Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,80 @@
|
||||
/* Metro module 6770; source: modules/guild_onboarding/native/ApplicationConnectionCard.tsx; dependencies: [31, 4234, 661, 33, 566, 6771, 6772, 1244, 6774, 6780, 683, 4863, 6785, 2] */
|
||||
function _fun53320(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6948:6, offset: 0x01345ca6, size: 178 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/ApplicationConnectionCard.tsx');
|
||||
exports.default = ApplicationConnectionCard;
|
||||
}
|
||||
|
||||
function ApplicationConnectionCard({connection, guildId, location}) { // fn#53321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6948:261, offset: 0x01345d58, size: 478 bytes, params: 2, frame: 29
|
||||
var r10;
|
||||
var intl;
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore], _fun53322,
|
||||
[connection.application_id]);
|
||||
const env0_3 = value3;
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(location).analyticsLocations;
|
||||
let binding = env0_3;
|
||||
binding.useEffect(_fun53323, [value3, connection.application_id]);
|
||||
const name = value3?.name;
|
||||
if (name != null) {
|
||||
r10 = name;
|
||||
} else {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r10 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cgPbaZ);
|
||||
}
|
||||
const {hasAlreadyLinked, canStartAuthorization, startAuthorization,
|
||||
fetched} = (importDefault(6774) /* metro dependency 6774: useStartAuthorize */)(value3);
|
||||
const GameIcon = importDefault(6780) /* metro dependency 6780: GameIcon */;
|
||||
const GameIconSizes = (require(6780) /* metro dependency 6780: GameIcon */).GameIconSizes;
|
||||
const SMALL = GameIconSizes.SMALL;
|
||||
const gameIcon = <GameIcon game={value3} size={SMALL} />;
|
||||
binding = env0_3;
|
||||
const useCallback = binding.useCallback;
|
||||
return ((Component) => <Component displayName={r10} description={connection.description} icon={gameIcon} isLoading={!fetched} isConnected={hasAlreadyLinked} canConnect={canStartAuthorization} onConnect={Reflect.apply(useCallback,
|
||||
binding, [_fun53325, [startAuthorization, guildId, connection.application_id, location,
|
||||
analyticsLocations]])} />)(importDefault(6785) /* metro dependency 6785: ConnectionCardView */);
|
||||
}
|
||||
|
||||
function _fun53322() { // fn#53322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6948:373, offset: 0x01345f36, size: 52 bytes, params: 1, frame: 12
|
||||
const application_id = connection.application_id;
|
||||
const value2 = null;
|
||||
return value2 != application_id ? ApplicationStore.getApplication(connection.application_id) : value2;
|
||||
}
|
||||
|
||||
function _fun53323() { // fn#53323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6948:506, offset: 0x01345f6a, size: 163 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
var value7;
|
||||
var moduleValue;
|
||||
let r1 = env0_3 != null || connection.application_id == null;
|
||||
r1 = !r1 ? ApplicationStore.isFetchingApplication(connection.application_id) : r1;
|
||||
r1 = !r1 ? ApplicationStore.didFetchingApplicationFail(connection.application_id) : r1;
|
||||
if (!r1) {
|
||||
value7 = environment.__proto__;
|
||||
moduleValue = require(6772) /* metro dependency 6772: ApplicationActionCreators */;
|
||||
moduleValue.fetchApplication(connection.application_id).catch(function() {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun53325() { // fn#53325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6948:963, offset: 0x0134600d, size: 170 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_ONBOARDING_CONNECTION_CLICKED = AnalyticEvents.GUILD_ONBOARDING_CONNECTION_CLICKED;
|
||||
const object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, value.collectGuildAnalyticsMetadata(guildId), value);
|
||||
object2['connection_type'] = 'application';
|
||||
object2['application_id'] = connection.application_id ?? value2;
|
||||
object2['location'] = location;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_CONNECTION_CLICKED, object2]);
|
||||
startAuthorization({analyticsLocations: analyticsLocations});
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
/* Metro module 11350; source: modules/guild_onboarding/native/ChannelsAndRolesModal.tsx; dependencies: [57, 31, 27, 1867, 5106, 33, 4501, 697, 632, 6941, 8853, 1244, 9221, 11351, 11357, 9883, 2] */
|
||||
function _fun86914(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:6, offset: 0x01fa75c5, size: 358 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
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 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_7 = (require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */).GuildOnboardingTab;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.screen = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const object4 = {};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.paddingHorizontal = PX_12;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingTop = PX_16;
|
||||
object2.tabBar = object4;
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/ChannelsAndRolesModal.tsx');
|
||||
exports.default = ChannelsAndRolesModal;
|
||||
}
|
||||
|
||||
function ChannelsAndRolesScreen({guildId, defaultTab}) { // fn#86915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:368, offset: 0x01fa772b, size: 631 bytes, params: 2, frame: 27
|
||||
var object2;
|
||||
var r5;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
|
||||
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
|
||||
const value2 = (importDefault(6941) /* metro dependency 6941: useGuildOnboardingAvailable */)(Reflect.apply(useStateFromStores,
|
||||
useStateFromStoresModule, [[GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
}]));
|
||||
const binding = undefined;
|
||||
const useState = binding.useState;
|
||||
const value5 = undefined(Reflect.apply(useState, binding,
|
||||
[defaultTab ?? (value2 ? GuildOnboardingTab.CUSTOMIZE : GuildOnboardingTab.BROWSE)]), 2);
|
||||
const property = value5[0];
|
||||
const property2 = value5[1];
|
||||
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
|
||||
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
|
||||
object2 = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: property2};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const F1VixV = (require(1244) /* metro dependency 1244: indexNative */).t.F1VixV;
|
||||
const items3 = [Reflect.apply(string, intl, [F1VixV])];
|
||||
string = intl.string;
|
||||
const MWmtj8 = (require(1244) /* metro dependency 1244: indexNative */).t.MWmtj8;
|
||||
items3[1] = Reflect.apply(string, intl, [MWmtj8]);
|
||||
object2.items = items3.map(function(a0) {
|
||||
return {id: a0, label: a0, page: null};
|
||||
});
|
||||
const value7 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object2]);
|
||||
value7.useEffect(_fun86918, [value2, property, value7]);
|
||||
const items2 = [value2 ? <View style={styles.tabBar}>{((SegmentedControl) => <SegmentedControl state={value7} />)((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)}</View> : null];
|
||||
const CUSTOMIZE = GuildOnboardingTab.CUSTOMIZE;
|
||||
if (property === CUSTOMIZE) {
|
||||
value = importDefault(11351) /* metro dependency 11351: CustomizeCommunity */;
|
||||
value = ((Component) => <Component setTab={property2} guildId={guildId} />)(value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value = importDefault(11357) /* metro dependency 11357: ChannelBrowser */;
|
||||
value = ((Component) => <Component guildId={guildId} />)(value);
|
||||
r5 = value;
|
||||
}
|
||||
items2[1] = r5;
|
||||
return (
|
||||
<View style={styles.screen}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ChannelsAndRolesModal({guildId, defaultTab}) { // fn#86919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:1168, offset: 0x01fa79fc, size: 224 bytes, params: 2, frame: 20
|
||||
const value2 = (importDefault(6941) /* metro dependency 6941: useGuildOnboardingAvailable */)((require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore],
|
||||
function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
}));
|
||||
const ModalStackNavigator = importDefault(9883) /* metro dependency 9883: ModalStackNavigator */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return (
|
||||
<ModalStackNavigator
|
||||
screenKey="channelAndRolesModal"
|
||||
title={value2 ? Reflect.apply(string, intl, [t.h9mGOP]) : Reflect.apply(string, intl, [t.et6wav])}
|
||||
render={render_86921}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86918() { // fn#86918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:803, offset: 0x01fa79a2, size: 90 bytes, params: 1, frame: 14
|
||||
var r0;
|
||||
var value2;
|
||||
var value4;
|
||||
var BROWSE;
|
||||
var setActiveIndex;
|
||||
let binding = env0_1;
|
||||
if (binding) {
|
||||
r0 = binding;
|
||||
} else {
|
||||
binding = env0_2;
|
||||
value2 = environment.__proto__;
|
||||
r0 = binding !== GuildOnboardingTab.CUSTOMIZE;
|
||||
}
|
||||
if (!r0) {
|
||||
binding = env0_3;
|
||||
value4 = environment.__proto__;
|
||||
BROWSE = GuildOnboardingTab.BROWSE;
|
||||
binding(BROWSE);
|
||||
binding = env0_4;
|
||||
setActiveIndex = binding.setActiveIndex;
|
||||
BROWSE = GuildOnboardingTab.BROWSE;
|
||||
Reflect.apply(setActiveIndex, binding, [BROWSE, false]);
|
||||
}
|
||||
}
|
||||
|
||||
function ChannelsAndRolesModalRender() { // fn#86921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:1443, owner: ChannelsAndRolesModal.render, offset: 0x01fa7adc, size: 43 bytes, params: 1, frame: 14
|
||||
return <ChannelsAndRolesScreen guildId={guildId} defaultTab={defaultTab} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/* Metro module 6769; source: modules/guild_onboarding/native/ConnectionCard.tsx; dependencies: [31, 5106, 33, 6770, 6786, 2] */
|
||||
function _fun53318(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6947:6, offset: 0x01345b68, size: 154 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */).OnboardingConnectionType;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/ConnectionCard.tsx');
|
||||
exports.default = ConnectionCard;
|
||||
}
|
||||
|
||||
function ConnectionCard({connection, guildId, location}) { // fn#53319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6947:247, offset: 0x01345c02, size: 164 bytes, params: 2, frame: 18
|
||||
const connection_type = connection.connection_type;
|
||||
const APPLICATION = OnboardingConnectionType.APPLICATION;
|
||||
if (APPLICATION === connection_type) {
|
||||
return ((Component) => <Component connection={connection} guildId={guildId} location={location} />)(importDefault(6770) /* metro dependency 6770: ApplicationConnectionCard */);
|
||||
}
|
||||
const PROVIDER_CONNECTED_ACCOUNT = OnboardingConnectionType.PROVIDER_CONNECTED_ACCOUNT;
|
||||
if (PROVIDER_CONNECTED_ACCOUNT === connection_type) {
|
||||
return ((Component) => <Component connection={connection} guildId={guildId} location={location} />)(importDefault(6786) /* metro dependency 6786: ProviderConnectionCard */);
|
||||
}
|
||||
connection.connection_type;
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 6785; source: modules/guild_onboarding/native/ConnectionCardView.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 4073, 4578, 2] */
|
||||
function _fun53429(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6963:6, offset: 0x013489c3, size: 502 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_2 = value.View;
|
||||
const env0_3 = value.ActivityIndicator;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object4.borderWidth = 1;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object4.borderColor = BORDER_SUBTLE;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.padding = PX_16;
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.marginBottom = PX_12;
|
||||
object4.flexDirection = 'row';
|
||||
object4.alignItems = 'center';
|
||||
object4.justifyContent = 'space-between';
|
||||
object3.card = object4;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.leftContent = {'flexDirection': 'row', 'alignItems': 'center', 'flex': 1, marginRight: PX_12};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.icon = {'width': 32, 'height': 32, 'marginRight': null, 'justifyContent': 'center', 'alignItems': 'center',
|
||||
marginRight: PX_12};
|
||||
object3.textContent = {flex: 1};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.connectedStatus = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
|
||||
const env0_6 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/ConnectionCardView.tsx');
|
||||
exports.default = ConnectionCardView;
|
||||
}
|
||||
|
||||
function ConnectionCardView({displayName, description, icon, isLoading, isConnected, canConnect, onConnect}) { // fn#53430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6963:872, offset: 0x01348bb9, size: 644 bytes, params: 2, frame: 29
|
||||
var r5;
|
||||
var Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const view = <View style={styles.icon}>{icon}</View>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const view2 = <View style={styles.leftContent}>{view}<View style={styles.textContent}><Text variant="text-md/medium" color="text-strong">{displayName}</Text>{description != null && description.length > 0 && <Text variant="text-sm/normal" color="text-subtle">{description}</Text>}</View></View>;
|
||||
if (isLoading) {
|
||||
r5 = <ActivityIndicator size="small" />;
|
||||
} else if (isConnected) {
|
||||
var viewBinding2Props = {style: styles.connectedStatus};
|
||||
value = <Text variant="text-sm/medium" color="text-feedback-positive">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LV+CXH'])}</Text>;
|
||||
value = <View {...viewBinding2Props}>{value}{((CircleCheckIcon) => <CircleCheckIcon size="sm" color="status-positive" />)((require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon)}</View>;
|
||||
r5 = value;
|
||||
} else {
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
r5 = <Button variant="primary" size="sm" onPress={onConnect} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.S0W8Z5)} disabled={!canConnect} />;
|
||||
}
|
||||
return (
|
||||
<View style={styles.card}>
|
||||
{view2}
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,672 @@
|
||||
/* Metro module 11351; source: modules/guild_onboarding/native/CustomizeCommunity.tsx; dependencies: [31, 27, 6540, 1867, 4605, 3969, 6603, 5106, 661, 1881, 4865, 33, 4501, 697, 6597, 3866, 4048, 566, 11352, 11353, 1305, 1244, 4573, 5105, 6734, 6769, 6789, 1585, 11354, 6602, 5097, 6606, 6739, 1423, 1360, 3860, 4017, 4504, 11355, 4080, 6744, 1962, 5278, 6759, 6735, 2] */
|
||||
function _fun86922(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:6, offset: 0x01fa7b07, size: 1741 bytes, params: 8, frame: 32
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = value.Image;
|
||||
const env0_6 = value.ScrollView;
|
||||
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
value = require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */;
|
||||
const env0_12 = value.GuildOnboardingTab;
|
||||
const env0_13 = value.OnboardingPromptType;
|
||||
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
|
||||
const env0_14 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
|
||||
const env0_15 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_16 = value.jsx;
|
||||
const env0_17 = value.jsxs;
|
||||
const env0_18 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.container = {paddingHorizontal: PX_16};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.sheetTitle = {marginTop: PX_16};
|
||||
const object3 = {position: 'relative'};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.marginTop = PX_12;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.padding = PX_12;
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object3.borderWidth = 2;
|
||||
object3.borderStyle = 'solid';
|
||||
object2.promptContainer = object3;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.titleContainer = {'flexDirection': 'row', 'alignItems': 'center', marginBottom: PX_12};
|
||||
const object5 = {};
|
||||
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
|
||||
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
|
||||
let MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
copyDataProperties(object5, textStyles(PRIMARY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 16), undefined);
|
||||
object2.prompt = object5;
|
||||
object2.badge = {'position': 'absolute', 'top': -6, 'right': -6};
|
||||
object2.badgeText = {fontWeight: 'bold'};
|
||||
const object7 = {};
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object7.backgroundColor = BACKGROUND_BASE_LOWEST;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object7.padding = PX_8;
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object7.paddingRight = PX_32;
|
||||
object7.minHeight = 48;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object7.marginBottom = PX_12;
|
||||
object7.display = 'flex';
|
||||
object7.flexDirection = 'row';
|
||||
object7.flexWrap = 'wrap';
|
||||
object7.alignItems = 'center';
|
||||
object7.position = 'relative';
|
||||
object2.dropdownContainer = object7;
|
||||
const object12 = {};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object12.marginVertical = PX_12;
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object12.marginLeft = PX_4;
|
||||
object2.emptyDropdownText = object12;
|
||||
const object14 = {};
|
||||
object14.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object14.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object14.padding = 6;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object14.marginRight = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object14.marginTop = PX_8;
|
||||
object14.display = 'flex';
|
||||
object14.flexDirection = 'row';
|
||||
object14.alignItems = 'center';
|
||||
object2.dropdownPill = object14;
|
||||
object2.emojiContainer = {'display': 'flex', 'alignItems': 'center'};
|
||||
const object17 = {position: 'absolute'};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object17.right = PX_4;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object17.top = PX_12;
|
||||
object2.dropdownIconContainer = object17;
|
||||
object2.dropdownIcon = {'height': 32, 'width': 32};
|
||||
object2.optionTextEmoji = {'fontSize': 18, 'lineHeight': 22, 'marginRight': 6};
|
||||
object2.optionImageEmoji = {'height': 22, 'width': 22, 'marginRight': 6};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.helpText = {marginTop: PX_4};
|
||||
const object18 = {};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object18.marginTop = PX_24;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object18.marginBottom = PX_16;
|
||||
object18.height = 1;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object18.backgroundColor = BORDER_SUBTLE;
|
||||
object2.sectionSeparator = object18;
|
||||
object2.emptyContainer = {'height': 400, 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.emptyContainerImage = {'width': 120, 'height': 80, marginBottom: PX_16};
|
||||
const object19 = {};
|
||||
const value3 = textStyles;
|
||||
const DISPLAY_SEMIBOLD = Fonts.DISPLAY_SEMIBOLD;
|
||||
MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
copyDataProperties(object19, value3(DISPLAY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object19['marginBottom'] = PX_4;
|
||||
object2.emptyContainerHeader = object19;
|
||||
const object20 = {};
|
||||
const value4 = textStyles;
|
||||
const DISPLAY_MEDIUM = Fonts.DISPLAY_MEDIUM;
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
copyDataProperties(object20, value4(DISPLAY_MEDIUM, TEXT_SUBTLE, 14), undefined);
|
||||
object2.emptyContainerSubheader = object20;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.connectionsContainer = {marginTop: PX_12};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.connectionsPromptContainer = {marginTop: PX_12};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.connectionsTitle = {marginBottom: PX_4};
|
||||
const env0_19 = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {code: 'function CustomizeCommunityTsx1(){const{isNew,brandColor,withSequence,withTiming,Easing,withDelay}=this.__closure;const rawBorderColor=isNew?brandColor+"FF":brandColor+"00";const borderColor=withSequence(withTiming(rawBorderColor,{duration:1,easing:Easing.in(Easing.ease)}),withDelay(500,withTiming(brandColor+"00",{duration:300,easing:Easing.out(Easing.ease)})));return{borderColor:borderColor};}'};
|
||||
object2 = {code: 'function CustomizeCommunityTsx2(){const{isNew,brandColor,withSequence,withTiming,Easing,withDelay}=this.__closure;const rawBorderColor=isNew?brandColor+"FF":brandColor+"00";const borderColor=withSequence(withTiming(rawBorderColor,{duration:1,easing:Easing.in(Easing.ease)}),withDelay(500,withTiming(brandColor+"00",{duration:300,easing:Easing.out(Easing.ease)})));return{borderColor:borderColor};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/CustomizeCommunity.tsx');
|
||||
exports.default = CustomizeCommunity;
|
||||
}
|
||||
|
||||
function EmptyCustomizeCommunity({setTab}) { // fn#86923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:2605, offset: 0x01fa81d4, size: 436 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
const isThemeDark2 = require(dependencyMap[15]).isThemeDark(importDefault(dependencyMap[16])());
|
||||
const env0_1 = require(dependencyMap[17]).useStateFromStores([SelectedGuildStore], function() {
|
||||
return SelectedGuildStore.getGuildId();
|
||||
});
|
||||
const items2 = [<Image style={styles.emptyContainerImage} source={importDefault(isThemeDark2 ? dependencyMap[18] : dependencyMap[19])} />];
|
||||
const LegacyText = require(dependencyMap[20]).LegacyText;
|
||||
const intl = require(dependencyMap[21]).intl;
|
||||
items2[1] = <LegacyText style={styles.emptyContainerHeader}>{intl.string(require(dependencyMap[21]).t.leKHQz)}</LegacyText>;
|
||||
items2[2] = <LegacyText style={styles.emptyContainerSubheader}>{intl.format(require(dependencyMap[21]).t['jH+ktB'],
|
||||
{onBrowseChannels: onBrowseChannels})}</LegacyText>;
|
||||
return (
|
||||
<View style={styles.emptyContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function PromptTitle({item}) { // fn#86926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:3116, offset: 0x01fa83c4, size: 204 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
return (
|
||||
<View style={styles.titleContainer}>
|
||||
<LegacyText style={styles.prompt} accessibilityRole="header">
|
||||
{item.title}
|
||||
{item.required ? ((Text) => <Text variant="text-md/bold" color="text-feedback-critical">{' '}{'*'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null}
|
||||
</LegacyText>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function PromptHelpText({guildId, prompt, selectedOptionIds}) { // fn#86927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:3397, offset: 0x01fa8490, size: 376 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
const r2 = prompt == null || prompt.options == null ? undefined : prompt.options.filter(function(a0) {
|
||||
return selectedOptionIds.includes(a0.id);
|
||||
});
|
||||
let binding = env0_3;
|
||||
let useMemo = binding.useMemo;
|
||||
const value5 = Reflect.apply(useMemo, binding, [_fun86930, [r2]]);
|
||||
binding = env0_3;
|
||||
useMemo = binding.useMemo;
|
||||
const {helpText,
|
||||
helpTextAdditional} = (importDefault(6734) /* metro dependency 6734: usePromptHelpText */)({guild: guild,
|
||||
prompt: prompt, selectedRoleIds: value5, selectedChannelIds: Reflect.apply(useMemo, binding, [_fun86931, [r2]]),
|
||||
itemHook: itemHook});
|
||||
if (helpText !== '') {
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
style={styles.helpText}
|
||||
variant="text-xs/medium"
|
||||
color="text-default"
|
||||
>
|
||||
{helpText}
|
||||
{' '}
|
||||
{helpTextAdditional}
|
||||
</Text>
|
||||
);
|
||||
} else if (helpTextAdditional === '') {
|
||||
return null;
|
||||
} else {
|
||||
const Text2 = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text2
|
||||
style={styles.helpText}
|
||||
variant="text-xs/medium"
|
||||
color="text-default"
|
||||
>
|
||||
{helpText}
|
||||
{' '}
|
||||
{helpTextAdditional}
|
||||
</Text2>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function ConnectionsPrompt({guildId}) { // fn#86933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:4100, offset: 0x01fa86f5, size: 382 bytes, params: 2, frame: 28
|
||||
var r0;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const connections = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getConnections(guildId);
|
||||
});
|
||||
if (connections.length === 0) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.connectionsPromptContainer};
|
||||
string = intl.string;
|
||||
items2 = [<Text style={styles.connectionsTitle} variant="text-md/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t.eDVMrA])}</Text>];
|
||||
string = intl.string;
|
||||
items2[1] = <Text variant="text-xs/medium" color="text-muted">{Reflect.apply(string, intl, [t.BozOXu])}</Text>;
|
||||
items2[2] = <View style={styles.connectionsContainer}>{connections.map(_fun86935)}</View>;
|
||||
r0 = <View {...viewBindingProps}>{items2}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function DropdownOption_86936({option}) { // fn#86936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:4694, offset: 0x01fa88e2, size: 432 bytes, params: 2, frame: 29
|
||||
var Emoji;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore], _fun86937);
|
||||
let r6 = option.emoji?.id != null || option.emoji?.name != null;
|
||||
if (r6) {
|
||||
var viewBinding2Props = {style: styles.emojiContainer};
|
||||
Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
r6 = <View {...viewBinding2Props}><Emoji textEmojiStyle={styles.optionTextEmoji} fastImageStyle={styles.optionImageEmoji} src={value3 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value3.id,
|
||||
|
||||
animated: value3.animated,
|
||||
size: EMOJI_URL_BASE_SIZE}) : undefined} name={option.emoji?.name ?? ''} /></View>;
|
||||
}
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.dropdownPill}>
|
||||
{r6}
|
||||
<Text variant="text-md/semibold">
|
||||
{option.title}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function DropdownPrompt_86938({guildId, prompt}) { // fn#86938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:5763, offset: 0x01fa8ae4, size: 998 bytes, params: 2, frame: 33
|
||||
var object2;
|
||||
var r6;
|
||||
var TextBadge;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const styles = useStyles();
|
||||
let isNew = prompt.isNew;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId, prompt.id);
|
||||
});
|
||||
const env0_3 = value2;
|
||||
const value3 = value2.map(function(a0) {
|
||||
var env0_0 = a0;
|
||||
return prompt.options.find(_fun86941);
|
||||
});
|
||||
const value4 = value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
const value5 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BRAND]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = DropdownPrompt_86938C;
|
||||
object2 = {isNew: isNew, brandColor: value5};
|
||||
object2.withSequence = reanimatedRexportModule.withSequence;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
object2.Easing = Easing;
|
||||
object2.withDelay = reanimatedRexportModule.withDelay;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 16609373875235;
|
||||
closure.__initData = env0_20;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const value7 = env0_3.useCallback(_fun86943, [guildId, prompt,
|
||||
(importDefault(11355) /* metro dependency 11355: useBatchUpdateSelectOption */)(guildId).handleSelectOption,
|
||||
value2.length]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items4 = [styles.promptContainer, value6];
|
||||
isNew = prompt.isNew;
|
||||
if (isNew) {
|
||||
TextBadge = (require(1305) /* metro dependency 1305: native */).TextBadge;
|
||||
r6 = <TextBadge color={(require(1305) /* metro dependency 1305: native */).BadgeColors.BRAND} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)} style={styles.badge} textStyle={styles.badgeText} />;
|
||||
} else {
|
||||
r6 = isNew;
|
||||
}
|
||||
const items2 = [r6];
|
||||
items2[1] = <PromptTitle item={prompt} />;
|
||||
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
const items3 = [value4.length === 0 && ((Text) => <Text style={styles.emptyDropdownText} variant="text-sm/normal" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GmSvdA)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
|
||||
items3[1] = value4.map(_fun86945);
|
||||
items3[2] = <View style={styles.dropdownIconContainer}><Image style={styles.dropdownIcon} source={importDefault(6759) /* metro dependency 6759 */} /></View>;
|
||||
items2[2] = <PressableHighlight style={styles.dropdownContainer} onPress={value7}>{items3}</PressableHighlight>;
|
||||
items2[3] = <PromptHelpText guildId={guildId} prompt={prompt} selectedOptionIds={value2} />;
|
||||
return (
|
||||
<View2 style={items4}>
|
||||
{items2}
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function MultipleChoicePrompt_86946({guildId, prompt}) { // fn#86946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:7906, offset: 0x01fa9164, size: 631 bytes, params: 2, frame: 28
|
||||
var object2;
|
||||
var r7;
|
||||
var TextBadge;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
let isNew = prompt.isNew;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId, prompt.id);
|
||||
});
|
||||
const env0_4 = (importDefault(11355) /* metro dependency 11355: useBatchUpdateSelectOption */)(guildId).handleSelectOption;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
const value3 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BRAND]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = MultipleChoicePrompt_86946O;
|
||||
object2 = {isNew: isNew, brandColor: value3};
|
||||
object2.withSequence = reanimatedRexportModule.withSequence;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
object2.Easing = Easing;
|
||||
object2.withDelay = reanimatedRexportModule.withDelay;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 12802766002208;
|
||||
closure.__initData = env0_21;
|
||||
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items3 = [styles.promptContainer, value4];
|
||||
isNew = prompt.isNew;
|
||||
if (isNew) {
|
||||
TextBadge = (require(1305) /* metro dependency 1305: native */).TextBadge;
|
||||
var textBadgeProps = {color: (require(1305) /* metro dependency 1305: native */).BadgeColors.BRAND};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
textBadgeProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA);
|
||||
textBadgeProps.style = styles.badge;
|
||||
textBadgeProps.textStyle = styles.badgeText;
|
||||
r7 = <TextBadge {...textBadgeProps} />;
|
||||
} else {
|
||||
r7 = isNew;
|
||||
}
|
||||
const items2 = [r7];
|
||||
items2[1] = <PromptTitle item={prompt} />;
|
||||
const options = prompt.options;
|
||||
items2[2] = options.map(_fun86949);
|
||||
items2[3] = <PromptHelpText guildId={guildId} prompt={prompt} selectedOptionIds={value2} />;
|
||||
return (
|
||||
<View style={items3}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function CustomizeCommunity({guildId, setTab}) { // fn#86951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:9266, offset: 0x01fa95f9, size: 1023 bytes, params: 2, frame: 36
|
||||
var r7;
|
||||
var scrollView;
|
||||
var object;
|
||||
var jsxRuntimeEnv0_18Binding;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items4;
|
||||
var map;
|
||||
var items2;
|
||||
var value10;
|
||||
var string;
|
||||
var items3;
|
||||
var object3;
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ReadStateStore], function() {
|
||||
return ReadStateStore.hasUnread(guildId, ReadStateTypes.GUILD_ONBOARDING_QUESTION);
|
||||
});
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun86953);
|
||||
const {onboardingPromptsRaw, newOnboardingPrompts, onboardingPromptsWithNewAnswers, newAnswersCount,
|
||||
onboardingPrompts} = (importDefault(11354) /* metro dependency 11354: useSortedOnboardingPrompts */)(guildId);
|
||||
env0_3.useEffect(_fun86954, [guildId, value2, value3]);
|
||||
env0_3.useEffect(function() {
|
||||
if (guildId != null) {
|
||||
return _fun86956;
|
||||
}
|
||||
}, [guildId]);
|
||||
const value5 = env0_3.useCallback(_fun86957, [guildId]);
|
||||
let length = onboardingPromptsRaw.length;
|
||||
if (length === 0) {
|
||||
var scrollViewBindingProps = {style: styles.container};
|
||||
object3 = {};
|
||||
object3.paddingBottom = bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
scrollViewBindingProps.contentContainerStyle = object3;
|
||||
scrollView = <ScrollView {...scrollViewBindingProps}><EmptyCustomizeCommunity setTab={setTab} /></ScrollView>;
|
||||
} else {
|
||||
var scrollViewBindingProps = {style: styles.container};
|
||||
object = {};
|
||||
object.paddingBottom = bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
scrollViewBindingProps.contentContainerStyle = object;
|
||||
length = newOnboardingPrompts.length;
|
||||
r7 = length > 0 || onboardingPromptsWithNewAnswers.length > 0;
|
||||
if (r7) {
|
||||
jsxRuntimeEnv0_18Binding = jsxRuntimeEnv0_18;
|
||||
items4 = [<Text style={styles.sheetTitle} variant="text-md/medium" color="mobile-text-heading-primary">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.iB5Gqe,
|
||||
|
||||
|
||||
{count: newOnboardingPrompts.length + newAnswersCount})}</Text>];
|
||||
map = newOnboardingPrompts.map;
|
||||
items4[1] = Reflect.apply(map, newOnboardingPrompts, [value5]);
|
||||
map = onboardingPromptsWithNewAnswers.map;
|
||||
items4[2] = Reflect.apply(map, onboardingPromptsWithNewAnswers, [value5]);
|
||||
items4[3] = <View style={styles.sectionSeparator} />;
|
||||
r7 = <>{items4}</>;
|
||||
}
|
||||
items2 = [r7];
|
||||
length = onboardingPrompts.length;
|
||||
value10 = length > 0;
|
||||
if (value10) {
|
||||
jsxRuntimeEnv0_18Binding = jsxRuntimeEnv0_18;
|
||||
string = intl.string;
|
||||
items3 = [<Text style={styles.sheetTitle} variant="text-md/medium" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
|
||||
intl, [t.BGkaer])}</Text>];
|
||||
string = intl.string;
|
||||
items3[1] = <Text variant="text-xs/medium" color="text-muted">{Reflect.apply(string, intl,
|
||||
[t.r6Vm8T])}</Text>;
|
||||
items3[2] = onboardingPrompts.map(value5);
|
||||
r7 = <>{items3}</>;
|
||||
} else {
|
||||
r7 = value10;
|
||||
}
|
||||
items2[1] = r7;
|
||||
items2[2] = <ConnectionsPrompt guildId={guildId} />;
|
||||
scrollView = <ScrollView {...scrollViewBindingProps}>{items2}</ScrollView>;
|
||||
}
|
||||
return scrollView;
|
||||
}
|
||||
|
||||
function onBrowseChannels() { // fn#86925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:3082, owner: EmptyCustomizeCommunity.onBrowseChannels, offset: 0x01fa839b, size: 41 bytes, params: 1, frame: 11
|
||||
var setTabBinding;
|
||||
if (guildId != null) {
|
||||
setTabBinding = setTab;
|
||||
value = environment.__proto__;
|
||||
setTabBinding(GuildOnboardingTab.BROWSE);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86930() { // fn#86930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:3613, offset: 0x01fa8608, size: 85 bytes, params: 1, frame: 13
|
||||
return env0_2 != null ? (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getSelectedRoleIds(env0_2) : new global.Set();
|
||||
}
|
||||
|
||||
function _fun86931() { // fn#86931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:3683, offset: 0x01fa865d, size: 85 bytes, params: 1, frame: 13
|
||||
return env0_2 != null ? (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getSelectedChannelIds(env0_2) : new global.Set();
|
||||
}
|
||||
|
||||
function itemHook(a0, a1) { // fn#86932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:3820, owner: PromptHelpText.itemHook, offset: 0x01fa86b2, size: 67 bytes, params: 3, frame: 15
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-xs/medium"
|
||||
color="mobile-text-heading-primary"
|
||||
key={a1}
|
||||
>
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86935(a0, a1) { // fn#86935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:4604, offset: 0x01fa888e, size: 84 bytes, params: 3, frame: 17
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6769) /* metro dependency 6769: ConnectionCard */;
|
||||
const guildIdBinding = guildId;
|
||||
const CHANNELS_AND_ROLES = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).CHANNELS_AND_ROLES;
|
||||
return ((Component) => <Component connection={a0} guildId={guildIdBinding} location={CHANNELS_AND_ROLES} key={a1} />)(value);
|
||||
}
|
||||
|
||||
function _fun86937() { // fn#86937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:4783, offset: 0x01fa8a92, size: 82 bytes, params: 1, frame: 14
|
||||
const emoji = option.emoji;
|
||||
const value2 = null;
|
||||
const value3 = undefined;
|
||||
return value2 != (value2 == emoji ? value3 : emoji.id) ? EmojiStore.getUsableCustomEmojiById(value2 == option.emoji ? value3 : option.emoji.id) : value2;
|
||||
}
|
||||
|
||||
function _fun86940(a0) { // fn#86940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:5928, offset: 0x01fa8eef, size: 41 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return prompt.options.find(_fun86941);
|
||||
}
|
||||
|
||||
function DropdownPrompt_86938C() { // fn#86942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:6079, owner: DropdownPrompt_86938.c, offset: 0x01fa8f18, size: 321 bytes, params: 1, frame: 27
|
||||
const isNewBinding = isNew;
|
||||
const binding = env0_4;
|
||||
const r9 = isNewBinding ? '' + binding + 'FF' : '' + binding + '00';
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withSequence = reanimatedRexportModule.withSequence;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const object = {duration: 1};
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
object.easing = Easing.in(Easing2.ease);
|
||||
const value5 = Reflect.apply(withTiming, timingModule, [r9, object]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
const withDelay = moduleValue3.withDelay;
|
||||
const moduleValue4 = timingModule;
|
||||
withTiming = moduleValue4.withTiming;
|
||||
let value = '' + env0_4 + '00';
|
||||
const out = Easing.out;
|
||||
const Easing3 = reanimatedRexportModule.Easing;
|
||||
value = Reflect.apply(withTiming, moduleValue4, [value, {duration: 300, easing: Reflect.apply(out, Easing,
|
||||
[Easing3.ease])}]);
|
||||
return {borderColor: Reflect.apply(withSequence, reanimatedRexportModule, [value5, Reflect.apply(withDelay,
|
||||
moduleValue3, [500, value])])};
|
||||
}
|
||||
|
||||
function _fun86943() { // fn#86943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:6613, offset: 0x01fa9059, size: 144 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[39]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[41]);
|
||||
value = value(dependencyMap[40], dependencyMap.paths);
|
||||
const promptBinding = prompt;
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'DropdownOptions', {guildId: guildId, promptId: promptBinding.id,
|
||||
onSelect: onSelect_86944, canBeNew: !promptBinding.isNew, returnToCustomize: true}]);
|
||||
}
|
||||
|
||||
function _fun86945(a0) { // fn#86945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:7299, offset: 0x01fa913f, size: 37 bytes, params: 2, frame: 15
|
||||
return <DropdownOption_86936 option={a0} key={a0.id} />;
|
||||
}
|
||||
|
||||
function MultipleChoicePrompt_86946O() { // fn#86948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:8187, owner: MultipleChoicePrompt_86946.o, offset: 0x01fa93db, size: 321 bytes, params: 1, frame: 27
|
||||
const isNewBinding = isNew;
|
||||
const binding = env0_5;
|
||||
const r9 = isNewBinding ? '' + binding + 'FF' : '' + binding + '00';
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withSequence = reanimatedRexportModule.withSequence;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const object = {duration: 1};
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
object.easing = Easing.in(Easing2.ease);
|
||||
const value5 = Reflect.apply(withTiming, timingModule, [r9, object]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
const withDelay = moduleValue3.withDelay;
|
||||
const moduleValue4 = timingModule;
|
||||
withTiming = moduleValue4.withTiming;
|
||||
let value = '' + env0_5 + '00';
|
||||
const out = Easing.out;
|
||||
const Easing3 = reanimatedRexportModule.Easing;
|
||||
value = Reflect.apply(withTiming, moduleValue4, [value, {duration: 300, easing: Reflect.apply(out, Easing,
|
||||
[Easing3.ease])}]);
|
||||
return {borderColor: Reflect.apply(withSequence, reanimatedRexportModule, [value5, Reflect.apply(withDelay,
|
||||
moduleValue3, [500, value])])};
|
||||
}
|
||||
|
||||
function _fun86949(a0) { // fn#86949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:8919, offset: 0x01fa951c, size: 131 bytes, params: 2, frame: 20
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6735) /* metro dependency 6735: GuildOnboardingPromptOptionButton */;
|
||||
const binding = env0_3;
|
||||
return ((Component) => <Component guildId={guildId} option={a0} selected={binding.includes(a0.id)} onSelect={onSelect_86950} suppressMemberCount canBeNew={!prompt.isNew} key={a0.id} />)(value);
|
||||
}
|
||||
|
||||
function _fun86953() { // fn#86953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:9465, offset: 0x01fa9a1e, size: 44 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return GuildStore.getGuild(guildId)?.latestOnboardingQuestionId;
|
||||
}
|
||||
|
||||
function _fun86954() { // fn#86954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:9701, offset: 0x01fa9a4a, size: 95 bytes, params: 1, frame: 13
|
||||
var value4;
|
||||
var moduleValue;
|
||||
if (guildId != null && (GuildOnboardingPromptsStore.shouldFetchPrompts(guildId) || env0_1)) {
|
||||
value4 = environment.__proto__;
|
||||
moduleValue = require(6602) /* metro dependency 6602: GuildOnboardingPromptsActionCreators */;
|
||||
moduleValue.fetchOnboardingPrompts(guildId);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86955() { // fn#86955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:9804, offset: 0x01fa9aa9, size: 28 bytes, params: 1, frame: 2
|
||||
if (guildId != null) {
|
||||
return _fun86956;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86957(a0) { // fn#86957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:9973, offset: 0x01fa9b28, size: 127 bytes, params: 2, frame: 17
|
||||
const type = a0.type;
|
||||
const MULTIPLE_CHOICE = OnboardingPromptType.MULTIPLE_CHOICE;
|
||||
if (MULTIPLE_CHOICE === type) {
|
||||
return (
|
||||
<MultipleChoicePrompt_86946
|
||||
guildId={guildId}
|
||||
prompt={a0}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
const DROPDOWN = OnboardingPromptType.DROPDOWN;
|
||||
if (DROPDOWN === type) {
|
||||
return (
|
||||
<DropdownPrompt_86938
|
||||
guildId={guildId}
|
||||
prompt={a0}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function onSelect_86944(a0, a1) { // fn#86944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:6712, offset: 0x01fa90e9, size: 86 bytes, params: 3, frame: 15
|
||||
var value6;
|
||||
const value = a1;
|
||||
if (!(!value && prompt.required && env1_3.length === 1)) {
|
||||
value6 = environment.__proto__;
|
||||
handleSelectOption(prompt, a0, value != null && value);
|
||||
}
|
||||
}
|
||||
|
||||
function onSelect_86950(a0) { // fn#86950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:8988, offset: 0x01fa959f, size: 90 bytes, params: 2, frame: 16
|
||||
var value7;
|
||||
const value = a0;
|
||||
if (!(!value && prompt.required && env1_3.length === 1)) {
|
||||
value7 = environment.__proto__;
|
||||
handleSelectOption(prompt, env0_0, value != null && value);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86956() { // fn#86956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:9826, offset: 0x01fa9ac5, size: 99 bytes, params: 1, frame: 19
|
||||
const value = environment.__proto__.__proto__;
|
||||
const readStateActionCreatorsModule = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
|
||||
const ackGuildFeature = readStateActionCreatorsModule.ackGuildFeature;
|
||||
const guildIdBinding = guildId;
|
||||
const GUILD_ONBOARDING_QUESTION = ReadStateTypes.GUILD_ONBOARDING_QUESTION;
|
||||
Reflect.apply(ackGuildFeature, readStateActionCreatorsModule, [guildIdBinding, GUILD_ONBOARDING_QUESTION,
|
||||
GuildOnboardingPromptsStore.ackIdForGuild(guildIdBinding)]);
|
||||
(importDefault(6606) /* metro dependency 6606: GuildOnboardingActionCreators */).updateOnboardingResponses(guildIdBinding);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
/* Metro module 6744; source: modules/guild_onboarding/native/DropdownOptionsActionSheet.tsx; dependencies: [31, 27, 6540, 6603, 1881, 33, 4501, 632, 6739, 1423, 1305, 1244, 4573, 6745, 1585, 4080, 6758, 6275, 6277, 4578, 2] */
|
||||
function _fun53207(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:6, offset: 0x0134123d, size: 353 bytes, params: 8, frame: 20
|
||||
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 emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const env0_7 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({optionTextEmoji: {'fontSize': 24,
|
||||
'lineHeight': 24, 'paddingTop': 5}, optionImageEmoji: {'height': 24, 'width': 24},
|
||||
newBadge: {fontWeight: 'bold'}, labelRow: {'display': 'flex', 'flexDirection': 'row',
|
||||
'justifyContent': 'space-between', 'alignItems': 'center'}, closeButtonWrapper: {'marginTop': 16,
|
||||
'marginHorizontal': 16}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/DropdownOptionsActionSheet.tsx');
|
||||
exports.default = DropdownOptionsActionSheet;
|
||||
}
|
||||
|
||||
function DropdownOptionRow({option, responses, onSelect, canBeNew}) { // fn#53208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:499, offset: 0x0134139e, size: 714 bytes, params: 2, frame: 30
|
||||
var r15;
|
||||
var r6;
|
||||
var r5;
|
||||
var defaultImport;
|
||||
var TextBadge;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([EmojiStore],
|
||||
_fun53209);
|
||||
const value4 = responses.includes(option.id);
|
||||
const value5 = env0_3.useCallback(_fun53210, [onSelect, option, value4]);
|
||||
if (option.emoji?.id != null) {
|
||||
defaultImport = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
var defaultImportProps = {textEmojiStyle: styles.optionTextEmoji, fastImageStyle: styles.optionImageEmoji};
|
||||
r15 = value3 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value3.id,
|
||||
|
||||
animated: value3.animated, size: EMOJI_URL_BASE_SIZE}) : undefined;
|
||||
defaultImportProps.src = r15;
|
||||
r15 = option.emoji?.name ?? '';
|
||||
defaultImportProps.name = r15;
|
||||
r6 = <View style={{'display': 'flex',
|
||||
'alignItems': 'center'}}>{((Component) => <Component {...defaultImportProps} />)(defaultImport)}</View>;
|
||||
} else if (option.emoji?.name != null) {
|
||||
defaultImport = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
var defaultImportProps = {textEmojiStyle: styles.optionTextEmoji, fastImageStyle: styles.optionImageEmoji};
|
||||
r15 = value3 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value3.id,
|
||||
|
||||
animated: value3.animated, size: EMOJI_URL_BASE_SIZE}) : undefined;
|
||||
defaultImportProps.src = r15;
|
||||
r15 = option.emoji?.name ?? '';
|
||||
defaultImportProps.name = r15;
|
||||
r6 = <View style={{'display': 'flex',
|
||||
'alignItems': 'center'}}>{((Component) => <Component {...defaultImportProps} />)(defaultImport)}</View>;
|
||||
} else {
|
||||
r6 = null;
|
||||
}
|
||||
if (canBeNew) {
|
||||
if (option.isUnseen) {
|
||||
TextBadge = (require(1305) /* metro dependency 1305: native */).TextBadge;
|
||||
var textBadgeProps = {color: (require(1305) /* metro dependency 1305: native */).BadgeColors.BRAND};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
textBadgeProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA);
|
||||
textBadgeProps.textStyle = styles.newBadge;
|
||||
r5 = <TextBadge {...textBadgeProps} />;
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return ((Component) => <Component label={<View style={styles.labelRow}><Text variant="text-md/normal">{option.title}</Text>{r5}</View>} selected={value4} leading={r6} trailing={r5} onPress={value5} />)(importDefault(6745) /* metro dependency 6745: FormCheckboxRow */);
|
||||
}
|
||||
|
||||
function DropdownOptionsActionSheet({guildId, promptId, canBeNew, onSelect}) { // fn#53211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:1584, offset: 0x013416d6, size: 625 bytes, params: 2, frame: 32
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const onboardingPrompt = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingPrompt(promptId);
|
||||
});
|
||||
const env0_4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId, promptId);
|
||||
});
|
||||
const value2 = onSelect.useCallback(_fun53214, []);
|
||||
if (onboardingPrompt == null) {
|
||||
return null;
|
||||
}
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
let E2ICbC = (require(1244) /* metro dependency 1244: indexNative */).t.E2ICbC;
|
||||
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [E2ICbC])} />;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
|
||||
const object = {paddingBottom: bottom};
|
||||
const CardSection = (require(1305) /* metro dependency 1305: native */).CardSection;
|
||||
string = intl.string;
|
||||
E2ICbC = (require(1244) /* metro dependency 1244: indexNative */).t.E2ICbC;
|
||||
const cardSection = <CardSection accessibilityRole="radiogroup" accessibilityLabel={Reflect.apply(string, intl,
|
||||
[E2ICbC])}>{onboardingPrompt.options.map(_fun53215)}</CardSection>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<BottomSheet scrollable header={bottomSheetTitleHeader}>
|
||||
<BottomSheetScrollView contentContainerStyle={object}>
|
||||
{cardSection}
|
||||
<View style={styles.closeButtonWrapper}>
|
||||
<Button
|
||||
onPress={value2}
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
|
||||
grow
|
||||
/>
|
||||
</View>
|
||||
</BottomSheetScrollView>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun53209() { // fn#53209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:624, offset: 0x01341668, size: 82 bytes, params: 1, frame: 14
|
||||
const emoji = option.emoji;
|
||||
const value2 = null;
|
||||
const value3 = undefined;
|
||||
return value2 != (value2 == emoji ? value3 : emoji.id) ? EmojiStore.getUsableCustomEmojiById(value2 == option.emoji ? value3 : option.emoji.id) : value2;
|
||||
}
|
||||
|
||||
function _fun53210() { // fn#53210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:784, offset: 0x013416ba, size: 28 bytes, params: 1, frame: 13
|
||||
onSelect(option, !env0_2);
|
||||
}
|
||||
|
||||
function _fun53215(a0) { // fn#53215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:2297, offset: 0x013419a7, size: 80 bytes, params: 2, frame: 17
|
||||
const Boolean = global.Boolean;
|
||||
return (
|
||||
<DropdownOptionRow
|
||||
option={a0}
|
||||
responses={env0_4}
|
||||
onSelect={onSelect}
|
||||
canBeNew={Boolean(canBeNew)}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,311 @@
|
||||
/* Metro module 6790; source: modules/guild_onboarding/native/GuildOnboardingCompleted.tsx; dependencies: [31, 27, 4502, 1938, 1867, 1878, 6603, 33, 4501, 697, 1484, 566, 6736, 3868, 6791, 1423, 1852, 1360, 4017, 4504, 5475, 6618, 4573, 1244, 1305, 6792, 6819, 3738, 6822, 2] */
|
||||
function _fun53451(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:6, offset: 0x0134b5bc, size: 747 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_4 = value.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {screen: {'flex': 1, 'position': 'relative'}, container: {'backgroundColor': 'rgba(0, 0, 0, 0.5)',
|
||||
'paddingHorizontal': 24, 'display': 'flex', 'justifyContent': 'center', 'flexGrow': 1}};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object2.containerWithoutSplash = {backgroundColor: BACKGROUND_BASE_LOWEST};
|
||||
object2.backgroundImage = {'position': 'absolute', 'width': '100%', 'height': '100%'};
|
||||
object2.title = {};
|
||||
object2.subtitle = {marginTop: 16};
|
||||
const object3 = {'marginTop': 24, 'padding': 16, 'paddingBottom': 32};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object2.card = object3;
|
||||
object2.username = {marginTop: 16};
|
||||
object2.rolesHeader = {marginTop: 8};
|
||||
object2.roles = {'marginTop': 12, 'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap'};
|
||||
object2.role = {marginRight: 8};
|
||||
const object5 = {'paddingHorizontal': 8, 'height': 28, 'borderRadius': null, 'display': 'flex',
|
||||
'justifyContent': 'center'};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object5.borderWidth = StyleSheet.hairlineWidth;
|
||||
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object5.borderColor = BORDER_SUBTLE;
|
||||
object2.roleOverflow = object5;
|
||||
const object6 = {'marginTop': 24, 'borderColor': null, 'borderWidth': 2, 'borderRadius': null, 'padding': 12,
|
||||
'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object6.borderColor = BORDER_SUBTLE;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.animation = object6;
|
||||
object2.wave = {transform: [{translateX: 24}, {rotate: '5deg'}]};
|
||||
object2.animationText = {'flexGrow': 1, 'marginLeft': 8};
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {code: "function GuildOnboardingCompletedTsx1(){const{withSequence,withTiming,withDelay,ANIMATION_DURATION,Easing,useReducedMotion}=this.__closure;const opacity=withSequence(withTiming(0,{duration:0}),withDelay(ANIMATION_DURATION,withTiming(0.5,{duration:ANIMATION_DURATION})),withTiming(1,{duration:ANIMATION_DURATION,easing:Easing.out(Easing.ease)}));const scale=withSequence(withTiming(1,{duration:0}),withDelay(ANIMATION_DURATION,withTiming(1.5,{duration:ANIMATION_DURATION,easing:Easing.out(Easing.ease)})),withTiming(1,{duration:useReducedMotion?1:ANIMATION_DURATION,easing:Easing.out(Easing.ease)}));const rawRotation=withSequence(withTiming('0deg',{duration:0}),withDelay(ANIMATION_DURATION,withTiming('-2deg',{duration:ANIMATION_DURATION})),withTiming('-5deg',{duration:ANIMATION_DURATION}));return{opacity:opacity,transform:[{rotate:rawRotation},{scale:scale}]};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingCompleted.tsx');
|
||||
exports.default = GuildOnboardingCompleted;
|
||||
}
|
||||
|
||||
function GuildOnboardingCompleted({guildId, prompts, completeOnboarding, onClose}) { // fn#53452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:2290, offset: 0x0134b8a7, size: 2256 bytes, params: 2, frame: 49
|
||||
var object7;
|
||||
var r18;
|
||||
var defaultImport;
|
||||
var getGuildSplashURL;
|
||||
var object4;
|
||||
const styles = useStyles();
|
||||
const env0_3 = styles;
|
||||
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
const value4 = (importDefault(6736) /* metro dependency 6736: useGuildRoleMemberCounts */)(guildId);
|
||||
const nativeModule = require(3868) /* metro dependency 3868: native */;
|
||||
const useThemeContext = nativeModule.useThemeContext;
|
||||
object7 = {backgroundColor: (require(6791) /* metro dependency 6791: useProfileThemeValuesNative */).useProfileThemeValues(Reflect.apply(useThemeContext,
|
||||
nativeModule, []).theme)?.rolePillBackgroundColor};
|
||||
if (guild != null) {
|
||||
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
getGuildSplashURL = defaultImport.getGuildSplashURL;
|
||||
object4 = {};
|
||||
object4.id = guild.id;
|
||||
object4.splash = guild.splash;
|
||||
object4.size = 400 * (importDefault(1852) /* metro dependency 1852: getDevicePixelRatioNative */)();
|
||||
r18 = Reflect.apply(getGuildSplashURL, defaultImport, [object4]);
|
||||
} else {
|
||||
r18 = null;
|
||||
}
|
||||
const env0_7 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingResponses(guildId);
|
||||
}, [guildId]);
|
||||
const value11 = prompts.map(function(a0) {
|
||||
return a0.options;
|
||||
}).flat().filter(_fun53457);
|
||||
const binding = env0_3;
|
||||
const {numSharedRoleMembers, allSelectedRoleIds} = binding.useMemo(_fun53458, [value4, value11]);
|
||||
const value13 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildRoleStore],
|
||||
function() {
|
||||
return GuildRoleStore.getManyRoles(guildId, allSelectedRoleIds);
|
||||
}, [allSelectedRoleIds, guildId]);
|
||||
binding.useLayoutEffect(_fun53462, [value3]);
|
||||
binding.useEffect(function() {
|
||||
global.setTimeout(_fun53465, 3600);
|
||||
}, [completeOnboarding, onClose]);
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = GuildOnboardingCompletedB;
|
||||
const object5 = {};
|
||||
object5.withSequence = reanimatedRexportModule.withSequence;
|
||||
object5.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object5.withDelay = reanimatedRexportModule.withDelay;
|
||||
object5.ANIMATION_DURATION = 400;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
object5.Easing = Easing;
|
||||
object5.useReducedMotion = useReducedMotion;
|
||||
closure.__closure = object5;
|
||||
closure.__workletHash = 8282245217026;
|
||||
closure.__initData = env0_13;
|
||||
const value14 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
if (currentUser == null) {
|
||||
return null;
|
||||
}
|
||||
if (guild == null) {
|
||||
return null;
|
||||
}
|
||||
const value15 = value13.length - 3;
|
||||
const r6 = r18 != null ? ((Component) => <Component source={{uri: r18}} style={styles.backgroundImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : null;
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const items10 = [styles.container];
|
||||
items10[1] = r18 == null ? styles.containerWithoutSplash : null;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const value17 = 'always-white';
|
||||
const r13 = r18 == null ? 'mobile-text-heading-primary' : value17;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const PFWIYe = (require(1244) /* metro dependency 1244: indexNative */).t.PFWIYe;
|
||||
const items11 = [<Text style={styles.title} accessibilityRole="header" variant="heading-xxl/extrabold" color={r13}>{Reflect.apply(string,
|
||||
intl, [PFWIYe])}</Text>];
|
||||
items11[1] = <Text style={styles.subtitle} accessibilityRole="header" variant="text-md/medium" color={r18 == null ? 'text-muted' : value17}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.og4NNr)}</Text>;
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const XXLARGE = AvatarSizes.XXLARGE;
|
||||
const items12 = [<Avatar size={XXLARGE} user={currentUser} guildId={guildId} animate={false} />];
|
||||
const object6 = {'style': null, 'variant': 'heading-xl/semibold', 'color': 'mobile-text-heading-primary'};
|
||||
let username = styles.username;
|
||||
object6.style = username;
|
||||
username = currentUser.username;
|
||||
items12[1] = <Text {...object6}>{username}</Text>;
|
||||
items12[2] = numSharedRoleMembers > 0 ? <Text style={styles.rolesHeader} variant="text-sm/normal" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.l1Jc1n,
|
||||
{numSharedRoleMembers: numSharedRoleMembers})}</Text> : null;
|
||||
items12[3] = <View style={styles.roles}>{value13.slice(0,
|
||||
3).map(_fun53468)}{value15 > 0 ? <View style={[styles.roleOverflow,
|
||||
object7]}><Text variant="heading-deprecated-12/semibold" color="mobile-text-heading-primary">{'+' + value15}</Text></View> : null}</View>;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items15 = [styles.animation, value14];
|
||||
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
|
||||
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
|
||||
const LARGE = GuildIconSizes.LARGE;
|
||||
const items16 = [<GuildIcon guild={guild} size={LARGE} />];
|
||||
const format = intl.format;
|
||||
const FXREhf = (require(1244) /* metro dependency 1244: indexNative */).t.FXREhf;
|
||||
items16[1] = <View style={styles.animationText}><Text variant="text-sm/medium" color="mobile-text-heading-primary">{Reflect.apply(format,
|
||||
intl, [FXREhf,
|
||||
{guildName: guild.name}])}</Text><Text variant="text-xs/normal" color="text-muted">{'' + (importDefault(3738) /* metro dependency 3738 */)().format('LL')}</Text></View>;
|
||||
items16[2] = ((Component) => <Component source={importDefault(6822) /* metro dependency 6822 */} style={styles.wave} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
items12[4] = <View2 style={items15}>{items16}</View2>;
|
||||
items11[2] = <View style={styles.card}>{items12}</View>;
|
||||
return (
|
||||
<View style={styles.screen}>
|
||||
{r6}
|
||||
<SafeAreaPaddingView bottom style={items10}>
|
||||
<View>
|
||||
{items11}
|
||||
</View>
|
||||
</SafeAreaPaddingView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun53457({id}) { // fn#53457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:2882, offset: 0x0134c1bf, size: 27 bytes, params: 2, frame: 11
|
||||
return env0_7.includes(id);
|
||||
}
|
||||
|
||||
function _fun53458() { // fn#53458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:2917, offset: 0x0134c1da, size: 174 bytes, params: 1, frame: 18
|
||||
var r2;
|
||||
var Math;
|
||||
var max;
|
||||
var value6;
|
||||
var items2;
|
||||
const value3 = env0_8.map(function(a0) {
|
||||
return a0.roleIds;
|
||||
}).flat();
|
||||
const value5 = value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
let value = 0;
|
||||
if (env0_6 != null) {
|
||||
if (value5.length > value) {
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
value6 = value5.map(_fun53460);
|
||||
items2 = [];
|
||||
arraySpread(items2, value6, value, value);
|
||||
value = apply(max, items2, Math, value);
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = value;
|
||||
}
|
||||
} else {
|
||||
r2 = value;
|
||||
}
|
||||
return {numSharedRoleMembers: r2, allSelectedRoleIds: value5};
|
||||
}
|
||||
|
||||
function _fun53462() { // fn#53462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:3266, offset: 0x0134c2c6, size: 36 bytes, params: 1, frame: 12
|
||||
env0_4.setOptions({headerLeft: function() {
|
||||
return null;
|
||||
}});
|
||||
}
|
||||
|
||||
function _fun53464() { // fn#53464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:3327, offset: 0x0134c2ea, size: 31 bytes, params: 1, frame: 13
|
||||
global.setTimeout(function() {
|
||||
completeOnboarding();
|
||||
onClose();
|
||||
}, 3600);
|
||||
}
|
||||
|
||||
function GuildOnboardingCompletedB() { // fn#53467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:3472, owner: GuildOnboardingCompleted.B, offset: 0x0134c32f, size: 649 bytes, params: 1, frame: 31
|
||||
var object2;
|
||||
let value = environment.__proto__;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let withSequence = reanimatedRexportModule.withSequence;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const value2 = Reflect.apply(withTiming, timingModule, [0, {duration: 0}]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
let withDelay = moduleValue3.withDelay;
|
||||
const moduleValue4 = timingModule;
|
||||
withTiming = moduleValue4.withTiming;
|
||||
const value3 = 400;
|
||||
const value4 = Reflect.apply(withDelay, moduleValue3, [value3, Reflect.apply(withTiming, moduleValue4, [0.5,
|
||||
{duration: value3}])]);
|
||||
const moduleValue5 = timingModule;
|
||||
withTiming = moduleValue5.withTiming;
|
||||
object2 = {duration: value3};
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
let out = Easing.out;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
object2.easing = Reflect.apply(out, Easing, [Easing2.ease]);
|
||||
const value5 = 1;
|
||||
const value6 = Reflect.apply(withSequence, reanimatedRexportModule, [value2, value4, Reflect.apply(withTiming,
|
||||
moduleValue5, [value5, object2])]);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
withSequence = moduleValue6.withSequence;
|
||||
const value7 = timingModule.withTiming(value5, {duration: 0});
|
||||
const moduleValue8 = reanimatedRexportModule;
|
||||
withDelay = moduleValue8.withDelay;
|
||||
const moduleValue9 = timingModule;
|
||||
withTiming = moduleValue9.withTiming;
|
||||
object2 = {duration: value3};
|
||||
out = Easing.out;
|
||||
const Easing3 = reanimatedRexportModule.Easing;
|
||||
object2.easing = Reflect.apply(out, Easing, [Easing3.ease]);
|
||||
const value8 = Reflect.apply(withDelay, moduleValue8, [value3, Reflect.apply(withTiming, moduleValue9, [1.5,
|
||||
object2])]);
|
||||
const moduleValue10 = timingModule;
|
||||
withTiming = moduleValue10.withTiming;
|
||||
object2 = {};
|
||||
object2.duration = useReducedMotion ? value5 : value3;
|
||||
out = Easing.out;
|
||||
const Easing4 = reanimatedRexportModule.Easing;
|
||||
object2.easing = Reflect.apply(out, Easing, [Easing4.ease]);
|
||||
value = Reflect.apply(withSequence, moduleValue6, [value7, value8, Reflect.apply(withTiming, moduleValue10, [value5,
|
||||
object2])]);
|
||||
object2 = {opacity: value6};
|
||||
const moduleValue11 = reanimatedRexportModule;
|
||||
withSequence = moduleValue11.withSequence;
|
||||
const value10 = timingModule.withTiming('0deg', {duration: 0});
|
||||
const moduleValue13 = reanimatedRexportModule;
|
||||
withDelay = moduleValue13.withDelay;
|
||||
const moduleValue14 = timingModule;
|
||||
const value11 = Reflect.apply(withDelay, moduleValue13, [value3, moduleValue14.withTiming('-2deg',
|
||||
{duration: value3})]);
|
||||
const moduleValue15 = timingModule;
|
||||
object2.transform = [{rotate: Reflect.apply(withSequence, moduleValue11, [value10, value11,
|
||||
moduleValue15.withTiming('-5deg', {duration: value3})])}, {scale: value}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun53468(a0) { // fn#53468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:5492, offset: 0x0134c5b8, size: 112 bytes, params: 2, frame: 19
|
||||
const viewBindingProps = {style: styles.role};
|
||||
const RoleItem = (require(6792) /* metro dependency 6792: UserProfileRolesCard */).RoleItem;
|
||||
return (
|
||||
<View {...viewBindingProps} key={a0.id}>
|
||||
<RoleItem
|
||||
role={a0}
|
||||
guildId={guild.id}
|
||||
disableInteraction
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun53460(a0) { // fn#53460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:3054, offset: 0x0134c288, size: 30 bytes, params: 2, frame: 3
|
||||
const value = environment.__proto__;
|
||||
return env1_6[a0] ?? 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,409 @@
|
||||
/* Metro module 6768; source: modules/guild_onboarding/native/GuildOnboardingConnectionPrompt.tsx; dependencies: [31, 27, 6616, 5109, 5040, 1867, 6603, 5106, 6600, 661, 33, 4501, 5314, 697, 1484, 1585, 566, 5105, 683, 4863, 6602, 6618, 4573, 1244, 6769, 6789, 4578, 2] */
|
||||
function _fun53304(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:6, offset: 0x01344d2a, size: 788 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_53307 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = value.ScrollView;
|
||||
const memberVerificationFormStore = importDefault(6616) /* metro dependency 6616: MemberVerificationFormStore */;
|
||||
const authorizedAppsStore = importDefault(5109) /* metro dependency 5109: AuthorizedAppsStore */;
|
||||
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const env0_11 = (require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */).OnboardingConnectionType;
|
||||
const env0_12 = (require(6600) /* metro dependency 6600: GuildOnboardingConstants */).GuildOnboardingModalStates;
|
||||
const env0_13 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value.jsx;
|
||||
const env0_15 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.flex = {flex: 1};
|
||||
const object5 = {'display': 'flex', 'flex': 1, 'flexGrow': 1};
|
||||
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
||||
object5.marginTop = NAV_BAR_HEIGHT;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.marginBottom = PX_16;
|
||||
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object5.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object2.container = object5;
|
||||
const object6 = {'display': 'flex', 'flexGrow': 1};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingTop = PX_16;
|
||||
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object6.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object2.scrollContainer = object6;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.header = {marginBottom: PX_24};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.title = {marginBottom: PX_8};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.description = {marginTop: PX_8};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.connectionsList = {marginTop: PX_8};
|
||||
const object7 = {'display': 'flex', 'flexDirection': 'column', 'justifyContent': 'flex-end', 'alignItems': 'center',
|
||||
'bottom': 0, 'paddingBottom': null, 'position': 'absolute', 'width': '100%'};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object7.paddingBottom = PX_8;
|
||||
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object7.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object2.footer = object7;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.footerContent = {width: '100%', paddingHorizontal: PX_16};
|
||||
const env0_16 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingConnectionPrompt.tsx');
|
||||
exports.default = GuildOnboardingConnectionPrompt;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_53305(a0, a1) { // fn#53305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:325, offset: 0x0134503e, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun53306;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_53307(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_53307(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_53307(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun53306;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function GuildOnboardingConnectionPrompt({guildId, onComplete, isLastStep}) { // fn#53308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:2199, offset: 0x013451b0, size: 1348 bytes, params: 2, frame: 39
|
||||
var r16;
|
||||
var object3;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items4;
|
||||
var items6;
|
||||
var object9;
|
||||
var Button;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const env0_3 = value2;
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value3 = 64 + bottom;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
const value4 = value3 + PX_8;
|
||||
const binding = env0_3;
|
||||
const env0_4 = binding.useRef(false);
|
||||
const connections = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getConnections(guildId);
|
||||
});
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingPromptsForOnboarding(guildId);
|
||||
});
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
const rulesPrompt = (require(566) /* metro dependency 566: flux */).useStateFromStores([MemberVerificationFormStore],
|
||||
function() {
|
||||
return MemberVerificationFormStore.getRulesPrompt(guildId);
|
||||
});
|
||||
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.isLoading();
|
||||
});
|
||||
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthorizedAppsStore,
|
||||
ConnectedAccountsStore], _fun53314, [connections]);
|
||||
binding.useEffect(_fun53315, [guildId, value6, connections]);
|
||||
const value8 = binding.useCallback(_fun53316, [value5.length, guild, rulesPrompt, value2, onComplete, connections,
|
||||
value7, isLastStep, guildId]);
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const safeAreaPaddingViewProps = {top: true, style: [styles.flex, styles.container]};
|
||||
if (value6) {
|
||||
safeAreaPaddingViewProps.children = <View style={[styles.flex, {'justifyContent': 'center',
|
||||
'alignItems': 'center'}]}><Text variant="text-md/normal" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZTNur7)}</Text></View>;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.flex};
|
||||
var scrollViewProps = {contentContainerStyle: [styles.scrollContainer, {paddingBottom: value4}]};
|
||||
var viewBindingProps2 = {style: styles.header};
|
||||
string = intl.string;
|
||||
items4 = [<Text style={styles.title} accessibilityRole="header" variant="heading-xl/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t.eDVMrA])}</Text>];
|
||||
string = intl.string;
|
||||
items4[1] = <Text style={styles.description} variant="text-md/normal" color="text-muted">{Reflect.apply(string,
|
||||
intl, [t.BozOXu])}</Text>;
|
||||
items6 = [<ScrollView {...scrollViewProps}><View {...viewBindingProps2}>{items4}</View><View style={styles.connectionsList}>{connections.map(_fun53317)}</View></ScrollView>];
|
||||
var viewProps = {style: [styles.footer, styles.footerContent, {paddingBottom: bottom}]};
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var buttonProps = {variant: value7 || isLastStep ? 'primary' : 'secondary', size: 'md'};
|
||||
string = intl.string;
|
||||
if (isLastStep) {
|
||||
value = Reflect.apply(string, intl, [t['8SuVoE']]);
|
||||
value = '' + value + ' 🎉';
|
||||
r16 = value;
|
||||
} else {
|
||||
r16 = value7 ? Reflect.apply(string, intl, [t.PDTjLN]) : Reflect.apply(string, intl, [t['5Wxrcd']]);
|
||||
}
|
||||
buttonProps.text = r16;
|
||||
buttonProps.onPress = value8;
|
||||
buttonProps.grow = true;
|
||||
items6[1] = <View {...viewProps}><Button {...buttonProps} /></View>;
|
||||
safeAreaPaddingViewProps.children = <View {...viewBindingProps}>{items6}</View>;
|
||||
}
|
||||
return <SafeAreaPaddingView {...safeAreaPaddingViewProps} />;
|
||||
}
|
||||
|
||||
function _fun53314() { // fn#53314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:2739, offset: 0x01345773, size: 208 bytes, params: 1, frame: 20
|
||||
var r2;
|
||||
var value5;
|
||||
var connection_type;
|
||||
var APPLICATION;
|
||||
var PROVIDER_CONNECTED_ACCOUNT;
|
||||
var provider_id;
|
||||
var getAccount;
|
||||
var value6;
|
||||
var revoked;
|
||||
var getNewestTokenForApplication;
|
||||
var application_id;
|
||||
var value7;
|
||||
const value3 = _createForOfIteratorHelperLoose_53305(connections);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r2 = value4;
|
||||
reducibleLoop1: while (true) {
|
||||
value5 = r2.value;
|
||||
connection_type = value5.connection_type;
|
||||
APPLICATION = OnboardingConnectionType.APPLICATION;
|
||||
if (connection_type === APPLICATION) {
|
||||
getNewestTokenForApplication = AuthorizedAppsStore.getNewestTokenForApplication;
|
||||
application_id = value5.application_id;
|
||||
reducibleJoin8: while (true) {
|
||||
if (Reflect.apply(getNewestTokenForApplication, AuthorizedAppsStore, [application_id]) != null) {
|
||||
return true;
|
||||
}
|
||||
break reducibleJoin8;
|
||||
}
|
||||
} else {
|
||||
connection_type = value5.connection_type;
|
||||
PROVIDER_CONNECTED_ACCOUNT = OnboardingConnectionType.PROVIDER_CONNECTED_ACCOUNT;
|
||||
reducibleJoin8: while (true) {
|
||||
if (connection_type !== PROVIDER_CONNECTED_ACCOUNT) {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
provider_id = value5.provider_id;
|
||||
if (provider_id == null) {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
getAccount = ConnectedAccountsStore.getAccount;
|
||||
provider_id = value5.provider_id;
|
||||
value6 = Reflect.apply(getAccount, ConnectedAccountsStore, [null, provider_id]);
|
||||
if (value6 == null) {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
revoked = value6.revoked;
|
||||
if (!revoked) {
|
||||
return true;
|
||||
}
|
||||
break reducibleJoin8;
|
||||
}
|
||||
}
|
||||
value7 = value3();
|
||||
done = value7.done;
|
||||
if (done) {
|
||||
return false;
|
||||
}
|
||||
r2 = value7;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function _fun53315() { // fn#53315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:3106, offset: 0x01345843, size: 301 bytes, params: 1, frame: 22
|
||||
var connectionsBinding;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var getProviderConnectionState;
|
||||
var value3;
|
||||
var applicationConnectionState;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var GUILD_ONBOARDING_STEP_VIEWED;
|
||||
var object2;
|
||||
var moduleValue3;
|
||||
var connected;
|
||||
var notConnected;
|
||||
if (!env0_9) {
|
||||
if (connections.length !== 0) {
|
||||
if (!env0_4.current) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
|
||||
getProviderConnectionState = moduleValue.getProviderConnectionState;
|
||||
connectionsBinding = connections;
|
||||
value3 = Reflect.apply(getProviderConnectionState, moduleValue, [connectionsBinding]);
|
||||
applicationConnectionState = (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getApplicationConnectionState(connectionsBinding);
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
GUILD_ONBOARDING_STEP_VIEWED = AnalyticEvents.GUILD_ONBOARDING_STEP_VIEWED;
|
||||
object2 = {};
|
||||
moduleValue3 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, moduleValue3.collectGuildAnalyticsMetadata(guildId), moduleValue3);
|
||||
object2['step'] = (require(6602) /* metro dependency 6602: GuildOnboardingPromptsActionCreators */).CONNECTIONS_STEP;
|
||||
object2['required'] = false;
|
||||
connected = value3.connected;
|
||||
object2['provider_connections_connected'] = connected;
|
||||
notConnected = value3.notConnected;
|
||||
object2['provider_connections_not_connected'] = notConnected;
|
||||
connected = applicationConnectionState.connected;
|
||||
object2['application_connections_connected'] = connected;
|
||||
notConnected = applicationConnectionState.notConnected;
|
||||
object2['application_connections_not_connected'] = notConnected;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_VIEWED, object2]);
|
||||
env0_4.current = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun53316() { // fn#53316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:3612, offset: 0x01345970, size: 420 bytes, params: 1, frame: 24
|
||||
var moduleValue4;
|
||||
var binding;
|
||||
const guildOnboardingUtilsModule = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
|
||||
const getProviderConnectionState = guildOnboardingUtilsModule.getProviderConnectionState;
|
||||
const connectionsBinding = connections;
|
||||
const value3 = Reflect.apply(getProviderConnectionState, guildOnboardingUtilsModule, [connectionsBinding]);
|
||||
const applicationConnectionState = guildOnboardingUtilsModule.getApplicationConnectionState(connectionsBinding);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
const object2 = {};
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), appAnalyticsUtilsModule);
|
||||
const CONNECTIONS_STEP = (require(6602) /* metro dependency 6602: GuildOnboardingPromptsActionCreators */).CONNECTIONS_STEP;
|
||||
object2['step'] = CONNECTIONS_STEP;
|
||||
object2['skipped'] = !env0_10;
|
||||
object2['back'] = false;
|
||||
object2['options_selected'] = 0;
|
||||
object2['in_onboarding'] = true;
|
||||
object2['is_final_step'] = isLastStep;
|
||||
object2['provider_connections_connected'] = value3.connected;
|
||||
object2['provider_connections_not_connected'] = value3.notConnected;
|
||||
object2['application_connections_connected'] = applicationConnectionState.connected;
|
||||
object2['application_connections_not_connected'] = applicationConnectionState.notConnected;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_COMPLETED, object2]);
|
||||
if (env0_6.length > 0) {
|
||||
binding = env0_3;
|
||||
binding.push(GuildOnboardingModalStates.PROMPT, {currentPrompt: 0});
|
||||
} else {
|
||||
moduleValue4 = guildOnboardingUtilsModule;
|
||||
if (moduleValue4.showRulesInOnboarding(guild, rulesPrompt)) {
|
||||
binding = env0_3;
|
||||
binding.push(GuildOnboardingModalStates.RULES);
|
||||
} else {
|
||||
onComplete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun53317(a0, a1) { // fn#53317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:5050, offset: 0x01345b14, size: 84 bytes, params: 3, frame: 17
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6769) /* metro dependency 6769: ConnectionCard */;
|
||||
const guildIdBinding = guildId;
|
||||
const GUILD_ONBOARDING = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GUILD_ONBOARDING;
|
||||
return ((Component) => <Component connection={a0} guildId={guildIdBinding} location={GUILD_ONBOARDING} key={a1} />)(value);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 6600; source: modules/guild_onboarding/native/GuildOnboardingConstants.tsx; dependencies: [2] */
|
||||
function _fun52021(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6778:6, offset: 0x012ea5ec, size: 150 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingConstants.tsx');
|
||||
exports.GUILD_ONBOARDING_MODAL_KEY = 'GUILD_ONBOARDING_MODAL_KEY';
|
||||
exports.CHANNELS_AND_ROLES_MODAL_KEY = 'CHANNELS_AND_ROLES_MODAL_KEY';
|
||||
exports.GuildOnboardingModalStates = {COVER: 'cover', PROMPT: 'prompt', CONNECTIONS: 'connections',
|
||||
COMPLETED: 'completed', RULES: 'rules'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
/* Metro module 15720; source: modules/guild_onboarding/native/GuildOnboardingManager.tsx; dependencies: [7, 6, 15, 17, 18, 1945, 1867, 3969, 661, 3772, 6598, 1391, 4860, 2] */
|
||||
function _fun120709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:6, offset: 0x02533a69, size: 332 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const env0_11 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
|
||||
const env0_12 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
|
||||
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun120713(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_120710() { // fn#120710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:229, offset: 0x02533bb5, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_120710_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun120713(a0) { // fn#120713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:446, offset: 0x02533c17, size: 42 bytes, params: 2, frame: 14
|
||||
const closure = GuildOnboardingManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_3(closure);
|
||||
}
|
||||
|
||||
function GuildOnboardingManager(a0) { // fn#120714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:458, offset: 0x02533c41, size: 228 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_4;
|
||||
binding(this, GuildOnboardingManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_6(GuildOnboardingManager);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_120710()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {CHANNEL_SELECT: CHANNEL_SELECT_120715, GUILD_DELETE: GUILD_DELETE_120716,
|
||||
POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_120717};
|
||||
value.handleConnectionOpen = handleConnectionOpen_120718;
|
||||
value.handleChannelSelect = handleChannelSelect_120719;
|
||||
value.handleGuildDelete = handleGuildDelete_120720;
|
||||
value._openOnboardingIfIncomplete = _openOnboardingIfIncomplete;
|
||||
return value;
|
||||
}
|
||||
|
||||
function GuildOnboardingManagerHandleConnectionOpen() { // fn#120718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:877, owner: GuildOnboardingManager.handleConnectionOpen, offset: 0x02533d25, size: 79 bytes, params: 1, frame: 13
|
||||
const value2 = null;
|
||||
const r3 = value2 != env2_13 ? env2_13 : SelectedGuildStore.getGuildId();
|
||||
const r1 = value2 != r3 ? r3 : value2;
|
||||
if (value2 != r1) {
|
||||
env0_0._openOnboardingIfIncomplete(r1);
|
||||
}
|
||||
}
|
||||
|
||||
function GuildOnboardingManagerHandleChannelSelect({guildId, channelId}) { // fn#120719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:997, owner: GuildOnboardingManager.handleChannelSelect, offset: 0x02533d74, size: 102 bytes, params: 2, frame: 14
|
||||
var value4;
|
||||
let r1 = env2_13 === guildId && env2_14 === channelId;
|
||||
if (!r1) {
|
||||
value4 = null;
|
||||
r1 = value4 != channelId ? channelId : value4;
|
||||
r1 = value4 != guildId ? guildId : value4;
|
||||
if (value4 != r1) {
|
||||
env0_0._openOnboardingIfIncomplete(r1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function GuildOnboardingManagerHandleGuildDelete({guild}) { // fn#120720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:1138, owner: GuildOnboardingManager.handleGuildDelete, offset: 0x02533dda, size: 51 bytes, params: 2, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(6598) /* metro dependency 6598: doGuildOnboardingNative */;
|
||||
value.discardOnboardingPromise(guild.id);
|
||||
}
|
||||
|
||||
function _openOnboardingIfIncomplete(a0) { // fn#120721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:1223, owner: GuildOnboardingManager._openOnboardingIfIncomplete, offset: 0x02533e0d, size: 252 bytes, params: 2, frame: 19
|
||||
var r1;
|
||||
var features;
|
||||
var selfMember;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const guild = GuildStore.getGuild(a0);
|
||||
if (guild != null) {
|
||||
features = guild.features;
|
||||
if (features.has(GuildFeatures.GUILD_ONBOARDING)) {
|
||||
selfMember = GuildMemberStore.getSelfMember(a0);
|
||||
value4 = selfMember != null;
|
||||
if (value4) {
|
||||
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
r1 = !moduleValue.hasFlag(selfMember.flags ?? 0, GuildMemberFlags.COMPLETED_ONBOARDING);
|
||||
} else {
|
||||
r1 = value4;
|
||||
}
|
||||
if (r1) {
|
||||
moduleValue2 = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
r1 = moduleValue2.hasFlag(selfMember.flags ?? 0, GuildMemberFlags.STARTED_ONBOARDING);
|
||||
}
|
||||
if (r1) {
|
||||
(importDefault(6598) /* metro dependency 6598: doGuildOnboardingNative */)({guildId: a0});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
/* Metro module 6615; source: modules/guild_onboarding/native/GuildOnboardingModal.tsx; dependencies: [31, 6616, 1379, 1867, 1934, 6603, 6600, 661, 33, 1230, 6617, 5282, 6768, 5105, 6790, 6620, 566, 6606, 6717, 5280, 1244, 2] */
|
||||
function _fun52259(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:6, offset: 0x01324130, size: 301 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const headerTitle = function() {
|
||||
return null;
|
||||
};
|
||||
const headerRight = function() {
|
||||
return null;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const memberVerificationFormStore = importDefault(6616) /* metro dependency 6616: MemberVerificationFormStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const env0_9 = (require(6600) /* metro dependency 6600: GuildOnboardingConstants */).GuildOnboardingModalStates;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = constantsModule.GuildFeatures;
|
||||
const env0_11 = constantsModule.Routes;
|
||||
const env0_12 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingModal.tsx');
|
||||
exports.default = GuildOnboardingModal;
|
||||
}
|
||||
|
||||
function getScreens_52262(a0) { // fn#52262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:316, offset: 0x0132425d, size: 366 bytes, params: 2, frame: 19
|
||||
const guildId = a0.guildId;
|
||||
const env0_1 = a0.prompts;
|
||||
a0.connections;
|
||||
const env0_2 = a0.selectOption;
|
||||
const env0_3 = a0.completeOnboarding;
|
||||
const env0_4 = a0.onFinish;
|
||||
const env0_5 = a0.onClose;
|
||||
const env0_6 = a0.landingAnimation;
|
||||
const env0_7 = a0.isFirstOpen;
|
||||
const env0_8 = a0.backShouldLeaveGuild;
|
||||
const env0_9 = GuildStore.getGuild(guildId);
|
||||
const env0_10 = MemberVerificationFormStore.getRulesPrompt(guildId);
|
||||
const object2 = {};
|
||||
const PROMPT = GuildOnboardingModalStates.PROMPT;
|
||||
const headerTitleBinding = headerTitle;
|
||||
const headerRightBinding = headerRight;
|
||||
object2[PROMPT] = {fullscreen: true, headerTitle: headerTitleBinding, headerRight: headerRightBinding,
|
||||
render: render_52263};
|
||||
const CONNECTIONS = GuildOnboardingModalStates.CONNECTIONS;
|
||||
const object4 = {fullscreen: true, headerTitle: headerTitleBinding, headerRight: headerRightBinding};
|
||||
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun52264);
|
||||
object4.render = render_52265;
|
||||
object2[CONNECTIONS] = object4;
|
||||
const COMPLETED = GuildOnboardingModalStates.COMPLETED;
|
||||
object2[COMPLETED] = {fullscreen: true, headerTitle: headerTitleBinding, headerRight: headerRightBinding,
|
||||
render: render_52266};
|
||||
const RULES = GuildOnboardingModalStates.RULES;
|
||||
object2[RULES] = {fullscreen: true, headerTitle: headerTitleBinding, headerRight: headerRightBinding,
|
||||
render: render_52268};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function GuildOnboardingModal({guildId, onFinish, onClose, landingAnimation, isFirstOpen, backShouldLeaveGuild}) { // fn#52269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:1652, offset: 0x01324648, size: 490 bytes, params: 2, frame: 27
|
||||
const env0_3 = landingAnimation;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun52270);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingPromptsForOnboarding(guildId);
|
||||
});
|
||||
const connections = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getConnections(guildId);
|
||||
});
|
||||
const binding = env0_3;
|
||||
const value4 = binding.useCallback(_fun52273, [guildId]);
|
||||
const value5 = binding.useCallback(_fun52274, [guildId, value3]);
|
||||
binding.useEffect(_fun52275, [guildId, value2]);
|
||||
const value6 = binding.useMemo(_fun52276, [guildId, value3, connections, value4, value5, onFinish, onClose,
|
||||
landingAnimation, isFirstOpen, backShouldLeaveGuild]);
|
||||
const r4 = isFirstOpen && connections.length > 0 ? GuildOnboardingModalStates.CONNECTIONS : GuildOnboardingModalStates.PROMPT;
|
||||
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Navigator
|
||||
screens={value6}
|
||||
initialRouteName={r4}
|
||||
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function getScreens_52262Render(a0) { // fn#52263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:609, owner: getScreens_52262.render, offset: 0x013243cb, size: 141 bytes, params: 2, frame: 18
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component guildId={guildId} currentPromptIdx={a0?.currentPrompt ?? 0} prompts={prompts} selectOption={selectOption} onClose={onClose} landingAnimation={landingAnimation} isFirstOpen={isFirstOpen} backShouldLeaveGuild={backShouldLeaveGuild} />)(importDefault(6617) /* metro dependency 6617: GuildOnboardingPrompts */);
|
||||
}
|
||||
|
||||
function _fun52264() { // fn#52264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:932, offset: 0x01324458, size: 203 bytes, params: 1, frame: 17
|
||||
var onCloseBinding;
|
||||
var guildIdBinding;
|
||||
var channel;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
if (backShouldLeaveGuild) {
|
||||
guildIdBinding = guildId;
|
||||
onCloseBinding = onClose;
|
||||
value = environment.__proto__;
|
||||
channel = ChannelStore.getChannel(SelectedChannelStore.getLastSelectedChannelId());
|
||||
if (channel == null) {
|
||||
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue.transitionTo(Routes.ME, {navigationReplace: true});
|
||||
} else if (channel.guild_id !== guildIdBinding) {
|
||||
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue2.transitionTo(Routes.CHANNEL(channel.guild_id, channel.id));
|
||||
} else {
|
||||
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue.transitionTo(Routes.ME, {navigationReplace: true});
|
||||
}
|
||||
onCloseBinding();
|
||||
} else {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
|
||||
function getScreens_52262Render_52265() { // fn#52265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:1149, owner: getScreens_52262.render, offset: 0x01324523, size: 125 bytes, params: 1, frame: 19
|
||||
var r5;
|
||||
let value = environment.__proto__;
|
||||
const GuildOnboardingConnectionPrompt = importDefault(6768) /* metro dependency 6768: GuildOnboardingConnectionPrompt */;
|
||||
const guildIdBinding = guildId;
|
||||
const value3 = prompts.length === 0;
|
||||
if (value3) {
|
||||
value = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
|
||||
value = !value.showRulesInOnboarding(env0_9, env0_10);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value3;
|
||||
}
|
||||
return (
|
||||
<GuildOnboardingConnectionPrompt
|
||||
guildId={guildIdBinding}
|
||||
isLastStep={r5}
|
||||
onComplete={completeOnboarding}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function getScreens_52262Render_52266() { // fn#52266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:1337, owner: getScreens_52262.render, offset: 0x013245a0, size: 80 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component guildId={guildId} prompts={prompts} completeOnboarding={completeOnboarding} onClose={function() {
|
||||
onClose();
|
||||
onFinish();
|
||||
}} />)(importDefault(6790) /* metro dependency 6790: GuildOnboardingCompleted */);
|
||||
}
|
||||
|
||||
function getScreens_52262Render_52268() { // fn#52268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:1499, owner: getScreens_52262.render, offset: 0x01324607, size: 65 bytes, params: 1, frame: 15
|
||||
const RulesPrompt = (require(6620) /* metro dependency 6620: GuildOnboardingPrompt */).RulesPrompt;
|
||||
return <RulesPrompt guildId={guildId} onClose={onClose} />;
|
||||
}
|
||||
|
||||
function _fun52270() { // fn#52270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:1811, offset: 0x01324832, size: 97 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const guild = GuildStore.getGuild(guildId);
|
||||
return guild != null && (guild.features.has(GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED) && !guild.features.has(GuildFeatures.MEMBER_VERIFICATION_MANUAL_APPROVAL));
|
||||
}
|
||||
|
||||
function _fun52273(a0, a1, a2) { // fn#52273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:2127, offset: 0x013248c9, size: 56 bytes, params: 4, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6606) /* metro dependency 6606: GuildOnboardingActionCreators */;
|
||||
value.selectOption(guildId, a0, a1, a2);
|
||||
}
|
||||
|
||||
function _fun52274() { // fn#52274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:2192, offset: 0x01324901, size: 50 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6606) /* metro dependency 6606: GuildOnboardingActionCreators */;
|
||||
value.completeOnboarding(guildId, env0_7);
|
||||
}
|
||||
|
||||
function _fun52275() { // fn#52275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:2252, offset: 0x01324933, size: 54 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
var defaultImport;
|
||||
if (env0_6) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(6717) /* metro dependency 6717: MemberVerificationActionCreators */;
|
||||
defaultImport.fetchVerificationForm(guildId);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52276() { // fn#52276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:2320, offset: 0x01324969, size: 110 bytes, params: 1, frame: 12
|
||||
return getScreens_52262({guildId: guildId, prompts: env0_7, connections: connections, selectOption: env0_9,
|
||||
completeOnboarding: env0_10, onFinish: onFinish, onClose: onClose, landingAnimation: landingAnimation,
|
||||
isFirstOpen: isFirstOpen, backShouldLeaveGuild: backShouldLeaveGuild});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,454 @@
|
||||
/* Metro module 6620; source: modules/guild_onboarding/native/GuildOnboardingPrompt.tsx; dependencies: [57, 31, 27, 6540, 6616, 1867, 6603, 6600, 1881, 33, 4501, 5314, 697, 1484, 566, 1585, 4048, 4002, 4000, 6618, 6621, 4573, 1244, 4578, 6717, 4589, 676, 5105, 6734, 674, 3860, 6735, 6739, 1423, 4080, 6744, 1962, 5278, 6759, 2] */
|
||||
function _fun52324(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:6, offset: 0x01326e9b, size: 1046 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
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 */;
|
||||
const env0_5 = value.Image;
|
||||
const env0_6 = value.View;
|
||||
const env0_7 = value.ScrollView;
|
||||
const env0_8 = value.FlatList;
|
||||
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
||||
const memberVerificationFormStore = importDefault(6616) /* metro dependency 6616: MemberVerificationFormStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const env0_13 = (require(6600) /* metro dependency 6600: GuildOnboardingConstants */).GuildOnboardingModalStates;
|
||||
const env0_14 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_15 = value.jsx;
|
||||
const env0_16 = value.jsxs;
|
||||
const env0_17 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.flex = {flex: 1};
|
||||
const object4 = {'display': 'flex', 'flex': 1, 'flexGrow': 1, 'marginTop': null, 'marginBottom': 16};
|
||||
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
||||
object4.marginTop = NAV_BAR_HEIGHT;
|
||||
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object4.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object2.container = object4;
|
||||
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.scrollContainer = {'display': 'flex', 'flexGrow': 1, 'justifyContent': 'center', 'paddingHorizontal': 16,
|
||||
'paddingTop': 0, backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
object2.scrollContainerGradient = {'position': 'absolute', 'height': 48, 'width': '100%', 'left': 0, 'top': -48};
|
||||
object2.promptHeader = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'marginBottom': 8};
|
||||
const object6 = {'flexShrink': 0, 'marginHorizontal': 8, 'color': null, 'backgroundColor': null, 'width': 4,
|
||||
'height': 4};
|
||||
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object6.color = BORDER_SUBTLE;
|
||||
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object6.backgroundColor = BORDER_SUBTLE;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object2.requiredSeparator = object6;
|
||||
object2.countText = {};
|
||||
object2.title = {marginBottom: 32};
|
||||
object2.helpText = {'marginTop': 8, 'marginBottom': 8, 'textAlign': 'center'};
|
||||
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.footer = {'display': 'flex', 'flexDirection': 'column', 'justifyContent': 'flex-end',
|
||||
'alignItems': 'center', 'bottom': 0, 'paddingBottom': 8, 'position': 'absolute', 'width': '100%',
|
||||
backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
object2.footerText = {'paddingHorizontal': 16, 'paddingBottom': 8, 'paddingTop': 8};
|
||||
object2.footerContent = {'width': '100%', 'paddingHorizontal': 16};
|
||||
object2.optionTextEmoji = {'fontSize': 18, 'lineHeight': 22, 'marginRight': 6};
|
||||
object2.optionImageEmoji = {'height': 22, 'width': 22, 'marginRight': 6};
|
||||
object2.emojiContainer = {'display': 'flex', 'alignItems': 'center'};
|
||||
const object7 = {'borderRadius': null, 'backgroundColor': null, 'padding': 8, 'paddingRight': 32, 'minHeight': 48,
|
||||
'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap', 'alignItems': 'center', 'position': 'relative'};
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object7.backgroundColor = BACKGROUND_BASE_LOWEST;
|
||||
object2.dropdownContainer = object7;
|
||||
object2.emptyDropdownText = {marginTop: 16};
|
||||
const object9 = {'borderRadius': null, 'backgroundColor': null, 'padding': 6, 'marginRight': 8, 'marginTop': 8,
|
||||
'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object9.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object2.dropdownPill = object9;
|
||||
object2.dropdownIconContainer = {'position': 'absolute', 'right': 4, 'top': 8};
|
||||
object2.dropdownIcon = {'height': 32, 'width': 32};
|
||||
const env0_18 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingPrompt.tsx');
|
||||
exports.RulesPrompt = RulesPrompt;
|
||||
exports.MultipleChoicePrompt = MultipleChoicePrompt;
|
||||
exports.DropdownPrompt = DropdownPrompt;
|
||||
}
|
||||
|
||||
function PromptHeader({currentPrompt, numberOfPrompts, currentPromptIndex}) { // fn#52325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:2141, offset: 0x013272b1, size: 492 bytes, params: 2, frame: 33
|
||||
var r11;
|
||||
var jsxRuntimeEnv0_17Binding2;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const text = <Text style={styles.countText} variant="text-sm/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.isV0NW,
|
||||
{currentQuestion: currentPromptIndex + 1, questionCount: numberOfPrompts})}</Text>;
|
||||
if (currentPrompt != null) {
|
||||
if (currentPrompt.required) {
|
||||
jsxRuntimeEnv0_17Binding2 = jsxRuntimeEnv0_17;
|
||||
items2 = [<View style={styles.requiredSeparator} />];
|
||||
items2[1] = <Text variant="text-sm/medium" color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ur8Vrt)}</Text>;
|
||||
r11 = <>{items2}</>;
|
||||
} else {
|
||||
r11 = null;
|
||||
}
|
||||
} else {
|
||||
r11 = null;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<View style={styles.promptHeader}>
|
||||
{text}
|
||||
{r11}
|
||||
</View>
|
||||
<Text
|
||||
style={styles.title}
|
||||
accessibilityRole="header"
|
||||
variant="heading-xl/semibold"
|
||||
color="mobile-text-heading-primary"
|
||||
>
|
||||
{currentPrompt.title}
|
||||
</Text>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function PromptFooter({guildId, currentPrompt, selectedOptionIds, handleOnPress, lastPrompt}) { // fn#52326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:2794, offset: 0x0132749d, size: 1134 bytes, params: 2, frame: 36
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const styles = useStyles();
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
const r18 = selectedOptionIds.length === 0 && !(currentPrompt != null && currentPrompt.required);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r14 = lastPrompt ? '' + Reflect.apply(string, intl, [t['8SuVoE']]) + ' 🎉' : r18 ? Reflect.apply(string, intl,
|
||||
[t['5Wxrcd']]) : Reflect.apply(string, intl, [t.PDTjLN]);
|
||||
const r12 = selectedOptionIds.length === 0 && currentPrompt?.required;
|
||||
let r11 = currentPrompt == null || currentPrompt.options == null ? undefined : currentPrompt.options.filter(function(a0) {
|
||||
return selectedOptionIds.includes(a0.id);
|
||||
});
|
||||
const {helpText,
|
||||
helpTextAdditional} = (importDefault(6734) /* metro dependency 6734: usePromptHelpText */)({guild: guild,
|
||||
prompt: currentPrompt, selectedRoleIds: env0_4.useMemo(_fun52329, [r11]),
|
||||
selectedChannelIds: env0_4.useMemo(_fun52330, [r11]), itemHook: formattedNameHighlight});
|
||||
const defaultImport2 = importDefault(674) /* metro dependency 674 */;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
const value17 = defaultImport2(Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOWER])).alpha(0);
|
||||
items3 = [value17.hex()];
|
||||
const defaultImport3 = defaultImport2;
|
||||
const moduleValue3 = useTokenModule;
|
||||
useToken = moduleValue3.useToken;
|
||||
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
const value20 = defaultImport3(Reflect.apply(useToken, moduleValue3, [BACKGROUND_BASE_LOWER])).alpha(1);
|
||||
items3[1] = value20.hex();
|
||||
const defaultImport4 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const items2 = [styles.scrollContainerGradient];
|
||||
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
|
||||
const defaultImport42 = ((Component) => <Component style={items2} start={START} end={END} colors={items3} pointerEvents="none" />)(defaultImport4);
|
||||
r11 = r12 ? <Text style={styles.helpText} variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dA1dSf)}</Text> : null;
|
||||
const r10 = helpText !== '' ? <Text style={styles.helpText} variant="text-xs/medium" color="text-default">{helpText}{' '}{helpTextAdditional}</Text> : helpTextAdditional === '' ? null : <Text style={styles.helpText} variant="text-xs/medium" color="text-default">{helpText}{' '}{helpTextAdditional}</Text>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const value24 = 'primary';
|
||||
return (
|
||||
<View style={styles.footer}>
|
||||
{defaultImport42}
|
||||
<View style={styles.footerContent}>
|
||||
{r11}
|
||||
{r10}
|
||||
<Button
|
||||
variant={r18 ? lastPrompt ? value24 : 'secondary' : value24}
|
||||
size="md"
|
||||
grow
|
||||
text={r14}
|
||||
onPress={handleOnPress}
|
||||
disabled={r12}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function formattedNameHighlight(a0, a1) { // fn#52331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:4297, offset: 0x013279d0, size: 67 bytes, params: 3, frame: 15
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-xs/medium"
|
||||
color="mobile-text-heading-primary"
|
||||
key={a1}
|
||||
>
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function DropdownOption({option}) { // fn#52332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:4434, offset: 0x01327a13, size: 369 bytes, params: 2, frame: 28
|
||||
const styles = useStyles();
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore], _fun52333);
|
||||
const view = <View style={styles.emojiContainer}>{((Component) => <Component textEmojiStyle={styles.optionTextEmoji} fastImageStyle={styles.optionImageEmoji} src={value3 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value3.id,
|
||||
animated: value3.animated,
|
||||
size: EMOJI_URL_BASE_SIZE}) : undefined} name={option.emoji?.name ?? ''} />)(importDefault(6739) /* metro dependency 6739: Emoji */)}</View>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.dropdownPill}>
|
||||
{view}
|
||||
<Text variant="text-md/semibold">
|
||||
{option.title}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function RulesPrompt({guildId}) { // fn#52334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:5108, offset: 0x01327bd6, size: 1107 bytes, params: 2, frame: 36
|
||||
var r9;
|
||||
var r0;
|
||||
var PRIMARY_130;
|
||||
var PRIMARY_600;
|
||||
var SafeAreaPaddingView;
|
||||
var flex;
|
||||
var object3;
|
||||
var items3;
|
||||
var object5;
|
||||
var Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items5;
|
||||
var Button;
|
||||
var items6;
|
||||
const VerticalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [MemberVerificationFormStore];
|
||||
const rulesPrompt = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return MemberVerificationFormStore.getRulesPrompt(guildId);
|
||||
}]);
|
||||
const env0_3 = fluxModule.useStateFromStores([GuildStore], _fun52336);
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value2 = 64 + bottom + 8;
|
||||
const moduleValue4 = fluxModule;
|
||||
useStateFromStores = moduleValue4.useStateFromStores;
|
||||
const [property, env0_5] = env0_3(Reflect.apply(useStateFromStores, moduleValue4, [[MemberVerificationFormStore],
|
||||
function() {
|
||||
return MemberVerificationFormStore.get(guildId);
|
||||
}]).useState(false), 2);
|
||||
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)());
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
|
||||
let unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
if (isThemeDark2) {
|
||||
PRIMARY_600 = unsafe_rawColors.PRIMARY_600;
|
||||
object = [Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_600, 0])];
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
PRIMARY_600 = unsafe_rawColors.PRIMARY_600;
|
||||
object[1] = PRIMARY_600;
|
||||
r9 = object;
|
||||
} else {
|
||||
PRIMARY_130 = unsafe_rawColors.PRIMARY_130;
|
||||
object = [Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_130, 0])];
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
PRIMARY_130 = unsafe_rawColors.PRIMARY_130;
|
||||
object[1] = PRIMARY_130;
|
||||
r9 = object;
|
||||
}
|
||||
if (rulesPrompt == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
object = {top: true};
|
||||
flex = styles.flex;
|
||||
object.style = [flex, styles.container];
|
||||
object3 = {};
|
||||
flex = styles.flex;
|
||||
object3.style = flex;
|
||||
items3 = [<FlatList contentContainerStyle={[styles.scrollContainer,
|
||||
{paddingBottom: value2}]} data={[0]} renderItem={renderItem_52338} onEndReached={onEndReached} />];
|
||||
var viewProps = {style: [styles.footer, styles.footerContent, {paddingBottom: bottom}]};
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
items5 = [<Text style={styles.footerText} variant="text-xs/medium">{property ? Reflect.apply(string, intl,
|
||||
[t.arAe3I]) : Reflect.apply(string, intl, [t.D0CVAc])}</Text>];
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items5[1] = <Button variant="primary" size="md" grow disabled={!property} text={intl.string(t['0KL0ot'])} onPress={onPress_52340} />;
|
||||
items3[1] = <View {...viewProps}>{items5}</View>;
|
||||
items6 = [<View {...object3}>{items3}</View>];
|
||||
value = importDefault(4589) /* metro dependency 4589 */;
|
||||
items6[1] = ((Component) => <Component style={[styles.scrollContainerGradient,
|
||||
{bottom: value2}]} start={VerticalGradient.START} end={VerticalGradient.END} colors={r9} pointerEvents="none" />)(value);
|
||||
value = <SafeAreaPaddingView {...object}>{items6}</SafeAreaPaddingView>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function MultipleChoicePrompt({guildId, currentPrompt, lastPrompt, currentPromptIndex, numberOfPrompts, selectOption, handleOnPress}) { // fn#52341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:6646, offset: 0x01328165, size: 391 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<>
|
||||
<ScrollView
|
||||
contentContainerStyle={[styles.scrollContainer,
|
||||
{paddingBottom: 64 + (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom + 48 + 48,
|
||||
position: 'relative'}]}
|
||||
>
|
||||
<PromptHeader
|
||||
currentPrompt={currentPrompt}
|
||||
numberOfPrompts={numberOfPrompts}
|
||||
currentPromptIndex={currentPromptIndex}
|
||||
/>
|
||||
<View>
|
||||
{currentPrompt.options.map(_fun52343)}
|
||||
</View>
|
||||
</ScrollView>
|
||||
<PromptFooter
|
||||
guildId={guildId}
|
||||
currentPrompt={currentPrompt}
|
||||
selectedOptionIds={(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
_fun52342, [guildId, currentPrompt])}
|
||||
handleOnPress={handleOnPress}
|
||||
lastPrompt={lastPrompt}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function DropdownPrompt({guildId, currentPrompt, lastPrompt, currentPromptIndex, numberOfPrompts, selectOption, handleOnPress}) { // fn#52345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7403, offset: 0x013283cb, size: 694 bytes, params: 2, frame: 39
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
_fun52346, [guildId, currentPrompt]);
|
||||
const r22 = currentPrompt == null || currentPrompt.options == null ? undefined : currentPrompt.options.filter(_fun52347);
|
||||
const value5 = env0_4.useCallback(_fun52348, [guildId, currentPrompt.id, selectOption]);
|
||||
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
|
||||
const items2 = [styles.scrollContainer];
|
||||
items2[1] = {paddingBottom: 64 + bottom + 48 + 48, position: 'relative'};
|
||||
const promptHeader = <PromptHeader currentPrompt={currentPrompt} numberOfPrompts={numberOfPrompts} currentPromptIndex={currentPromptIndex} />;
|
||||
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
const items4 = [r22.length === 0 && ((Text) => <Text style={styles.emptyDropdownText} variant="text-sm/normal" color="text-muted">{'No answers selected.'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
|
||||
items4[1] = r22.map(_fun52350);
|
||||
items4[2] = <View style={styles.dropdownIconContainer}><Image style={styles.dropdownIcon} source={importDefault(6759) /* metro dependency 6759 */} /></View>;
|
||||
return (
|
||||
<>
|
||||
<ScrollView contentContainerStyle={items2}>
|
||||
{promptHeader}
|
||||
<View>
|
||||
<PressableHighlight style={styles.dropdownContainer} onPress={value5}>
|
||||
{items4}
|
||||
</PressableHighlight>
|
||||
</View>
|
||||
</ScrollView>
|
||||
<PromptFooter
|
||||
guildId={guildId}
|
||||
currentPrompt={currentPrompt}
|
||||
selectedOptionIds={value3}
|
||||
handleOnPress={handleOnPress}
|
||||
lastPrompt={lastPrompt}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun52329() { // fn#52329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:3269, offset: 0x01327926, size: 85 bytes, params: 1, frame: 13
|
||||
return env0_2 != null ? (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getSelectedRoleIds(env0_2) : new global.Set();
|
||||
}
|
||||
|
||||
function _fun52330() { // fn#52330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:3339, offset: 0x0132797b, size: 85 bytes, params: 1, frame: 13
|
||||
return env0_2 != null ? (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getSelectedChannelIds(env0_2) : new global.Set();
|
||||
}
|
||||
|
||||
function _fun52333() { // fn#52333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:4519, offset: 0x01327b84, size: 82 bytes, params: 1, frame: 14
|
||||
const emoji = option.emoji;
|
||||
const value2 = null;
|
||||
const value3 = undefined;
|
||||
return value2 != (value2 == emoji ? value3 : emoji.id) ? EmojiStore.getUsableCustomEmojiById(value2 == option.emoji ? value3 : option.emoji.id) : value2;
|
||||
}
|
||||
|
||||
function _fun52336() { // fn#52336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:5275, offset: 0x01328044, size: 44 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return GuildStore.getGuild(guildId)?.rulesChannelId;
|
||||
}
|
||||
|
||||
function RulesPromptRenderItem() { // fn#52338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:5921, owner: RulesPrompt.renderItem, offset: 0x0132808a, size: 65 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component rules={rulesPrompt.values} rulesChannelId={env0_3} />)(importDefault(6621) /* metro dependency 6621: TermsFieldList */);
|
||||
}
|
||||
|
||||
function RulesPromptOnPress() { // fn#52340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:6339, owner: RulesPrompt.onPress, offset: 0x013280dd, size: 136 bytes, params: 1, frame: 18
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var submitVerificationForm;
|
||||
var guildIdBinding;
|
||||
var object3;
|
||||
var object4;
|
||||
var binding;
|
||||
if (env0_4 != null) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(6717) /* metro dependency 6717: MemberVerificationActionCreators */;
|
||||
submitVerificationForm = defaultImport.submitVerificationForm;
|
||||
guildIdBinding = guildId;
|
||||
object3 = {};
|
||||
copyDataProperties(object3, env0_4, undefined);
|
||||
object4 = {};
|
||||
copyDataProperties(object4, rulesPrompt, undefined);
|
||||
object4['response'] = true;
|
||||
object3['formFields'] = [object4];
|
||||
Reflect.apply(submitVerificationForm, defaultImport, [guildIdBinding, object3]);
|
||||
binding = env0_1;
|
||||
binding.push(GuildOnboardingModalStates.COMPLETED);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52342() { // fn#52342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:6858, offset: 0x013282ec, size: 53 bytes, params: 1, frame: 14
|
||||
return currentPrompt != null ? GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId,
|
||||
currentPrompt.id) : [];
|
||||
}
|
||||
|
||||
function _fun52343(a0) { // fn#52343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7151, offset: 0x01328321, size: 116 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6735) /* metro dependency 6735: GuildOnboardingPromptOptionButton */;
|
||||
const valueProps = {option: a0, guildId: guildId, onSelect: onSelect};
|
||||
const binding = env0_3;
|
||||
const value3 = binding.includes(a0.id);
|
||||
valueProps.selected = value3 != null && value3;
|
||||
return ((Component) => <Component {...valueProps} key={a0.id} />)(value);
|
||||
}
|
||||
|
||||
function _fun52347({id}) { // fn#52347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7724, offset: 0x01328681, size: 27 bytes, params: 2, frame: 11
|
||||
return env0_3.includes(id);
|
||||
}
|
||||
|
||||
function _fun52348() { // fn#52348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7763, offset: 0x0132869c, size: 119 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[34]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[36]);
|
||||
value = value(dependencyMap[35], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'DropdownOptions', {guildId: guildId, promptId: currentPrompt.id,
|
||||
onSelect: function(a0, a1) {
|
||||
var value = a1;
|
||||
return selectOption(currentPrompt.id, a0.id, value != null && value);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun52350(a0) { // fn#52350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:8341, offset: 0x01328745, size: 37 bytes, params: 2, frame: 15
|
||||
return <DropdownOption option={a0} key={a0.id} />;
|
||||
}
|
||||
|
||||
function onSelect(a0) { // fn#52344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7208, offset: 0x01328395, size: 54 bytes, params: 2, frame: 16
|
||||
const value = a0;
|
||||
return selectOption(currentPrompt.id, env0_0.id, value != null && value);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,390 @@
|
||||
/* Metro module 6735; source: modules/guild_onboarding/native/GuildOnboardingPromptOptionButton.tsx; dependencies: [57, 31, 27, 4502, 6540, 1881, 33, 4501, 697, 566, 4017, 4504, 4577, 6736, 1244, 3860, 3874, 5278, 6739, 1423, 4573, 6742, 1305, 2] */
|
||||
function _fun53153(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:6, offset: 0x0133f1ab, size: 573 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
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 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
||||
const env0_8 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'borderRadius': null, 'borderWidth': 2, 'borderStyle': 'solid', 'marginBottom': 8};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object3.container = object4;
|
||||
object3.optionButton = {'paddingVertical': 12, 'paddingHorizontal': 16, 'display': 'flex', 'flexDirection': 'row',
|
||||
'alignItems': 'center'};
|
||||
object3.optionTextEmoji = {'fontSize': 24, 'lineHeight': 24, 'marginRight': 12, 'paddingTop': 5};
|
||||
object3.optionImageEmoji = {'height': 24, 'width': 24, 'marginRight': 12};
|
||||
object3.optionText = {flexShrink: 1};
|
||||
let BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object3.checkIcon = {'position': 'absolute', 'top': -6, 'right': -6, 'width': 20, 'height': 20,
|
||||
'backgroundColor': null, 'borderRadius': 10, 'display': 'flex', 'alignItems': 'center',
|
||||
'justifyContent': 'center', backgroundColor: BACKGROUND_BRAND};
|
||||
object3.newBadgeWrapper = {'position': 'absolute', 'top': -6, 'right': -6};
|
||||
object3.newBadge = {fontWeight: 'bold'};
|
||||
BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object3.roleCount = {'position': 'absolute', 'top': -6, 'right': 24, 'paddingVertical': 2, 'paddingHorizontal': 6,
|
||||
'backgroundColor': null, 'borderRadius': 10, 'display': 'flex', 'alignItems': 'center',
|
||||
'justifyContent': 'center', backgroundColor: BACKGROUND_BRAND};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object3]);
|
||||
object3 = {code: 'function GuildOnboardingPromptOptionButtonTsx1(){const{selected,withTiming,Easing,useReducedMotion,withSequence,withSpring}=this.__closure;const rawOpacity=selected?1:0;const opacity=withTiming(rawOpacity,{duration:150,easing:Easing.out(Easing.ease)});const rawScale=selected?1:0.7;const scale=useReducedMotion?rawScale:withSequence(withSpring(rawScale*1.2,{stiffness:80,damping:6,mass:0.3}),withSpring(rawScale,{stiffness:80,damping:6,mass:0.3}));return{opacity:opacity,transform:[{scale:scale}]};}'};
|
||||
object3 = {code: 'function GuildOnboardingPromptOptionButtonTsx2(){const{showMemberCount,withDelay,withTiming,Easing,useReducedMotion}=this.__closure;const rawOpacity=showMemberCount?1:0;const opacity=withDelay(showMemberCount?400:0,withTiming(rawOpacity,{duration:150,easing:Easing.out(Easing.ease)}));const rawTranslate=showMemberCount?0:16;const translateX=useReducedMotion?rawTranslate:withDelay(showMemberCount?400:0,withTiming(rawTranslate,{duration:200,easing:Easing.out(Easing.ease)}));return{opacity:opacity,transform:[{translateX:translateX}]};}'};
|
||||
object3 = {code: "function GuildOnboardingPromptOptionButtonTsx3(){const{useReducedMotion,Easing,withTiming,selected,selectedBorderColor,isNew,unselectedBrandBorderColor,unselectedBorderColor,selectedBackgroundColor}=this.__closure;const timing=useReducedMotion?{duration:0}:{duration:200,easing:Easing.out(Easing.ease)};return{borderColor:withTiming(selected?selectedBorderColor:isNew?unselectedBrandBorderColor:unselectedBorderColor,timing),backgroundColor:withTiming(selected?selectedBackgroundColor:'transparent',timing)};}"};
|
||||
object3 = {code: 'function GuildOnboardingPromptOptionButtonTsx4(){const{useReducedMotion,scale}=this.__closure;return useReducedMotion?{}:{transform:[{scale:scale.get()}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingPromptOptionButton.tsx');
|
||||
exports.default = PromptOptionButton;
|
||||
}
|
||||
|
||||
function PromptOptionButton({guildId, option, selected, onSelect, suppressMemberCount, canBeNew}) { // fn#53154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:2931, offset: 0x0133f3e8, size: 2519 bytes, params: 2, frame: 43
|
||||
var r23;
|
||||
var r24;
|
||||
var Math;
|
||||
var max;
|
||||
var value8;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var Emoji;
|
||||
var TextBadge;
|
||||
const env0_3 = suppressMemberCount;
|
||||
const env0_12 = undefined;
|
||||
const env0_13 = undefined;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore], _fun53155);
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const env0_4 = useReducedMotion;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = PromptOptionButtonD;
|
||||
object = {selected: selected};
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
object.Easing = Easing;
|
||||
object.useReducedMotion = useReducedMotion;
|
||||
object.withSequence = reanimatedRexportModule.withSequence;
|
||||
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 8281627194581;
|
||||
closure.__initData = env0_12;
|
||||
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
if ((importDefault(6736) /* metro dependency 6736: useGuildRoleMemberCounts */)(guildId) == null) {
|
||||
r23 = 0;
|
||||
} else if (option.roleIds == null) {
|
||||
r23 = 0;
|
||||
} else {
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
value8 = option.roleIds.map(_fun53158);
|
||||
object = [];
|
||||
arraySpread(object, value8, 0, undefined);
|
||||
r23 = apply(max, object, Math, undefined);
|
||||
}
|
||||
const binding = env0_4;
|
||||
const [property, env0_7] = env0_3(binding.useState(false), 2);
|
||||
const env0_8 = binding.useRef(null);
|
||||
binding.useEffect(_fun53159, [property]);
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue4.useAnimatedStyle;
|
||||
closure = PromptOptionButtonK;
|
||||
object = {showMemberCount: property};
|
||||
object.withDelay = reanimatedRexportModule.withDelay;
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object.Easing = Easing;
|
||||
object.useReducedMotion = useReducedMotion;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 9518487706997;
|
||||
closure.__initData = env0_13;
|
||||
const value12 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
|
||||
const value13 = reanimatedRexportModule.useSharedValue(1);
|
||||
const r29 = canBeNew && option.isUnseen;
|
||||
const value16 = env0_4.useMemo(_fun53163,
|
||||
[(option == null || option.emoji == null ? undefined : option.emoji.id) != null || (option == null || option.emoji == null ? undefined : option.emoji.name) != null,
|
||||
option.emoji?.name, option.title, option.description]);
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
const value17 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BRAND]);
|
||||
const moduleValue7 = useTokenModule;
|
||||
useToken = moduleValue7.useToken;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
const value18 = Reflect.apply(useToken, moduleValue7, [BORDER_SUBTLE]);
|
||||
const moduleValue8 = useTokenModule;
|
||||
useToken = moduleValue8.useToken;
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
const value19 = Reflect.apply(useToken, moduleValue8, [BORDER_STRONG]);
|
||||
const env0_14 = value19;
|
||||
const moduleValue9 = useTokenModule;
|
||||
useToken = moduleValue9.useToken;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
const value20 = Reflect.apply(useToken, moduleValue9, [BACKGROUND_BASE_LOWEST]);
|
||||
const env0_15 = value20;
|
||||
const moduleValue10 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue10.useAnimatedStyle;
|
||||
closure = PromptOptionButtonL;
|
||||
object = {useReducedMotion: useReducedMotion};
|
||||
object.Easing = Easing;
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object.selected = selected;
|
||||
object.selectedBorderColor = value19;
|
||||
object.isNew = r29;
|
||||
object.unselectedBrandBorderColor = value17;
|
||||
object.unselectedBorderColor = value18;
|
||||
object.selectedBackgroundColor = value20;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 17180171486485;
|
||||
closure.__initData = env0_14;
|
||||
const value21 = Reflect.apply(useAnimatedStyle, moduleValue10, [closure]);
|
||||
const moduleValue11 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue11.useAnimatedStyle;
|
||||
closure = PromptOptionButtonX;
|
||||
closure.__closure = {useReducedMotion: useReducedMotion, scale: value13};
|
||||
closure.__workletHash = 319662489785;
|
||||
closure.__initData = env0_15;
|
||||
const value22 = Reflect.apply(useAnimatedStyle, moduleValue11, [closure]);
|
||||
const {accessibilityRole,
|
||||
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: selected});
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [value22, value21];
|
||||
items2[2] = styles.container;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const pressableOpacityProps2 = {activeOpacity: 0.6, style: [styles.optionButton], onPress: onPress_53166,
|
||||
onPressIn: onPressIn_53167, onPressOut: onPressOut_53168, accessibilityRole: accessibilityRole,
|
||||
accessibilityState: accessibilityState, accessibilityLabel: value16,
|
||||
accessibilityHint: suppressMemberCount || r23 <= 0 ? undefined : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.iyXfAn,
|
||||
{memberCount: r23})};
|
||||
let r16 = (option == null || option.emoji == null ? undefined : option.emoji.id) != null || (option == null || option.emoji == null ? undefined : option.emoji.name) != null;
|
||||
if (r16) {
|
||||
Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
var defaultImportProps = {textEmojiStyle: styles.optionTextEmoji, fastImageStyle: styles.optionImageEmoji};
|
||||
r24 = value3 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value3.id,
|
||||
|
||||
animated: value3.animated, size: EMOJI_URL_BASE_SIZE}) : undefined;
|
||||
defaultImportProps.src = r24;
|
||||
r24 = (option == null || option.emoji == null ? undefined : option.emoji.name) ?? '';
|
||||
defaultImportProps.name = r24;
|
||||
r16 = <View style={{'display': 'flex', 'alignItems': 'center'}}><Emoji {...defaultImportProps} /></View>;
|
||||
}
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items5 = [<PressableOpacity {...pressableOpacityProps2}>{r16}<View style={styles.optionText}><Text variant="text-md/semibold" color="mobile-text-heading-primary">{option.title}</Text>{option.description != null && option.description.length > 0 && <Text variant="text-xs/medium" color="text-default">{option.description}</Text>}</View></PressableOpacity>];
|
||||
items5[1] = r23 > 0 ? ((View) => <View accessible={false} importantForAccessibility="no-hide-descendants" accessibilityElementsHidden style={[styles.roleCount,
|
||||
value12]}><Text variant="text-xs/semibold" color="always-white">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.EgKsZA,
|
||||
{memberCount: r23})}</Text></View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View) : null;
|
||||
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items7 = [styles.checkIcon, value4];
|
||||
const CheckmarkSmallIcon = (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
items5[2] = <View4 style={items7}><CheckmarkSmallIcon size="xs" color={WHITE} /></View4>;
|
||||
let r5 = canBeNew && !selected && option.isUnseen;
|
||||
if (r5) {
|
||||
TextBadge = (require(1305) /* metro dependency 1305: native */).TextBadge;
|
||||
r5 = <TextBadge color={(require(1305) /* metro dependency 1305: native */).BadgeColors.BRAND} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)} style={styles.newBadgeWrapper} textStyle={styles.newBadge} />;
|
||||
}
|
||||
items5[3] = r5;
|
||||
return (
|
||||
<View2 style={items2}>
|
||||
{items5}
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun53155() { // fn#53155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:3096, offset: 0x0133fdbf, size: 108 bytes, params: 1, frame: 16
|
||||
const optionBinding = option;
|
||||
const value2 = null;
|
||||
const value3 = undefined;
|
||||
return value2 != (value2 == optionBinding || value2 == option.emoji ? value3 : option.emoji.id) ? EmojiStore.getUsableCustomEmojiById(value2 == option || value2 == option.emoji ? value3 : option.emoji.id) : value2;
|
||||
}
|
||||
|
||||
function PromptOptionButtonD() { // fn#53157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:3329, owner: PromptOptionButton.D, offset: 0x0133fe3a, size: 286 bytes, params: 1, frame: 23
|
||||
var object2;
|
||||
var r1;
|
||||
var withSequence;
|
||||
var value9;
|
||||
var moduleValue3;
|
||||
var value;
|
||||
const r6 = selected ? 1 : 0;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const out = Easing.out;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const value5 = Reflect.apply(withTiming, timingModule, [r6, {duration: 150, easing: Reflect.apply(out, Easing,
|
||||
[Easing2.ease])}]);
|
||||
const r9 = selected ? 1 : 0.7;
|
||||
object2 = {opacity: value5};
|
||||
if (useReducedMotion) {
|
||||
r1 = r9;
|
||||
} else {
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withSequence = value.withSequence;
|
||||
value9 = (require(4577) /* metro dependency 4577: spring */).withSpring(1.2 * r9, {'stiffness': 80,
|
||||
'damping': 6,
|
||||
'mass': 0.3});
|
||||
moduleValue3 = require(4577) /* metro dependency 4577: spring */;
|
||||
value = Reflect.apply(withSequence, value, [value9, moduleValue3.withSpring(r9, {'stiffness': 80, 'damping': 6,
|
||||
'mass': 0.3})]);
|
||||
r1 = value;
|
||||
}
|
||||
object2.transform = [{scale: r1}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun53159() { // fn#53159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:3995, offset: 0x0133ff58, size: 60 bytes, params: 1, frame: 15
|
||||
if (env0_6) {
|
||||
env0_8.current = global.setTimeout(_fun53160, 3000);
|
||||
return _fun53161;
|
||||
}
|
||||
}
|
||||
|
||||
function PromptOptionButtonK() { // fn#53162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:4163, owner: PromptOptionButton.K, offset: 0x0133ffe0, size: 344 bytes, params: 1, frame: 26
|
||||
var object4;
|
||||
var r6;
|
||||
var moduleValue3;
|
||||
var object2;
|
||||
var value;
|
||||
const value2 = 0;
|
||||
const r10 = env0_6 ? 1 : value2;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let withDelay = reanimatedRexportModule.withDelay;
|
||||
let r1 = env0_6 ? 400 : value2;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
const out = Easing.out;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
const value6 = Reflect.apply(withDelay, reanimatedRexportModule, [r1, Reflect.apply(withTiming, timingModule, [r10,
|
||||
{duration: 150, easing: Reflect.apply(out, Easing, [Easing2.ease])}])]);
|
||||
const r9 = env0_6 ? value2 : 16;
|
||||
object4 = {opacity: value6};
|
||||
if (useReducedMotion) {
|
||||
r1 = r9;
|
||||
} else {
|
||||
moduleValue3 = reanimatedRexportModule;
|
||||
withDelay = moduleValue3.withDelay;
|
||||
r6 = env0_6 ? 400 : value2;
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = value.withTiming;
|
||||
object2 = {duration: 200};
|
||||
object2.easing = Easing.out((require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease);
|
||||
value = Reflect.apply(withDelay, moduleValue3, [r6, Reflect.apply(withTiming, value, [r9, object2])]);
|
||||
r1 = value;
|
||||
}
|
||||
object4.transform = [{translateX: r1}];
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _fun53163() { // fn#53163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:4814, offset: 0x01340138, size: 422 bytes, params: 1, frame: 18
|
||||
var name;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value4;
|
||||
var value5;
|
||||
const binding = env0_11;
|
||||
const optionBinding = option;
|
||||
if (binding) {
|
||||
name = optionBinding.emoji?.name;
|
||||
value4 = '';
|
||||
value5 = (name ?? value4).replace(RegExp('^:|:$', 'g'), value4);
|
||||
return option.description == null ? intl.formatToPlainString(t.rBPpAN, {emojiName: value5,
|
||||
title: option.title}) : option.description.length > 0 ? intl.formatToPlainString(t.nSzqkg,
|
||||
{emojiName: value5,
|
||||
title: option.title, description: option.description}) : intl.formatToPlainString(t.rBPpAN,
|
||||
{emojiName: value5,
|
||||
title: option.title});
|
||||
}
|
||||
return optionBinding.description == null ? option.title : option.description.length > 0 ? intl.formatToPlainString(t.U4lDOC,
|
||||
{title: option.title, description: option.description}) : option.title;
|
||||
}
|
||||
|
||||
function PromptOptionButtonL() { // fn#53164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:5607, owner: PromptOptionButton.L, offset: 0x013402de, size: 222 bytes, params: 1, frame: 19
|
||||
var r4;
|
||||
var object2;
|
||||
var value2;
|
||||
var Easing;
|
||||
if (useReducedMotion) {
|
||||
r4 = {duration: 0};
|
||||
} else {
|
||||
object2 = {duration: 200};
|
||||
value2 = environment.__proto__;
|
||||
Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
object2.easing = Easing.out((require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease);
|
||||
r4 = object2;
|
||||
}
|
||||
object2 = {};
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
object2.borderColor = timingModule.withTiming(selected ? env0_14 : env0_10 ? env0_12 : env0_13, r4);
|
||||
const moduleValue2 = timingModule;
|
||||
object2.backgroundColor = moduleValue2.withTiming(selected ? env0_15 : 'transparent', r4);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function PromptOptionButtonX() { // fn#53165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:6108, owner: PromptOptionButton.X, offset: 0x013403bc, size: 50 bytes, params: 1, frame: 11
|
||||
var object;
|
||||
var object3;
|
||||
if (useReducedMotion) {
|
||||
object = {};
|
||||
} else {
|
||||
object3 = {};
|
||||
object3.scale = env0_9.get();
|
||||
object = {transform: [object3]};
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
function PromptOptionButtonOnPress() { // fn#53166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:6483, owner: PromptOptionButton.onPress, offset: 0x013403ee, size: 46 bytes, params: 1, frame: 12
|
||||
onSelect(!selected);
|
||||
if (!suppressMemberCount) {
|
||||
env0_7(!selected);
|
||||
}
|
||||
}
|
||||
|
||||
function PromptOptionButtonOnPressIn() { // fn#53167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:6514, owner: PromptOptionButton.onPressIn, offset: 0x0134041c, size: 181 bytes, params: 1, frame: 23
|
||||
const binding = env0_9;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withSequence = value.withSequence;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const value2 = Reflect.apply(withTiming, timingModule, [1, {duration: 0}]);
|
||||
const moduleValue2 = timingModule;
|
||||
withTiming = moduleValue2.withTiming;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const out = Easing.out;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withSequence, value, [value2, Reflect.apply(withTiming, moduleValue2,
|
||||
[1.02, {duration: 200, easing: Reflect.apply(out, Easing, [Easing2.ease])}])])]);
|
||||
}
|
||||
|
||||
function PromptOptionButtonOnPressOut() { // fn#53168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:6687, owner: PromptOptionButton.onPressOut, offset: 0x013404d1, size: 122 bytes, params: 1, frame: 20
|
||||
const binding = env0_9;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = value.withTiming;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const out = Easing.out;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, {duration: 100, easing: Reflect.apply(out, Easing,
|
||||
[Easing2.ease])}])]);
|
||||
}
|
||||
|
||||
function _fun53160() { // fn#53160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:4034, offset: 0x0133ff94, size: 30 bytes, params: 1, frame: 12
|
||||
env1_7(false);
|
||||
env1_8.current = null;
|
||||
}
|
||||
|
||||
function _fun53161() { // fn#53161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:4067, offset: 0x0133ffb2, size: 46 bytes, params: 1, frame: 11
|
||||
if (env1_8.current != null) {
|
||||
global.clearTimeout(env1_8.current);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,673 @@
|
||||
/* Metro module 6617; source: modules/guild_onboarding/native/GuildOnboardingPrompts.tsx; dependencies: [57, 5, 31, 27, 4502, 6616, 1379, 1867, 1934, 6603, 5106, 6600, 661, 33, 1230, 4501, 5314, 697, 1475, 4000, 5475, 4589, 676, 566, 1585, 1484, 4017, 6606, 5105, 1423, 1852, 683, 4863, 4504, 5282, 6618, 6620, 1360, 6760, 4573, 1244, 6766, 2] */
|
||||
function _fun52289(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:6, offset: 0x01324d6c, size: 904 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
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 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.StyleSheet;
|
||||
const env0_7 = value.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const memberVerificationFormStore = importDefault(6616) /* metro dependency 6616: MemberVerificationFormStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const env0_14 = (require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */).OnboardingPromptType;
|
||||
const env0_15 = (require(6600) /* metro dependency 6600: GuildOnboardingConstants */).GuildOnboardingModalStates;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_16 = value.AnalyticEvents;
|
||||
const env0_17 = value.MarketingURLs;
|
||||
const env0_18 = value.Routes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_19 = value.jsx;
|
||||
const env0_20 = value.Fragment;
|
||||
const env0_21 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.flex = {flex: 1};
|
||||
const object4 = {'display': 'flex', 'flex': 1, 'flexGrow': 1};
|
||||
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
||||
object4.marginTop = NAV_BAR_HEIGHT;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.marginBottom = PX_16;
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object4.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object2.container = object4;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.subtitle = {marginBottom: PX_16, opacity: 0.8};
|
||||
object2.onboardingTitle = {textAlign: 'center'};
|
||||
const object5 = {'position': 'absolute', 'paddingHorizontal': null, 'display': 'flex', 'justifyContent': 'center',
|
||||
'width': '100%'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.marginBottom = PX_16;
|
||||
object2.onboardingPolicy = object5;
|
||||
object2.onboardingPolicyText = {textAlign: 'center'};
|
||||
object2.landingOverlay = {'position': 'absolute', 'width': '100%', 'height': '100%', 'display': 'flex',
|
||||
'justifyContent': 'center'};
|
||||
object2.artWrapper = {'height': 350, 'position': 'relative', 'display': 'flex', 'flexDirection': 'row',
|
||||
'alignItems': 'center', 'justifyContent': 'center'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.landingBody = {'alignItems': 'center', 'marginTop': -24, paddingHorizontal: PX_16};
|
||||
object2.backgroundImage = {'position': 'absolute', 'height': '50%', 'width': '100%', 'top': 0};
|
||||
object2.backgroundColorGradient = {'position': 'absolute', 'height': '100%', 'width': '100%', 'top': 0};
|
||||
object2.darkColorGradient = {'position': 'absolute', 'height': '100%', 'width': '100%', 'top': 0};
|
||||
const env0_22 = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {code: 'function GuildOnboardingPromptsTsx1(){const{showPrompts,withTiming,Easing,useReducedMotion}=this.__closure;const rawOpacity=showPrompts.get()?0:1;const opacity=withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)});const rawTranslateY=!useReducedMotion&&showPrompts.get()?-80:0;const translateY=withTiming(rawTranslateY,{duration:300,easing:Easing.out(Easing.ease)});return{opacity:opacity,transform:[{translateY:translateY}]};}'};
|
||||
object2 = {code: 'function GuildOnboardingPromptsTsx2(){const{showPrompts,withDelay,withTiming,Easing,useReducedMotion}=this.__closure;const rawOpacity=showPrompts.get()?0:1;const opacity=withDelay(200,withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)}));const rawTranslateY=!useReducedMotion&&showPrompts.get()?-80:0;const translateY=withDelay(200,withTiming(rawTranslateY,{duration:300,easing:Easing.out(Easing.ease)}));return{opacity:opacity,transform:[{translateY:translateY}]};}'};
|
||||
object2 = {code: 'function GuildOnboardingPromptsTsx3(){const{showPrompts,withDelay,withTiming,Easing}=this.__closure;const rawOpacity=showPrompts.get()?0:1;const opacity=withDelay(200,withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)}));return{opacity:opacity};}'};
|
||||
object2 = {code: 'function GuildOnboardingPromptsTsx4(){const{showPrompts,withDelay,withTiming,Easing}=this.__closure;const rawOpacity=showPrompts.get()?0:1;const opacity=withDelay(200,withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)}));return{opacity:opacity};}'};
|
||||
object2 = {code: 'function GuildOnboardingPromptsTsx5(){const{showPrompts,withDelay,withTiming,Easing,useReducedMotion}=this.__closure;const rawOpacity=showPrompts.get()?1:0;const opacity=withDelay(600,withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)}));const rawTranslateY=!useReducedMotion&&!showPrompts.get()?80:0;const translateY=withDelay(600,withTiming(rawTranslateY,{duration:300,easing:Easing.out(Easing.ease)}));return{opacity:opacity,transform:[{translateY:translateY}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingPrompts.tsx');
|
||||
exports.default = GuildOnboardingPrompt;
|
||||
}
|
||||
|
||||
function _getBackgroundGradientColor() { // fn#52290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:1432, offset: 0x013250f4, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun52292).apply(this, arguments);
|
||||
}
|
||||
|
||||
function BackgroundImageGradient({splashUrl, color}) { // fn#52293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:1685, offset: 0x013251b7, size: 266 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const jsxRuntimeEnv0_20Binding = jsxRuntimeEnv0_20;
|
||||
const value2 = ((Component) => <Component source={{uri: splashUrl}} style={[styles.backgroundImage]} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
|
||||
let value = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
value = value.hexWithOpacity(color, 0.16);
|
||||
return (
|
||||
<>
|
||||
{value2}
|
||||
{((Component) => <Component style={styles.backgroundColorGradient} start={START} end={END} colors={[value,
|
||||
color]} />)(defaultImport2)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildOnboardingPrompt({guildId, currentPromptIdx, prompts, selectOption, onClose, landingAnimation, isFirstOpen, backShouldLeaveGuild}) { // fn#52294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:4074, offset: 0x013252c1, size: 3095 bytes, params: 2, frame: 48
|
||||
var r34;
|
||||
var r23;
|
||||
var r18;
|
||||
var moduleValue8;
|
||||
var defaultImport;
|
||||
var getGuildSplashURL;
|
||||
var type;
|
||||
var moduleValue14;
|
||||
const env0_3 = onClose;
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [MemberVerificationFormStore];
|
||||
const rulesPrompt = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return MemberVerificationFormStore.getRulesPrompt(guildId);
|
||||
}]);
|
||||
const env0_5 = rulesPrompt;
|
||||
const useReducedMotion = fluxModule.useStateFromStores([AccessibilityStore], function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const moduleValue3 = fluxModule;
|
||||
useStateFromStores = moduleValue3.useStateFromStores;
|
||||
const value3 = Reflect.apply(useStateFromStores, moduleValue3, [[GuildOnboardingPromptsStore], function() {
|
||||
return GuildOnboardingPromptsStore.getConnections(guildId);
|
||||
}]).length > 0;
|
||||
let r1 = isFirstOpen && currentPromptIdx === 0 && !value3;
|
||||
const value6 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const value7 = prompts.length > 0;
|
||||
const property = prompts[currentPromptIdx];
|
||||
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(!r1);
|
||||
let binding = env0_5;
|
||||
const value9 = binding.useCallback(_fun52298, [guildId, prompts]);
|
||||
const guild = fluxModule.useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
const value10 = fluxModule.useStateFromStoresArray([GuildOnboardingPromptsStore], _fun52300, [guildId, property]);
|
||||
const env0_16 = value10.length === 0 && property?.required;
|
||||
const value13 = currentPromptIdx + 1 >= prompts.length;
|
||||
if (value13) {
|
||||
moduleValue8 = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
|
||||
r34 = !moduleValue8.showRulesInOnboarding(guild, rulesPrompt);
|
||||
} else {
|
||||
r34 = value13;
|
||||
}
|
||||
binding = env0_5;
|
||||
const useState = binding.useState;
|
||||
let PRIMARY_800 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_800;
|
||||
const value16 = env0_3(Reflect.apply(useState, binding, [PRIMARY_800]), 2);
|
||||
const property2 = value16[0];
|
||||
const env0_18 = value16[1];
|
||||
if (guild != null) {
|
||||
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
getGuildSplashURL = defaultImport.getGuildSplashURL;
|
||||
object = {};
|
||||
object.id = guild.id;
|
||||
object.splash = guild.splash;
|
||||
object.size = 400 * (importDefault(1852) /* metro dependency 1852: getDevicePixelRatioNative */)();
|
||||
r23 = Reflect.apply(getGuildSplashURL, defaultImport, [object]);
|
||||
} else {
|
||||
r23 = null;
|
||||
}
|
||||
binding = env0_5;
|
||||
binding.useEffect(_fun52301, [r23]);
|
||||
binding.useEffect(_fun52304, [guildId, value7, rulesPrompt, r1]);
|
||||
binding.useEffect(_fun52305, [value8, r1, value7, value3, onClose, value9, guildId]);
|
||||
binding.useEffect(_fun52307, [r1, value7, onClose]);
|
||||
r1 = value7 && prompts[0].required;
|
||||
binding = env0_5;
|
||||
binding.useEffect(_fun52308, [guildId, r1, currentPromptIdx]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = GuildOnboardingPromptSt;
|
||||
object = {showPrompts: value8};
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
object.Easing = Easing;
|
||||
object.useReducedMotion = useReducedMotion;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 6820086589932;
|
||||
closure.__initData = env0_24;
|
||||
const value20 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue10 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue10.useAnimatedStyle;
|
||||
closure = GuildOnboardingPromptRt;
|
||||
object = {showPrompts: value8};
|
||||
object.withDelay = reanimatedRexportModule.withDelay;
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object.Easing = Easing;
|
||||
object.useReducedMotion = useReducedMotion;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 3034833873876;
|
||||
closure.__initData = env0_25;
|
||||
const value21 = Reflect.apply(useAnimatedStyle, moduleValue10, [closure]);
|
||||
const moduleValue11 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue11.useAnimatedStyle;
|
||||
closure = GuildOnboardingPromptLt;
|
||||
object = {showPrompts: value8};
|
||||
object.withDelay = reanimatedRexportModule.withDelay;
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object.Easing = Easing;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 2795589385440;
|
||||
closure.__initData = env0_26;
|
||||
const value22 = Reflect.apply(useAnimatedStyle, moduleValue11, [closure]);
|
||||
const moduleValue12 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue12.useAnimatedStyle;
|
||||
closure = GuildOnboardingPromptCt;
|
||||
object = {showPrompts: value8};
|
||||
object.withDelay = reanimatedRexportModule.withDelay;
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object.Easing = Easing;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 13481450530727;
|
||||
closure.__initData = env0_27;
|
||||
const value23 = Reflect.apply(useAnimatedStyle, moduleValue12, [closure]);
|
||||
const moduleValue13 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue13.useAnimatedStyle;
|
||||
closure = GuildOnboardingPromptDt;
|
||||
object = {showPrompts: value8};
|
||||
object.withDelay = reanimatedRexportModule.withDelay;
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object.Easing = Easing;
|
||||
object.useReducedMotion = useReducedMotion;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 14018549800735;
|
||||
closure.__initData = env0_28;
|
||||
const value24 = Reflect.apply(useAnimatedStyle, moduleValue13, [closure]);
|
||||
closure = handleOnPress;
|
||||
binding.useLayoutEffect(_fun52315, [value6, currentPromptIdx, value10, guildId, prompts, onClose,
|
||||
backShouldLeaveGuild, value3]);
|
||||
object = {style: styles.flex};
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const items2 = [styles.flex];
|
||||
items2[1] = styles.container;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items3 = [styles.flex, value24];
|
||||
if (value7) {
|
||||
if (property == null) {
|
||||
r18 = null;
|
||||
} else {
|
||||
type = property.type;
|
||||
if (OnboardingPromptType.MULTIPLE_CHOICE === type) {
|
||||
const MultipleChoicePrompt = (require(6620) /* metro dependency 6620: GuildOnboardingPrompt */).MultipleChoicePrompt;
|
||||
r18 = <MultipleChoicePrompt guildId={guildId} currentPrompt={property} lastPrompt={r34} currentPromptIndex={currentPromptIdx} numberOfPrompts={prompts.length} selectOption={selectOption} handleOnPress={closure} />;
|
||||
} else if (OnboardingPromptType.DROPDOWN === type) {
|
||||
const DropdownPrompt = (require(6620) /* metro dependency 6620: GuildOnboardingPrompt */).DropdownPrompt;
|
||||
r18 = <DropdownPrompt guildId={guildId} currentPrompt={property} lastPrompt={r34} currentPromptIndex={currentPromptIdx} numberOfPrompts={prompts.length} selectOption={selectOption} handleOnPress={closure} />;
|
||||
} else {
|
||||
moduleValue14 = require(1360) /* metro dependency 1360: GlobalUtils */;
|
||||
moduleValue14.assertNever(property.type);
|
||||
r18 = undefined;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
r18 = null;
|
||||
}
|
||||
const safeAreaPaddingView = <SafeAreaPaddingView top bottom style={items2}><View2 style={items3}>{r18}</View2></SafeAreaPaddingView>;
|
||||
const absoluteFill = StyleSheet.absoluteFill;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items5 = [styles.flex];
|
||||
items5[1] = styles.landingOverlay;
|
||||
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items6 = [styles.landingOverlay, value23];
|
||||
const r13 = r23 != null ? <BackgroundImageGradient splashUrl={r23} color={property2} /> : null;
|
||||
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
|
||||
PRIMARY_800 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_800;
|
||||
const items8 = [Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_800, 0.5])];
|
||||
PRIMARY_800 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_800;
|
||||
items8[1] = PRIMARY_800;
|
||||
const items9 = [<View4 style={items6}>{r13}{((Component) => <Component style={styles.darkColorGradient} start={START} end={END} colors={items8} />)(defaultImport2)}</View4>];
|
||||
const View5 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
items9[1] = <View5 style={[styles.artWrapper,
|
||||
value20]}>{((Component) => <Component source={landingAnimation} autoPlay={!useReducedMotion} style={{width: '100%'}} />)(importDefault(6760) /* metro dependency 6760: LottieAnimationView */)}</View5>;
|
||||
const View6 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items11 = [styles.landingBody, value21];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let format = intl.format;
|
||||
const O2bQlD = (require(1244) /* metro dependency 1244: indexNative */).t.O2bQlD;
|
||||
items9[2] = <View6 style={items11}><Text style={styles.subtitle} variant="text-md/semibold" color="always-white">{Reflect.apply(format,
|
||||
intl, [O2bQlD,
|
||||
{guildName: guild?.name ?? ''}])}</Text><Text style={styles.onboardingTitle} accessibilityRole="header" variant="heading-xl/semibold" color="always-white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Alcl/e'])}</Text></View6>;
|
||||
const view = <View3 style={items5} pointerEvents="none">{items9}</View3>;
|
||||
const View7 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items14 = [styles.onboardingPolicy, value22];
|
||||
items14[2] = {bottom: bottom};
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
format = intl.format;
|
||||
const kI6UoD = (require(1244) /* metro dependency 1244: indexNative */).t.kI6UoD;
|
||||
const PRIVACY = MarketingURLs.PRIVACY;
|
||||
return (
|
||||
<View {...object}>
|
||||
{safeAreaPaddingView}
|
||||
<View style={absoluteFill} pointerEvents="none">
|
||||
{view}
|
||||
<View7 style={items14} pointerEvents="auto">
|
||||
<TextWithIOSLinkWorkaround
|
||||
style={styles.onboardingPolicyText}
|
||||
variant="heading-sm/normal"
|
||||
color="text-default"
|
||||
>
|
||||
{Reflect.apply(format, intl, [kI6UoD, {privacyLink: PRIVACY}])}
|
||||
</TextWithIOSLinkWorkaround>
|
||||
</View7>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function* _fun52292(a0) { // fn#52292, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:1509, offset: 0x0132512d, size: 138 bytes, params: 2, frame: 19
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const value3 = env2_0(env2_2[18]);
|
||||
const getPaletteForAvatar = value3.getPaletteForAvatar;
|
||||
yield Reflect.apply(getPaletteForAvatar, value3, [a0]);
|
||||
const value4 = undefined;
|
||||
if (false) {
|
||||
return value4;
|
||||
}
|
||||
const value6 = env2_3(value4[0], 3);
|
||||
return env2_0(env2_2[19]).rgbToHex(value6[0], value6[1], value6[2]);
|
||||
}
|
||||
|
||||
function _fun52298() { // fn#52298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:4560, offset: 0x01325f0e, size: 50 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6606) /* metro dependency 6606: GuildOnboardingActionCreators */;
|
||||
value.completeOnboarding(guildId, prompts);
|
||||
}
|
||||
|
||||
function _fun52300() { // fn#52300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:4702, offset: 0x01325f5b, size: 53 bytes, params: 1, frame: 14
|
||||
return env0_11 != null ? GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId, env0_11.id) : [];
|
||||
}
|
||||
|
||||
function _fun52301() { // fn#52301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5050, offset: 0x01325f90, size: 50 bytes, params: 1, frame: 12
|
||||
if (env0_19 != null) {
|
||||
(function() {
|
||||
return _getBackgroundGradientColor.apply(this, arguments);
|
||||
})(env0_19).then(_fun52303);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52304() { // fn#52304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5205, offset: 0x01325fe0, size: 224 bytes, params: 1, frame: 26
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var GUILD_ONBOARDING_STEP_VIEWED;
|
||||
var object2;
|
||||
var moduleValue;
|
||||
var collectGuildAnalyticsMetadata;
|
||||
var guildIdBinding;
|
||||
var defaultImport2;
|
||||
var GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
var moduleValue2;
|
||||
if (env0_8) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
GUILD_ONBOARDING_STEP_VIEWED = AnalyticEvents.GUILD_ONBOARDING_STEP_VIEWED;
|
||||
object2 = {};
|
||||
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
collectGuildAnalyticsMetadata = moduleValue.collectGuildAnalyticsMetadata;
|
||||
guildIdBinding = guildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, moduleValue, [guildIdBinding]),
|
||||
undefined);
|
||||
object2['step'] = -1;
|
||||
object2['required'] = true;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_VIEWED, object2]);
|
||||
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport2.track;
|
||||
GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
object2 = {};
|
||||
moduleValue2 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
collectGuildAnalyticsMetadata = moduleValue2.collectGuildAnalyticsMetadata;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, moduleValue2, [guildIdBinding]),
|
||||
'required');
|
||||
object2['step'] = -1;
|
||||
object2['skipped'] = env0_10;
|
||||
object2['is_final_step'] = false;
|
||||
object2['in_onboarding'] = true;
|
||||
Reflect.apply(track, defaultImport2, [GUILD_ONBOARDING_STEP_COMPLETED, object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52305() { // fn#52305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5504, offset: 0x013260c0, size: 43 bytes, params: 1, frame: 13
|
||||
if (env0_8) {
|
||||
global.setTimeout(_fun52306, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52307() { // fn#52307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5604, offset: 0x0132611f, size: 31 bytes, params: 1, frame: 10
|
||||
if (!(env0_8 || env0_10)) {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52308() { // fn#52308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5667, offset: 0x0132613e, size: 125 bytes, params: 1, frame: 19
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var GUILD_ONBOARDING_STEP_VIEWED;
|
||||
var object2;
|
||||
var moduleValue;
|
||||
if (currentPromptIdx === 0) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(dependencyMap[31]);
|
||||
track = defaultImport.track;
|
||||
GUILD_ONBOARDING_STEP_VIEWED = AnalyticEvents.GUILD_ONBOARDING_STEP_VIEWED;
|
||||
object2 = {};
|
||||
moduleValue = require(dependencyMap[32]);
|
||||
copyDataProperties(object2, moduleValue.collectGuildAnalyticsMetadata(guildId), dependencyMap);
|
||||
object2['step'] = 0;
|
||||
object2['required'] = env0_20;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_VIEWED, object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function GuildOnboardingPromptSt() { // fn#52309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5857, owner: GuildOnboardingPrompt.st, offset: 0x013261bb, size: 273 bytes, params: 1, frame: 23
|
||||
var object2;
|
||||
const r6 = env0_12.get() ? 0 : 1;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
let out = Easing.out;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const value6 = Reflect.apply(withTiming, timingModule, [r6, {duration: 300, easing: Reflect.apply(out, Easing,
|
||||
[Easing2.ease])}]);
|
||||
const value7 = 0;
|
||||
const r5 = useReducedMotion ? value7 : env0_12.get() ? -80 : value7;
|
||||
object2 = {opacity: value6};
|
||||
const value = timingModule;
|
||||
withTiming = value.withTiming;
|
||||
out = Easing.out;
|
||||
const Easing3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
object2.transform = [{translateY: Reflect.apply(withTiming, value, [r5, {duration: 300, easing: Reflect.apply(out,
|
||||
Easing, [Easing3.ease])}])}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function GuildOnboardingPromptRt() { // fn#52310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:6312, owner: GuildOnboardingPrompt.rt, offset: 0x013262cc, size: 318 bytes, params: 1, frame: 25
|
||||
var object2;
|
||||
let r8 = env0_12.get() ? 0 : 1;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let withDelay = reanimatedRexportModule.withDelay;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
let out = Easing.out;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
const value7 = Reflect.apply(withDelay, reanimatedRexportModule, [200, Reflect.apply(withTiming, timingModule, [r8,
|
||||
{duration: 300, easing: Reflect.apply(out, Easing, [Easing2.ease])}])]);
|
||||
const value8 = 0;
|
||||
r8 = useReducedMotion ? value8 : env0_12.get() ? -80 : value8;
|
||||
object2 = {opacity: value7};
|
||||
const value = reanimatedRexportModule;
|
||||
withDelay = value.withDelay;
|
||||
const moduleValue3 = timingModule;
|
||||
withTiming = moduleValue3.withTiming;
|
||||
out = Easing.out;
|
||||
const Easing3 = reanimatedRexportModule.Easing;
|
||||
object2.transform = [{translateY: Reflect.apply(withDelay, value, [200, Reflect.apply(withTiming, moduleValue3, [r8,
|
||||
{duration: 300, easing: Reflect.apply(out, Easing, [Easing3.ease])}])])}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function GuildOnboardingPromptLt() { // fn#52311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:6844, owner: GuildOnboardingPrompt.lt, offset: 0x0132640a, size: 159 bytes, params: 1, frame: 22
|
||||
const r6 = env0_12.get() ? 0 : 1;
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withDelay = value.withDelay;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const out = Easing.out;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
return {opacity: Reflect.apply(withDelay, value, [200, Reflect.apply(withTiming, timingModule, [r6, {duration: 300,
|
||||
easing: Reflect.apply(out, Easing, [Easing2.ease])}])])};
|
||||
}
|
||||
|
||||
function GuildOnboardingPromptDt() { // fn#52313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:7550, owner: GuildOnboardingPrompt.dt, offset: 0x013264a9, size: 316 bytes, params: 1, frame: 26
|
||||
var object2;
|
||||
const value2 = env0_12.get();
|
||||
const value3 = 0;
|
||||
const r9 = value2 ? 1 : value3;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let withDelay = reanimatedRexportModule.withDelay;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
let out = Easing.out;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
const value7 = Reflect.apply(withDelay, reanimatedRexportModule, [600, Reflect.apply(withTiming, timingModule, [r9,
|
||||
{duration: 300, easing: Reflect.apply(out, Easing, [Easing2.ease])}])]);
|
||||
const r8 = useReducedMotion || env0_12.get() ? value3 : 80;
|
||||
object2 = {opacity: value7};
|
||||
const value = reanimatedRexportModule;
|
||||
withDelay = value.withDelay;
|
||||
const moduleValue3 = timingModule;
|
||||
withTiming = moduleValue3.withTiming;
|
||||
out = Easing.out;
|
||||
const Easing3 = reanimatedRexportModule.Easing;
|
||||
object2.transform = [{translateY: Reflect.apply(withDelay, value, [600, Reflect.apply(withTiming, moduleValue3, [r8,
|
||||
{duration: 300, easing: Reflect.apply(out, Easing, [Easing3.ease])}])])}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function handleOnPress() { // fn#52314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:8060, owner: GuildOnboardingPrompt.handleOnPress, offset: 0x013265e5, size: 494 bytes, params: 1, frame: 23
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
var object2;
|
||||
var moduleValue;
|
||||
var currentPromptIdxBinding;
|
||||
var length;
|
||||
var defaultImport2;
|
||||
var GUILD_ONBOARDING_STEP_VIEWED;
|
||||
var moduleValue2;
|
||||
var value3;
|
||||
var moduleValue3;
|
||||
var binding;
|
||||
if (!env0_16) {
|
||||
value2 = environment.__proto__;
|
||||
if (env0_17) {
|
||||
binding = env0_9;
|
||||
binding.push(GuildOnboardingModalStates.COMPLETED);
|
||||
} else {
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
object2 = {};
|
||||
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, moduleValue.collectGuildAnalyticsMetadata(guildId), undefined);
|
||||
object2['step'] = currentPromptIdx;
|
||||
length = env0_15.length;
|
||||
object2['options_selected'] = length;
|
||||
length = env0_15.length;
|
||||
object2['skipped'] = length === 0;
|
||||
object2['back'] = false;
|
||||
object2['in_onboarding'] = true;
|
||||
object2['is_final_step'] = false;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_COMPLETED, object2]);
|
||||
length = prompts.length;
|
||||
if (currentPromptIdxBinding < length - 1) {
|
||||
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport2.track;
|
||||
GUILD_ONBOARDING_STEP_VIEWED = AnalyticEvents.GUILD_ONBOARDING_STEP_VIEWED;
|
||||
object2 = {};
|
||||
moduleValue2 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, moduleValue2.collectGuildAnalyticsMetadata(guildId), true);
|
||||
currentPromptIdxBinding = currentPromptIdx;
|
||||
object2['step'] = currentPromptIdxBinding + 1;
|
||||
object2['required'] = prompts[currentPromptIdxBinding + 1].required;
|
||||
Reflect.apply(track, defaultImport2, [GUILD_ONBOARDING_STEP_VIEWED, object2]);
|
||||
}
|
||||
value3 = currentPromptIdx + 1;
|
||||
length = prompts.length;
|
||||
if (value3 < length) {
|
||||
binding = env0_9;
|
||||
binding.push(GuildOnboardingModalStates.PROMPT, {currentPrompt: currentPromptIdx + 1});
|
||||
} else {
|
||||
moduleValue3 = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
|
||||
if (moduleValue3.showRulesInOnboarding(guild, rulesPrompt)) {
|
||||
binding = env0_9;
|
||||
binding.push(GuildOnboardingModalStates.RULES);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52315() { // fn#52315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:8559, offset: 0x013267d3, size: 199 bytes, params: 1, frame: 16
|
||||
const r3 = currentPromptIdx !== 0 || result ? currentPromptIdx !== 0 ? (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(_fun52317,
|
||||
true) : result ? (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(_fun52316,
|
||||
true) : (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(_fun52317,
|
||||
true) : (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun52318);
|
||||
const binding = env0_9;
|
||||
binding.setOptions({headerLeft: r3});
|
||||
}
|
||||
|
||||
function _fun52306() { // fn#52306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5524, offset: 0x013260eb, size: 52 bytes, params: 1, frame: 11
|
||||
if (env1_10) {
|
||||
env1_12.set(true);
|
||||
} else {
|
||||
onClose();
|
||||
env1_13();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52316() { // fn#52316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:8620, offset: 0x0132689a, size: 178 bytes, params: 1, frame: 19
|
||||
let value = environment.__proto__.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
const object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, value.collectGuildAnalyticsMetadata(guildId), undefined);
|
||||
object2['step'] = 0;
|
||||
object2['skipped'] = false;
|
||||
object2['back'] = true;
|
||||
object2['options_selected'] = env1_15.length;
|
||||
object2['in_onboarding'] = true;
|
||||
object2['is_final_step'] = false;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_COMPLETED, object2]);
|
||||
env1_9.pop();
|
||||
}
|
||||
|
||||
function _fun52317() { // fn#52317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:8852, offset: 0x0132694c, size: 274 bytes, params: 1, frame: 28
|
||||
let value = environment.__proto__.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
let track = defaultImport.track;
|
||||
const GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
let object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
|
||||
const guildIdBinding = guildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [guildIdBinding]), undefined);
|
||||
const currentPromptIdxBinding = currentPromptIdx;
|
||||
object2['step'] = currentPromptIdxBinding;
|
||||
object2['skipped'] = false;
|
||||
object2['back'] = true;
|
||||
const length = env1_15.length;
|
||||
object2['options_selected'] = length;
|
||||
object2['in_onboarding'] = true;
|
||||
object2['is_final_step'] = false;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_COMPLETED, object2]);
|
||||
value = defaultImport;
|
||||
track = value.track;
|
||||
const GUILD_ONBOARDING_STEP_VIEWED = AnalyticEvents.GUILD_ONBOARDING_STEP_VIEWED;
|
||||
object2 = {};
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildIdBinding), length);
|
||||
object2['step'] = currentPromptIdxBinding - 1;
|
||||
object2['required'] = prompts[currentPromptIdxBinding - 1].required;
|
||||
Reflect.apply(track, value, [GUILD_ONBOARDING_STEP_VIEWED, object2]);
|
||||
env1_9.pop();
|
||||
}
|
||||
|
||||
function _fun52318() { // fn#52318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:9213, offset: 0x01326a5e, size: 338 bytes, params: 1, frame: 20
|
||||
var onCloseBinding;
|
||||
var channel;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
const object2 = {};
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), undefined);
|
||||
object2['step'] = 0;
|
||||
object2['skipped'] = true;
|
||||
object2['back'] = false;
|
||||
object2['options_selected'] = 0;
|
||||
object2['in_onboarding'] = true;
|
||||
object2['is_final_step'] = false;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_COMPLETED, object2]);
|
||||
if (backShouldLeaveGuild) {
|
||||
guildIdBinding = guildId;
|
||||
onCloseBinding = onClose;
|
||||
channel = ChannelStore.getChannel(SelectedChannelStore.getLastSelectedChannelId());
|
||||
if (channel == null) {
|
||||
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue2.transitionTo(Routes.ME, {navigationReplace: true});
|
||||
} else if (channel.guild_id !== guildIdBinding) {
|
||||
moduleValue3 = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue3.transitionTo(Routes.CHANNEL(channel.guild_id, channel.id));
|
||||
} else {
|
||||
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue2.transitionTo(Routes.ME, {navigationReplace: true});
|
||||
}
|
||||
onCloseBinding();
|
||||
} else {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* Metro module 6786; source: modules/guild_onboarding/native/ProviderConnectionCard.tsx; dependencies: [5, 31, 661, 33, 4048, 4915, 1244, 6787, 683, 4863, 1423, 4002, 1305, 4056, 6785, 2] */
|
||||
function _fun53431(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6964:6, offset: 0x01348e3d, size: 178 bytes, params: 8, frame: 19
|
||||
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 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/ProviderConnectionCard.tsx');
|
||||
exports.default = ProviderConnectionCard;
|
||||
}
|
||||
|
||||
function ProviderConnectionCard({connection, guildId, location}) { // fn#53432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6964:258, offset: 0x01348eef, size: 422 bytes, params: 2, frame: 26
|
||||
var r10;
|
||||
var defaultImport;
|
||||
var intl;
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const env0_3 = value3;
|
||||
if (connection.provider_id != null) {
|
||||
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
|
||||
r10 = defaultImport.get(connection.provider_id)?.name;
|
||||
} else {
|
||||
r10 = null;
|
||||
}
|
||||
if (r10 == null) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r10 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NzCoRx);
|
||||
}
|
||||
const value7 = (require(6787) /* metro dependency 6787: useStartProviderConnection */).useStartProviderConnection(connection.provider_id);
|
||||
const hasConnection = value7.hasConnection;
|
||||
const canConnect = value7.canConnect;
|
||||
const startConnection = value7.startConnection;
|
||||
const env0_4 = startConnection;
|
||||
const loading = value7.loading;
|
||||
const binding = env0_4;
|
||||
const useCallback = binding.useCallback;
|
||||
return ((Component) => <Component displayName={r10} description={connection.description} icon={binding.useMemo(_fun53435,
|
||||
[connection.provider_id,
|
||||
value3])} isLoading={loading} isConnected={hasConnection} canConnect={canConnect} onConnect={Reflect.apply(useCallback,
|
||||
binding, [env0_3(_fun53434), [startConnection, guildId, connection.provider_id,
|
||||
location]])} />)(importDefault(6785) /* metro dependency 6785: ConnectionCardView */);
|
||||
}
|
||||
|
||||
function* _fun53434() { // fn#53434, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6964:611, offset: 0x0134909e, size: 192 bytes, params: 1, frame: 19
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const binding = env2_1;
|
||||
const binding2 = env2_2;
|
||||
const value3 = undefined;
|
||||
const value4 = binding(binding2[8]);
|
||||
const track = value4.track;
|
||||
const GUILD_ONBOARDING_CONNECTION_CLICKED = env2_5.GUILD_ONBOARDING_CONNECTION_CLICKED;
|
||||
const object2 = {};
|
||||
value = env2_0(binding2[9]);
|
||||
copyDataProperties(object2, value.collectGuildAnalyticsMetadata(importDefault), value);
|
||||
object2['connection_type'] = 'provider';
|
||||
object2['provider_id'] = require.provider_id ?? value3;
|
||||
object2['location'] = dependencyMap;
|
||||
Reflect.apply(track, value4, [GUILD_ONBOARDING_CONNECTION_CLICKED, object2]);
|
||||
yield env1_4('Guild Onboarding');
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _fun53435() { // fn#53435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6964:878, offset: 0x0134915e, size: 299 bytes, params: 1, frame: 19
|
||||
var icon;
|
||||
var r4;
|
||||
var value3;
|
||||
var value4;
|
||||
var defaultImport;
|
||||
var value5;
|
||||
var moduleValue;
|
||||
var makeSource;
|
||||
var value;
|
||||
const provider_id = connection.provider_id;
|
||||
const value2 = null;
|
||||
if (value2 != provider_id) {
|
||||
value3 = environment.__proto__;
|
||||
value4 = undefined;
|
||||
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
|
||||
value5 = defaultImport.get(connection.provider_id);
|
||||
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
makeSource = moduleValue.makeSource;
|
||||
icon = value2 == value5 ? value4 : value5.icon;
|
||||
if (value2 != icon) {
|
||||
value = (require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_3);
|
||||
icon = value5.icon;
|
||||
r4 = value ? icon.darkPNG : icon.lightPNG;
|
||||
} else {
|
||||
r4 = value2;
|
||||
}
|
||||
value = Reflect.apply(makeSource, moduleValue, [r4]);
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
return (
|
||||
<Icon
|
||||
source={value}
|
||||
style={{'width': 32, 'height': 32}}
|
||||
disableColor
|
||||
/>
|
||||
);
|
||||
}
|
||||
value = environment.__proto__;
|
||||
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
|
||||
return <LinkIcon size="lg" color="text-subtle" />;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user