Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
+368
@@ -0,0 +1,368 @@
|
||||
/* Metro module 15931; source: modules/guild_settings/integrations/native/GuildSettingsModalIntegrationPlatform.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 9113, 661, 33, 4501, 697, 9112, 4496, 1244, 4596, 15902, 15932, 4915, 1423, 4002, 6231, 6238, 6808, 3860, 1484, 566, 4048, 5282, 5277, 7007, 1948, 7972, 4572, 4573, 5462, 2] */
|
||||
function _fun122865(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:6, offset: 0x02578670, size: 479 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
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 value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_8 = value2.ActivityIndicator;
|
||||
const env0_9 = value2.Image;
|
||||
const env0_10 = value2.View;
|
||||
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = constantsModule.GuildSettingsSections;
|
||||
const env0_13 = constantsModule.HelpdeskArticles;
|
||||
const env0_14 = constantsModule.PlatformTypes;
|
||||
const env0_15 = constantsModule.UserSettingsSections;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_16 = value4.jsx;
|
||||
const env0_17 = value4.jsxs;
|
||||
const env0_18 = value4.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const env0_19 = Reflect.apply(createStyles, createStylesModule, [{form: {paddingTop: PX_16},
|
||||
trailingWrapper: {'flexDirection': 'row', 'alignItems': 'center'}, platformIcon: {'width': 24, 'height': 24}}]);
|
||||
const Component = value.Component;
|
||||
const env0_20 = _fun122869(Component);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/integrations/native/GuildSettingsModalIntegrationPlatform.tsx');
|
||||
exports.default = GuildSettingsModalIntegrationPlatform;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_122866() { // fn#122866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:366, offset: 0x0257884f, 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_122866_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun122869(a0) { // fn#122869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:724, offset: 0x025788b1, size: 102 bytes, params: 2, frame: 17
|
||||
const closure = IntegrationItem;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'render', value: value_122874}], [{key: 'getDerivedStateFromProps',
|
||||
value: function({integration}, {enabled}) {
|
||||
var value = null;
|
||||
return enabled ? integration.syncing !== false || integration.enabled === enabled ? value : {enabled: integration.enabled} : value;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function GuildSettingsModalIntegrationPlatform({contentContainerStyle, platformType, closeGuildSettings}) { // fn#122877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:2941, offset: 0x02578f9b, size: 946 bytes, params: 2, frame: 27
|
||||
var object3;
|
||||
var r16;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
var ro1jEN;
|
||||
var defaultImport2;
|
||||
var property;
|
||||
var defaultImport3;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
|
||||
const value3 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
|
||||
const styles = useStyles();
|
||||
const value4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsStore],
|
||||
function() {
|
||||
var object = {};
|
||||
object.guild = GuildSettingsStore.getGuild();
|
||||
object.submitting = GuildSettingsStore.isSubmitting();
|
||||
object.hasChanges = GuildSettingsStore.hasChanges();
|
||||
return object;
|
||||
});
|
||||
const submitting = value5.submitting;
|
||||
const env0_5 = value5.hasChanges;
|
||||
const guild = value5.guild;
|
||||
const env0_7 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const r14 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore], function() {
|
||||
return GuildSettingsStore.getProps().integrations;
|
||||
})?.filter(function({type}) {
|
||||
return type === platformType;
|
||||
});
|
||||
if (guild == null) {
|
||||
return null;
|
||||
}
|
||||
const setOptions = value4.setOptions;
|
||||
object3 = {headerLeft: submitting ? function() {
|
||||
return null;
|
||||
} : undefined};
|
||||
object3.title = (importDefault(4915) /* metro dependency 4915: Platforms */).get(platformType)?.name;
|
||||
object3.headerRight = headerRight_122883;
|
||||
Reflect.apply(setOptions, value4, [object3]);
|
||||
const closure = function() {
|
||||
closeGuildSettings();
|
||||
require(dependencyMap[30]).openUserSettings({screen: UserSettingsSections.CONNECTIONS, isRootScreen: true});
|
||||
};
|
||||
const YOUTUBE = PlatformTypes.YOUTUBE;
|
||||
if (YOUTUBE === platformType) {
|
||||
format = intl.format;
|
||||
property = (require(1244) /* metro dependency 1244: indexNative */).t['4OSAQ9'];
|
||||
object3 = {connectAction: closure};
|
||||
defaultImport3 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
object3.helpdeskArticle = defaultImport3.getArticleURL(HelpdeskArticles.YOUTUBE_INTEGRATION);
|
||||
r16 = Reflect.apply(format, intl, [property, object3]);
|
||||
} else if (PlatformTypes.TWITCH !== platformType) {
|
||||
r16 = undefined;
|
||||
} else {
|
||||
format = intl.format;
|
||||
ro1jEN = (require(1244) /* metro dependency 1244: indexNative */).t.ro1jEN;
|
||||
object3 = {connectAction: closure};
|
||||
defaultImport2 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
object3.helpdeskArticle = defaultImport2.getArticleURL(HelpdeskArticles.TWITCH_INTEGRATION);
|
||||
r16 = Reflect.apply(format, intl, [ro1jEN, object3]);
|
||||
}
|
||||
const jsxRuntimeEnv0_18Binding = jsxRuntimeEnv0_18;
|
||||
const Form = (require(7972) /* metro dependency 7972: native */).Form;
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const object2 = {paddingHorizontal: value3};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
const r7 = r14?.map(_fun122885);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const form = <Form style={styles.form} contentContainerStyle={contentContainerStyle}><Stack style={object2} spacing={PX_24}>{r7}<Text variant="text-sm/medium" color="text-muted">{r16}</Text></Stack></Form>;
|
||||
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
|
||||
return (
|
||||
<>
|
||||
{form}
|
||||
<NavScrim />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function IntegrationItem(a0) { // fn#122870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:736, offset: 0x02578917, size: 173 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, IntegrationItem);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_6(IntegrationItem);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_122866()) {
|
||||
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.state = {enabled: value.props.integration.enabled};
|
||||
value.handleToggleEnabled = handleToggleEnabled;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_122874() { // fn#122874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:1676, offset: 0x02578c34, size: 776 bytes, params: 1, frame: 29
|
||||
var r13;
|
||||
var r12;
|
||||
var defaultImport;
|
||||
var get;
|
||||
var value4;
|
||||
var value5;
|
||||
var moduleValue;
|
||||
var makeSource;
|
||||
var isThemeDark2;
|
||||
var icon;
|
||||
var TableRowGroup;
|
||||
var TableRow;
|
||||
var object;
|
||||
var user;
|
||||
var syncing;
|
||||
var enabled;
|
||||
var items2;
|
||||
var TableSwitchRow;
|
||||
var object3;
|
||||
var Boolean;
|
||||
var intl;
|
||||
const props = this.props;
|
||||
const integration = props.integration;
|
||||
const env0_1 = props.onPress;
|
||||
const theme = props.theme;
|
||||
const styles = props.styles;
|
||||
const value2 = undefined;
|
||||
const SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS = (require(15902) /* metro dependency 15902: GuildSettingsModalIntegrations */).SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS;
|
||||
const includes = SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS.includes;
|
||||
let type = integration.type;
|
||||
if (Reflect.apply(includes, SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS, [type])) {
|
||||
type = integration.type;
|
||||
r13 = (require(15932) /* metro dependency 15932: IntegrationTypes */).IntegrationTypes.YOUTUBE === type ? integration.account == null ? value2 : integration.account.name : (require(15932) /* metro dependency 15932: IntegrationTypes */).IntegrationTypes.TWITCH !== type ? value2 : 'twitch.tv/' + integration.name;
|
||||
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
|
||||
get = defaultImport.get;
|
||||
type = integration.type;
|
||||
value4 = Reflect.apply(get, defaultImport, [type]);
|
||||
value5 = null;
|
||||
if (value5 != value4) {
|
||||
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
makeSource = moduleValue.makeSource;
|
||||
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(theme);
|
||||
icon = value4.icon;
|
||||
r12 = <Image source={Reflect.apply(makeSource, moduleValue,
|
||||
[isThemeDark2 ? icon.darkPNG : icon.lightPNG])} style={styles.platformIcon} />;
|
||||
} else {
|
||||
r12 = value5;
|
||||
}
|
||||
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
object = {};
|
||||
user = integration.user;
|
||||
object.label = value5 == user ? value2 : user.toString();
|
||||
object.subLabel = r13;
|
||||
syncing = integration.syncing;
|
||||
object.trailing = <View style={styles.trailingWrapper}>{syncing && <ActivityIndicator animating size="small" />}</View>;
|
||||
enabled = integration.enabled;
|
||||
r13 = enabled && !integration.syncing;
|
||||
object.arrow = r13;
|
||||
object.icon = r12;
|
||||
enabled = integration.enabled;
|
||||
r12 = enabled ? integration.syncing : !enabled;
|
||||
object.disabled = r12;
|
||||
object.onPress = onPress_122875;
|
||||
items2 = [<TableRow {...object} />];
|
||||
TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
|
||||
object3 = {};
|
||||
Boolean = global.Boolean;
|
||||
enabled = this.state.enabled;
|
||||
object3.value = Boolean(enabled);
|
||||
syncing = integration.syncing;
|
||||
object3.disabled = syncing === true;
|
||||
object3.onValueChange = this.handleToggleEnabled;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vQC6vR);
|
||||
items2[1] = <TableSwitchRow {...object3} />;
|
||||
return (
|
||||
<TableRowGroup hasIcons>
|
||||
{items2}
|
||||
</TableRowGroup>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function GuildSettingsModalIntegrationPlatformOnSave() { // fn#122881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:3476, owner: GuildSettingsModalIntegrationPlatform.onSave, offset: 0x0257939d, size: 64 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
|
||||
const saveGuild = value.saveGuild;
|
||||
const guildBinding = guild;
|
||||
Reflect.apply(saveGuild, value, [guildBinding.id, {features: guildBinding.features}]);
|
||||
}
|
||||
|
||||
function GuildSettingsModalIntegrationPlatformHeaderRight() { // fn#122883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:3632, owner: GuildSettingsModalIntegrationPlatform.headerRight, offset: 0x025793dd, size: 168 bytes, params: 1, frame: 20
|
||||
var r0;
|
||||
var value3;
|
||||
var HeaderActionButton;
|
||||
var intl;
|
||||
var value;
|
||||
if (submitting) {
|
||||
value = environment.__proto__;
|
||||
const HeaderSubmittingIndicator = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).HeaderSubmittingIndicator;
|
||||
value = <HeaderSubmittingIndicator />;
|
||||
r0 = value;
|
||||
} else if (hasChanges) {
|
||||
value3 = environment.__proto__;
|
||||
HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = <HeaderActionButton text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+'])} onPress={GuildSettingsModalIntegrationPlatformOnSave} />;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun122885(a0, a1) { // fn#122885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:4399, offset: 0x025794ce, size: 86 bytes, params: 3, frame: 17
|
||||
const env0_0 = a1;
|
||||
return ((Component) => <Component guild={guild} theme={env0_7} integration={a0} styles={styles} onPress={onPress_122886} key={a0.id} />)(env1_20);
|
||||
}
|
||||
|
||||
function handleToggleEnabled() { // fn#122871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:1035, owner: IntegrationItem.handleToggleEnabled, offset: 0x025789c4, size: 536 bytes, params: 1, frame: 22
|
||||
var environment;
|
||||
var enabled;
|
||||
var binding;
|
||||
var setState;
|
||||
var object2;
|
||||
var defaultImport;
|
||||
var show;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value;
|
||||
const props = env0_0.props;
|
||||
const guild = props.guild;
|
||||
var env0_0 = guild;
|
||||
const integration = props.integration;
|
||||
if (!integration.syncing) {
|
||||
enabled = integration.enabled;
|
||||
binding = env0_0;
|
||||
setState = binding.setState;
|
||||
object2 = {};
|
||||
if (enabled) {
|
||||
object2.enabled = false;
|
||||
Reflect.apply(setState, binding, [object2]);
|
||||
value = environment.__proto__.__proto__;
|
||||
defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
|
||||
show = defaultImport.show;
|
||||
object2 = {};
|
||||
object2.title = intl.string(t.emx3lN);
|
||||
object2.body = integration.type === 'youtube' ? intl.string(t.anKQWU) : intl.string(t['BW/xtn']);
|
||||
object2.confirmText = intl.string(t.R9GHya);
|
||||
object2.cancelText = intl.string(t['ETE/oC']);
|
||||
object2.onConfirm = onConfirm_122872;
|
||||
object2.onCancel = onCancel_122873;
|
||||
object2.confirmColor = (importDefault(4596) /* metro dependency 4596: Alert */).Colors.RED;
|
||||
Reflect.apply(show, defaultImport, [object2]);
|
||||
} else {
|
||||
object2.enabled = true;
|
||||
Reflect.apply(setState, binding, [object2]);
|
||||
value = environment.__proto__.__proto__;
|
||||
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
|
||||
value.enableIntegration(guild.id, integration.type, integration.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_122874OnPress() { // fn#122875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:2451, owner: value_122874.onPress, offset: 0x02578f3c, size: 32 bytes, params: 1, frame: 12
|
||||
return integration.enabled && onPress(integration);
|
||||
}
|
||||
|
||||
function onPress_122886() { // fn#122886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:4458, offset: 0x02579524, size: 49 bytes, params: 1, frame: 14
|
||||
const binding = env1_3;
|
||||
const push = binding.push;
|
||||
const INTEGRATION_SETTINGS = GuildSettingsSections.INTEGRATION_SETTINGS;
|
||||
Reflect.apply(push, binding, [INTEGRATION_SETTINGS, {integrationId: require}]);
|
||||
}
|
||||
|
||||
function handleToggleEnabledOnConfirm() { // fn#122872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:1413, owner: IntegrationItem.handleToggleEnabled.onConfirm, offset: 0x02578bdc, size: 60 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
|
||||
return value.disableIntegration(guild.id, integration.id);
|
||||
}
|
||||
|
||||
function handleToggleEnabledOnCancel() { // fn#122873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:1466, owner: IntegrationItem.handleToggleEnabled.onCancel, offset: 0x02578c18, size: 28 bytes, params: 1, frame: 12
|
||||
return env1_0.setState({enabled: true});
|
||||
}
|
||||
|
||||
+330
@@ -0,0 +1,330 @@
|
||||
/* Metro module 15927; source: modules/guild_settings/integrations/native/GuildSettingsModalIntegrationSettings.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 1938, 9113, 33, 15928, 1244, 4501, 697, 7987, 5278, 6238, 15929, 6231, 6808, 9112, 4573, 4915, 1423, 4002, 7972, 4572, 3738, 7988, 15930, 5462, 3868, 566, 4048, 15902, 2] */
|
||||
function _fun122839(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:6, offset: 0x02577492, size: 528 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_8 = value2.Image;
|
||||
const env0_9 = value2.ActivityIndicator;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value3.jsx;
|
||||
const env0_13 = value3.jsxs;
|
||||
const env0_14 = value3.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
|
||||
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
|
||||
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule,
|
||||
[{integrationLabel: {fontSize: 24}, integrationIcon: {'width': 48, 'height': 48, 'marginRight': 16},
|
||||
forceSyncIcon: {marginLeft: 10}, value: {textAlign: 'right'},
|
||||
stackPadding: {paddingHorizontal: TABLE_ROW_PADDING}}]);
|
||||
const PureComponent = value.PureComponent;
|
||||
value = _fun122847(PureComponent);
|
||||
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
|
||||
value.contextType = ThemeContext;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/integrations/native/GuildSettingsModalIntegrationSettings.tsx');
|
||||
exports.default = ConnectedGuildSettingsModalIntegrationSettings;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_122840() { // fn#122840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:268, offset: 0x025776a2, 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_122840_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function GraceOption({integration, option, onPress}) { // fn#122843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:727, offset: 0x02577704, size: 125 bytes, params: 2, frame: 17
|
||||
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
|
||||
return (
|
||||
<TableRadioRow
|
||||
value={option.value}
|
||||
label={option.label}
|
||||
legacyCompat_onPress={function() {
|
||||
return onPress(option.value);
|
||||
}}
|
||||
legacyCompat_selected={integration.expire_grace_period === option.value}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function ForceSyncIcon({isSyncing, onPress}) { // fn#122845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:937, offset: 0x0257779a, size: 217 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var PressableOpacity;
|
||||
var intl;
|
||||
if (isSyncing) {
|
||||
r0 = <ActivityIndicator animating size="small" />;
|
||||
} else {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+Josox'])} onPress={onPress}>{((Icon) => <Icon source={importDefault(15929) /* metro dependency 15929 */} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)}</PressableOpacity>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function TwitchEmoticonsRow({integration, onPress}) { // fn#122846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:1211, offset: 0x02577873, size: 242 bytes, params: 2, frame: 23
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.helperText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7r4OKg']);
|
||||
object2.hasIcons = false;
|
||||
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
|
||||
const tableSwitchRowProps = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bZBLBs)};
|
||||
const Boolean = global.Boolean;
|
||||
tableSwitchRowProps.value = Boolean(integration.enable_emoticons);
|
||||
tableSwitchRowProps.onValueChange = onPress;
|
||||
tableSwitchRowProps.disabled = integration.syncing;
|
||||
return (
|
||||
<TableRowGroup {...object2}>
|
||||
<TableSwitchRow {...tableSwitchRowProps} />
|
||||
</TableRowGroup>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun122847(a0) { // fn#122847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:1526, offset: 0x02577965, size: 72 bytes, params: 2, frame: 15
|
||||
const closure = GuildSettingsModalIntegrationSettings;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'render', value: value_122853}]);
|
||||
}
|
||||
|
||||
function ConnectedGuildSettingsModalIntegrationSettings({integrationId, contentContainerStyle}) { // fn#122858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:5041, offset: 0x02578398, size: 261 bytes, params: 2, frame: 21
|
||||
const {guild,
|
||||
integrations} = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore],
|
||||
function() {
|
||||
return GuildSettingsStore.getProps();
|
||||
});
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore], _fun122860);
|
||||
const value4 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const r7 = integrations?.filter(function(a0) {
|
||||
var SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS = require(dependencyMap[34]).SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS;
|
||||
return SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS.includes(a0.type);
|
||||
})?.[integrationId];
|
||||
return guild == null || r7 == null || value3 == null ? null : ((Component) => <Component guildId={guild.id} guildRoles={value3} integration={r7} theme={value4} contentContainerStyle={contentContainerStyle} />)(env0_16);
|
||||
}
|
||||
|
||||
function GuildSettingsModalIntegrationSettings(a0) { // fn#122848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:1538, offset: 0x025779ad, size: 184 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, GuildSettingsModalIntegrationSettings);
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, items2);
|
||||
value = env1_6(GuildSettingsModalIntegrationSettings);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_122840()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items2, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items2);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.handleExpireBehaviorChange = handleExpireBehaviorChange;
|
||||
value.handleExpireGracePeriodChange = handleExpireGracePeriodChange;
|
||||
value.handleToggleEmotes = handleToggleEmotes;
|
||||
value.handleSync = handleSync;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_122853() { // fn#122853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:2498, offset: 0x02577baa, size: 1773 bytes, params: 1, frame: 44
|
||||
var r21;
|
||||
var name;
|
||||
var r13;
|
||||
var r24;
|
||||
var r26;
|
||||
var r31;
|
||||
var r25;
|
||||
var property;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
var object;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value7;
|
||||
var value8;
|
||||
var RdUTrl;
|
||||
var account;
|
||||
var value10;
|
||||
var moduleValue;
|
||||
var makeSource;
|
||||
var isThemeDark2;
|
||||
var icon;
|
||||
const binding = env1_15;
|
||||
const context = this.context;
|
||||
const value2 = undefined;
|
||||
const value3 = binding(context);
|
||||
const {guildRoles, integration, theme} = this.props;
|
||||
const role_id = integration.role_id;
|
||||
const value4 = null;
|
||||
const r9 = value4 != role_id ? guildRoles[role_id] : value4;
|
||||
if (value4 != r9) {
|
||||
r21 = <TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eBtNBa)} trailing={((Text) => <Text style={value3.value} variant="text-md/medium" color="text-muted">{r9.name}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)} />;
|
||||
} else {
|
||||
r21 = value2;
|
||||
}
|
||||
if (integration.type === 'youtube') {
|
||||
account = integration.account;
|
||||
name = value4 == account ? value2 : account.name;
|
||||
value10 = intl.string(t.A5MiqO);
|
||||
property = t['7lNtce'];
|
||||
r13 = value2;
|
||||
r24 = value10;
|
||||
r26 = name;
|
||||
r31 = property;
|
||||
} else {
|
||||
value7 = 'twitch.tv/' + integration.name;
|
||||
value8 = intl.string(t['S/WCrG']);
|
||||
RdUTrl = t.RdUTrl;
|
||||
r13 = <TwitchEmoticonsRow integration={integration} onPress={this.handleToggleEmotes} />;
|
||||
r24 = value8;
|
||||
r26 = value7;
|
||||
r31 = RdUTrl;
|
||||
}
|
||||
const value11 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(integration.type);
|
||||
if (value4 != value11) {
|
||||
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
makeSource = moduleValue.makeSource;
|
||||
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(theme);
|
||||
icon = value11.icon;
|
||||
r25 = <Image source={Reflect.apply(makeSource, moduleValue,
|
||||
[isThemeDark2 ? icon.darkPNG : icon.lightPNG])} style={value3.integrationIcon} />;
|
||||
} else {
|
||||
r25 = value4;
|
||||
}
|
||||
const subGracePeriodOptions = getSubGracePeriodOptions();
|
||||
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
|
||||
const Form = (require(7972) /* metro dependency 7972: native */).Form;
|
||||
const items3 = [{paddingTop: 16}];
|
||||
items3[1] = this.props.contentContainerStyle;
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const stackPadding = value3.stackPadding;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const user = integration.user;
|
||||
const items2 = [<TableRowGroup hasIcons><TableRow label={value4 == user ? value2 : user.toString()} subLabel={r26} icon={r25} /></TableRowGroup>];
|
||||
const tableRowGroupProps = {title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i17qFc),
|
||||
hasIcons: false};
|
||||
const format = intl.format;
|
||||
const subscriber_count = integration.subscriber_count;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
property = (require(1244) /* metro dependency 1244: indexNative */).t['+42M+u'];
|
||||
const object2 = {};
|
||||
object2.datetime = (importDefault(3738) /* metro dependency 3738 */)(integration.synced_at).calendar();
|
||||
const syncing = integration.syncing;
|
||||
items2[1] = <TableRowGroup {...tableRowGroupProps}><TableRow label={Reflect.apply(format, intl, [r31,
|
||||
{subscribers: value4 != subscriber_count ? subscriber_count : ''}])} subLabel={Reflect.apply(formatToPlainString,
|
||||
intl, [property,
|
||||
object2])} trailing={<ForceSyncIcon isSyncing={value4 != syncing && syncing} onPress={this.handleSync} />} />{r21}</TableRowGroup>;
|
||||
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
|
||||
const expire_behavior = integration.expire_behavior;
|
||||
const handleExpireBehaviorChange = this.handleExpireBehaviorChange;
|
||||
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
|
||||
const IntegrationExpireBehaviorTypes = (require(15930) /* metro dependency 15930: IntegrationExpireBehaviorTypes */).IntegrationExpireBehaviorTypes;
|
||||
const REMOVE_ROLE = IntegrationExpireBehaviorTypes.REMOVE_ROLE;
|
||||
const tableRadioRow = <TableRadioRow value={REMOVE_ROLE} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6kpw4i'])} />;
|
||||
const KICK = IntegrationExpireBehaviorTypes.KICK;
|
||||
items2[2] = <TableRadioGroup title={r24} value={expire_behavior} onChange={handleExpireBehaviorChange} hasIcons={false}>{tableRadioRow}<TableRadioRow value={KICK} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fQUQIJ)} /></TableRadioGroup>;
|
||||
items2[3] = <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uiXMow)} hasIcons={false}>{subGracePeriodOptions.map(_fun122857)}</TableRowGroup>;
|
||||
items2[4] = r13;
|
||||
const form = <Form style={{flex: 1}} contentContainerStyle={items3}><Stack style={stackPadding} spacing={PX_24}>{items2}</Stack></Form>;
|
||||
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
|
||||
return (
|
||||
<>
|
||||
{form}
|
||||
<NavScrim />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun122860() { // fn#122860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:5260, offset: 0x025784b0, size: 47 bytes, params: 1, frame: 12
|
||||
return guild != null ? GuildRoleStore.getRolesSnapshot(guild.id) : undefined;
|
||||
}
|
||||
|
||||
function handleExpireBehaviorChange(a0) { // fn#122849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:1864, owner: GuildSettingsModalIntegrationSettings.handleExpireBehaviorChange, offset: 0x02577a65, size: 86 bytes, params: 2, frame: 20
|
||||
const {guildId, integration} = env0_0.props;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
|
||||
value.updateIntegration(guildId, integration.id, a0, integration.expire_grace_period, integration.enable_emoticons);
|
||||
}
|
||||
|
||||
function handleExpireGracePeriodChange(a0) { // fn#122850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:2022, owner: GuildSettingsModalIntegrationSettings.handleExpireGracePeriodChange, offset: 0x02577abb, size: 86 bytes, params: 2, frame: 20
|
||||
const {guildId, integration} = env0_0.props;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
|
||||
value.updateIntegration(guildId, integration.id, integration.expire_behavior, a0, integration.enable_emoticons);
|
||||
}
|
||||
|
||||
function handleToggleEmotes(a0) { // fn#122851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:2165, owner: GuildSettingsModalIntegrationSettings.handleToggleEmotes, offset: 0x02577b11, size: 86 bytes, params: 2, frame: 20
|
||||
const {guildId, integration} = env0_0.props;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
|
||||
value.updateIntegration(guildId, integration.id, integration.expire_behavior, integration.expire_grace_period, a0);
|
||||
}
|
||||
|
||||
function handleSync() { // fn#122852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:2303, owner: GuildSettingsModalIntegrationSettings.handleSync, offset: 0x02577b67, size: 67 bytes, params: 1, frame: 14
|
||||
const {guildId, integration} = env0_0.props;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
|
||||
value.syncIntegration(guildId, integration.id);
|
||||
}
|
||||
|
||||
function getSubGracePeriodOptions() { // fn#122854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:3267, owner: value_122853.getSubGracePeriodOptions, offset: 0x02578297, size: 87 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
const Object = global.Object;
|
||||
const values = Object.values;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const IntegrationExpireGracePeriodTypes = (require(15928) /* metro dependency 15928: IntegrationExpireGracePeriodTypes */).IntegrationExpireGracePeriodTypes;
|
||||
value = Reflect.apply(values, Object, [IntegrationExpireGracePeriodTypes]);
|
||||
value = value.filter(function(a0) {
|
||||
var Number = global.Number;
|
||||
return Number.isInteger(a0);
|
||||
});
|
||||
return value.map(function(a0) {
|
||||
var object = {value: a0};
|
||||
object.label = require(dependencyMap[11]).intl.formatToPlainString(require(dependencyMap[11]).t.eGjmy5,
|
||||
{days: a0});
|
||||
return object;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun122857(a0, a1) { // fn#122857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:4723, offset: 0x0257835b, size: 61 bytes, params: 3, frame: 15
|
||||
return (
|
||||
<GraceOption
|
||||
integration={integration}
|
||||
option={a0}
|
||||
onPress={env0_0.handleExpireGracePeriodChange}
|
||||
key={a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
+250
@@ -0,0 +1,250 @@
|
||||
/* Metro module 15902; source: modules/guild_settings/integrations/native/GuildSettingsModalIntegrations.tsx; dependencies: [31, 27, 3784, 9113, 661, 33, 4501, 697, 3860, 1484, 566, 4048, 15866, 7972, 4572, 6231, 6238, 1244, 15117, 15201, 13127, 4915, 1423, 4002, 5462, 2] */
|
||||
function _fun122677(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:6, offset: 0x02570a2f, size: 389 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).Image;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = value.GuildSettingsSections;
|
||||
const PlatformTypes = value.PlatformTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
const env0_9 = value.Fragment;
|
||||
const TWITCH = PlatformTypes.TWITCH;
|
||||
items = [TWITCH];
|
||||
const YOUTUBE = PlatformTypes.YOUTUBE;
|
||||
items[1] = YOUTUBE;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object3 = {};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object3.screenContainer = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.screenContent = {paddingTop: PX_16};
|
||||
object3.platformIcon = {'width': 24, 'height': 24};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/integrations/native/GuildSettingsModalIntegrations.tsx');
|
||||
exports.default = GuildSettingsModalIntegrations;
|
||||
exports.SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS = items;
|
||||
}
|
||||
|
||||
function GuildSettingsModalIntegrations({contentContainerStyle}) { // fn#122678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:564, offset: 0x02570bb4, size: 1303 bytes, params: 2, frame: 39
|
||||
var r19;
|
||||
var r18;
|
||||
var r17;
|
||||
var r1;
|
||||
var r0;
|
||||
var jsxRuntimeEnv0_9Binding;
|
||||
const Form = (require(7972) /* metro dependency 7972: native */).Form;
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
var object6;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items2;
|
||||
var object7;
|
||||
var object8;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
|
||||
const value3 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
|
||||
const styles = useStyles();
|
||||
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore], function() {
|
||||
return GuildSettingsStore.getGuild();
|
||||
}, []);
|
||||
const {canManageWebhooks,
|
||||
canManageGuild} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PermissionStore],
|
||||
_fun122680);
|
||||
const env0_3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const r2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore], function() {
|
||||
return GuildSettingsStore.getProps().integrations;
|
||||
})?.filter(_fun122682);
|
||||
const useChannelsAllowedToUnlinkModule = require(15866) /* metro dependency 15866: useChannelsAllowedToUnlink */;
|
||||
const useChannelsAllowedToUnlink = useChannelsAllowedToUnlinkModule.useChannelsAllowedToUnlink;
|
||||
const value9 = Reflect.apply(useChannelsAllowedToUnlink, useChannelsAllowedToUnlinkModule, [value4?.id]).length > 0;
|
||||
let r15 = canManageGuild && (r2?.length ?? 0) > 0;
|
||||
if (value4 == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
if (canManageWebhooks) {
|
||||
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
var formProps = {style: styles.screenContainer, contentContainerStyle: [styles.screenContent,
|
||||
contentContainerStyle]};
|
||||
var stackProps = {style: {paddingHorizontal: value3},
|
||||
spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_24};
|
||||
if (canManageWebhooks) {
|
||||
r19 = <TableRow label={intl.string(t.jp25Id)} subLabel={intl.string(t.mKIOkI)} icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)} arrow onPress={onPress_122683} />;
|
||||
} else {
|
||||
r19 = canManageWebhooks;
|
||||
}
|
||||
items2 = [r19];
|
||||
if (canManageWebhooks) {
|
||||
r18 = <TableRow label={intl.string(t.OrV60r)} subLabel={intl.string(t.rQREJl)} icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)} arrow onPress={onPress_122684} />;
|
||||
} else {
|
||||
r18 = canManageWebhooks;
|
||||
}
|
||||
items2[1] = r18;
|
||||
if (value9) {
|
||||
r17 = <TableRow label={intl.string(t.tqtDXC)} subLabel={intl.string(t.v8819e)} icon={((RefreshIcon) => <RefreshIcon />)((require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon)} arrow onPress={onPress_122685} />;
|
||||
} else {
|
||||
r17 = value9;
|
||||
}
|
||||
items2[2] = r17;
|
||||
r15 = r15 && env0_10.map(_fun122686);
|
||||
items2[3] = r15;
|
||||
r1 = <><Form {...formProps}><Stack {...stackProps}><TableRowGroup hasIcons>{items2}</TableRowGroup></Stack></Form>{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}</>;
|
||||
} else if (value9) {
|
||||
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
var formProps = {style: styles.screenContainer, contentContainerStyle: [styles.screenContent,
|
||||
contentContainerStyle]};
|
||||
var stackProps = {style: {paddingHorizontal: value3},
|
||||
spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_24};
|
||||
if (canManageWebhooks) {
|
||||
r19 = <TableRow label={intl.string(t.jp25Id)} subLabel={intl.string(t.mKIOkI)} icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)} arrow onPress={onPress_122683} />;
|
||||
} else {
|
||||
r19 = canManageWebhooks;
|
||||
}
|
||||
items2 = [r19];
|
||||
if (canManageWebhooks) {
|
||||
r18 = <TableRow label={intl.string(t.OrV60r)} subLabel={intl.string(t.rQREJl)} icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)} arrow onPress={onPress_122684} />;
|
||||
} else {
|
||||
r18 = canManageWebhooks;
|
||||
}
|
||||
items2[1] = r18;
|
||||
if (value9) {
|
||||
r17 = <TableRow label={intl.string(t.tqtDXC)} subLabel={intl.string(t.v8819e)} icon={((RefreshIcon) => <RefreshIcon />)((require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon)} arrow onPress={onPress_122685} />;
|
||||
} else {
|
||||
r17 = value9;
|
||||
}
|
||||
items2[2] = r17;
|
||||
r15 = r15 && env0_10.map(_fun122686);
|
||||
items2[3] = r15;
|
||||
r1 = <><Form {...formProps}><Stack {...stackProps}><TableRowGroup hasIcons>{items2}</TableRowGroup></Stack></Form>{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}</>;
|
||||
} else if (r15) {
|
||||
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
var formProps = {style: styles.screenContainer, contentContainerStyle: [styles.screenContent,
|
||||
contentContainerStyle]};
|
||||
var stackProps = {style: {paddingHorizontal: value3},
|
||||
spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_24};
|
||||
if (canManageWebhooks) {
|
||||
r19 = <TableRow label={intl.string(t.jp25Id)} subLabel={intl.string(t.mKIOkI)} icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)} arrow onPress={onPress_122683} />;
|
||||
} else {
|
||||
r19 = canManageWebhooks;
|
||||
}
|
||||
items2 = [r19];
|
||||
if (canManageWebhooks) {
|
||||
r18 = <TableRow label={intl.string(t.OrV60r)} subLabel={intl.string(t.rQREJl)} icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)} arrow onPress={onPress_122684} />;
|
||||
} else {
|
||||
r18 = canManageWebhooks;
|
||||
}
|
||||
items2[1] = r18;
|
||||
if (value9) {
|
||||
r17 = <TableRow label={intl.string(t.tqtDXC)} subLabel={intl.string(t.v8819e)} icon={((RefreshIcon) => <RefreshIcon />)((require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon)} arrow onPress={onPress_122685} />;
|
||||
} else {
|
||||
r17 = value9;
|
||||
}
|
||||
items2[2] = r17;
|
||||
r15 = r15 && env0_10.map(_fun122686);
|
||||
items2[3] = r15;
|
||||
r1 = <><Form {...formProps}><Stack {...stackProps}><TableRowGroup hasIcons>{items2}</TableRowGroup></Stack></Form>{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}</>;
|
||||
} else {
|
||||
r1 = null;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun122680() { // fn#122680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:828, offset: 0x025710de, size: 49 bytes, params: 1, frame: 11
|
||||
return env0_2 == null ? {'canManageWebhooks': false,
|
||||
'canManageGuild': false} : PermissionStore.getGuildPermissionProps(env0_2);
|
||||
}
|
||||
|
||||
function _fun122682({type}) { // fn#122682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:1060, offset: 0x02571128, size: 27 bytes, params: 2, frame: 11
|
||||
return env1_10.includes(type);
|
||||
}
|
||||
|
||||
function GuildSettingsModalIntegrationsOnPress() { // fn#122683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:1633, owner: GuildSettingsModalIntegrations.onPress, offset: 0x02571143, size: 32 bytes, params: 1, frame: 11
|
||||
const binding = env0_1;
|
||||
const push = binding.push;
|
||||
const WEBHOOKS = GuildSettingsSections.WEBHOOKS;
|
||||
return Reflect.apply(push, binding, [WEBHOOKS]);
|
||||
}
|
||||
|
||||
function GuildSettingsModalIntegrationsOnPress_122684() { // fn#122684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:1835, owner: GuildSettingsModalIntegrations.onPress, offset: 0x02571163, size: 32 bytes, params: 1, frame: 11
|
||||
const binding = env0_1;
|
||||
const push = binding.push;
|
||||
const CHANNELS_FOLLOWED = GuildSettingsSections.CHANNELS_FOLLOWED;
|
||||
return Reflect.apply(push, binding, [CHANNELS_FOLLOWED]);
|
||||
}
|
||||
|
||||
function GuildSettingsModalIntegrationsOnPress_122685() { // fn#122685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:2037, owner: GuildSettingsModalIntegrations.onPress, offset: 0x02571183, size: 32 bytes, params: 1, frame: 11
|
||||
const binding = env0_1;
|
||||
const push = binding.push;
|
||||
const LOBBIES_LINKED = GuildSettingsSections.LOBBIES_LINKED;
|
||||
return Reflect.apply(push, binding, [LOBBIES_LINKED]);
|
||||
}
|
||||
|
||||
function _fun122686(a0) { // fn#122686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:2078, offset: 0x025711a3, size: 343 bytes, params: 2, frame: 28
|
||||
var environment;
|
||||
var r1;
|
||||
var value3;
|
||||
var value4;
|
||||
var TableRow;
|
||||
var object2;
|
||||
var name;
|
||||
var intl;
|
||||
var formatToPlainString;
|
||||
var VXU4EU;
|
||||
var moduleValue;
|
||||
var makeSource;
|
||||
var isThemeDark2;
|
||||
var icon;
|
||||
const env0_0 = a0;
|
||||
const value2 = null;
|
||||
if (value2 != env0_4) {
|
||||
var binding = env0_4;
|
||||
if (binding.some(_fun122687)) {
|
||||
value3 = environment.__proto__;
|
||||
value4 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(a0);
|
||||
if (value2 == value4) {
|
||||
r1 = value2;
|
||||
} else {
|
||||
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
object2 = {};
|
||||
name = value4.name;
|
||||
object2.label = name;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
VXU4EU = (require(1244) /* metro dependency 1244: indexNative */).t.VXU4EU;
|
||||
name = value4.name;
|
||||
object2.subLabel = Reflect.apply(formatToPlainString, intl, [VXU4EU, {platformName: name}]);
|
||||
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
makeSource = moduleValue.makeSource;
|
||||
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_3);
|
||||
icon = value4.icon;
|
||||
object2.icon = <Image source={Reflect.apply(makeSource, moduleValue,
|
||||
[isThemeDark2 ? icon.darkPNG : icon.lightPNG])} style={styles.platformIcon} />;
|
||||
object2.arrow = true;
|
||||
object2.onPress = onPress_122688;
|
||||
r1 = <TableRow {...object2} key={a0} />;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function onPress_122688() { // fn#122688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:2424, offset: 0x025712fa, size: 47 bytes, params: 1, frame: 14
|
||||
const binding = env1_1;
|
||||
const push = binding.push;
|
||||
const INTEGRATION_PLATFORM = GuildSettingsSections.INTEGRATION_PLATFORM;
|
||||
return Reflect.apply(push, binding, [INTEGRATION_PLATFORM, {platformType: env0_0}]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user