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,175 +1,207 @@
/* Metro module 12131; source: modules/instant_invite/native/components/GroupDMInviteManagementScreen.tsx; dependencies: [5, 57, 31, 27, 8150, 8149, 661, 33, 4501, 4594, 507, 22, 697, 12132, 5460, 1305, 12146, 12147, 1244, 5282, 480, 5280, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import InviteRecord from '../../../../records/InviteRecord.tsx'; /* Metro dependency 8150 */
import InstantInvite from '../../../guild_instant_invites/native/InstantInvite.tsx'; /* Metro dependency 12132 */
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 AnalyticsUtilsModule from '../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as ChannelSettingsStoreModule from '../../../../stores/ChannelSettingsStore.tsx'; /* Metro dependency 8149 */
function _fun93130(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:6, offset: 0x020a82a2, size: 332 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
value2.Platform;
const env0_6 = value2.View;
const env0_7 = value2.FlatList;
const inviteRecord = importDefault(8150) /* metro dependency 8150: InviteRecord */;
require(8149) /* metro dependency 8149: ChannelSettingsStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_9 = constantsModule.ChannelSettingsSections;
const env0_10 = constantsModule.Endpoints;
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({list: {paddingTop: 8}});
let value = ReactModule;
ReactNativeModule.Platform;
ChannelSettingsStoreModule;
const env0_12 = (CreateStylesModule).createStyles({list: {paddingTop: 8}});
value = value.memo(_fun93146);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/GroupDMInviteManagementScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/GroupDMInviteManagementScreen.tsx');
exports.default = value;
}
function GroupDMInviteManagement({channelId}) { // fn#93131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:305, offset: 0x020a83ee, size: 590 bytes, params: 2, frame: 23
var r0;
var EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const styles = useStyles();
let binding = env0_5;
const [property, env0_2] = env0_4Binding(binding.useState([]), 2);
const [property2, env0_3] = env0_4Binding(env0_5.useState(true), 2);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
_fun93133()().catch(_fun93138);
});
var [property3, env0_4] = env0_4Binding(env0_5.useState(21), 2);
binding = env0_5;
const useMemo = binding.useMemo;
const items = [property];
const value8 = Reflect.apply(useMemo, binding, [_fun93139, items]);
env0_5.useEffect(_fun93141, []);
binding = env0_5;
let useCallback = binding.useCallback;
const value9 = Reflect.apply(useCallback, binding, [function(a0) {
return a0.code;
}, []]);
binding = env0_5;
useCallback = binding.useCallback;
if (property2) {
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
r0 = <SceneLoadingIndicator />;
} else if (property.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r0 = <EmptyState lightSource={importDefault(12146) /* metro dependency 12146 */} darkSource={importDefault(12147) /* metro dependency 12147 */} title={intl.string(t['+nLJkZ'])} body={intl.string(t.F53CAc)} />;
} else {
r0 = <FlatList style={styles.list} data={value8} keyExtractor={value9} renderItem={Reflect.apply(useCallback,
binding, [_fun93143, [property]])} initialNumToRender={10} windowSize={property3} />;
}
return r0;
}
function _fun93146({channelId, onClose}) { // fn#93146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1534, offset: 0x020a88cc, size: 123 bytes, params: 2, frame: 16
const value2 = env0_5.useMemo(function() {
return _fun93148(channelId, onClose);
}, [channelId, onClose]);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const INSTANT_INVITES_MANAGEMENT = ChannelSettingsSections.INSTANT_INVITES_MANAGEMENT;
return <Navigator screens={value2} initialRouteName={INSTANT_INVITES_MANAGEMENT} />;
}
function _fun93132() { // fn#93132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:452, offset: 0x020a863c, size: 39 bytes, params: 1, frame: 12
_fun93133()().catch(_fun93138);
}
function _fun93139() { // fn#93139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:841, offset: 0x020a8785, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.sortBy(env0_1, function({inviter}) {
return (inviter == null || inviter.username == null ? undefined : inviter.username.toLowerCase()) ?? '';
});
}
function _fun93141() { // fn#93141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:985, offset: 0x020a87f9, size: 19 bytes, params: 1, frame: 11
env0_4(21);
}
function _fun93143({item}) { // fn#93143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1055, offset: 0x020a880c, size: 120 bytes, params: 2, frame: 19
var environment;
const value = environment.__proto__;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
return (
<View style={{marginHorizontal: PX_12}}>
{((Component) => <Component invite={item} onInviteRevoked={onInviteRevoked} />)(importDefault(12132) /* metro dependency 12132: InstantInvite */)}
</View>
);
}
function _fun93147() { // fn#93147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1585, offset: 0x020a8947, size: 30 bytes, params: 1, frame: 13
return getScreens_93148(channelId, onClose);
}
function _fun93133() { // fn#93133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:463, offset: 0x020a8663, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun93135);
return _fun93137;
}
function onInviteRevoked(a0) { // fn#93144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1164, offset: 0x020a8884, size: 46 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return env1_2(env1_1.filter(_fun93145));
}
function getScreens_93148(a0, a1) { // fn#93148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1589, offset: 0x020a8965, size: 166 bytes, params: 3, frame: 18
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__;
const INSTANT_INVITES_MANAGEMENT = ChannelSettingsSections.INSTANT_INVITES_MANAGEMENT;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const OQ9MKu = (require(1244) /* metro dependency 1244: indexNative */).t.OQ9MKu;
object.title = Reflect.apply(string, intl, [OQ9MKu]);
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a1);
object.render = render_93149;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const GDM_SETTINGS_INVITES = ImpressionNames.GDM_SETTINGS_INVITES;
object.impressionName = GDM_SETTINGS_INVITES;
return {[INSTANT_INVITES_MANAGEMENT]: object};
}
function* _fun93135() { // fn#93135, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:483, offset: 0x020a8692, size: 151 bytes, params: 1, frame: 17
var environment;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var binding = env4_0;
var HTTP = binding(env4_2[10]).HTTP;
var get = HTTP.get;
binding = env4_10;
var INSTANT_INVITES = binding.INSTANT_INVITES;
value = environment.__proto__.__proto__.__proto__;
yield Reflect.apply(get, HTTP, [{'url': null, 'retries': 3, 'oldFormErrors': true, 'rejectWithError': true,
url: Reflect.apply(INSTANT_INVITES, binding, [require])}]);
var value3 = undefined;
if (false) {
return value3;
function GroupDMInviteManagement({channelId}) { // fn#93131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:305, offset: 0x020a83ee, size: 590 bytes, params: 2, frame: 23
var r0;
var EmptyState;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const styles = useStyles();
let binding = env0_5;
const [property, env0_2] = env0_4Binding(binding.useState([]), 2);
const [property2, env0_3] = env0_4Binding(env0_5.useState(true), 2);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
_fun93133()().catch(_fun93138);
});
var [property3, env0_4] = env0_4Binding(env0_5.useState(21), 2);
binding = env0_5;
const useMemo = binding.useMemo;
const items = [property];
const value8 = Reflect.apply(useMemo, binding, [_fun93139, items]);
env0_5.useEffect(_fun93141, []);
binding = env0_5;
let useCallback = binding.useCallback;
const value9 = Reflect.apply(useCallback, binding, [function(a0) {
return a0.code;
}, []]);
binding = env0_5;
useCallback = binding.useCallback;
if (property2) {
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
r0 = <SceneLoadingIndicator />;
} else if (property.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r0 = (
<EmptyState
lightSource={importDefault(12146) /* metro dependency 12146 */}
darkSource={importDefault(12147) /* metro dependency 12147 */}
title={intl.string(t['+nLJkZ'])}
body={intl.string(t.F53CAc)}
/>
);
} else {
r0 = (
<FlatList
style={styles.list}
data={value8}
keyExtractor={value9}
renderItem={Reflect.apply(useCallback, binding, [_fun93143, [property]])}
initialNumToRender={10}
windowSize={property3}
/>
);
}
dependencyMap(value3.body.map(_fun93136));
env3_3(false);
return r0;
function _fun93132() { // fn#93132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:452, offset: 0x020a863c, size: 39 bytes, params: 1, frame: 12
_fun93133()().catch(_fun93138);
function _fun93133() { // fn#93133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:463, offset: 0x020a8663, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun93135);
return _fun93137;
function* _fun93135() { // fn#93135, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:483, offset: 0x020a8692, size: 151 bytes, params: 1, frame: 17
var environment;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var binding = env4_0;
var HTTP = binding(env4_2[10]).HTTP;
var get = HTTP.get;
binding = env4_10;
var INSTANT_INVITES = binding.INSTANT_INVITES;
value = environment.__proto__.__proto__.__proto__;
yield Reflect.apply(get, HTTP, [{'url': null, 'retries': 3, 'oldFormErrors': true, 'rejectWithError': true,
url: Reflect.apply(INSTANT_INVITES, binding, [require])}]);
var value3 = undefined;
if (false) {
return value3;
}
dependencyMap(value3.body.map(_fun93136));
env3_3(false);
}
function _fun93136(a0) { // fn#93136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:611, offset: 0x020a8729, size: 92 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
const binding = env5_8;
const object = {};
copyDataProperties(object, a0, undefined);
object['maxUses'] = a0.max_uses;
object['maxAge'] = a0.max_age;
object['createdAt'] = a0.created_at;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding(object);
return binding2 instanceof Object ? binding2 : value;
}
}
function _fun93137() { // fn#93137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:710, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function _fun93138() { // fn#93138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:767, offset: 0x010c96cc, size: 18 bytes, params: 1, frame: 11
env1_3(false);
}
}
function _fun93139() { // fn#93139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:841, offset: 0x020a8785, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.sortBy(env0_1, function({inviter}) {
return (inviter == null || inviter.username == null ? undefined : inviter.username.toLowerCase()) ?? '';
});
}
function _fun93141() { // fn#93141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:985, offset: 0x020a87f9, size: 19 bytes, params: 1, frame: 11
env0_4(21);
}
function _fun93143({item}) { // fn#93143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1055, offset: 0x020a880c, size: 120 bytes, params: 2, frame: 19
var environment;
const value = environment.__proto__;
const PX_12 = (Native).space.PX_12;
return (
<View style={{marginHorizontal: PX_12}}>
{((Component) => <Component invite={item} onInviteRevoked={onInviteRevoked} />)(InstantInvite)}
</View>
);
function onInviteRevoked(a0) { // fn#93144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1164, offset: 0x020a8884, size: 46 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return env1_2(env1_1.filter(_fun93145));
function _fun93145({code}) { // fn#93145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1179, offset: 0x020a88b2, size: 26 bytes, params: 2, frame: 2
return code !== env0_0.code;
}
}
}
}
function _fun93146({channelId, onClose}) { // fn#93146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1534, offset: 0x020a88cc, size: 123 bytes, params: 2, frame: 16
const value2 = env0_5.useMemo(function() {
return _fun93148(channelId, onClose);
}, [channelId, onClose]);
const Navigator = (NavigatorNativeModule).Navigator;
const INSTANT_INVITES_MANAGEMENT = ChannelSettingsSections.INSTANT_INVITES_MANAGEMENT;
return <Navigator screens={value2} initialRouteName={INSTANT_INVITES_MANAGEMENT} />;
function _fun93147() { // fn#93147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1585, offset: 0x020a8947, size: 30 bytes, params: 1, frame: 13
return getScreens_93148(channelId, onClose);
function getScreens_93148(a0, a1) { // fn#93148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1589, offset: 0x020a8965, size: 166 bytes, params: 3, frame: 18
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__;
const INSTANT_INVITES_MANAGEMENT = ChannelSettingsSections.INSTANT_INVITES_MANAGEMENT;
const object2 = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const OQ9MKu = (IndexNativeModule).t.OQ9MKu;
object2.title = Reflect.apply(string, intl, [OQ9MKu]);
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a1);
object2.render = render_93149;
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const GDM_SETTINGS_INVITES = ImpressionNames.GDM_SETTINGS_INVITES;
object2.impressionName = GDM_SETTINGS_INVITES;
return {[INSTANT_INVITES_MANAGEMENT]: object2};
function getScreens_93148Render() { // fn#93149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1750, owner: getScreens_93148.render, offset: 0x020a8a0b, size: 34 bytes, params: 1, frame: 13
return <GroupDMInviteManagement channelId={env0_0} />;
}
}
}
}
}
function _fun93145({code}) { // fn#93145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1179, offset: 0x020a88b2, size: 26 bytes, params: 2, frame: 2
return code !== env0_0.code;
}
function getScreens_93148Render() { // fn#93149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1750, owner: getScreens_93148.render, offset: 0x020a8a0b, size: 34 bytes, params: 1, frame: 13
return <GroupDMInviteManagement channelId={env0_0} />;
}
function _fun93136(a0) { // fn#93136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:611, offset: 0x020a8729, size: 92 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
const binding = env5_8;
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['maxUses'] = a0.max_uses;
object2['maxAge'] = a0.max_age;
object2['createdAt'] = a0.created_at;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding(object2);
return binding2 instanceof Object ? binding2 : value;
}
global.__d(_fun93130, 12131, [5, 57, 31, 27, 8150, 8149, 661, 33, 4501, 4594, 507, 22, 697, 12132, 5460, 1305,
12146, 12147, 1244, 5282, 480, 5280,
2]) /* metro module 12131, dependencies: [5, 57, 31, 27, 8150, 8149, 661, 33, 4501, 4594, 507, 22, 697, 12132, 5460, 1305, 12146, 12147, 1244, 5282, 480, 5280, 2] */;
@@ -1,269 +1,335 @@
/* Metro module 9160; source: modules/instant_invite/native/components/InstantInviteActionSheet.tsx; dependencies: [57, 31, 27, 1384, 9152, 1867, 3784, 4118, 661, 33, 4501, 697, 9161, 1585, 6771, 6789, 6777, 566, 4098, 7147, 9151, 4080, 8743, 6927, 1314, 9162, 6275, 6758, 1244, 1305, 9165, 9169, 9171, 6984, 9164, 9205, 9206, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import StageInstanceStore from '../../../stage_channels/StageInstanceStore.tsx'; /* Metro dependency 1384 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import ShowUserProfileActionSheet from '../../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import CreateInviteModalStore from '../../../../stores/CreateInviteModalStore.tsx'; /* Metro dependency 9152 */
import UseInviteSuggestionRows from '../useInviteSuggestionRows.tsx'; /* Metro dependency 9162 */
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 FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as Preloaded_user_settingsModule from '../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/preloaded_user_settings.tsx'; /* Metro dependency 1314 */
import * as ConstantsModule2 from '../../Constants.tsx'; /* Metro dependency 4118 */
import * as BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as UseAnalyticsLocationsModule from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
function _fun71823(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:6, offset: 0x01d2e082, size: 714 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.ScrollView;
const stageInstanceStore = importDefault(1384) /* metro dependency 1384: StageInstanceStore */;
const createInviteModalStore = importDefault(9152) /* metro dependency 9152: CreateInviteModalStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_11 = (require(4118) /* metro dependency 4118: Constants */).InviteTargetTypes;
const env0_12 = (require(661) /* metro dependency 661: Constants */).Permissions;
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.Fragment;
const env0_15 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object7 = {'height': 16, 'width': '80%', 'margin': 16, 'marginBottom': 8};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object = {};
const object2 = {'height': 16, 'width': '80%', 'margin': 16, 'marginBottom': 8};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
let BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object7.backgroundColor = BACKGROUND_MOD_MUTED;
object4.placeholderHeader = object7;
const object8 = {'height': 16, 'width': '40%', 'margin': 16};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.backgroundColor = BACKGROUND_MOD_MUTED;
object.placeholderHeader = object2;
const object3 = {'height': 16, 'width': '40%', 'margin': 16};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object8.backgroundColor = BACKGROUND_MOD_MUTED;
object4.placeholderLabel = object8;
object4.errorEmptyState = {backgroundColor: 'transparent'};
const object9 = {borderTopWidth: 1};
object3.backgroundColor = BACKGROUND_MOD_MUTED;
object.placeholderLabel = object3;
object.errorEmptyState = {backgroundColor: 'transparent'};
const object5 = {borderTopWidth: 1};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object9.borderColor = BORDER_SUBTLE;
object5.borderColor = BORDER_SUBTLE;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object9.marginTop = PX_8;
object5.marginTop = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object9.paddingVertical = PX_8;
object5.paddingVertical = PX_8;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object9.paddingHorizontal = PX_12;
object9.flexDirection = 'column';
object5.paddingHorizontal = PX_12;
object5.flexDirection = 'column';
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object9.gap = PX_12;
object4.searchAndShareContainer = object9;
const object10 = {};
object5.gap = PX_12;
object.searchAndShareContainer = object5;
const object6 = {};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.paddingBottom = PX_8;
object6.paddingBottom = PX_8;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object10.paddingHorizontal = PX_4;
object4.inviteAgeText = object10;
object4.shareApps = {paddingVertical: 0};
const env0_16 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteActionSheet.tsx');
object6.paddingHorizontal = PX_4;
object.inviteAgeText = object6;
object.shareApps = {paddingVertical: 0};
const env0_16 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteActionSheet.tsx');
exports.default = InstantInviteActionSheet;
}
function Loading() { // fn#71824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:1014, offset: 0x01d2e34c, size: 167 bytes, params: 1, frame: 22
var push;
var jsxRuntimeEnv0_13Binding;
var UserPlaceholderRow;
var value3;
const styles = useStyles();
const items2 = [];
let r2 = 0;
reducibleLoop1: while (true) {
push = items2.push;
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
UserPlaceholderRow = importDefault(9161) /* metro dependency 9161: UserPlaceholderRow */;
Reflect.apply(push, items2, [<UserPlaceholderRow row={r2} key={r2} />]);
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value3 < 10) {
r2 = value3;
continue reducibleLoop1;
function Loading() { // fn#71824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:1014, offset: 0x01d2e34c, size: 167 bytes, params: 1, frame: 22
var push;
var jsxRuntimeEnv0_13Binding;
var UserPlaceholderRow;
var value3;
const styles = useStyles();
const items2 = [];
let r2 = 0;
reducibleLoop1: while (true) {
push = items2.push;
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
UserPlaceholderRow = importDefault(9161) /* metro dependency 9161: UserPlaceholderRow */;
Reflect.apply(push, items2, [<UserPlaceholderRow row={r2} key={r2} />]);
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value3 < 10) {
r2 = value3;
continue reducibleLoop1;
}
break reducibleLoop1;
}
break reducibleLoop1;
return (
<>
<View style={styles.placeholderHeader} />
<View style={styles.placeholderLabel} />
{items2}
</>
);
}
return (
<>
<View style={styles.placeholderHeader} />
<View style={styles.placeholderLabel} />
{items2}
</>
);
}
function InstantInviteActionSheet({channel, source, vanityURLCode, guildScheduledEventId, targetApplicationId, code}) { // fn#71825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:1194, offset: 0x01d2e3f3, size: 1815 bytes, params: 2, frame: 55
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var jsxRuntimeEnv0_14Binding;
var items3;
var SearchField;
var items2;
const env0_4 = code;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const INSTANT_INVITE_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INSTANT_INVITE_MODAL;
const analyticsLocations = defaultImport(INSTANT_INVITE_MODAL).analyticsLocations;
const property = guildScheduledEventId((importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(targetApplicationId != null ? [targetApplicationId] : []),
1)[0];
const invite_code = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore,
CreateInviteModalStore, StageInstanceStore], _fun71826);
const error = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.getError();
});
const r20 = invite_code != null ? (importDefault(7147) /* metro dependency 7147: getInviteURL */)(invite_code) : null;
let r7 = r20 != null ? (require(9151) /* metro dependency 9151: InstantInviteUtils */).getShareMessage(r20) : '';
const EMBEDDED_APPLICATION = targetApplicationId != null ? InviteTargetTypes.EMBEDDED_APPLICATION : null;
let binding = env0_4;
const value9 = binding.useCallback(_fun71828, [channel, analyticsLocations]);
const value10 = binding.useCallback(_fun71829, [channel, invite_code, r7, source]);
const value11 = binding.useCallback(_fun71830, [channel]);
const value12 = binding.useCallback(_fun71831, [invite_code, channel, source]);
const value13 = binding.useCallback(_fun71832, [invite_code, channel, r7, source]);
const value14 = binding.useCallback(_fun71833, [channel]);
const {rows, isFetchingRows} = (importDefault(9162) /* metro dependency 9162: useInviteSuggestionRows */)(channel,
source, EMBEDDED_APPLICATION, targetApplicationId);
const r9 = invite_code == null || rows.length === 0 && isFetchingRows;
binding = env0_4;
const useState = binding.useState;
const property2 = guildScheduledEventId(Reflect.apply(useState, binding,
[invite_code != null && rows.length === 0 && !isFetchingRows]), 1)[0];
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object = {'showGradient': null, 'scrollable': true, 'startExpanded': true};
let r10 = error != null || !r9;
r10 = !r10 ? !property2 : r10;
object.showGradient = r10;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object.header = <BottomSheetTitleHeader title={targetApplicationId != null ? property != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ZdK3dW,
{applicationName: property.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['OzOM/q']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['f1+QIK'])} />;
if (error != null) {
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r7 = <EmptyState style={styles.errorEmptyState} Illustration={(require(9165) /* metro dependency 9165: AppCrash */).AppCrash} title={error} />;
} else if (r9) {
r7 = <Loading />;
} else if (property2) {
r7 = <ScrollView contentContainerStyle={{paddingBottom: bottom + 16}}>{((Component) => <Component link={r20} onCopy={value12} onShare={value13} onPressSettings={value14} />)(importDefault(9169) /* metro dependency 9169: InstantInviteEmptyState */)}</ScrollView>;
} else {
jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
items3 = [((Component) => <Component contentContainerStyle={styles.shareApps} onItemPressed={value10} />)(importDefault(9171) /* metro dependency 9171: InstantInviteShareApps */)];
var viewBinding2Props = {style: styles.searchAndShareContainer};
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
items2 = [<SearchField size="md" isRound onChange={(require(9164) /* metro dependency 9164: InviteSuggestionsActionCreators */).searchInviteSuggestions} placeholder={targetApplicationId != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iI1gMg) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['1UgGdm'],
{groupname: GuildStore.getGuild(channel.guild_id)?.name})} />];
items2[1] = !(vanityURLCode != null) && ((Component) => <Component style={styles.inviteAgeText} channel={channel} canEditInvite={code == null} />)(importDefault(9205) /* metro dependency 9205: InstantInviteAgeText */);
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
r7 = <><View>{items3}</View>{((Component) => <Component data={rows} code={invite_code} source={source ?? undefined} onPressAvatar={value9} onInviteSent={value11} />)(importDefault(9206) /* metro dependency 9206: InstantInviteFriendsList */)}</>;
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<BottomSheet {...object}>
{r7}
</BottomSheet>
</AnalyticsLocationProvider>
);
}
function _fun71826() { // fn#71826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:1494, offset: 0x01d2eb0a, size: 306 bytes, params: 1, frame: 18
var r1;
var value2;
var value3;
var value5;
var invite;
if (code != null) {
return code;
}
const channelBinding = channel;
if (channelBinding.isGuildStageVoice()) {
value2 = environment.__proto__;
if (PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel)) {
function InstantInviteActionSheet({channel, source, vanityURLCode, guildScheduledEventId, targetApplicationId, code}) { // fn#71825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:1194, offset: 0x01d2e3f3, size: 1815 bytes, params: 2, frame: 55
var r35;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var jsxRuntimeEnv0_14Binding;
var items3;
var SearchField;
var guildStoreBinding;
var items2;
const code2 = code;
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const defaultImport = UseAnalyticsLocations;
const INSTANT_INVITE_MODAL = (AnalyticsLocation).INSTANT_INVITE_MODAL;
const analyticsLocations = defaultImport(INSTANT_INVITE_MODAL).analyticsLocations;
let property = guildScheduledEventId((importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(targetApplicationId != null ? [targetApplicationId] : []),
1)[0];
const useStateFromStores = FluxModule.useStateFromStores;
const createInviteModalStoreBinding = CreateInviteModalStore;
const invite_code = Reflect.apply(useStateFromStores, FluxModule, [[PermissionStore, createInviteModalStoreBinding,
StageInstanceStore], _fun71826]);
const error = FluxModule.useStateFromStores([createInviteModalStoreBinding], function() {
return CreateInviteModalStore.getError();
});
const r20 = invite_code != null ? (importDefault(7147) /* metro dependency 7147: getInviteURL */)(invite_code) : null;
let r7 = r20 != null ? (require(9151) /* metro dependency 9151: InstantInviteUtils */).getShareMessage(r20) : '';
const EMBEDDED_APPLICATION = targetApplicationId != null ? InviteTargetTypes.EMBEDDED_APPLICATION : null;
let binding = code2;
const value9 = binding.useCallback(_fun71828, [channel, analyticsLocations]);
const value10 = binding.useCallback(_fun71829, [channel, invite_code, r7, source]);
const value11 = binding.useCallback(_fun71830, [channel]);
const value12 = binding.useCallback(_fun71831, [invite_code, channel, source]);
const value13 = binding.useCallback(_fun71832, [invite_code, channel, r7, source]);
const value14 = binding.useCallback(_fun71833, [channel]);
const {rows, isFetchingRows} = (UseInviteSuggestionRows)(channel,
source, EMBEDDED_APPLICATION, targetApplicationId);
const r9 = invite_code == null || rows.length === 0 && isFetchingRows;
binding = code2;
const useState = binding.useState;
const property2 = guildScheduledEventId(Reflect.apply(useState, binding,
[invite_code != null && rows.length === 0 && !isFetchingRows]), 1)[0];
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object2 = {'showGradient': null, 'scrollable': true, 'startExpanded': true};
let r10 = error != null || !r9;
r10 = !r10 ? !property2 : r10;
object2.showGradient = r10;
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
object2.header = (
<BottomSheetTitleHeader
title={targetApplicationId != null ? property != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ZdK3dW,
{applicationName: property.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['OzOM/q']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['f1+QIK'])}
/>
);
if (error != null) {
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r7 = (
<EmptyState
style={styles.errorEmptyState}
Illustration={(require(9165) /* metro dependency 9165: AppCrash */).AppCrash}
title={error}
/>
);
} else if (r9) {
r7 = <Loading />;
} else if (property2) {
r7 = (
<ScrollView contentContainerStyle={{paddingBottom: bottom + 16}}>
{((Component) => <Component link={r20} onCopy={value12} onShare={value13} onPressSettings={value14} />)(importDefault(9169) /* metro dependency 9169: InstantInviteEmptyState */)}
</ScrollView>
);
} else {
jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
items3 = [
((Component) => <Component contentContainerStyle={styles.shareApps} onItemPressed={value10} />)(importDefault(9171) /* metro dependency 9171: InstantInviteShareApps */),
];
var viewBinding2Props = {style: styles.searchAndShareContainer};
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
var searchFieldProps = {'size': 'md', 'isRound': true,
onChange: (require(9164) /* metro dependency 9164: InviteSuggestionsActionCreators */).searchInviteSuggestions};
if (targetApplicationId != null) {
r35 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iI1gMg);
} else {
formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['1UgGdm'];
guildStoreBinding = GuildStore;
r35 = Reflect.apply(formatToPlainString, intl, [property,
{groupname: guildStoreBinding.getGuild(channel.guild_id)?.name}]);
}
searchFieldProps.placeholder = r35;
items2 = [
<SearchField {...searchFieldProps} />,
];
items2[1] = !(vanityURLCode != null) && ((Component) => <Component style={styles.inviteAgeText} channel={channel} canEditInvite={code == null} />)(importDefault(9205) /* metro dependency 9205: InstantInviteAgeText */);
items3[1] = (
<View {...viewBinding2Props}>
{items2}
</View>
);
r7 = (
<>
<View>
{items3}
</View>
{((Component) => <Component data={rows} code={invite_code} source={source ?? undefined} onPressAvatar={value9} onInviteSent={value11} />)(importDefault(9206) /* metro dependency 9206: InstantInviteFriendsList */)}
</>
);
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<BottomSheet {...object2}>
{r7}
</BottomSheet>
</AnalyticsLocationProvider>
);
function _fun71826() { // fn#71826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:1494, offset: 0x01d2eb0a, size: 306 bytes, params: 1, frame: 18
var r1;
var value2;
var permissionStoreBinding;
var stageInstanceStoreBinding;
var value3;
var value5;
var invite;
if (code != null) {
return code;
}
const channelBinding = channel;
if (channelBinding.isGuildStageVoice()) {
value2 = environment.__proto__;
permissionStoreBinding = PermissionStore;
if (permissionStoreBinding.can(Permissions.CREATE_INSTANT_INVITE, channel)) {
if (vanityURLCode != null) {
return guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: vanityURLCode,
guildScheduledEventId: guildScheduledEventId}) : vanityURLCode;
}
value5 = environment.__proto__;
invite = CreateInviteModalStore.getInvite();
return invite != null ? guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: guildScheduledEventId}) : invite.code : undefined;
}
stageInstanceStoreBinding = StageInstanceStore;
value3 = stageInstanceStoreBinding.getStageInstanceByChannel(channel.id);
if (value3?.invite_code == null) {
if (vanityURLCode != null) {
return guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: vanityURLCode,
guildScheduledEventId: guildScheduledEventId}) : vanityURLCode;
}
value5 = environment.__proto__;
invite = CreateInviteModalStore.getInvite();
return invite != null ? guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: guildScheduledEventId}) : invite.code : undefined;
}
return value3.invite_code;
}
if (vanityURLCode != null) {
return guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: vanityURLCode,
r1 = guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: vanityURLCode,
guildScheduledEventId: guildScheduledEventId}) : vanityURLCode;
} else {
invite = CreateInviteModalStore.getInvite();
r1 = invite != null ? guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: guildScheduledEventId}) : invite.code : undefined;
}
value5 = environment.__proto__;
invite = CreateInviteModalStore.getInvite();
return invite != null ? guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: guildScheduledEventId}) : invite.code : undefined;
return r1;
}
value3 = StageInstanceStore.getStageInstanceByChannel(channel.id);
if (value3?.invite_code == null) {
if (vanityURLCode != null) {
return guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: vanityURLCode,
guildScheduledEventId: guildScheduledEventId}) : vanityURLCode;
function _fun71828(a0) { // fn#71828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2108, offset: 0x01d2ec4f, size: 88 bytes, params: 2, frame: 13
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
(ShowUserProfileActionSheet)({userId: a0, channelId: channel.id,
sourceAnalyticsLocations: analyticsLocations});
}
function _fun71829(a0) { // fn#71829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2230, offset: 0x01d2eca7, size: 130 bytes, params: 2, frame: 16
var channelBinding;
var value;
if (invite_code != null) {
channelBinding = channel;
a0({channel: channelBinding, code: invite_code, message: env0_7, location: source});
value = environment.__proto__;
value = require(6927) /* metro dependency 6927: HubProgressActionCreators */;
value.setHubProgressActionComplete(channelBinding.getGuildId(),
(require(1314) /* metro dependency 1314: preloaded_user_settings */).HubProgressStep.INVITE_USER);
}
value5 = environment.__proto__;
invite = CreateInviteModalStore.getInvite();
return invite != null ? guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: guildScheduledEventId}) : invite.code : undefined;
}
return value3.invite_code;
function _fun71830() { // fn#71830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2409, offset: 0x01d2ed29, size: 80 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(6927) /* metro dependency 6927: HubProgressActionCreators */;
const setHubProgressActionComplete = value.setHubProgressActionComplete;
const guildId = channel.getGuildId();
const HubProgressStep = (Preloaded_user_settingsModule).HubProgressStep;
const INVITE_USER = HubProgressStep.INVITE_USER;
Reflect.apply(setHubProgressActionComplete, value, [guildId, INVITE_USER]);
}
function _fun71831() { // fn#71831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2529, offset: 0x01d2ed79, size: 55 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
return value.handleCopy(invite_code, channel, source);
}
function _fun71832() { // fn#71832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2587, offset: 0x01d2edb0, size: 59 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
return value.handleOpenShareSheet(invite_code, channel, env0_7, source);
}
function _fun71833() { // fn#71833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2659, offset: 0x01d2edeb, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
return value.handlePressSettings(channel);
}
}
if (vanityURLCode != null) {
r1 = guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: vanityURLCode,
guildScheduledEventId: guildScheduledEventId}) : vanityURLCode;
} else {
invite = CreateInviteModalStore.getInvite();
r1 = invite != null ? guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: guildScheduledEventId}) : invite.code : undefined;
}
return r1;
}
function _fun71828(a0) { // fn#71828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2108, offset: 0x01d2ec4f, size: 88 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0, channelId: channel.id,
sourceAnalyticsLocations: analyticsLocations});
}
function _fun71829(a0) { // fn#71829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2230, offset: 0x01d2eca7, size: 130 bytes, params: 2, frame: 16
var channelBinding;
var value;
if (invite_code != null) {
channelBinding = channel;
a0({channel: channelBinding, code: invite_code, message: env0_7, location: source});
value = environment.__proto__;
value = require(6927) /* metro dependency 6927: HubProgressActionCreators */;
value.setHubProgressActionComplete(channelBinding.getGuildId(),
(require(1314) /* metro dependency 1314: preloaded_user_settings */).HubProgressStep.INVITE_USER);
}
}
function _fun71830() { // fn#71830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2409, offset: 0x01d2ed29, size: 80 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(6927) /* metro dependency 6927: HubProgressActionCreators */;
const setHubProgressActionComplete = value.setHubProgressActionComplete;
const guildId = channel.getGuildId();
const HubProgressStep = (require(1314) /* metro dependency 1314: preloaded_user_settings */).HubProgressStep;
const INVITE_USER = HubProgressStep.INVITE_USER;
Reflect.apply(setHubProgressActionComplete, value, [guildId, INVITE_USER]);
}
function _fun71831() { // fn#71831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2529, offset: 0x01d2ed79, size: 55 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
return value.handleCopy(invite_code, channel, source);
}
function _fun71832() { // fn#71832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2587, offset: 0x01d2edb0, size: 59 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
return value.handleOpenShareSheet(invite_code, channel, env0_7, source);
}
function _fun71833() { // fn#71833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2659, offset: 0x01d2edeb, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
return value.handlePressSettings(channel);
}
global.__d(_fun71823, 9160, [57, 31, 27, 1384, 9152, 1867, 3784, 4118, 661, 33, 4501, 697, 9161, 1585, 6771, 6789,
6777, 566, 4098, 7147, 9151, 4080, 8743, 6927, 1314, 9162, 6275, 6758, 1244, 1305, 9165, 9169, 9171, 6984, 9164,
9205, 9206,
2]) /* metro module 9160, dependencies: [57, 31, 27, 1384, 9152, 1867, 3784, 4118, 661, 33, 4501, 697, 9161, 1585, 6771, 6789, 6777, 566, 4098, 7147, 9151, 4080, 8743, 6927, 1314, 9162, 6275, 6758, 1244, 1305, 9165, 9169, 9171, 6984, 9164, 9205, 9206, 2] */;
@@ -1,65 +1,91 @@
/* Metro module 9205; source: modules/instant_invite/native/components/InstantInviteAgeText.tsx; dependencies: [31, 27, 9152, 33, 4501, 566, 4573, 9153, 5278, 9151, 1244, 2] */
import CreateInviteModalStore from '../../../../stores/CreateInviteModalStore.tsx'; /* Metro dependency 9152 */
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 CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun72033(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9390:6, offset: 0x01d3706c, size: 227 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const createInviteModalStore = importDefault(9152) /* metro dependency 9152: CreateInviteModalStore */;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsxs;
const env0_5 = value.jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({inviteAgeContainer: {'flexDirection': 'row',
ReactModule;
const env0_6 = (CreateStylesModule).createStyles({inviteAgeContainer: {'flexDirection': 'row',
'alignItems': 'center', 'flexWrap': 'wrap'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteAgeText.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteAgeText.tsx');
exports.default = _default_72034;
}
function _default_72034({style, channel, callbackActionSheet, canEditInvite, onEdit, source}) { // fn#72034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9390:268, offset: 0x01d3714f, size: 511 bytes, params: 2, frame: 26
var r6;
var r0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var moduleValue2;
var items3;
var PressableOpacity;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
canEditInvite = canEditInvite === undefined || canEditInvite;
const styles = useStyles();
const inviteSettings = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.getInviteSettings();
});
if (inviteSettings == null) {
r0 = null;
} else {
var viewBindingProps = {style: [styles.inviteAgeContainer, style]};
moduleValue2 = require(9153) /* metro dependency 9153: InstantInviteUtils */;
items3 = [<Text variant="text-xs/normal">{moduleValue2.maxAgeString(inviteSettings.maxAge,
inviteSettings.maxUses)}{' '}</Text>];
if (canEditInvite) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
r6 = <PressableOpacity onPress={onPress_72036} accessibilityRole="link" accessibilityLabel={intl.string(t['VNe8P/'])} hitSlop={{'top': 8,
'left': 8, 'bottom': 8,
'right': 8}}><Text variant="text-xs/normal" color="text-link">{intl.string(t['VNe8P/'])}</Text></PressableOpacity>;
function _default_72034({style, channel, callbackActionSheet, canEditInvite, onEdit, source}) { // fn#72034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9390:268, offset: 0x01d3714f, size: 511 bytes, params: 2, frame: 26
var r6;
var r0;
const Text = (TextModule).Text;
var moduleValue2;
var items3;
var PressableOpacity;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
canEditInvite = canEditInvite === undefined || canEditInvite;
const styles = useStyles();
const inviteSettings = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.getInviteSettings();
});
if (inviteSettings == null) {
r0 = null;
} else {
r6 = canEditInvite;
var viewBindingProps = {style: [styles.inviteAgeContainer, style]};
moduleValue2 = require(9153) /* metro dependency 9153: InstantInviteUtils */;
items3 = [
<Text variant="text-xs/normal">
{moduleValue2.maxAgeString(inviteSettings.maxAge, inviteSettings.maxUses)}
{' '}
</Text>,
];
if (canEditInvite) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
r6 = (
<PressableOpacity
onPress={onPress_72036}
accessibilityRole="link"
accessibilityLabel={intl.string(t['VNe8P/'])}
hitSlop={{
'top': 8,
'left': 8,
'bottom': 8,
'right': 8,
}}
>
<Text variant="text-xs/normal" color="text-link">
{intl.string(t['VNe8P/'])}
</Text>
</PressableOpacity>
);
} else {
r6 = canEditInvite;
}
items3[1] = r6;
r0 = (
<View {...viewBindingProps}>
{items3}
</View>
);
}
return r0;
function _default_72034OnPress() { // fn#72036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9390:627, owner: _default_72034.onPress, offset: 0x01d37361, size: 73 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
value.handlePressSettings(channel, callbackActionSheet, source);
if (onEdit != null) {
onEdit();
}
}
items3[1] = r6;
r0 = <View {...viewBindingProps}>{items3}</View>;
}
return r0;
}
function _default_72034OnPress() { // fn#72036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9390:627, owner: _default_72034.onPress, offset: 0x01d37361, size: 73 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
value.handlePressSettings(channel, callbackActionSheet, source);
if (onEdit != null) {
onEdit();
}
}
global.__d(_fun72033, 9205, [31, 27, 9152, 33, 4501, 566, 4573, 9153, 5278, 9151, 1244,
2]) /* metro module 9205, dependencies: [31, 27, 9152, 33, 4501, 566, 4573, 9153, 5278, 9151, 1244, 2] */;
@@ -1,337 +1,325 @@
/* Metro module 9172; source: modules/instant_invite/native/components/InstantInviteConstants.tsx; dependencies: [27, 9157, 661, 9173, 9176, 697, 1244, 9151, 9177, 4057, 9178, 1581, 9179, 4080, 9180, 1962, 7147, 477, 9194, 9195, 4486, 7067, 4496, 9196, 9197, 9198, 9199, 9200, 9201, 9202, 9203, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GetInviteURL from '../../getInviteURL.tsx'; /* Metro dependency 7147 */
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 PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as MetaQuestUtilsAndroidModule from '../../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
import * as DCDSendUtilsModule from '../DCDSendUtils.tsx'; /* Metro dependency 4486 */
import * as InstantInviteUtilsModule from '../InstantInviteUtils.tsx'; /* Metro dependency 9151 */
import * as InstantInviteConstantsModule from '../InstantInviteConstants.tsx'; /* Metro dependency 9157 */
function _fun71902(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:6, offset: 0x01d30e5a, size: 1525 bytes, params: 8, frame: 31
var object13;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = (require(27) /* metro dependency 27 */).Linking;
const instantInviteConstantsModule = require(9157) /* metro dependency 9157: InstantInviteConstants */;
const SHARE_APPS_KEY = instantInviteConstantsModule.SHARE_APPS_KEY;
const env0_5 = instantInviteConstantsModule.SHARE_URLS;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.InviteOptionsType;
const env0_7 = constantsModule.SendTypes;
object13 = {SHARE: 0};
object13[0] = 'SHARE';
object13.COPY = 1;
object13[1] = 'COPY';
object13.QR_CODE = 2;
object13[2] = 'QR_CODE';
object13.MESSAGES = 3;
object13[3] = 'MESSAGES';
object13.MAIL = 4;
object13[4] = 'MAIL';
object13.FB_MESSENGER = 5;
object13[5] = 'FB_MESSENGER';
object13.GMAIL = 6;
object13[6] = 'GMAIL';
object13.TELEGRAM = 7;
object13[7] = 'TELEGRAM';
object13.TWITTER = 8;
object13[8] = 'TWITTER';
object13.WHATSAPP = 9;
object13[9] = 'WHATSAPP';
object13.LINE = 10;
object13[10] = 'LINE';
const object14 = {};
const SHARE = object13.SHARE;
object14.type = SHARE;
object14.icon = importDefault(9173) /* metro dependency 9173: Share */;
const SHARE_APPS_KEY = InstantInviteConstantsModule.SHARE_APPS_KEY;
object = {SHARE: 0};
object[0] = 'SHARE';
object.COPY = 1;
object[1] = 'COPY';
object.QR_CODE = 2;
object[2] = 'QR_CODE';
object.MESSAGES = 3;
object[3] = 'MESSAGES';
object.MAIL = 4;
object[4] = 'MAIL';
object.FB_MESSENGER = 5;
object[5] = 'FB_MESSENGER';
object.GMAIL = 6;
object[6] = 'GMAIL';
object.TELEGRAM = 7;
object[7] = 'TELEGRAM';
object.TWITTER = 8;
object[8] = 'TWITTER';
object.WHATSAPP = 9;
object[9] = 'WHATSAPP';
object.LINE = 10;
object[10] = 'LINE';
const object2 = {};
const SHARE = object.SHARE;
object2.type = SHARE;
object2.icon = importDefault(9173) /* metro dependency 9173: Share */;
let Promise = global.Promise;
let resolve = Promise.resolve;
object14.isAvailable = Reflect.apply(resolve, Promise, [true]);
object14.IconComponent = importDefault(9176) /* metro dependency 9176 */;
const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
object14.backgroundColor = BRAND_500;
object14.getLabel = function() {
object2.isAvailable = Reflect.apply(resolve, Promise, [true]);
object2.IconComponent = importDefault(9176) /* metro dependency 9176 */;
const BRAND_500 = (Native).unsafe_rawColors.BRAND_500;
object2.backgroundColor = BRAND_500;
object2.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.wPadMa);
};
object14.onPress = onPress_71904;
const items3 = [object14];
const object15 = {};
const COPY = object13.COPY;
object15.type = COPY;
object15.icon = importDefault(9177) /* metro dependency 9177 */;
object2.onPress = onPress_71904;
const items3 = [object2];
const object3 = {};
const COPY = object.COPY;
object3.type = COPY;
object3.icon = importDefault(9177) /* metro dependency 9177 */;
Promise = global.Promise;
object15.isAvailable = Promise.resolve(true);
object15.IconComponent = importDefault(4057) /* metro dependency 4057 */;
object15.getLabel = function() {
object3.isAvailable = Promise.resolve(true);
object3.IconComponent = importDefault(4057) /* metro dependency 4057 */;
object3.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.WqhZss);
};
object15.onPress = onPress_71906;
items3[1] = object15;
const object16 = {};
const QR_CODE = object13.QR_CODE;
object16.type = QR_CODE;
object16.icon = importDefault(9178) /* metro dependency 9178 */;
object3.onPress = onPress_71906;
items3[1] = object3;
const object4 = {};
const QR_CODE = object.QR_CODE;
object4.type = QR_CODE;
object4.icon = importDefault(9178) /* metro dependency 9178 */;
Promise = global.Promise;
resolve = Promise.resolve;
const metaQuestUtilsAndroidModule = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
object16.isAvailable = Reflect.apply(resolve, Promise, [!metaQuestUtilsAndroidModule.isMetaQuest()]);
object16.IconComponent = importDefault(9179) /* metro dependency 9179 */;
object16.getLabel = function() {
object4.isAvailable = Reflect.apply(resolve, Promise, [!MetaQuestUtilsAndroidModule.isMetaQuest()]);
object4.IconComponent = importDefault(9179) /* metro dependency 9179 */;
object4.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.rriLm1);
};
object16.onPress = onPress_71908;
items3[2] = object16;
const object17 = {};
const MESSAGES = object13.MESSAGES;
object17.type = MESSAGES;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object17.fullIcon = platformUtilsModule.isIOS() ? importDefault(9194) /* metro dependency 9194 */ : value;
const value7 = platformUtilsModule;
object17.icon = value7.isAndroid() ? importDefault(9195) /* metro dependency 9195 */ : value;
object17.isAvailable = (require(4486) /* metro dependency 4486: DCDSendUtils */).canSendSMS();
object17.getLabel = function() {
object4.onPress = onPress_71908;
items3[2] = object4;
const object5 = {};
const MESSAGES = object.MESSAGES;
object5.type = MESSAGES;
object5.fullIcon = PlatformUtilsModule.isIOS() ? importDefault(9194) /* metro dependency 9194 */ : value;
object5.icon = PlatformUtilsModule.isAndroid() ? importDefault(9195) /* metro dependency 9195 */ : value;
object5.isAvailable = (require(4486) /* metro dependency 4486: DCDSendUtils */).canSendSMS();
object5.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.AQKfCj);
};
object17.onPress = onPress_71910;
items3[3] = object17;
const object18 = {};
const MAIL = object13.MAIL;
object18.type = MAIL;
const value10 = platformUtilsModule;
object18.fullIcon = value10.isIOS() ? importDefault(9196) /* metro dependency 9196 */ : value;
const value12 = platformUtilsModule;
object18.icon = value12.isAndroid() ? importDefault(9197) /* metro dependency 9197 */ : value;
object18.isAvailable = (require(4486) /* metro dependency 4486: DCDSendUtils */).canSendMail();
object18.getLabel = function() {
object5.onPress = onPress_71910;
items3[3] = object5;
const object6 = {};
const MAIL = object.MAIL;
object6.type = MAIL;
object6.fullIcon = PlatformUtilsModule.isIOS() ? importDefault(9196) /* metro dependency 9196 */ : value;
object6.icon = PlatformUtilsModule.isAndroid() ? importDefault(9197) /* metro dependency 9197 */ : value;
object6.isAvailable = (require(4486) /* metro dependency 4486: DCDSendUtils */).canSendMail();
object6.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.QaAypP);
};
object18.onPress = onPress_71913;
items3[4] = object18;
const object19 = {};
const FB_MESSENGER = object13.FB_MESSENGER;
object19.type = FB_MESSENGER;
object19.fullIcon = importDefault(9198) /* metro dependency 9198 */;
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
let isAppInstalled = instantInviteUtilsModule.isAppInstalled;
object6.onPress = onPress_71913;
items3[4] = object6;
const object7 = {};
const FB_MESSENGER = object.FB_MESSENGER;
object7.type = FB_MESSENGER;
object7.fullIcon = importDefault(9198) /* metro dependency 9198 */;
let isAppInstalled = InstantInviteUtilsModule.isAppInstalled;
const MESSENGER = SHARE_APPS_KEY.MESSENGER;
object19.isAvailable = Reflect.apply(isAppInstalled, instantInviteUtilsModule, [MESSENGER]);
object19.getLabel = function() {
object7.isAvailable = Reflect.apply(isAppInstalled, InstantInviteUtilsModule, [MESSENGER]);
object7.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.P0R3ZF);
};
object19.onPress = onPress_71916;
items3[5] = object19;
const object20 = {};
let GMAIL = object13.GMAIL;
object20.type = GMAIL;
object20.fullIcon = importDefault(9199) /* metro dependency 9199 */;
const value16 = instantInviteUtilsModule;
isAppInstalled = value16.isAppInstalled;
object7.onPress = onPress_71916;
items3[5] = object7;
const object8 = {};
let GMAIL = object.GMAIL;
object8.type = GMAIL;
object8.fullIcon = importDefault(9199) /* metro dependency 9199 */;
isAppInstalled = InstantInviteUtilsModule.isAppInstalled;
GMAIL = SHARE_APPS_KEY.GMAIL;
object20.isAvailable = Reflect.apply(isAppInstalled, value16, [GMAIL]);
object20.getLabel = function() {
object8.isAvailable = Reflect.apply(isAppInstalled, InstantInviteUtilsModule, [GMAIL]);
object8.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['14o9ZT']);
};
object20.onPress = function({channel, code, message, location}) {
object8.onPress = function({channel, code, message, location}) {
require(dependencyMap[7]).trackOptionClicked(code, channel, InviteOptionsType.GMAIL, location);
Linking.openURL(SHARE_URLS[SHARE_APPS_KEY.GMAIL]('', message));
};
items3[6] = object20;
const object21 = {};
let TELEGRAM = object13.TELEGRAM;
object21.type = TELEGRAM;
object21.fullIcon = importDefault(9200) /* metro dependency 9200 */;
const value17 = instantInviteUtilsModule;
isAppInstalled = value17.isAppInstalled;
items3[6] = object8;
const object9 = {};
let TELEGRAM = object.TELEGRAM;
object9.type = TELEGRAM;
object9.fullIcon = importDefault(9200) /* metro dependency 9200 */;
isAppInstalled = InstantInviteUtilsModule.isAppInstalled;
TELEGRAM = SHARE_APPS_KEY.TELEGRAM;
object21.isAvailable = Reflect.apply(isAppInstalled, value17, [TELEGRAM]);
object21.getLabel = function() {
object9.isAvailable = Reflect.apply(isAppInstalled, InstantInviteUtilsModule, [TELEGRAM]);
object9.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['148qIV']);
};
object21.onPress = onPress_71920;
items3[7] = object21;
const object22 = {};
let TWITTER = object13.TWITTER;
object22.type = TWITTER;
object22.fullIcon = importDefault(9201) /* metro dependency 9201 */;
const value18 = instantInviteUtilsModule;
isAppInstalled = value18.isAppInstalled;
object9.onPress = onPress_71920;
items3[7] = object9;
const object10 = {};
let TWITTER = object.TWITTER;
object10.type = TWITTER;
object10.fullIcon = importDefault(9201) /* metro dependency 9201 */;
isAppInstalled = InstantInviteUtilsModule.isAppInstalled;
TWITTER = SHARE_APPS_KEY.TWITTER;
object22.isAvailable = Reflect.apply(isAppInstalled, value18, [TWITTER]);
object22.getLabel = function() {
object10.isAvailable = Reflect.apply(isAppInstalled, InstantInviteUtilsModule, [TWITTER]);
object10.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.oAiltV);
};
object22.onPress = function({channel, code, message, location}) {
object10.onPress = function({channel, code, message, location}) {
require(dependencyMap[7]).trackOptionClicked(code, channel, InviteOptionsType.TWITTER, location);
Linking.openURL(SHARE_URLS[SHARE_APPS_KEY.TWITTER](message));
};
items3[8] = object22;
const object23 = {};
let WHATSAPP = object13.WHATSAPP;
object23.type = WHATSAPP;
object23.fullIcon = importDefault(9202) /* metro dependency 9202 */;
const value19 = instantInviteUtilsModule;
isAppInstalled = value19.isAppInstalled;
items3[8] = object10;
const object11 = {};
let WHATSAPP = object.WHATSAPP;
object11.type = WHATSAPP;
object11.fullIcon = importDefault(9202) /* metro dependency 9202 */;
isAppInstalled = InstantInviteUtilsModule.isAppInstalled;
WHATSAPP = SHARE_APPS_KEY.WHATSAPP;
object23.isAvailable = Reflect.apply(isAppInstalled, value19, [WHATSAPP]);
object23.getLabel = function() {
object11.isAvailable = Reflect.apply(isAppInstalled, InstantInviteUtilsModule, [WHATSAPP]);
object11.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.viazhS);
};
object23.onPress = function({channel, code, message, location}) {
object11.onPress = function({channel, code, message, location}) {
require(dependencyMap[7]).trackOptionClicked(code, channel, InviteOptionsType.WHATSAPP, location);
Linking.openURL(SHARE_URLS[SHARE_APPS_KEY.WHATSAPP](message));
};
items3[9] = object23;
const object24 = {};
let LINE = object13.LINE;
object24.type = LINE;
object24.fullIcon = importDefault(9203) /* metro dependency 9203 */;
const value20 = instantInviteUtilsModule;
isAppInstalled = value20.isAppInstalled;
items3[9] = object11;
const object12 = {};
let LINE = object.LINE;
object12.type = LINE;
object12.fullIcon = importDefault(9203) /* metro dependency 9203 */;
isAppInstalled = InstantInviteUtilsModule.isAppInstalled;
LINE = SHARE_APPS_KEY.LINE;
object24.isAvailable = Reflect.apply(isAppInstalled, value20, [LINE]);
object24.getLabel = function() {
object12.isAvailable = Reflect.apply(isAppInstalled, InstantInviteUtilsModule, [LINE]);
object12.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.kqgslH);
};
object24.onPress = function({channel, code, message, location}) {
object12.onPress = function({channel, code, message, location}) {
require(dependencyMap[7]).trackOptionClicked(code, channel, InviteOptionsType.LINE, location);
Linking.openURL(SHARE_URLS[SHARE_APPS_KEY.LINE](message));
};
items3[10] = object24;
items3[10] = object12;
const items2 = [items3[0], items3[1]];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteConstants.tsx');
exports.ShareItemType = object13;
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteConstants.tsx');
exports.ShareItemType = object;
exports.SHARE_ITEMS = items3;
exports.SHARE_ITEMS_DEFAULT = items2;
return value;
}
function onPress_71904({channel, code, message, location}) { // fn#71904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:692, offset: 0x01d3148f, size: 66 bytes, params: 2, frame: 18
return (require(9151) /* metro dependency 9151: InstantInviteUtils */).handleOpenShareSheet(code, channel, message,
location);
}
function onPress_71906({channel, code, location}) { // fn#71906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:913, offset: 0x01d3150f, size: 58 bytes, params: 2, frame: 16
return (require(9151) /* metro dependency 9151: InstantInviteUtils */).handleCopy(code, channel, location);
}
function onPress_71908({code, channel, location}) { // fn#71908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:1138, offset: 0x01d31589, size: 158 bytes, params: 2, frame: 23
const defaultImport = importDefault(dependencyMap[13]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[15]);
value = value(dependencyMap[14], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'InstantInviteQRCodeActionSheet-' + code,
{link: importDefault(dependencyMap[16])(code), location: location, channel: channel}, 'stack']);
}
function onPress_71910({channel, code, message, location}) { // fn#71910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:1497, offset: 0x01d31667, size: 189 bytes, params: 2, frame: 23
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
const trackOptionClicked = instantInviteUtilsModule.trackOptionClicked;
const SMS = InviteOptionsType.SMS;
Reflect.apply(trackOptionClicked, instantInviteUtilsModule, [code, channel, SMS, location]);
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
function onPress_71904({channel, code, message, location}) { // fn#71904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:692, offset: 0x01d3148f, size: 66 bytes, params: 2, frame: 18
return (InstantInviteUtilsModule).handleOpenShareSheet(code, channel, message,
location);
}
const dcdSendUtilsModule = require(4486) /* metro dependency 4486: DCDSendUtils */;
dcdSendUtilsModule.sendSMS({body: message}, _fun71911);
}
function onPress_71913({channel, code, message, location}) { // fn#71913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:2108, offset: 0x01d31857, size: 198 bytes, params: 2, frame: 23
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
const trackOptionClicked = instantInviteUtilsModule.trackOptionClicked;
const EMAIL = InviteOptionsType.EMAIL;
Reflect.apply(trackOptionClicked, instantInviteUtilsModule, [code, channel, EMAIL, location]);
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
function onPress_71906({channel, code, location}) { // fn#71906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:913, offset: 0x01d3150f, size: 58 bytes, params: 2, frame: 16
return (InstantInviteUtilsModule).handleCopy(code, channel, location);
}
const dcdSendUtilsModule = require(4486) /* metro dependency 4486: DCDSendUtils */;
dcdSendUtilsModule.sendMail({subject: '', body: message}, _fun71914);
}
function onPress_71916({channel, code, location}) { // fn#71916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:2692, offset: 0x01d31a50, size: 130 bytes, params: 2, frame: 20
const value2 = (importDefault(7147) /* metro dependency 7147: getInviteURL */)(code);
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
const trackOptionClicked = instantInviteUtilsModule.trackOptionClicked;
let MESSENGER = InviteOptionsType.MESSENGER;
Reflect.apply(trackOptionClicked, instantInviteUtilsModule, [code, channel, MESSENGER, location]);
const openURL = Linking.openURL;
MESSENGER = SHARE_APPS_KEY.MESSENGER;
Reflect.apply(openURL, Linking, [SHARE_URLS[MESSENGER](value2)]);
}
function onPress_71920({channel, code, message, location}) { // fn#71920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:3219, offset: 0x01d31bc9, size: 136 bytes, params: 2, frame: 21
const value2 = (importDefault(7147) /* metro dependency 7147: getInviteURL */)(code);
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
const trackOptionClicked = instantInviteUtilsModule.trackOptionClicked;
let TELEGRAM = InviteOptionsType.TELEGRAM;
Reflect.apply(trackOptionClicked, instantInviteUtilsModule, [code, channel, TELEGRAM, location]);
const openURL = Linking.openURL;
TELEGRAM = SHARE_APPS_KEY.TELEGRAM;
Reflect.apply(openURL, Linking, [SHARE_URLS[TELEGRAM](message, value2)]);
}
function _fun71911(a0, a1, a2) { // fn#71911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:1653, offset: 0x01d31724, size: 243 bytes, params: 4, frame: 17
var id;
var value;
var value2;
var defaultImport;
var trackInvite;
var object2;
var channelBinding;
var value4;
var defaultImport2;
var show;
var intl;
if (a0) {
value = environment.__proto__;
value2 = undefined;
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
trackInvite = defaultImport.trackInvite;
channelBinding = channel;
value4 = null;
id = value4 == channelBinding ? value2 : channel.id;
Reflect.apply(trackInvite, defaultImport, [{inviteKey: code, channelId: value4 != id ? id : value4,
messageId: value4, location: 'SMS Option', overrideProperties: {send_type: SendTypes.SMS}}]);
function onPress_71908({code, channel, location}) { // fn#71908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:1138, offset: 0x01d31589, size: 158 bytes, params: 2, frame: 23
const defaultImport = importDefault(dependencyMap[13]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[15]);
value = value(dependencyMap[14], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'InstantInviteQRCodeActionSheet-' + code,
{link: importDefault(dependencyMap[16])(code), location: location, channel: channel}, 'stack']);
}
if (a2) {
value = environment.__proto__;
defaultImport2 = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = defaultImport2.show;
object2 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1ieAR5']);
object2.isDismissable = true;
Reflect.apply(show, defaultImport2, [object2]);
}
}
function _fun71914(a0, a1, a2) { // fn#71914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:2278, offset: 0x01d3191d, size: 243 bytes, params: 4, frame: 17
var id;
var value;
var value2;
var defaultImport;
var trackInvite;
var object2;
var channelBinding;
var value4;
var defaultImport2;
var show;
var intl;
if (a0) {
value = environment.__proto__;
value2 = undefined;
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
trackInvite = defaultImport.trackInvite;
channelBinding = channel;
value4 = null;
id = value4 == channelBinding ? value2 : channel.id;
Reflect.apply(trackInvite, defaultImport, [{inviteKey: code, channelId: value4 != id ? id : value4,
messageId: value4, location: 'Email Option', overrideProperties: {send_type: SendTypes.EMAIL}}]);
}
if (a2) {
value = environment.__proto__;
defaultImport2 = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = defaultImport2.show;
object2 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1ieAR5']);
object2.isDismissable = true;
Reflect.apply(show, defaultImport2, [object2]);
function onPress_71910({channel, code, message, location}) { // fn#71910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:1497, offset: 0x01d31667, size: 189 bytes, params: 2, frame: 23
const trackOptionClicked = InstantInviteUtilsModule.trackOptionClicked;
const SMS = InviteOptionsType.SMS;
Reflect.apply(trackOptionClicked, InstantInviteUtilsModule, [code, channel, SMS, location]);
if (PlatformUtilsModule.isIOS()) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
DCDSendUtilsModule.sendSMS({body: message}, _fun71911);
function _fun71911(a0, a1, a2) { // fn#71911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:1653, offset: 0x01d31724, size: 243 bytes, params: 4, frame: 17
var id;
var value;
var value2;
var defaultImport;
var trackInvite;
var object;
var channelBinding;
var value4;
var defaultImport2;
var show;
var intl;
if (a0) {
value = environment.__proto__;
value2 = undefined;
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
trackInvite = defaultImport.trackInvite;
channelBinding = channel;
value4 = null;
id = value4 == channelBinding ? value2 : channel.id;
Reflect.apply(trackInvite, defaultImport, [{inviteKey: code, channelId: value4 != id ? id : value4,
messageId: value4, location: 'SMS Option', overrideProperties: {send_type: SendTypes.SMS}}]);
}
if (a2) {
value = environment.__proto__;
defaultImport2 = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = defaultImport2.show;
object = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1ieAR5']);
object.isDismissable = true;
Reflect.apply(show, defaultImport2, [object]);
}
}
}
function onPress_71913({channel, code, message, location}) { // fn#71913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:2108, offset: 0x01d31857, size: 198 bytes, params: 2, frame: 23
const trackOptionClicked = InstantInviteUtilsModule.trackOptionClicked;
const EMAIL = InviteOptionsType.EMAIL;
Reflect.apply(trackOptionClicked, InstantInviteUtilsModule, [code, channel, EMAIL, location]);
if (PlatformUtilsModule.isIOS()) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
DCDSendUtilsModule.sendMail({subject: '', body: message}, _fun71914);
function _fun71914(a0, a1, a2) { // fn#71914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:2278, offset: 0x01d3191d, size: 243 bytes, params: 4, frame: 17
var id;
var value;
var value2;
var defaultImport;
var trackInvite;
var object;
var channelBinding;
var value4;
var defaultImport2;
var show;
var intl;
if (a0) {
value = environment.__proto__;
value2 = undefined;
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
trackInvite = defaultImport.trackInvite;
channelBinding = channel;
value4 = null;
id = value4 == channelBinding ? value2 : channel.id;
Reflect.apply(trackInvite, defaultImport, [{inviteKey: code, channelId: value4 != id ? id : value4,
messageId: value4, location: 'Email Option', overrideProperties: {send_type: SendTypes.EMAIL}}]);
}
if (a2) {
value = environment.__proto__;
defaultImport2 = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = defaultImport2.show;
object = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1ieAR5']);
object.isDismissable = true;
Reflect.apply(show, defaultImport2, [object]);
}
}
}
function onPress_71916({channel, code, location}) { // fn#71916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:2692, offset: 0x01d31a50, size: 130 bytes, params: 2, frame: 20
const value2 = (GetInviteURL)(code);
const trackOptionClicked = InstantInviteUtilsModule.trackOptionClicked;
let MESSENGER = InviteOptionsType.MESSENGER;
Reflect.apply(trackOptionClicked, InstantInviteUtilsModule, [code, channel, MESSENGER, location]);
const openURL = Linking.openURL;
MESSENGER = SHARE_APPS_KEY.MESSENGER;
Reflect.apply(openURL, Linking, [SHARE_URLS[MESSENGER](value2)]);
}
function onPress_71920({channel, code, message, location}) { // fn#71920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:3219, offset: 0x01d31bc9, size: 136 bytes, params: 2, frame: 21
const value2 = (GetInviteURL)(code);
const trackOptionClicked = InstantInviteUtilsModule.trackOptionClicked;
let TELEGRAM = InviteOptionsType.TELEGRAM;
Reflect.apply(trackOptionClicked, InstantInviteUtilsModule, [code, channel, TELEGRAM, location]);
const openURL = Linking.openURL;
TELEGRAM = SHARE_APPS_KEY.TELEGRAM;
Reflect.apply(openURL, Linking, [SHARE_URLS[TELEGRAM](message, value2)]);
}
}
global.__d(_fun71902, 9172, [27, 9157, 661, 9173, 9176, 697, 1244, 9151, 9177, 4057, 9178, 1581, 9179, 4080, 9180,
1962, 7147, 477, 9194, 9195, 4486, 7067, 4496, 9196, 9197, 9198, 9199, 9200, 9201, 9202, 9203,
2]) /* metro module 9172, dependencies: [27, 9157, 661, 9173, 9176, 697, 1244, 9151, 9177, 4057, 9178, 1581, 9179, 4080, 9180, 1962, 7147, 477, 9194, 9195, 4486, 7067, 4496, 9196, 9197, 9198, 9199, 9200, 9201, 9202, 9203, 2] */;
@@ -1,83 +1,124 @@
/* Metro module 9169; source: modules/instant_invite/native/components/InstantInviteEmptyState.tsx; dependencies: [31, 27, 9152, 33, 4501, 697, 566, 1305, 9170, 1244, 8969, 5278, 7002, 4573, 9153, 4578, 2] */
import FreeFormTextInput from '../../../../design/void/Form/native/FreeFormTextInput.tsx'; /* Metro dependency 8969 */
import CreateInviteModalStore from '../../../../stores/CreateInviteModalStore.tsx'; /* Metro dependency 9152 */
import InstantInviteUtils from '../../../../utils/InstantInviteUtils.tsx'; /* Metro dependency 9153 */
import Module09170 from '../../../../by-id/module-09170.js'; /* Metro dependency 9170 */
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 NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
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 SettingsIconModule from '../../../../design/components/Icon/native/redesign/generated/SettingsIcon.tsx'; /* Metro dependency 7002 */
function _fun71886(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9354:6, offset: 0x01d3041b, size: 375 bytes, params: 8, frame: 24
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 createInviteModalStore = importDefault(9152) /* metro dependency 9152: CreateInviteModalStore */;
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;
const object = {'width': 48, 'height': 48, 'justifyContent': 'center', 'alignItems': 'center'};
const object2 = {'width': 48, 'height': 48, 'justifyContent': 'center', 'alignItems': 'center'};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object.backgroundColor = BACKGROUND_BASE_LOWEST;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_7 = Reflect.apply(createStyles, value, [{container: {padding: 16}, emptyStateContainer: {'padding': 0,
'marginBottom': 16}, emptyStateArt: {marginBottom: 16}, emptyStateTitle: {marginBottom: 4},
linkContainer: {'maxWidth': '100%', 'flexDirection': 'row', 'marginBottom': 8, 'gap': 8},
inviteInput: {flexShrink: 1}, expireCaption: {marginBottom: 16}, settingsButton: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteEmptyState.tsx');
inviteInput: {flexShrink: 1}, expireCaption: {marginBottom: 16}, settingsButton: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteEmptyState.tsx');
exports.default = _default_71887;
}
function _default_71887({link, onCopy, onShare, onPressSettings}) { // fn#71887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9354:623, offset: 0x01d30592, size: 744 bytes, params: 2, frame: 31
const styles = useStyles();
const env0_0 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.getInviteSettings();
});
const RefreshEmptyState = (NativeModule).RefreshEmptyState;
const refreshEmptyStateProps2 = {containerStyle: styles.emptyStateContainer, imageStyle: styles.emptyStateArt,
titleStyle: styles.emptyStateTitle, source: Module09170};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
refreshEmptyStateProps2.title = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.tQc0l8]);
string = intl.string;
const DXgdcD = (require(1244) /* metro dependency 1244: indexNative */).t.DXgdcD;
refreshEmptyStateProps2.body = Reflect.apply(string, intl, [DXgdcD]);
const items2 = [
<RefreshEmptyState {...refreshEmptyStateProps2} />,
];
const r9 = link ?? '';
const ClearButtonVisibility = (NativeModule).ClearButtonVisibility;
const NEVER = ClearButtonVisibility.NEVER;
const freeFormTextInput = (
<FreeFormTextInput
accessibilityRole="button"
onPress={onCopy}
editable={false}
value={r9}
style={styles.inviteInput}
forceAccessibleContainer
clearButtonVisibility={NEVER}
/>
);
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/']),
accessibilityRole: 'button', onPress: onPressSettings, style: styles.settingsButton};
const SettingsIcon = (SettingsIconModule).SettingsIcon;
items2[1] = (
<View style={styles.linkContainer}>
{freeFormTextInput}
<PressableOpacity {...pressableOpacityProps}>
<SettingsIcon />
</PressableOpacity>
</View>
);
const Text = (TextModule).Text;
items2[2] = (
<Text
style={styles.expireCaption}
variant="text-xs/medium"
color="text-muted"
>
{_fun71889()}
</Text>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const Ej3B3Y = (require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y;
items2[3] = <Button text={Reflect.apply(string, intl, [Ej3B3Y])} onPress={onShare} />;
return (
<View style={styles.container}>
{items2}
</View>
);
function _fun71889() { // fn#71889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9354:1520, offset: 0x01d3088d, size: 290 bytes, params: 1, frame: 19
const t = (IndexNativeModule).t;
if (inviteSettings == null) {
return null;
}
const maxAgeOptionByValue = (InstantInviteUtils).getMaxAgeOptionByValue(inviteSettings.maxAge);
const value4 = '';
const r6 = maxAgeOptionByValue != null && maxAgeOptionByValue.descriptiveLabel != null ? maxAgeOptionByValue.descriptiveLabel : value4;
const getMaxUsesOptions = (InstantInviteUtils).getMaxUsesOptions;
const value5 = getMaxUsesOptions.find(function({value}) {
return value === inviteSettings.maxUses;
});
const descriptiveLabel = value5 != null ? value5.descriptiveLabel : value4;
const r4 = inviteSettings.maxAge === 0 ? t['99ISmn'] : t.dqPWMN;
const intl = (IndexNativeModule).intl;
return intl.format(r4, {maxAge: r6, maxUses: descriptiveLabel});
}
function _default_71887({link, onCopy, onShare, onPressSettings}) { // fn#71887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9354:623, offset: 0x01d30592, size: 744 bytes, params: 2, frame: 31
const styles = useStyles();
const env0_0 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.getInviteSettings();
});
const RefreshEmptyState = (require(1305) /* metro dependency 1305: native */).RefreshEmptyState;
const refreshEmptyStateProps2 = {containerStyle: styles.emptyStateContainer, imageStyle: styles.emptyStateArt,
titleStyle: styles.emptyStateTitle, source: importDefault(9170) /* metro dependency 9170 */};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
refreshEmptyStateProps2.title = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.tQc0l8]);
string = intl.string;
const DXgdcD = (require(1244) /* metro dependency 1244: indexNative */).t.DXgdcD;
refreshEmptyStateProps2.body = Reflect.apply(string, intl, [DXgdcD]);
const items2 = [<RefreshEmptyState {...refreshEmptyStateProps2} />];
const FreeFormTextInput = importDefault(8969) /* metro dependency 8969: FreeFormTextInput */;
const r9 = link ?? '';
const ClearButtonVisibility = (require(1305) /* metro dependency 1305: native */).ClearButtonVisibility;
const NEVER = ClearButtonVisibility.NEVER;
const freeFormTextInput = <FreeFormTextInput accessibilityRole="button" onPress={onCopy} editable={false} value={r9} style={styles.inviteInput} forceAccessibleContainer clearButtonVisibility={NEVER} />;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/']),
accessibilityRole: 'button', onPress: onPressSettings, style: styles.settingsButton};
const SettingsIcon = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
items2[1] = <View style={styles.linkContainer}>{freeFormTextInput}<PressableOpacity {...pressableOpacityProps}><SettingsIcon /></PressableOpacity></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[2] = <Text style={styles.expireCaption} variant="text-xs/medium" color="text-muted">{_fun71889()}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const Ej3B3Y = (require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y;
items2[3] = <Button text={Reflect.apply(string, intl, [Ej3B3Y])} onPress={onShare} />;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function _fun71889() { // fn#71889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9354:1520, offset: 0x01d3088d, size: 290 bytes, params: 1, frame: 19
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (inviteSettings == null) {
return null;
}
const maxAgeOptionByValue = (importDefault(9153) /* metro dependency 9153: InstantInviteUtils */).getMaxAgeOptionByValue(inviteSettings.maxAge);
const value4 = '';
const r6 = maxAgeOptionByValue != null && maxAgeOptionByValue.descriptiveLabel != null ? maxAgeOptionByValue.descriptiveLabel : value4;
const getMaxUsesOptions = (importDefault(9153) /* metro dependency 9153: InstantInviteUtils */).getMaxUsesOptions;
const value5 = getMaxUsesOptions.find(function({value}) {
return value === inviteSettings.maxUses;
});
const descriptiveLabel = value5 != null ? value5.descriptiveLabel : value4;
const r4 = inviteSettings.maxAge === 0 ? t['99ISmn'] : t.dqPWMN;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.format(r4, {maxAge: r6, maxUses: descriptiveLabel});
}
global.__d(_fun71886, 9169, [31, 27, 9152, 33, 4501, 697, 566, 1305, 9170, 1244, 8969, 5278, 7002, 4573, 9153, 4578,
2]) /* metro module 9169, dependencies: [31, 27, 9152, 33, 4501, 697, 566, 1305, 9170, 1244, 8969, 5278, 7002, 4573, 9153, 4578, 2] */;
@@ -1,102 +1,124 @@
/* Metro module 9206; source: modules/instant_invite/native/components/InstantInviteFriendsList.tsx; dependencies: [31, 661, 33, 4501, 6597, 697, 1305, 1244, 5278, 4080, 4008, 4573, 9207, 5463, 6277, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import TextStyles from '../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import InstantInviteRow from './InstantInviteRow.tsx'; /* Metro dependency 9207 */
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as Module06277Module from '../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
function _fun72037(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:6, offset: 0x01d373aa, size: 416 bytes, params: 8, frame: 27
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 Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
const Fonts = (ConstantsModule).Fonts;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
object = {};
const object2 = {};
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object5, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
object5['textTransform'] = 'none';
object5['lineHeight'] = 24;
object4.emptyTitle = object5;
const object6 = {};
const value3 = textStyles;
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object2, TextStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
object2['textTransform'] = 'none';
object2['lineHeight'] = 24;
object.emptyTitle = object2;
const object3 = {};
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
copyDataProperties(object6, value3(PRIMARY_MEDIUM, TEXT_SUBTLE, 16), undefined);
object6['lineHeight'] = 20;
object6['fontWeight'] = '600';
object4.emptyBody = object6;
object4.goToFriendsLink = {textAlign: 'center'};
const env0_7 = Reflect.apply(createStyles, value, [object4]);
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
copyDataProperties(object3, TextStyles(PRIMARY_MEDIUM, TEXT_SUBTLE, 16), undefined);
object3['lineHeight'] = 20;
object3['fontWeight'] = '600';
object.emptyBody = object3;
object.goToFriendsLink = {textAlign: 'center'};
const env0_7 = Reflect.apply(createStyles, value, [object]);
const keyExtractor_72040 = function(a0) {
return a0.item.id;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteFriendsList.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteFriendsList.tsx');
exports.default = InstantInviteFriendsList;
function FriendsEmptyComponent() { // fn#72038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:479, offset: 0x01d3754a, size: 437 bytes, params: 1, frame: 25
const styles = useStyles();
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const RefreshEmptyState = (NativeModule).RefreshEmptyState;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.dz4UlO]);
string = intl.string;
const MBQBI7 = (require(1244) /* metro dependency 1244: indexNative */).t.MBQBI7;
object2.body = Reflect.apply(string, intl, [MBQBI7]);
object2.titleStyle = styles.emptyTitle;
object2.bodyStyle = styles.emptyBody;
const refreshEmptyState = <RefreshEmptyState {...object2} />;
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_72039, accessibilityRole: 'link',
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE),
hitSlop: {'top': 8, 'left': 8, 'bottom': 8, 'right': 8}};
const Text = (TextModule).Text;
return (
<>
{refreshEmptyState}
<PressableOpacity {...pressableOpacityProps}>
<Text
style={[styles.goToFriendsLink]}
variant="text-sm/semibold"
color="text-link"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE)}
</Text>
</PressableOpacity>
</>
);
function FriendsEmptyComponentOnPress() { // fn#72039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:744, owner: FriendsEmptyComponent.onPress, offset: 0x01d376ff, size: 116 bytes, params: 1, frame: 15
let value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value != null) {
value.navigate('friends', {screen: 'add-friends', params: {sourcePage: 'Instant Invite Empty State'}});
}
}
}
function InstantInviteFriendsList({code, onPressAvatar, onInviteSent, data, source}) { // fn#72041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:1304, offset: 0x01d37782, size: 292 bytes, params: 2, frame: 23
const value2 = data.useCallback(_fun72042, [onPressAvatar, onInviteSent, code, source, data.length]);
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({isKeyboardAwareOnAndroid: false}).insets;
const BottomSheetFlatList = (Module06277Module).BottomSheetFlatList;
const object2 = {};
const PX_16 = (Native).space.PX_16;
object2.paddingBottom = PX_16 + insets.bottom;
const PX_12 = (Native).space.PX_12;
object2.paddingHorizontal = PX_12;
return (
<BottomSheetFlatList
contentContainerStyle={object2}
bounces={false}
renderItem={value2}
data={data}
keyExtractor={keyExtractor_72040}
keyboardShouldPersistTaps="always"
ListEmptyComponent={FriendsEmptyComponent}
/>
);
function _fun72042({item, index}) { // fn#72042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:1416, offset: 0x01d378a6, size: 128 bytes, params: 2, frame: 18
const value = environment.__proto__;
return ((Component) => <Component start={index === 0} end={index === data.length - 1} row={item} onPressAvatar={onPressAvatar} onInviteSent={onInviteSent} code={code} source={source} />)(InstantInviteRow);
}
}
}
function FriendsEmptyComponent() { // fn#72038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:479, offset: 0x01d3754a, size: 437 bytes, params: 1, frame: 25
const styles = useStyles();
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const RefreshEmptyState = (require(1305) /* metro dependency 1305: native */).RefreshEmptyState;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.dz4UlO]);
string = intl.string;
const MBQBI7 = (require(1244) /* metro dependency 1244: indexNative */).t.MBQBI7;
object.body = Reflect.apply(string, intl, [MBQBI7]);
object.titleStyle = styles.emptyTitle;
object.bodyStyle = styles.emptyBody;
const refreshEmptyState = <RefreshEmptyState {...object} />;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_72039, accessibilityRole: 'link',
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE),
hitSlop: {'top': 8, 'left': 8, 'bottom': 8, 'right': 8}};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<>
{refreshEmptyState}
<PressableOpacity {...pressableOpacityProps}>
<Text
style={[styles.goToFriendsLink]}
variant="text-sm/semibold"
color="text-link"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE)}
</Text>
</PressableOpacity>
</>
);
}
function InstantInviteFriendsList({code, onPressAvatar, onInviteSent, data, source}) { // fn#72041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:1304, offset: 0x01d37782, size: 292 bytes, params: 2, frame: 23
const value2 = data.useCallback(_fun72042, [onPressAvatar, onInviteSent, code, source, data.length]);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({isKeyboardAwareOnAndroid: false}).insets;
const BottomSheetFlatList = (require(6277) /* metro dependency 6277 */).BottomSheetFlatList;
const object = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingBottom = PX_16 + insets.bottom;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingHorizontal = PX_12;
return (
<BottomSheetFlatList
contentContainerStyle={object}
bounces={false}
renderItem={value2}
data={data}
keyExtractor={keyExtractor_72040}
keyboardShouldPersistTaps="always"
ListEmptyComponent={FriendsEmptyComponent}
/>
);
}
function _fun72042({item, index}) { // fn#72042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:1416, offset: 0x01d378a6, size: 128 bytes, params: 2, frame: 18
const value = environment.__proto__;
return ((Component) => <Component start={index === 0} end={index === data.length - 1} row={item} onPressAvatar={onPressAvatar} onInviteSent={onInviteSent} code={code} source={source} />)(importDefault(9207) /* metro dependency 9207: InstantInviteRow */);
}
global.__d(_fun72037, 9206, [31, 661, 33, 4501, 6597, 697, 1305, 1244, 5278, 4080, 4008, 4573, 9207, 5463, 6277,
2]) /* metro module 9206, dependencies: [31, 661, 33, 4501, 6597, 697, 1305, 1244, 5278, 4080, 4008, 4573, 9207, 5463, 6277, 2] */;
@@ -1,14 +1,22 @@
/* Metro module 9180; source: modules/instant_invite/native/components/InstantInviteQRCodeActionSheet.tsx; dependencies: [31, 27, 1867, 1878, 661, 33, 4501, 697, 6819, 566, 1244, 694, 3856, 6805, 6758, 9181, 4573, 2] */
import Dispatcher from '../../../../Dispatcher.tsx'; /* Metro dependency 694 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
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 FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ToastUtilsModule from '../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
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 */
function _fun71934(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:6, offset: 0x01d3208f, size: 471 bytes, params: 8, frame: 24
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 guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_7 = value.InstantInviteSources;
const env0_8 = value.RelationshipTypes;
value = require(33) /* metro dependency 33 */;
@@ -16,135 +24,156 @@ function _fun71934(global, require, importDefault, importAll, module, exports, d
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {'padding': null, 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center'};
object = {};
const object2 = {'padding': null, 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.padding = PX_12;
object2.padding = PX_12;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.gap = PX_24;
object4.container = object5;
object4.iconContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
object2.gap = PX_24;
object.container = object2;
object.iconContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
'justifyContent': 'center', 'alignItems': 'center'};
const object6 = {};
const object3 = {};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.padding = PX_4;
object3.padding = PX_4;
const lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.borderRadius = lg + PX_4;
object3.borderRadius = lg + PX_4;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object6.backgroundColor = WHITE;
object4.icon = object6;
object4.code = {alignSelf: 'center'};
const env0_11 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteQRCodeActionSheet.tsx');
object3.backgroundColor = WHITE;
object.icon = object3;
object.code = {alignSelf: 'center'};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteQRCodeActionSheet.tsx');
exports.default = InstantInviteQRCodeActionSheet;
}
function InstantInviteQRCodeActionSheet(a0) { // fn#71935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:750, offset: 0x01d32266, size: 659 bytes, params: 2, frame: 28
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object;
const link = a0.link;
const value2 = undefined;
const styles = useStyles();
const location = a0.location;
const ADD_FRIENDS_MODAL = InstantInviteSources.ADD_FRIENDS_MODAL;
const r6 = location === ADD_FRIENDS_MODAL ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VUNqoc) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DqE26p);
const value5 = InstantInviteQRCodeActionSheetUseDescription(a0);
const channel = a0.channel;
const value6 = null;
const r17 = value6 != channel && value6 != GuildStore.getGuild(channel.guild_id) ? ((Component) => <Component guild={GuildStore.getGuild(channel.guild_id)} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */) : value6;
useOnFriendAdded((require(3856) /* metro dependency 3856: ToastUtils */).presentFriendRequestAcceptedToast);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
return (
<ActionSheet header={<BottomSheetTitleHeader title={r6} />}>
<View style={styles.container}>
<View>
{((Component) => <Component text={link} size={240} style={styles.code} accessibilityLabel={value6 == value5 ? value2 : value5.plainText} />)(importDefault(9181) /* metro dependency 9181: QRCode */)}
{value6 != r17 && <View style={styles.iconContainer}><View style={styles.icon}>{r17}</View></View>}
</View>
{value6 != value5 && ((Text) => <Text variant="text-md/normal">{value5.visible}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
</ActionSheet>
);
}
function InstantInviteQRCodeActionSheetUseDescription({location, channel}) { // fn#71936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:963, owner: InstantInviteQRCodeActionSheet.useDescription, offset: 0x01d324f9, size: 413 bytes, params: 2, frame: 23
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var zDGAfl;
var username;
var formatToPlainString;
var VK3zyF;
var name;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [UserStore];
const currentUser = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return UserStore.getCurrentUser();
}]);
if (channel != null) {
var guild = GuildStore.getGuild(channel.guild_id);
if (guild != null) {
object = {};
format = intl.format;
VK3zyF = t.VK3zyF;
name = guild.name;
object.visible = Reflect.apply(format, intl, [VK3zyF, {name: name}]);
formatToPlainString = intl.formatToPlainString;
VK3zyF = t.VK3zyF;
name = guild.name;
object.plainText = Reflect.apply(formatToPlainString, intl, [VK3zyF, {name: name}]);
return object;
function InstantInviteQRCodeActionSheet(a0) { // fn#71935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:750, offset: 0x01d32266, size: 659 bytes, params: 2, frame: 28
var r17;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var guildStoreBinding;
var GuildIcon;
var object2;
const link = a0.link;
const value2 = undefined;
const styles = useStyles();
const location = a0.location;
const ADD_FRIENDS_MODAL = InstantInviteSources.ADD_FRIENDS_MODAL;
const r6 = location === ADD_FRIENDS_MODAL ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VUNqoc) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DqE26p);
const value5 = useDescription(a0);
const channel = a0.channel;
const value6 = null;
if (value6 != channel) {
if (value6 != Reflect.apply(GuildStore.getGuild, guildStoreBinding, [channel.guild_id])) {
GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
guildStoreBinding = GuildStore;
r17 = (
<GuildIcon
guild={guildStoreBinding.getGuild(channel.guild_id)}
size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE}
/>
);
} else {
r17 = value6;
}
} else {
r17 = value6;
}
useOnFriendAdded((ToastUtilsModule).presentFriendRequestAcceptedToast);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
return (
<ActionSheet header={<BottomSheetTitleHeader title={r6} />}>
<View style={styles.container}>
<View>
{((Component) => <Component text={link} size={240} style={styles.code} accessibilityLabel={value6 == value5 ? value2 : value5.plainText} />)(importDefault(9181) /* metro dependency 9181: QRCode */)}
{value6 != r17 && <View style={styles.iconContainer}><View style={styles.icon}>{r17}</View></View>}
</View>
{value6 != value5 && ((Text) => <Text variant="text-md/normal">{value5.visible}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
</ActionSheet>
);
function useDescription({location, channel}) { // fn#71936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:963, owner: InstantInviteQRCodeActionSheet.useDescription, offset: 0x01d324f9, size: 413 bytes, params: 2, frame: 23
var r0;
const intl = (IndexNativeModule).intl;
var format;
const t = (IndexNativeModule).t;
var zDGAfl;
var username;
var formatToPlainString;
var VK3zyF;
var name;
const useStateFromStores = FluxModule.useStateFromStores;
let object = [UserStore];
const currentUser = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return UserStore.getCurrentUser();
}]);
if (channel != null) {
var guild = GuildStore.getGuild(channel.guild_id);
if (guild != null) {
object = {};
format = intl.format;
VK3zyF = t.VK3zyF;
name = guild.name;
object.visible = Reflect.apply(format, intl, [VK3zyF, {name: name}]);
formatToPlainString = intl.formatToPlainString;
VK3zyF = t.VK3zyF;
name = guild.name;
object.plainText = Reflect.apply(formatToPlainString, intl, [VK3zyF, {name: name}]);
return object;
}
}
const ADD_FRIENDS_MODAL = InstantInviteSources.ADD_FRIENDS_MODAL;
if (location !== ADD_FRIENDS_MODAL) {
r0 = null;
} else if (currentUser != null) {
object = {};
format = intl.format;
zDGAfl = t.zDGAfl;
username = currentUser.username;
object.visible = Reflect.apply(format, intl, [zDGAfl, {name: username}]);
formatToPlainString = intl.formatToPlainString;
zDGAfl = t.zDGAfl;
username = currentUser.username;
object.plainText = Reflect.apply(formatToPlainString, intl, [zDGAfl, {name: username}]);
r0 = object;
} else {
r0 = null;
}
return r0;
}
function useOnFriendAdded(a0) { // fn#71938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1640, owner: InstantInviteQRCodeActionSheet.useOnFriendAdded, offset: 0x01d326a8, size: 46 bytes, params: 2, frame: 14
const env0_0 = a0;
env1_3.useEffect(_fun71939, [a0]);
function _fun71939() { // fn#71939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1682, offset: 0x01d326d6, size: 63 bytes, params: 1, frame: 14
var environment;
const handleRelationshipAdd_719402 = handleRelationshipAdd_71940;
const value = environment.__proto__.__proto__;
(Dispatcher).subscribe('RELATIONSHIP_ADD',
handleRelationshipAdd_719402);
return _fun71941;
function handleRelationshipAdd_71940({relationship}) { // fn#71940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1713, offset: 0x01d32715, size: 54 bytes, params: 2, frame: 11
const type = relationship.type;
const FRIEND = RelationshipTypes.FRIEND;
if (type === FRIEND) {
value = environment.__proto__;
env1_0(relationship.user);
}
}
function _fun71941() { // fn#71941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1832, offset: 0x01d3274b, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('RELATIONSHIP_ADD', handleRelationshipAdd_71940);
}
}
}
}
const ADD_FRIENDS_MODAL = InstantInviteSources.ADD_FRIENDS_MODAL;
if (location !== ADD_FRIENDS_MODAL) {
r0 = null;
} else if (currentUser != null) {
object = {};
format = intl.format;
zDGAfl = t.zDGAfl;
username = currentUser.username;
object.visible = Reflect.apply(format, intl, [zDGAfl, {name: username}]);
formatToPlainString = intl.formatToPlainString;
zDGAfl = t.zDGAfl;
username = currentUser.username;
object.plainText = Reflect.apply(formatToPlainString, intl, [zDGAfl, {name: username}]);
r0 = object;
} else {
r0 = null;
}
return r0;
}
function useOnFriendAdded(a0) { // fn#71938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1640, owner: InstantInviteQRCodeActionSheet.useOnFriendAdded, offset: 0x01d326a8, size: 46 bytes, params: 2, frame: 14
const env0_0 = a0;
env1_3.useEffect(_fun71939, [a0]);
}
function _fun71939() { // fn#71939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1682, offset: 0x01d326d6, size: 63 bytes, params: 1, frame: 14
var environment;
const closure = handleRelationshipAdd_71940;
const value = environment.__proto__.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('RELATIONSHIP_ADD', closure);
return _fun71941;
}
function handleRelationshipAdd_71940({relationship}) { // fn#71940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1713, offset: 0x01d32715, size: 54 bytes, params: 2, frame: 11
const type = relationship.type;
const FRIEND = RelationshipTypes.FRIEND;
if (type === FRIEND) {
value = environment.__proto__;
env1_0(relationship.user);
}
}
function _fun71941() { // fn#71941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1832, offset: 0x01d3274b, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('RELATIONSHIP_ADD', handleRelationshipAdd_71940);
}
global.__d(_fun71934, 9180, [31, 27, 1867, 1878, 661, 33, 4501, 697, 6819, 566, 1244, 694, 3856, 6805, 6758, 9181,
4573,
2]) /* metro module 9180, dependencies: [31, 27, 1867, 1878, 661, 33, 4501, 697, 6819, 566, 1244, 694, 3856, 6805, 6758, 9181, 4573, 2] */;
@@ -1,262 +1,326 @@
/* Metro module 9207; source: modules/instant_invite/native/components/InstantInviteRow.tsx; dependencies: [31, 27, 1379, 9152, 1867, 9163, 1878, 9208, 4118, 33, 4501, 697, 566, 4805, 9153, 9209, 5278, 1305, 9210, 3995, 1244, 1423, 1861, 4573, 6238, 9211, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UseChannelName from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import CreateInviteModalStore from '../../../../stores/CreateInviteModalStore.tsx'; /* Metro dependency 9152 */
import InviteSuggestionsStore from '../../../../stores/InviteSuggestionsStore.tsx'; /* Metro dependency 9163 */
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 FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 4118 */
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 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as InstantInviteUtilsModule from '../../../../utils/InstantInviteUtils.tsx'; /* Metro dependency 9153 */
import * as InstantInviteSendStateStoreModule from '../../InstantInviteSendStateStore.tsx'; /* Metro dependency 9208 */
import * as InviteQueueModule from '../../../../lib/InviteQueue.tsx'; /* Metro dependency 9209 */
function _fun72043(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:6, offset: 0x01d37926, size: 431 bytes, params: 8, frame: 23
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(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const createInviteModalStore = importDefault(9152) /* metro dependency 9152: CreateInviteModalStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const inviteSuggestionsStore = importDefault(9163) /* metro dependency 9163: InviteSuggestionsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const instantInviteSendStateStoreModule = require(9208) /* metro dependency 9208: InstantInviteSendStateStore */;
const env0_9 = instantInviteSendStateStoreModule.setSendState;
const env0_10 = instantInviteSendStateStoreModule.useInstantInviteSendStates;
const env0_11 = (require(4118) /* metro dependency 4118: Constants */).InviteSendStates;
const env0_12 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'width': 32, 'height': 32, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'width': 32, 'height': 32, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
'justifyContent': 'center', 'overflow': 'hidden', 'marginTop': 0, 'marginRight': 10, 'borderColor': null,
'borderStyle': 'solid', 'borderWidth': 2};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object.borderColor = BORDER_MUTED;
const env0_13 = Reflect.apply(createStyles, createStylesModule, [{acronym: object}]);
object2.borderColor = BORDER_MUTED;
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [{acronym: object2}]);
value = value.memo(_fun72044);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteRow.tsx');
exports.default = value;
}
function _fun72044({row, code, onPressAvatar, onInviteSent, start, end, source}) { // fn#72044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:583, offset: 0x01d37ad5, size: 1488 bytes, params: 2, frame: 40
var r25;
var r13;
var r12;
var r14;
var r3;
var r2;
var r5;
var r6;
var r7;
var moduleValue4;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var defaultImport;
var makeSource;
var defaultImport2;
var defaultImport3;
var defaultImport4;
var user;
const PressableOpacity = (PressablesModule).PressableOpacity;
var pressableOpacity;
var value18;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const TableRow = (TableRowNativeModule).TableRow;
const styles = useStyles();
const id = row.item.id;
const useStateFromStores = FluxModule.useStateFromStores;
const createInviteModalStoreBinding = CreateInviteModalStore;
const value3 = Reflect.apply(useStateFromStores, FluxModule, [[createInviteModalStoreBinding], function() {
return CreateInviteModalStore.isSubmitting();
}]);
const error = FluxModule.useStateFromStores([createInviteModalStoreBinding], function() {
return CreateInviteModalStore.getError();
});
const value4 = useInstantInviteSendStates(function(a0) {
var codeBinding = code;
var value2 = null;
return value2 != codeBinding ? value2 == a0[code] ? undefined : a0[code][id] : value2;
});
const channel = FluxModule.useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(id);
});
const value5 = (UseChannelName)(channel);
if (code != null) {
var onPressSend2 = onPressSend;
var type = row.type;
var RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var DM = RowTypes.DM;
if (DM === type) {
user = UserStore.getUser(id);
pressableOpacity = (
<PressableOpacity
importantForAccessibility="no-hide-descendants"
accessibilityElementsHidden
onPress={function(a0) {
a0.stopPropagation();
if (onPressAvatar != null) {
onPressAvatar(id);
}
}}
style={{'padding': 8, 'margin': -8}}
>
<Avatar
source={user?.getAvatarSource(undefined) ?? null}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
</PressableOpacity>
);
value18 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r2 = onPressAvatar != null ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: user?.tag})}] : undefined;
r5 = O_72052;
r6 = r2;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value18,
trailing: ((Component) => <Component sendState={value4} onPressSend={onPressSend2} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: onPressSend2};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var FRIEND = RowTypes.FRIEND;
if (FRIEND === type) {
user = UserStore.getUser(id);
pressableOpacity = (
<PressableOpacity
importantForAccessibility="no-hide-descendants"
accessibilityElementsHidden
onPress={function(a0) {
a0.stopPropagation();
if (onPressAvatar != null) {
onPressAvatar(id);
}
}}
style={{'padding': 8, 'margin': -8}}
>
<Avatar
source={user?.getAvatarSource(undefined) ?? null}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
</PressableOpacity>
);
value18 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r2 = onPressAvatar != null ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: user?.tag})}] : undefined;
r5 = O_72052;
r6 = r2;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value18,
trailing: ((Component) => <Component sendState={value4} onPressSend={onPressSend2} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: onPressSend2};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var GROUP_DM = RowTypes.GROUP_DM;
if (GROUP_DM === type) {
if (channel != null) {
defaultImport3 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport3.makeSource;
defaultImport4 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r14 = (
<Avatar
source={Reflect.apply(makeSource, defaultImport3,
[defaultImport4.getChannelIconURL({id: channel.id,
icon: channel.icon, applicationId: channel.application_id, size: 32})])}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
);
} else {
r14 = null;
}
r3 = value5 ?? '';
r5 = undefined;
r6 = undefined;
var tableRowProps = {start: start, end: end, icon: r14, label: r3,
trailing: ((Component) => <Component sendState={value4} onPressSend={onPressSend2} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: onPressSend2};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var CHANNEL = RowTypes.CHANNEL;
if (CHANNEL === type) {
r25 = channel?.guild_id != null ? GuildStore.getGuild(channel.guild_id) : undefined;
if (r25 == null) {
return null;
}
if (r25.icon != null) {
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport.makeSource;
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r13 = (
<Avatar
source={Reflect.apply(makeSource, defaultImport, [defaultImport2.getGuildIconURL({id: r25.id,
icon: r25.icon, size: 32})])}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
);
} else {
moduleValue4 = require(1861) /* metro dependency 1861: StringUtils */;
r13 = (
<View style={styles.acronym}>
{((Text) => <Text variant="text-sm/bold">{moduleValue4.getAcronym(r25.name)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
);
}
r12 = value5 == null ? '' : '#' + value5;
r5 = undefined;
r6 = undefined;
var tableRowProps = {start: start, end: end, icon: r13, label: r12,
trailing: ((Component) => <Component sendState={value4} onPressSend={onPressSend2} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: onPressSend2};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
}
return null;
function onPress_72049() { // fn#72049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:975, offset: 0x01d38118, size: 683 bytes, params: 1, frame: 21
var defaultImport;
var enqueue;
const InvitePropertiesType = (InviteQueueModule).InvitePropertiesType;
var channelStoreBinding;
var inviteSuggestionsStoreBinding;
var defaultImport2;
var defaultImport3;
var userStoreBinding;
const closure = function(a0) {
setSendState(code, id, a0 ? InviteSendStates.SENT : InviteSendStates.ERROR);
if (a0) {
if (onInviteSent != null) {
onInviteSent();
}
}
};
const setSendStateBinding = setSendState;
const codeBinding = code;
const idBinding = id;
const SENDING = InviteSendStates.SENDING;
setSendStateBinding(codeBinding, idBinding, SENDING);
const type = row.type;
const RowTypes = (InstantInviteUtilsModule).RowTypes;
const FRIEND = RowTypes.FRIEND;
if (FRIEND === type) {
if (code != null) {
defaultImport3 = importDefault(9209) /* metro dependency 9209: InviteQueue */;
enqueue = defaultImport3.enqueue;
userStoreBinding = UserStore;
inviteSuggestionsStoreBinding = InviteSuggestionsStore;
Reflect.apply(enqueue, defaultImport3, [{inviteKey: code, type: InvitePropertiesType.USER,
user: userStoreBinding.getUser(id), location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: inviteSuggestionsStoreBinding.getSelectedInviteMetadata(row),
source: source}}, closure]);
}
} else if (RowTypes.DM === type) {
if (code != null) {
defaultImport3 = importDefault(9209) /* metro dependency 9209: InviteQueue */;
enqueue = defaultImport3.enqueue;
userStoreBinding = UserStore;
inviteSuggestionsStoreBinding = InviteSuggestionsStore;
Reflect.apply(enqueue, defaultImport3, [{inviteKey: code, type: InvitePropertiesType.USER,
user: userStoreBinding.getUser(id), location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: inviteSuggestionsStoreBinding.getSelectedInviteMetadata(row),
source: source}}, closure]);
}
} else if (RowTypes.GROUP_DM === type) {
if (code != null) {
defaultImport2 = importDefault(9209) /* metro dependency 9209: InviteQueue */;
enqueue = defaultImport2.enqueue;
channelStoreBinding = ChannelStore;
inviteSuggestionsStoreBinding = InviteSuggestionsStore;
Reflect.apply(enqueue, defaultImport2, [{inviteKey: code, type: InvitePropertiesType.GROUP_DM,
channel: channelStoreBinding.getChannel(id), location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: inviteSuggestionsStoreBinding.getSelectedInviteMetadata(row),
source: source}}, closure]);
}
} else if (RowTypes.CHANNEL === type) {
if (code != null) {
defaultImport = importDefault(9209) /* metro dependency 9209: InviteQueue */;
enqueue = defaultImport.enqueue;
channelStoreBinding = ChannelStore;
inviteSuggestionsStoreBinding = InviteSuggestionsStore;
Reflect.apply(enqueue, defaultImport, [{inviteKey: code, type: InvitePropertiesType.CHANNEL,
channel: channelStoreBinding.getChannel(id), location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: inviteSuggestionsStoreBinding.getSelectedInviteMetadata(row),
source: source}}, closure]);
}
}
}
function _fun72044({row, code, onPressAvatar, onInviteSent, start, end, source}) { // fn#72044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:583, offset: 0x01d37ad5, size: 1488 bytes, params: 2, frame: 40
var r25;
var r13;
var r12;
var r14;
var r3;
var r2;
var r5;
var r6;
var r7;
var moduleValue4;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var defaultImport;
var makeSource;
var defaultImport2;
var defaultImport3;
var defaultImport4;
var user;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacity;
var value18;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const styles = useStyles();
const id = row.item.id;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.isSubmitting();
});
const error = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.getError();
});
const value4 = useInstantInviteSendStates(function(a0) {
var codeBinding = code;
var value2 = null;
return value2 != codeBinding ? value2 == a0[code] ? undefined : a0[code][id] : value2;
});
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(id);
});
const value5 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
if (code != null) {
var closure = onPressSend;
var type = row.type;
var RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var DM = RowTypes.DM;
if (DM === type) {
user = UserStore.getUser(id);
pressableOpacity = <PressableOpacity importantForAccessibility="no-hide-descendants" accessibilityElementsHidden onPress={function(a0) {
a0.stopPropagation();
function O_72052({nativeEvent}) { // fn#72052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:2515, offset: 0x01d3843a, size: 76 bytes, params: 2, frame: 11
if (nativeEvent.actionName === 'viewProfile' && onPressAvatar !== null) {
if (onPressAvatar != null) {
onPressAvatar(id);
}
}} style={{'padding': 8,
'margin': -8}}><Avatar source={user?.getAvatarSource(undefined) ?? null} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} /></PressableOpacity>;
value18 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r2 = onPressAvatar != null ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: user?.tag})}] : undefined;
r5 = O_72052;
r6 = r2;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value18,
trailing: ((Component) => <Component sendState={value4} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var FRIEND = RowTypes.FRIEND;
if (FRIEND === type) {
user = UserStore.getUser(id);
pressableOpacity = <PressableOpacity importantForAccessibility="no-hide-descendants" accessibilityElementsHidden onPress={function(a0) {
a0.stopPropagation();
if (onPressAvatar != null) {
onPressAvatar(id);
}
}} style={{'padding': 8,
'margin': -8}}><Avatar source={user?.getAvatarSource(undefined) ?? null} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} /></PressableOpacity>;
value18 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r2 = onPressAvatar != null ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: user?.tag})}] : undefined;
r5 = O_72052;
r6 = r2;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value18,
trailing: ((Component) => <Component sendState={value4} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var GROUP_DM = RowTypes.GROUP_DM;
if (GROUP_DM === type) {
if (channel != null) {
defaultImport3 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport3.makeSource;
defaultImport4 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r14 = <Avatar source={Reflect.apply(makeSource, defaultImport3,
[defaultImport4.getChannelIconURL({id: channel.id,
icon: channel.icon, applicationId: channel.application_id,
size: 32})])} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} />;
} else {
r14 = null;
}
r3 = value5 ?? '';
r5 = undefined;
r6 = undefined;
var tableRowProps = {start: start, end: end, icon: r14, label: r3,
trailing: ((Component) => <Component sendState={value4} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var CHANNEL = RowTypes.CHANNEL;
if (CHANNEL === type) {
r25 = channel?.guild_id != null ? GuildStore.getGuild(channel.guild_id) : undefined;
if (r25 == null) {
return null;
}
if (r25.icon != null) {
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport.makeSource;
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r13 = <Avatar source={Reflect.apply(makeSource, defaultImport,
[defaultImport2.getGuildIconURL({id: r25.id,
icon: r25.icon,
size: 32})])} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} />;
} else {
moduleValue4 = require(1861) /* metro dependency 1861: StringUtils */;
r13 = <View style={styles.acronym}>{((Text) => <Text variant="text-sm/bold">{moduleValue4.getAcronym(r25.name)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
}
r12 = value5 == null ? '' : '#' + value5;
r5 = undefined;
r6 = undefined;
var tableRowProps = {start: start, end: end, icon: r13, label: r12,
trailing: ((Component) => <Component sendState={value4} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
}
return null;
}
function onPress_72049() { // fn#72049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:975, offset: 0x01d38118, size: 683 bytes, params: 1, frame: 21
const InvitePropertiesType = (require(9209) /* metro dependency 9209: InviteQueue */).InvitePropertiesType;
const closure = function(a0) {
setSendState(code, id, a0 ? InviteSendStates.SENT : InviteSendStates.ERROR);
if (a0) {
if (onInviteSent != null) {
onInviteSent();
}
}
};
const setSendStateBinding = setSendState;
const codeBinding = code;
const idBinding = id;
const SENDING = InviteSendStates.SENDING;
setSendStateBinding(codeBinding, idBinding, SENDING);
const type = row.type;
const RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
const FRIEND = RowTypes.FRIEND;
if (FRIEND === type) {
if (code != null) {
(importDefault(9209) /* metro dependency 9209: InviteQueue */).enqueue({inviteKey: code,
type: InvitePropertiesType.USER, user: UserStore.getUser(id), location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: InviteSuggestionsStore.getSelectedInviteMetadata(row),
source: source}}, closure);
}
} else if (RowTypes.DM === type) {
if (code != null) {
(importDefault(9209) /* metro dependency 9209: InviteQueue */).enqueue({inviteKey: code,
type: InvitePropertiesType.USER, user: UserStore.getUser(id), location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: InviteSuggestionsStore.getSelectedInviteMetadata(row),
source: source}}, closure);
}
} else if (RowTypes.GROUP_DM === type) {
if (code != null) {
(importDefault(9209) /* metro dependency 9209: InviteQueue */).enqueue({inviteKey: code,
type: InvitePropertiesType.GROUP_DM, channel: ChannelStore.getChannel(id),
location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: InviteSuggestionsStore.getSelectedInviteMetadata(row),
source: source}}, closure);
}
} else if (RowTypes.CHANNEL === type) {
if (code != null) {
(importDefault(9209) /* metro dependency 9209: InviteQueue */).enqueue({inviteKey: code,
type: InvitePropertiesType.CHANNEL, channel: ChannelStore.getChannel(id),
location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: InviteSuggestionsStore.getSelectedInviteMetadata(row),
source: source}}, closure);
}
}
}
function O_72052({nativeEvent}) { // fn#72052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:2515, offset: 0x01d3843a, size: 76 bytes, params: 2, frame: 11
if (nativeEvent.actionName === 'viewProfile' && onPressAvatar !== null) {
if (onPressAvatar != null) {
onPressAvatar(id);
}
}
}
global.__d(_fun72043, 9207, [31, 27, 1379, 9152, 1867, 9163, 1878, 9208, 4118, 33, 4501, 697, 566, 4805, 9153, 9209,
5278, 1305, 9210, 3995, 1244, 1423, 1861, 4573, 6238, 9211,
2]) /* metro module 9207, dependencies: [31, 27, 1379, 9152, 1867, 9163, 1878, 9208, 4118, 33, 4501, 697, 566, 4805, 9153, 9209, 5278, 1305, 9210, 3995, 1244, 1423, 1861, 4573, 6238, 9211, 2] */;
@@ -1,93 +1,112 @@
/* Metro module 9171; source: modules/instant_invite/native/components/InstantInviteShareApps.tsx; dependencies: [57, 31, 27, 9172, 33, 4501, 697, 4584, 5321, 9204, 8341, 9176, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseFontScaleModule from '../../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as InstantInviteConstantsModule from './InstantInviteConstants.tsx'; /* Metro dependency 9172 */
function _fun71892(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:6, offset: 0x01d30a10, size: 324 bytes, params: 8, frame: 23
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 env0_6 = value2.ScrollView;
const instantInviteConstantsModule = require(9172) /* metro dependency 9172: InstantInviteConstants */;
const env0_7 = instantInviteConstantsModule.SHARE_ITEMS;
const env0_8 = instantInviteConstantsModule.SHARE_ITEMS_DEFAULT;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.padding = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.gap = PX_12;
object.alignItems = 'center';
const env0_10 = Reflect.apply(createStyles, createStylesModule, [{contentContainer: object}]);
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
const PX_16 = (Native).space.PX_16;
object2.padding = PX_16;
const PX_12 = (Native).space.PX_12;
object2.gap = PX_12;
object2.alignItems = 'center';
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [{contentContainer: object2}]);
value = value.memo(InstantInviteShareApps);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteShareApps.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteShareApps.tsx');
exports.default = value;
}
function InstantInviteShareApps({onItemPressed, contentContainerStyle}) { // fn#71893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:345, offset: 0x01d30b54, size: 270 bytes, params: 2, frame: 22
const styles = useStyles();
const env0_1 = (UseFontScaleModule).useFontScale();
const binding = env0_4;
const useState = binding.useState;
const value3 = Module00057(Reflect.apply(useState, binding, [SHARE_ITEMS_DEFAULT]), 2);
const property = value3[0];
const env0_2 = value3[1];
const value4 = binding.useMemo(_fun71894, []);
binding.useEffect(_fun71895, []);
const scrollView = (
<ScrollView
contentContainerStyle={[styles.contentContainer, contentContainerStyle]}
showsHorizontalScrollIndicator={false}
horizontal
>
{property.map(_fun71899)}
</ScrollView>
);
const GestureDetector = (Module05321Module).GestureDetector;
return (
<GestureDetector gesture={value4}>
{scrollView}
</GestureDetector>
);
function _fun71894() { // fn#71894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:507, offset: 0x01d30c62, size: 56 bytes, params: 1, frame: 11
const value = environment.__proto__;
const Gesture = (Module05321Module).Gesture;
return Gesture.Native().disallowInterruption(true);
}
function InstantInviteShareApps({onItemPressed, contentContainerStyle}) { // fn#71893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:345, offset: 0x01d30b54, size: 270 bytes, params: 2, frame: 22
const styles = useStyles();
const env0_1 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const binding = env0_4;
const useState = binding.useState;
const value3 = env0_3(Reflect.apply(useState, binding, [SHARE_ITEMS_DEFAULT]), 2);
const property = value3[0];
const env0_2 = value3[1];
const value4 = binding.useMemo(_fun71894, []);
binding.useEffect(_fun71895, []);
const scrollView = <ScrollView contentContainerStyle={[styles.contentContainer,
contentContainerStyle]} showsHorizontalScrollIndicator={false} horizontal>{property.map(_fun71899)}</ScrollView>;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
return (
<GestureDetector gesture={value4}>
{scrollView}
</GestureDetector>
);
}
function _fun71895() { // fn#71895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:579, offset: 0x01d30c9a, size: 66 bytes, params: 1, frame: 14
var environment;
const Promise = global.Promise;
const all = Promise.all;
const value = environment.__proto__;
Reflect.apply(all, Promise, [SHARE_ITEMS.map(function(a0) {
return a0.isAvailable;
})]).then(_fun71897);
function _fun71897(a0) { // fn#71897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:629, offset: 0x01d30ce7, size: 46 bytes, params: 2, frame: 12
a0.forEach(_fun71898);
env1_2([]);
function _fun71898(a0, a1) { // fn#71898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:653, offset: 0x01d30d15, size: 41 bytes, params: 3, frame: 12
var value;
var binding;
var push;
if (a0) {
binding = env0_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(push, binding, [SHARE_ITEMS[a1]]);
}
}
function _fun71894() { // fn#71894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:507, offset: 0x01d30c62, size: 56 bytes, params: 1, frame: 11
const value = environment.__proto__;
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
return Gesture.Native().disallowInterruption(true);
}
}
function _fun71895() { // fn#71895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:579, offset: 0x01d30c9a, size: 66 bytes, params: 1, frame: 14
var environment;
const Promise = global.Promise;
const all = Promise.all;
const value = environment.__proto__;
Reflect.apply(all, Promise, [SHARE_ITEMS.map(function(a0) {
return a0.isAvailable;
})]).then(_fun71897);
}
}
function _fun71899({fullIcon, getLabel, icon, IconComponent, onPress, type}) { // fn#71899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:814, offset: 0x01d30d3e, size: 284 bytes, params: 2, frame: 27
var environment;
const value = environment.__proto__;
return (
<View style={{maxWidth: 76 * env0_1}} key={type}>
{fullIcon != null ? ((ImageButton) => <ImageButton image={fullIcon} label={getLabel()} onPress={function() {
return onItemPressed(onPress);
}} maxFontSizeMultiplier={2} />)((require(9204) /* metro dependency 9204: ImageButtonNative */).ImageButton) : ((IconButton) => <IconButton variant="secondary" icon={IconComponent ?? (icon ?? (importDefault(9176) /* metro dependency 9176 */))} label={getLabel()} onPress={onPress_71901} maxFontSizeMultiplier={2} />)((require(8341) /* metro dependency 8341: IconButtonNative */).IconButton)}
</View>
);
}
function _fun71899({fullIcon, getLabel, icon, IconComponent, onPress, type}) { // fn#71899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:814, offset: 0x01d30d3e, size: 284 bytes, params: 2, frame: 27
var environment;
const value = environment.__proto__;
return (
<View style={{maxWidth: 76 * env0_1}} key={type}>
{
fullIcon != null
? ((ImageButton) => <ImageButton image={fullIcon} label={getLabel()} onPress={function() {
return onItemPressed(onPress);
}} maxFontSizeMultiplier={2} />)((require(9204) /* metro dependency 9204: ImageButtonNative */).ImageButton)
: ((IconButton) => <IconButton variant="secondary" icon={IconComponent ?? (icon ?? (importDefault(9176) /* metro dependency 9176 */))} label={getLabel()} onPress={onPress_71901} maxFontSizeMultiplier={2} />)((require(8341) /* metro dependency 8341: IconButtonNative */).IconButton)
}
</View>
);
function onPress_71901() { // fn#71901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:1104, offset: 0x0102838e, size: 23 bytes, params: 1, frame: 11
return onItemPressed(onPress);
}
function _fun71897(a0) { // fn#71897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:629, offset: 0x01d30ce7, size: 46 bytes, params: 2, frame: 12
a0.forEach(_fun71898);
env1_2([]);
}
}
function _fun71898(a0, a1) { // fn#71898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:653, offset: 0x01d30d15, size: 41 bytes, params: 3, frame: 12
var value;
var binding;
var push;
if (a0) {
binding = env0_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(push, binding, [SHARE_ITEMS[a1]]);
}
}
global.__d(_fun71892, 9171, [57, 31, 27, 9172, 33, 4501, 697, 4584, 5321, 9204, 8341, 9176,
2]) /* metro module 9171, dependencies: [57, 31, 27, 9172, 33, 4501, 697, 4584, 5321, 9204, 8341, 9176, 2] */;
@@ -1,72 +1,79 @@
/* Metro module 9211; source: modules/instant_invite/native/components/InviteButton.tsx; dependencies: [31, 27, 4118, 33, 4501, 1244, 4578, 2] */
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 4118 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
function _fun72071(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9396:6, offset: 0x01d38cd0, size: 231 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(4118) /* metro dependency 4118: Constants */).InviteSendStates;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({buttonWrapper: {'minWidth': 66,
let value = ReactModule;
const env0_5 = (CreateStylesModule).createStyles({buttonWrapper: {'minWidth': 66,
'flexDirection': 'row'}});
value = value.memo(_fun72072);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InviteButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InviteButton.tsx');
exports.default = value;
function _fun72072({sendState, disabled, onPressSend}) { // fn#72072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9396:246, offset: 0x01d38db7, size: 479 bytes, params: 2, frame: 21
var r7;
var r9;
var value2;
var value4;
var value5;
var value6;
var value7;
var value9;
var value10;
if (disabled === undefined) {
disabled = false;
}
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYnGPG);
const SENDING = InviteSendStates.SENDING;
if (SENDING === sendState) {
value9 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYnGPG);
value10 = true;
disabled = false;
r7 = value10;
r9 = value9;
} else if (InviteSendStates.SENT === sendState) {
value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dVT149);
value7 = false;
disabled = true;
r7 = value7;
r9 = value6;
} else if (InviteSendStates.ERROR === sendState) {
value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wNcfpX);
value5 = false;
disabled = value5;
r7 = value5;
r9 = value4;
} else {
value2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYnGPG);
r7 = false;
r9 = value2;
}
const Button = (ButtonNativeModule).Button;
return (
<View style={styles.buttonWrapper}>
<Button
accessibilityRole="none"
size="sm"
variant="secondary"
text={r9}
onPress={onPressSend}
disabled={disabled || r7}
grow
/>
</View>
);
}
}
function _fun72072({sendState, disabled, onPressSend}) { // fn#72072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9396:246, offset: 0x01d38db7, size: 479 bytes, params: 2, frame: 21
var r7;
var r9;
var value2;
var value4;
var value5;
var value6;
var value7;
var value9;
var value10;
if (disabled === undefined) {
disabled = false;
}
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYnGPG);
const SENDING = InviteSendStates.SENDING;
if (SENDING === sendState) {
value9 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYnGPG);
value10 = true;
disabled = false;
r7 = value10;
r9 = value9;
} else if (InviteSendStates.SENT === sendState) {
value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dVT149);
value7 = false;
disabled = true;
r7 = value7;
r9 = value6;
} else if (InviteSendStates.ERROR === sendState) {
value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wNcfpX);
value5 = false;
disabled = value5;
r7 = value5;
r9 = value4;
} else {
value2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYnGPG);
r7 = false;
r9 = value2;
}
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View style={styles.buttonWrapper}>
<Button
accessibilityRole="none"
size="sm"
variant="secondary"
text={r9}
onPress={onPressSend}
disabled={disabled || r7}
grow
/>
</View>
);
}
global.__d(_fun72071, 9211, [31, 27, 4118, 33, 4501, 1244, 4578,
2]) /* metro module 9211, dependencies: [31, 27, 4118, 33, 4501, 1244, 4578, 2] */;
@@ -1,23 +1,27 @@
/* Metro module 9159; source: modules/instant_invite/native/components/openInstantInviteActionSheet.tsx; dependencies: [4080, 9160, 1962, 480, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun71821(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9344:6, offset: 0x01d2df34, size: 103 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/instant_invite/native/components/openInstantInviteActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/openInstantInviteActionSheet.tsx');
exports.default = openInstantInviteActionSheet;
function openInstantInviteActionSheet(a0) { // fn#71822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9344:209, offset: 0x01d2df9b, size: 231 bytes, params: 2, frame: 21
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
const value2 = require(dependencyMap[2])(dependencyMap[1], dependencyMap.paths);
const value3 = 'InstantInviteActionSheet-' + (a0.vanityURLCode ?? a0.channel.id);
const object = {};
copyDataProperties(object, a0, undefined);
const ImpressionNames = require(dependencyMap[3]).ImpressionNames;
const GUILD_INVITE = ImpressionNames.GUILD_INVITE;
object['impressionName'] = GUILD_INVITE;
object['impressionProperties'] = {invite_channel_id: a0.channel.id, invite_guild_id: a0.channel.guild_id};
Reflect.apply(openLazy, defaultImport, [value2, value3, object, a0.stackingBehavior]);
}
}
function openInstantInviteActionSheet(a0) { // fn#71822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9344:209, offset: 0x01d2df9b, size: 231 bytes, params: 2, frame: 21
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
const value2 = require(dependencyMap[2])(dependencyMap[1], dependencyMap.paths);
const value3 = 'InstantInviteActionSheet-' + (a0.vanityURLCode ?? a0.channel.id);
const object2 = {};
copyDataProperties(object2, a0, undefined);
const ImpressionNames = require(dependencyMap[3]).ImpressionNames;
const GUILD_INVITE = ImpressionNames.GUILD_INVITE;
object2['impressionName'] = GUILD_INVITE;
object2['impressionProperties'] = {invite_channel_id: a0.channel.id, invite_guild_id: a0.channel.guild_id};
Reflect.apply(openLazy, defaultImport, [value2, value3, object2, a0.stackingBehavior]);
}
global.__d(_fun71821, 9159, [4080, 9160, 1962, 480,
2]) /* metro module 9159, dependencies: [4080, 9160, 1962, 480, 2] */;