Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,157 @@
|
||||
/* Metro module 11447; source: modules/guild_antiraid/GuildAntiRaidActionCreators.tsx; dependencies: [5, 1867, 8276, 661, 683, 4863, 9112, 3738, 507, 10927, 2] */
|
||||
function _fun87630(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:6, offset: 0x01fc5ef1, size: 296 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 guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_5 = (require(8276) /* metro dependency 8276: GuildAntiRaidConstants */).DEFAULT_LOCKDOWN_DURATION;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = constantsModule.AnalyticEvents;
|
||||
const env0_7 = constantsModule.Endpoints;
|
||||
const env0_8 = constantsModule.GuildFeatures;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/GuildAntiRaidActionCreators.tsx');
|
||||
exports.trackReportRaidViewed = trackReportRaidViewed;
|
||||
exports.setGuildRaidAlerts = function() {
|
||||
return _setGuildRaidAlerts.apply(this, arguments);
|
||||
};
|
||||
exports.setGuildIncidentActions = function() {
|
||||
return _setGuildIncidentActions.apply(this, arguments);
|
||||
};
|
||||
exports.handleResolveRaid = function() {
|
||||
return _handleResolveRaid.apply(this, arguments);
|
||||
};
|
||||
exports.handleReportRaid = function() {
|
||||
return _handleReportRaid.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _setGuildRaidAlerts() { // fn#87631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:213, offset: 0x01fc6019, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun87633).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _setGuildIncidentActions() { // fn#87634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:557, offset: 0x01fc6149, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun87636).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _handleResolveRaid() { // fn#87637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:934, offset: 0x01fc6271, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun87639).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _handleReportRaid() { // fn#87640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:1224, offset: 0x01fc636b, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun87642).apply(this, arguments);
|
||||
}
|
||||
|
||||
function trackReportRaidViewed(a0) { // fn#87643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:1579, offset: 0x01fc644d, size: 129 bytes, params: 2, frame: 19
|
||||
var object2;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var GUILD_RAID_REPORTED;
|
||||
let value = a1;
|
||||
const r6 = value !== undefined ? value : [];
|
||||
if (r6.length !== 0) {
|
||||
defaultImport = importDefault(dependencyMap[4]);
|
||||
track = defaultImport.track;
|
||||
GUILD_RAID_REPORTED = AnalyticEvents.GUILD_RAID_REPORTED;
|
||||
object2 = {};
|
||||
value = require(dependencyMap[5]);
|
||||
copyDataProperties(object2, value.collectGuildAnalyticsMetadata(a0), dependencyMap);
|
||||
object2['guild_id'] = a0;
|
||||
object2['raid_types'] = r6;
|
||||
Reflect.apply(track, defaultImport, [GUILD_RAID_REPORTED, object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun87633({features, id}, a1) { // fn#87633, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:274, offset: 0x01fc6056, size: 243 bytes, params: 3, frame: 18
|
||||
if (true) {
|
||||
var Set = global.Set;
|
||||
var set = new Set(features);
|
||||
var has = set.has;
|
||||
var COMMUNITY = env2_8.COMMUNITY;
|
||||
if (Reflect.apply(has, set, [COMMUNITY])) {
|
||||
if (a1) {
|
||||
set.delete(env2_8.RAID_ALERTS_DISABLED);
|
||||
} else {
|
||||
set.add(env2_8.RAID_ALERTS_DISABLED);
|
||||
}
|
||||
} else if (a1) {
|
||||
set.add(env2_8.NON_COMMUNITY_RAID_ALERTS);
|
||||
} else {
|
||||
set.delete(env2_8.NON_COMMUNITY_RAID_ALERTS);
|
||||
}
|
||||
var value4 = env2_1(env2_2[6]);
|
||||
yield value4.saveGuild(id, {features: set}, {throwErr: true});
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun87636(a0, a1, a2, a3) { // fn#87636, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:628, offset: 0x01fc6186, size: 235 bytes, params: 5, frame: 19
|
||||
var r2;
|
||||
var r6;
|
||||
let value = a1;
|
||||
const value2 = a2;
|
||||
const value3 = a3;
|
||||
if (true) {
|
||||
var r3 = value || value2;
|
||||
var value6 = null;
|
||||
r2 = value6 != value3 ? value3 : env2_5;
|
||||
r6 = r3 ? env2_1(env2_2[7])().add(r2, 'hours').toISOString() : value6;
|
||||
var object3 = {};
|
||||
object3.invites_disabled_until = value ? r6 : value6;
|
||||
object3.dms_disabled_until = value2 ? r6 : value6;
|
||||
object3.lockdown_duration_hours = r3 ? r2 : value6;
|
||||
value = environment.__proto__.__proto__;
|
||||
var HTTP = env2_0(env2_2[8]).HTTP;
|
||||
var put = HTTP.put;
|
||||
var object4 = {};
|
||||
object4.url = env2_7.GUILD_INCIDENT_ACTIONS(a0);
|
||||
object4.body = object3;
|
||||
object4.rejectWithError = false;
|
||||
yield Reflect.apply(put, HTTP, [object4]);
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun87639(a0, a1, a2) { // fn#87639, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:993, offset: 0x01fc62ae, size: 189 bytes, params: 4, frame: 17
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const guild = env2_4.getGuild(a0);
|
||||
const value4 = null;
|
||||
if (value4 == (value4 != guild ? env2_1(env2_2[9])(guild) : value4)) {
|
||||
return value4;
|
||||
}
|
||||
const HTTP = env2_0(env2_2[8]).HTTP;
|
||||
const post = HTTP.post;
|
||||
const object2 = {};
|
||||
object2.url = env2_7.GUILD_INCIDENT_REPORT_FALSE_ALARM(a0);
|
||||
object2.body = {alert_message_id: a1, reason: a2};
|
||||
object2.rejectWithError = false;
|
||||
yield Reflect.apply(post, HTTP, [object2]);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function* _fun87642(a0) { // fn#87642, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:1281, offset: 0x01fc63a8, size: 165 bytes, params: 2, frame: 17
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const guild = env2_4.getGuild(a0);
|
||||
const value4 = null;
|
||||
if (value4 == (value4 != guild ? env2_1(env2_2[9])(guild) : value4)) {
|
||||
return value4;
|
||||
}
|
||||
const HTTP = env2_0(env2_2[8]).HTTP;
|
||||
const post = HTTP.post;
|
||||
const object2 = {};
|
||||
object2.url = env2_7.GUILD_INCIDENT_REPORT_RAID(a0);
|
||||
object2.rejectWithError = false;
|
||||
yield Reflect.apply(post, HTTP, [object2]);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/* Metro module 8276; source: modules/guild_antiraid/GuildAntiRaidConstants.tsx; dependencies: [482, 1244, 483, 2] */
|
||||
function _fun66140(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8461:6, offset: 0x01bee820, size: 201 bytes, params: 8, frame: 25
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const Permissions = (require(482) /* metro dependency 482: Constants */).Permissions;
|
||||
let value = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
const combine = value.combine;
|
||||
const ADMINISTRATOR = Permissions.ADMINISTRATOR;
|
||||
const MANAGE_GUILD = Permissions.MANAGE_GUILD;
|
||||
const BAN_MEMBERS = Permissions.BAN_MEMBERS;
|
||||
const KICK_MEMBERS = Permissions.KICK_MEMBERS;
|
||||
const MODERATE_MEMBERS = Permissions.MODERATE_MEMBERS;
|
||||
value = Reflect.apply(combine, value, [ADMINISTRATOR, MANAGE_GUILD, BAN_MEMBERS, KICK_MEMBERS, MODERATE_MEMBERS]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/GuildAntiRaidConstants.tsx');
|
||||
exports.GUILD_REPORT_RAID_MOBILE_KEY = 'guild_report_raid_mobile';
|
||||
exports.NAGBAR_DISPLAY_MAX_HOURS = 2;
|
||||
exports.DEFAULT_LOCKDOWN_DURATION = 2;
|
||||
exports.getTimeframes = getTimeframes;
|
||||
exports.IncidentAlertModeratorPermissions = value;
|
||||
}
|
||||
|
||||
function getTimeframes() { // fn#66141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8461:432, offset: 0x01bee8e9, size: 430 bytes, params: 1, frame: 17
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const items2 = [{'id': '1', 'value': 1, label: Reflect.apply(string, intl, [t['GA/d4I']])}];
|
||||
object2 = {'id': '2', 'value': 2};
|
||||
object2.label = intl.string(t['+rHFej']);
|
||||
items2[1] = object2;
|
||||
object2 = {'id': '4', 'value': 4};
|
||||
object2.label = intl.string(t['5CNt/M']);
|
||||
items2[2] = object2;
|
||||
items2[3] = {'id': '6', 'value': 6, label: intl.string(t.oQ4PNE)};
|
||||
string = intl.string;
|
||||
const LOQ0j6 = t.LOQ0j6;
|
||||
items2[4] = {'id': '12', 'value': 12, label: Reflect.apply(string, intl, [LOQ0j6])};
|
||||
object2 = {'id': '24', 'value': 24};
|
||||
object2.label = intl.string(t['W0+LsV']);
|
||||
items2[5] = object2;
|
||||
return items2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,513 @@
|
||||
/* Metro module 10923; source: modules/guild_antiraid/GuildAntiRaidHooks.tsx; dependencies: [1348, 1867, 3784, 3969, 1878, 10906, 8276, 661, 632, 21, 8275, 483, 3789, 10924, 2] */
|
||||
function _fun83701(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:6, offset: 0x01f25448, size: 380 bytes, params: 8, frame: 19
|
||||
let env0_0 = require;
|
||||
const _arrayLikeToArray_83704 = 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 userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const guildIncidentsStore = importDefault(10906) /* metro dependency 10906: GuildIncidentsStore */;
|
||||
const env0_10 = (require(8276) /* metro dependency 8276: GuildAntiRaidConstants */).IncidentAlertModeratorPermissions;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_11 = constantsModule.EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const env0_12 = constantsModule.GuildFeatures;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/GuildAntiRaidHooks.tsx');
|
||||
exports.useFirstGuildIncidentId = useFirstGuildIncidentId;
|
||||
exports.useGuildIncidentsState = useGuildIncidentsState;
|
||||
exports.shouldShowRaidNotificationNagbar = shouldShowRaidNotificationNagbar;
|
||||
exports.shouldShowRaidInAppNotification = shouldShowRaidInAppNotification;
|
||||
exports.getDisabledActions = getDisabledActions;
|
||||
exports.useDisabledActions = useDisabledActions;
|
||||
exports.useShowAntiRaidInGuildNotifSettings = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[8]).useStateFromStores([PermissionStore, GuildStore], _fun83721);
|
||||
};
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_83702(a0, a1) { // fn#83702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:264, offset: 0x01f255c4, size: 372 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 _fun83703;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_83704(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_83704(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_83704(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun83703;
|
||||
}
|
||||
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 getFirstGuildIncidentId(a0) { // fn#83705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:1174, offset: 0x01f25738, size: 368 bytes, params: 2, frame: 30
|
||||
var r4;
|
||||
var value7;
|
||||
var id;
|
||||
var property;
|
||||
var moduleValue;
|
||||
var hasDetectedActivity;
|
||||
var moduleValue2;
|
||||
var isUnderLockdown;
|
||||
var moduleValue3;
|
||||
var moduleValue4;
|
||||
var hasAny;
|
||||
var moduleValue5;
|
||||
var computePermissions;
|
||||
var permissions;
|
||||
var value8;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const incidentsByGuild = GuildIncidentsStore.getIncidentsByGuild();
|
||||
const _createForOfIteratorHelperLoose_83702Binding = _createForOfIteratorHelperLoose_83702;
|
||||
const value4 = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(incidentsByGuild);
|
||||
const value5 = _createForOfIteratorHelperLoose_83702Binding(value4.map(function(a0) {
|
||||
return GuildStore.getGuild(a0);
|
||||
}));
|
||||
const value6 = value5();
|
||||
let done = value6.done;
|
||||
if (!done) {
|
||||
r4 = value6;
|
||||
reducibleLoop1: while (true) {
|
||||
value7 = r4.value;
|
||||
if (value7 != null) {
|
||||
id = value7.id;
|
||||
property = incidentsByGuild[id];
|
||||
reducibleJoin8: while (true) {
|
||||
if (property == null) {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
moduleValue = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
|
||||
hasDetectedActivity = moduleValue.hasDetectedActivity;
|
||||
if (!Reflect.apply(hasDetectedActivity, moduleValue, [property])) {
|
||||
moduleValue2 = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
|
||||
reducibleJoin5: while (true) {
|
||||
if (moduleValue2.isUnderLockdown(property)) {
|
||||
break reducibleJoin5;
|
||||
}
|
||||
break reducibleJoin8;
|
||||
}
|
||||
}
|
||||
moduleValue3 = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
|
||||
isUnderLockdown = moduleValue3.isUnderLockdown;
|
||||
if (Reflect.apply(isUnderLockdown, moduleValue3, [property])) {
|
||||
id = value7.id;
|
||||
reducibleJoin7: while (true) {
|
||||
if (id !== a0) {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
break reducibleJoin7;
|
||||
}
|
||||
}
|
||||
moduleValue4 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
hasAny = moduleValue4.hasAny;
|
||||
moduleValue5 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
computePermissions = moduleValue5.computePermissions;
|
||||
permissions = Reflect.apply(computePermissions, moduleValue5, [{user: currentUser, context: value7,
|
||||
checkElevated: false}]);
|
||||
if (Reflect.apply(hasAny, moduleValue4, [permissions, IncidentAlertModeratorPermissions])) {
|
||||
return value7.id;
|
||||
}
|
||||
break reducibleJoin8;
|
||||
}
|
||||
}
|
||||
value8 = value5();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
return null;
|
||||
}
|
||||
r4 = value8;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function useFirstGuildIncidentId() { // fn#83707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:1740, offset: 0x01f258bf, size: 381 bytes, params: 1, frame: 29
|
||||
var r4;
|
||||
var value4;
|
||||
var id;
|
||||
var property;
|
||||
var moduleValue4;
|
||||
var hasDetectedActivity;
|
||||
var moduleValue5;
|
||||
var isUnderLockdown;
|
||||
var moduleValue6;
|
||||
var hasAny;
|
||||
var moduleValue7;
|
||||
var computePermissions;
|
||||
var permissions;
|
||||
var value5;
|
||||
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
|
||||
function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const incidentsByGuild = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildIncidentsStore],
|
||||
function() {
|
||||
return GuildIncidentsStore.getIncidentsByGuild();
|
||||
});
|
||||
const _createForOfIteratorHelperLoose_83702Binding = _createForOfIteratorHelperLoose_83702;
|
||||
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
|
||||
const useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
|
||||
const value2 = _createForOfIteratorHelperLoose_83702Binding(Reflect.apply(useStateFromStoresArray,
|
||||
useStateFromStoresModule, [[GuildStore], _fun83710]));
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (!done) {
|
||||
r4 = value3;
|
||||
reducibleLoop1: while (true) {
|
||||
value4 = r4.value;
|
||||
if (value4 != null) {
|
||||
id = value4.id;
|
||||
property = incidentsByGuild[id];
|
||||
reducibleJoin6: while (true) {
|
||||
if (property == null) {
|
||||
break reducibleJoin6;
|
||||
}
|
||||
moduleValue4 = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
|
||||
hasDetectedActivity = moduleValue4.hasDetectedActivity;
|
||||
if (!Reflect.apply(hasDetectedActivity, moduleValue4, [property])) {
|
||||
moduleValue5 = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
|
||||
isUnderLockdown = moduleValue5.isUnderLockdown;
|
||||
reducibleJoin5: while (true) {
|
||||
if (Reflect.apply(isUnderLockdown, moduleValue5, [property])) {
|
||||
break reducibleJoin5;
|
||||
}
|
||||
break reducibleJoin6;
|
||||
}
|
||||
}
|
||||
moduleValue6 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
hasAny = moduleValue6.hasAny;
|
||||
moduleValue7 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
computePermissions = moduleValue7.computePermissions;
|
||||
permissions = Reflect.apply(computePermissions, moduleValue7, [{user: currentUser, context: value4,
|
||||
checkElevated: false}]);
|
||||
if (Reflect.apply(hasAny, moduleValue6, [permissions, IncidentAlertModeratorPermissions])) {
|
||||
return value4.id;
|
||||
}
|
||||
break reducibleJoin6;
|
||||
}
|
||||
}
|
||||
value5 = value2();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
return null;
|
||||
}
|
||||
r4 = value5;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function useGuildIncidentsState(a0) { // fn#83712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:2303, offset: 0x01f25aa5, size: 170 bytes, params: 2, frame: 19
|
||||
var object2;
|
||||
var r1;
|
||||
const env0_0 = a0;
|
||||
var value;
|
||||
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore,
|
||||
PermissionStore], _fun83713);
|
||||
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildIncidentsStore],
|
||||
_fun83714);
|
||||
object2 = {shouldShowIncidentActions: value2, incidentData: value3};
|
||||
const value4 = value3 != null;
|
||||
if (value4) {
|
||||
value = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
|
||||
value = value.isUnderLockdown(value3);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value4;
|
||||
}
|
||||
object2.isUnderLockdown = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function shouldShowRaidNotificationNagbar() { // fn#83715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:2714, offset: 0x01f25bd8, size: 99 bytes, params: 1, frame: 13
|
||||
const firstGuildIncidentId = getFirstGuildIncidentId(SelectedGuildStore.getGuildId());
|
||||
const guildsProto = UserSettingsProtoStore.getGuildsProto();
|
||||
const value4 = null;
|
||||
const r0 = value4 != firstGuildIncidentId ? (value4 != guildsProto ? guildsProto : {})[firstGuildIncidentId] : value4;
|
||||
return {show: value4 != firstGuildIncidentId && !(value4 != r0 && r0.disableRaidAlertNag),
|
||||
guildId: firstGuildIncidentId};
|
||||
}
|
||||
|
||||
function shouldShowRaidInAppNotification() { // fn#83716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:2966, offset: 0x01f25c3b, size: 167 bytes, params: 1, frame: 17
|
||||
var value;
|
||||
const firstGuildIncidentId = getFirstGuildIncidentId(SelectedGuildStore.getGuildId());
|
||||
const guildsProto = UserSettingsProtoStore.getGuildsProto();
|
||||
const value5 = null;
|
||||
let r3 = value5 != guildsProto ? guildsProto : {};
|
||||
let r4 = value5 != firstGuildIncidentId ? r3[firstGuildIncidentId] : value5;
|
||||
r3 = value5 != r4 && r4.disableRaidAlertNag;
|
||||
const r6 = value5 != firstGuildIncidentId ? GuildIncidentsStore.getGuildIncident(firstGuildIncidentId) : value5;
|
||||
const value8 = value5 != r6;
|
||||
if (value8) {
|
||||
value = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
|
||||
value = value.isUnderLockdown(r6);
|
||||
r4 = value;
|
||||
} else {
|
||||
r4 = value8;
|
||||
}
|
||||
return {show: value5 != firstGuildIncidentId && !r4 && !r3, guildId: firstGuildIncidentId};
|
||||
}
|
||||
|
||||
function getDisabledActions(a0) { // fn#83717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:3285, offset: 0x01f25ce2, size: 274 bytes, params: 2, frame: 18
|
||||
var invitesDisabledUntil;
|
||||
var r5;
|
||||
var r1;
|
||||
var Date;
|
||||
var prototype;
|
||||
var date;
|
||||
var value4;
|
||||
var value6;
|
||||
if (a0 == null) {
|
||||
return {'dmsDisabled': false, 'invitesDisabled': false};
|
||||
}
|
||||
var value;
|
||||
const guildIncident = GuildIncidentsStore.getGuildIncident(a0.id);
|
||||
const object2 = {};
|
||||
const value3 = undefined;
|
||||
let r4 = a0 == null ? value3 : a0.features.has(GuildFeatures.INVITES_DISABLED);
|
||||
if (!r4) {
|
||||
invitesDisabledUntil = guildIncident == null ? value3 : guildIncident.invitesDisabledUntil;
|
||||
value = invitesDisabledUntil != null;
|
||||
if (value) {
|
||||
Date = global.Date;
|
||||
invitesDisabledUntil = guildIncident.invitesDisabledUntil;
|
||||
prototype = Date.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value = date instanceof Object ? date : value;
|
||||
Date = global.Date;
|
||||
prototype = Date.prototype;
|
||||
value4 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value = value > (date instanceof Object ? date : value4);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
r4 = r5;
|
||||
}
|
||||
object2.invitesDisabled = r4;
|
||||
let dmsDisabledUntil = guildIncident == null ? value3 : guildIncident.dmsDisabledUntil;
|
||||
value = dmsDisabledUntil != null;
|
||||
if (value) {
|
||||
Date = global.Date;
|
||||
dmsDisabledUntil = guildIncident.dmsDisabledUntil;
|
||||
prototype = Date.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date(dmsDisabledUntil);
|
||||
value = date instanceof Object ? date : value;
|
||||
Date = global.Date;
|
||||
prototype = Date.prototype;
|
||||
value6 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value = value > (date instanceof Object ? date : value6);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
object2.dmsDisabled = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useDisabledActions(a0) { // fn#83718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:3682, offset: 0x01f25df4, size: 346 bytes, params: 2, frame: 20
|
||||
var r4;
|
||||
var invitesDisabledUntil;
|
||||
var r5;
|
||||
var dmsDisabledUntil;
|
||||
var r1;
|
||||
var r0;
|
||||
var value6;
|
||||
var Date;
|
||||
var prototype;
|
||||
var value7;
|
||||
var date;
|
||||
var value8;
|
||||
var value9;
|
||||
var value12;
|
||||
let value = undefined;
|
||||
const r9 = (a0 == null ? value : a0.id) ?? EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
|
||||
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
|
||||
let object = [GuildIncidentsStore];
|
||||
const value4 = Reflect.apply(useStateFromStores, useStateFromStoresModule, [object, _fun83719, [r9]]);
|
||||
if (a0 == null) {
|
||||
r0 = {'dmsDisabled': false, 'invitesDisabled': false};
|
||||
} else {
|
||||
object = {};
|
||||
r4 = a0 == null ? value : a0.features.has(GuildFeatures.INVITES_DISABLED);
|
||||
if (!r4) {
|
||||
invitesDisabledUntil = value4 == null ? value : value4.invitesDisabledUntil;
|
||||
value6 = invitesDisabledUntil != null;
|
||||
if (value6) {
|
||||
Date = global.Date;
|
||||
invitesDisabledUntil = value4.invitesDisabledUntil;
|
||||
prototype = Date.prototype;
|
||||
value7 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value8 = date instanceof Object ? date : value7;
|
||||
Date = global.Date;
|
||||
prototype = Date.prototype;
|
||||
value9 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
r5 = value8 > (date instanceof Object ? date : value9);
|
||||
} else {
|
||||
r5 = value6;
|
||||
}
|
||||
r4 = r5;
|
||||
}
|
||||
object.invitesDisabled = r4;
|
||||
dmsDisabledUntil = value4 == null ? value : value4.dmsDisabledUntil;
|
||||
value = dmsDisabledUntil != null;
|
||||
if (value) {
|
||||
Date = global.Date;
|
||||
dmsDisabledUntil = value4.dmsDisabledUntil;
|
||||
prototype = Date.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value = date instanceof Object ? date : value;
|
||||
Date = global.Date;
|
||||
prototype = Date.prototype;
|
||||
value12 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value = value > (date instanceof Object ? date : value12);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
object.dmsDisabled = r1;
|
||||
r0 = object;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useShowAntiRaidInGuildNotifSettings(a0) { // fn#83720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:4166, offset: 0x01f25f69, size: 74 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([PermissionStore,
|
||||
GuildStore], _fun83721);
|
||||
}
|
||||
|
||||
function _fun83710() { // fn#83710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:1982, offset: 0x01f25a4f, size: 63 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = Reflect.apply((importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys, value, [incidentsByGuild]);
|
||||
return value.map(function(a0) {
|
||||
return GuildStore.getGuild(a0);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun83713() { // fn#83713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:2379, offset: 0x01f25b4f, size: 97 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
const guild = GuildStore.getGuild(env0_0);
|
||||
if (guild == null) {
|
||||
return false;
|
||||
}
|
||||
const guildPermissions = PermissionStore.getGuildPermissions(guild);
|
||||
return guildPermissions != null && (importAll(483) /* metro dependency 483: BigFlagUtils */).hasAny(guildPermissions,
|
||||
IncidentAlertModeratorPermissions);
|
||||
}
|
||||
|
||||
function _fun83714() { // fn#83714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:2531, offset: 0x01f25bb0, size: 40 bytes, params: 1, frame: 12
|
||||
const value2 = null;
|
||||
return value2 != env0_0 ? GuildIncidentsStore.getGuildIncident(env0_0) : value2;
|
||||
}
|
||||
|
||||
function _fun83719() { // fn#83719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:3790, offset: 0x01f25f4e, size: 27 bytes, params: 1, frame: 11
|
||||
return GuildIncidentsStore.getGuildIncident(env0_0);
|
||||
}
|
||||
|
||||
function _fun83721() { // fn#83721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11109:4256, offset: 0x01f25fb3, size: 65 bytes, params: 1, frame: 14
|
||||
return (require(10924) /* metro dependency 10924: GuildAntiRaidPermissionsUtils */).canReportRaid(GuildStore.getGuild(env0_0),
|
||||
PermissionStore);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/* Metro module 12689; source: modules/guild_antiraid/GuildAntiRaidModalActionCreators.native.tsx; dependencies: [8276, 5080, 12690, 1962, 2] */
|
||||
function _fun97236(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12879:6, offset: 0x0217845d, size: 124 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(8276) /* metro dependency 8276: GuildAntiRaidConstants */).GUILD_REPORT_RAID_MOBILE_KEY;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/GuildAntiRaidModalActionCreators.native.tsx');
|
||||
exports.openReportRaidModal = function(a0) {
|
||||
importDefault(dependencyMap[1]).pushLazy(require(dependencyMap[3])(dependencyMap[2], dependencyMap.paths),
|
||||
{onCloseModal: _fun97238, guildId: a0}, GUILD_REPORT_RAID_MOBILE_KEY);
|
||||
};
|
||||
}
|
||||
|
||||
function openReportRaidModal(a0) { // fn#97237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12879:257, offset: 0x021784d9, size: 101 bytes, params: 2, frame: 17
|
||||
const defaultImport = importDefault(dependencyMap[1]);
|
||||
defaultImport.pushLazy(require(dependencyMap[3])(dependencyMap[2], dependencyMap.paths), {onCloseModal: function() {
|
||||
importDefault(dependencyMap[1]).popWithKey(GUILD_REPORT_RAID_MOBILE_KEY);
|
||||
}, guildId: a0}, GUILD_REPORT_RAID_MOBILE_KEY);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/* Metro module 10924; source: modules/guild_antiraid/GuildAntiRaidPermissionsUtils.tsx; dependencies: [3784, 10906, 661, 566, 8275, 10925, 2] */
|
||||
function _fun83722(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11110:6, offset: 0x01f25ff4, size: 228 bytes, params: 8, frame: 21
|
||||
let env0_0 = require;
|
||||
const closure = canReportRaid;
|
||||
const closure2 = canEnableRaidAlerts;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const guildIncidentsStore = importDefault(10906) /* metro dependency 10906: GuildIncidentsStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = constantsModule.EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const env0_5 = constantsModule.Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/GuildAntiRaidPermissionsUtils.tsx');
|
||||
exports.canReportRaid = closure;
|
||||
exports.useCanReportRaid = useCanReportRaid;
|
||||
exports.canEnableRaidAlerts = closure2;
|
||||
exports.useCanEnableRaidAlerts = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[3]).useStateFromStores([PermissionStore], _fun83729, [a0]);
|
||||
};
|
||||
exports.useShowMentionRaidLimitUpsell = useShowMentionRaidLimitUpsell;
|
||||
}
|
||||
|
||||
function canReportRaid(a0) { // fn#83723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11110:172, offset: 0x01f260d8, size: 124 bytes, params: 2, frame: 15
|
||||
const value = a1;
|
||||
const r2 = value !== undefined ? value : PermissionStore;
|
||||
const can = r2.can;
|
||||
const BAN_MEMBERS = Permissions.BAN_MEMBERS;
|
||||
let r0 = Reflect.apply(can, r2, [BAN_MEMBERS, a0]) || r2.can(Permissions.KICK_MEMBERS, a0);
|
||||
r0 = !r0 ? r2.can(Permissions.MODERATE_MEMBERS, a0) : r0;
|
||||
r0 = !r0 ? r2.can(Permissions.MANAGE_GUILD, a0) : r0;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function canEnableRaidAlerts(a0) { // fn#83724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11110:311, offset: 0x01f26154, size: 46 bytes, params: 2, frame: 13
|
||||
const value = a1;
|
||||
const r3 = value !== undefined ? value : PermissionStore;
|
||||
const can = r3.can;
|
||||
const MANAGE_GUILD = Permissions.MANAGE_GUILD;
|
||||
return Reflect.apply(can, r3, [MANAGE_GUILD, a0]);
|
||||
}
|
||||
|
||||
function useCanReportRaid(a0) { // fn#83725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11110:517, offset: 0x01f26182, size: 172 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
const env0_0 = a0;
|
||||
var value;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun83726,
|
||||
[a0]);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildIncidentsStore], _fun83727,
|
||||
[a0]);
|
||||
const value4 = value3 != null;
|
||||
if (value4) {
|
||||
value = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
|
||||
value = value.hasDetectedActivity(value3);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value4;
|
||||
}
|
||||
r0 = !r0 && value2;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useCanEnableRaidAlerts(a0) { // fn#83728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11110:815, offset: 0x01f26277, size: 75 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun83729, [a0]);
|
||||
}
|
||||
|
||||
function useShowMentionRaidLimitUpsell(a0) { // fn#83730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11110:957, offset: 0x01f262de, size: 129 bytes, params: 2, frame: 21
|
||||
const env0_0 = a0;
|
||||
const value2 = undefined;
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun83731,
|
||||
[a0]);
|
||||
const experimentUtilsModule = require(10925) /* metro dependency 10925: ExperimentUtils */;
|
||||
const useIsMentionRaidExperimentEnabled = experimentUtilsModule.useIsMentionRaidExperimentEnabled;
|
||||
return Reflect.apply(useIsMentionRaidExperimentEnabled, experimentUtilsModule,
|
||||
[(a0 == null ? value2 : a0.id) ?? EMPTY_STRING_SNOWFLAKE_ID, false]) && value3;
|
||||
}
|
||||
|
||||
function _fun83726() { // fn#83726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11110:584, offset: 0x01f2622e, size: 28 bytes, params: 1, frame: 13
|
||||
return canReportRaid(env0_0, PermissionStore);
|
||||
}
|
||||
|
||||
function _fun83727() { // fn#83727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11110:647, offset: 0x01f2624a, size: 45 bytes, params: 1, frame: 12
|
||||
const value2 = null;
|
||||
return value2 != env0_0 ? GuildIncidentsStore.getGuildIncident(env0_0.id) : value2;
|
||||
}
|
||||
|
||||
function _fun83729() { // fn#83729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11110:889, offset: 0x01f262c2, size: 28 bytes, params: 1, frame: 13
|
||||
return canEnableRaidAlerts(env0_0, PermissionStore);
|
||||
}
|
||||
|
||||
function _fun83731() { // fn#83731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11110:1039, offset: 0x01f2635f, size: 48 bytes, params: 1, frame: 13
|
||||
const binding = env0_0;
|
||||
const PermissionStore2 = PermissionStore !== undefined ? PermissionStore : PermissionStore;
|
||||
const can = PermissionStore2.can;
|
||||
const MANAGE_GUILD = Permissions.MANAGE_GUILD;
|
||||
return Reflect.apply(can, PermissionStore2, [MANAGE_GUILD, binding]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 8277; source: modules/guild_antiraid/GuildAntiRaidTypes.tsx; dependencies: [2] */
|
||||
function _fun66142(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8462:6, offset: 0x01beea97, size: 212 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/GuildAntiRaidTypes.tsx');
|
||||
exports.GuildIncidentActionSources = {MESSAGE: 'message', NAGBAR: 'nagbar', GUILD_SETTINGS: 'guild_settings',
|
||||
CONTEXT_MENU: 'context_menu', GUILD_PROFILE: 'guild_profile', MEMBER_SAFETY_PAGE: 'member_safety_page'};
|
||||
exports.GuildIncidentAlertTypes = {JOIN_RAID: 'join_raid', DM_RAID: 'dm_raid'};
|
||||
exports.GuildIncidentActionTypes = {INVITES_DISABLED: 'invites_disabled', DMS_DISABLED: 'dms_disabled'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,278 @@
|
||||
/* Metro module 8275; source: modules/guild_antiraid/GuildAntiRaidUtils.tsx; dependencies: [8276, 3738, 8277, 1244, 2] */
|
||||
function _fun66127(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8460:6, offset: 0x01bee09b, size: 308 bytes, params: 8, frame: 19
|
||||
let env0_0 = require;
|
||||
const closure = hasDetectedRaid;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildAntiRaidConstantsModule = require(8276) /* metro dependency 8276: GuildAntiRaidConstants */;
|
||||
const env0_3 = guildAntiRaidConstantsModule.NAGBAR_DISPLAY_MAX_HOURS;
|
||||
const env0_4 = guildAntiRaidConstantsModule.DEFAULT_LOCKDOWN_DURATION;
|
||||
const env0_5 = guildAntiRaidConstantsModule.getTimeframes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/GuildAntiRaidUtils.tsx');
|
||||
exports.DATE_CONFIG = {'month': 'numeric', 'day': 'numeric', 'hour': 'numeric', 'minute': '2-digit'};
|
||||
exports.hasDetectedActivity = hasDetectedActivity;
|
||||
exports.hasDetectedRaid = closure;
|
||||
exports.hasDetectedDMRaid = hasDetectedDMRaid;
|
||||
exports.getIncidentAlertType = getIncidentAlertType;
|
||||
exports.getEnabledInterventions = getEnabledInterventions;
|
||||
exports.getDisabledInterventions = getDisabledInterventions;
|
||||
exports.isUnderLockdown = isUnderLockdown;
|
||||
exports.hasDMsDisabled = function(a0) {
|
||||
var r0;
|
||||
var property;
|
||||
var dmsDisabledUntil;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
value = a0?.dmsDisabledUntil != null;
|
||||
if (value) {
|
||||
property = global.Date;
|
||||
dmsDisabledUntil = a0.dmsDisabledUntil;
|
||||
value2 = new property();
|
||||
property = global.Date;
|
||||
value3 = Object.create(property.prototype, {constructor: {value: property}});
|
||||
value4 = new property();
|
||||
value2 = value2 > (value4 instanceof Object ? value4 : value3);
|
||||
r0 = value2;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
exports.hasInvitesDisabled = function(a0) {
|
||||
var r0;
|
||||
var property;
|
||||
var invitesDisabledUntil;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
value = a0?.invitesDisabledUntil != null;
|
||||
if (value) {
|
||||
property = global.Date;
|
||||
invitesDisabledUntil = a0.invitesDisabledUntil;
|
||||
value2 = new property();
|
||||
property = global.Date;
|
||||
value3 = Object.create(property.prototype, {constructor: {value: property}});
|
||||
value4 = new property();
|
||||
value2 = value2 > (value4 instanceof Object ? value4 : value3);
|
||||
r0 = value2;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
exports.initialLockdownDurationHours = function(a0) {
|
||||
var r0;
|
||||
var env0_0 = a0?.lockdownDurationHours;
|
||||
r0 = r0 == null || !getTimeframes().some(_fun66138) ? DEFAULT_LOCKDOWN_DURATION : r0;
|
||||
return r0;
|
||||
};
|
||||
exports.getSecurityActionDetailsString = getSecurityActionDetailsString;
|
||||
}
|
||||
|
||||
function hasDetectedRaid(a0) { // fn#66128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8460:249, offset: 0x01bee1cf, size: 92 bytes, params: 2, frame: 18
|
||||
var r0;
|
||||
let value = a0.raidDetectedAt != null;
|
||||
if (value) {
|
||||
value = (importDefault(3738) /* metro dependency 3738 */)(a0.raidDetectedAt).add(NAGBAR_DISPLAY_MAX_HOURS,
|
||||
'hours');
|
||||
value = value > (importDefault(3738) /* metro dependency 3738 */)();
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function hasDetectedActivity(a0) { // fn#66129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8460:476, offset: 0x01bee22b, size: 183 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var r1;
|
||||
let value = a0.dmSpamDetectedAt != null;
|
||||
if (value) {
|
||||
value = (importDefault(3738) /* metro dependency 3738 */)(a0.dmSpamDetectedAt).add(NAGBAR_DISPLAY_MAX_HOURS,
|
||||
'hours');
|
||||
value = value > (importDefault(3738) /* metro dependency 3738 */)();
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
if (!r0) {
|
||||
value = a0.raidDetectedAt != null;
|
||||
if (value) {
|
||||
value = (importDefault(3738) /* metro dependency 3738 */)(a0.raidDetectedAt).add(NAGBAR_DISPLAY_MAX_HOURS,
|
||||
'hours');
|
||||
value = value > (importDefault(3738) /* metro dependency 3738 */)();
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function hasDetectedDMRaid(a0) { // fn#66130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8460:725, offset: 0x01bee2e2, size: 92 bytes, params: 2, frame: 18
|
||||
var r0;
|
||||
let value = a0.dmSpamDetectedAt != null;
|
||||
if (value) {
|
||||
value = (importDefault(3738) /* metro dependency 3738 */)(a0.dmSpamDetectedAt).add(NAGBAR_DISPLAY_MAX_HOURS,
|
||||
'hours');
|
||||
value = value > (importDefault(3738) /* metro dependency 3738 */)();
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getIncidentAlertType(a0) { // fn#66131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8460:865, offset: 0x01bee33e, size: 76 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var hasDetectedRaid2;
|
||||
var GuildIncidentAlertTypes;
|
||||
if (a0 == null) {
|
||||
r0 = undefined;
|
||||
} else {
|
||||
hasDetectedRaid2 = hasDetectedRaid(a0);
|
||||
GuildIncidentAlertTypes = (require(8277) /* metro dependency 8277: GuildAntiRaidTypes */).GuildIncidentAlertTypes;
|
||||
r0 = hasDetectedRaid2 ? GuildIncidentAlertTypes.JOIN_RAID : GuildIncidentAlertTypes.DM_RAID;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getEnabledInterventions(a0, a1) { // fn#66132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8460:1048, offset: 0x01bee38a, size: 112 bytes, params: 3, frame: 13
|
||||
const GuildIncidentActionTypes = (require(8277) /* metro dependency 8277: GuildAntiRaidTypes */).GuildIncidentActionTypes;
|
||||
const items2 = [];
|
||||
if (a0) {
|
||||
items2.push(GuildIncidentActionTypes.INVITES_DISABLED);
|
||||
}
|
||||
if (a1) {
|
||||
items2.push(GuildIncidentActionTypes.DMS_DISABLED);
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
|
||||
function getDisabledInterventions(a0, a1) { // fn#66133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8460:1250, offset: 0x01bee3fa, size: 112 bytes, params: 3, frame: 13
|
||||
const GuildIncidentActionTypes = (require(8277) /* metro dependency 8277: GuildAntiRaidTypes */).GuildIncidentActionTypes;
|
||||
const items2 = [];
|
||||
if (!a0) {
|
||||
items2.push(GuildIncidentActionTypes.INVITES_DISABLED);
|
||||
}
|
||||
if (!a1) {
|
||||
items2.push(GuildIncidentActionTypes.DMS_DISABLED);
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
|
||||
function isUnderLockdown(a0) { // fn#66134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8460:1444, offset: 0x01bee46a, size: 167 bytes, params: 2, frame: 15
|
||||
var r0;
|
||||
var r1;
|
||||
var Date;
|
||||
var prototype;
|
||||
var date;
|
||||
var value2;
|
||||
var invitesDisabledUntil;
|
||||
var value4;
|
||||
let dmsDisabledUntil = a0.dmsDisabledUntil;
|
||||
let value = dmsDisabledUntil != null;
|
||||
if (value) {
|
||||
Date = global.Date;
|
||||
dmsDisabledUntil = a0.dmsDisabledUntil;
|
||||
prototype = Date.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date(dmsDisabledUntil);
|
||||
value = date instanceof Object ? date : value;
|
||||
Date = global.Date;
|
||||
prototype = Date.prototype;
|
||||
value2 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value = value > (date instanceof Object ? date : value2);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
if (!r0) {
|
||||
invitesDisabledUntil = a0.invitesDisabledUntil;
|
||||
value = invitesDisabledUntil != null;
|
||||
if (value) {
|
||||
Date = global.Date;
|
||||
invitesDisabledUntil = a0.invitesDisabledUntil;
|
||||
prototype = Date.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value = date instanceof Object ? date : value;
|
||||
Date = global.Date;
|
||||
prototype = Date.prototype;
|
||||
value4 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value = value > (date instanceof Object ? date : value4);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function initialLockdownDurationHours(a0) { // fn#66137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8460:1930, offset: 0x01bee5cb, size: 73 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
let value = undefined;
|
||||
const lockdownDurationHours = a0 == null ? value : a0.lockdownDurationHours;
|
||||
if (lockdownDurationHours == null) {
|
||||
r0 = DEFAULT_LOCKDOWN_DURATION;
|
||||
} else {
|
||||
value = getTimeframes();
|
||||
r0 = value.some(function({value}) {
|
||||
return value === lockdownDurationHours;
|
||||
}) ? lockdownDurationHours : DEFAULT_LOCKDOWN_DURATION;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getSecurityActionDetailsString(a0, a1) { // fn#66139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8460:2097, offset: 0x01bee614, size: 524 bytes, params: 3, frame: 22
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var M3iSyL;
|
||||
var object2;
|
||||
var date;
|
||||
var property;
|
||||
var hCZitf;
|
||||
if ((a0.dmsDisabledUntil ?? a0.invitesDisabledUntil) != null) {
|
||||
var value = a0.dmsDisabledUntil != null;
|
||||
var value2 = a0.invitesDisabledUntil != null;
|
||||
if ((value && value2) === true) {
|
||||
value = environment;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
hCZitf = t.hCZitf;
|
||||
object2 = {guildName: a1};
|
||||
date = new global.Date();
|
||||
object2.time = date.toLocaleString((require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale,
|
||||
|
||||
env0_6);
|
||||
return Reflect.apply(formatToPlainString, intl, [hCZitf, object2]);
|
||||
}
|
||||
if (value === true) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property = t['HNKxf+'];
|
||||
object2 = {guildName: a1};
|
||||
date = new global.Date();
|
||||
object2.time = date.toLocaleString((require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale,
|
||||
|
||||
env0_6);
|
||||
return Reflect.apply(formatToPlainString, intl, [property, object2]);
|
||||
}
|
||||
if (value2 === true) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
M3iSyL = t.M3iSyL;
|
||||
object2 = {guildName: a1};
|
||||
date = new global.Date();
|
||||
object2.time = date.toLocaleString((require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale,
|
||||
|
||||
env0_6);
|
||||
return Reflect.apply(formatToPlainString, intl, [M3iSyL, object2]);
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,325 @@
|
||||
/* Metro module 10906; source: modules/guild_antiraid/GuildIncidentsStore.tsx; dependencies: [6, 7, 15, 17, 18, 4107, 1348, 1867, 3784, 8275, 566, 694, 2] */
|
||||
function _fun83526(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:6, offset: 0x01f1dda1, size: 441 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_83532 = 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 incidentsDataFromServer = function(a0) {
|
||||
var r0;
|
||||
var property;
|
||||
var value = null;
|
||||
if (value != a0) {
|
||||
property = global.Object;
|
||||
property = property.keys(a0).length;
|
||||
r0 = property > 0 ? {raidDetectedAt: a0.raid_detected_at, dmSpamDetectedAt: a0.dm_spam_detected_at,
|
||||
dmsDisabledUntil: a0.dms_disabled_until, invitesDisabledUntil: a0.invites_disabled_until,
|
||||
lockdownDurationHours: a0.lockdown_duration_hours} : value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
|
||||
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
let env0_11 = {};
|
||||
const env0_12 = {};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun83535(Store);
|
||||
value.displayName = 'GuildIncidentsStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{CONNECTION_OPEN: CONNECTION_OPEN_83541, GUILD_CREATE: GUILD_CREATE_83542, GUILD_UPDATE: GUILD_UPDATE_83543,
|
||||
GUILD_DELETE: GUILD_DELETE_83544, LOGOUT: function() {
|
||||
env0_11 = {};
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/GuildIncidentsStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_83527() { // fn#83527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:190, offset: 0x01f1df5a, 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_83527_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_83530(a0, a1) { // fn#83530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:383, offset: 0x01f1dfbc, size: 372 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 _fun83531;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_83532(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_83532(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_83532(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun83531;
|
||||
}
|
||||
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 computeAlertSettings() { // fn#83533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:1307, offset: 0x01f1e130, size: 140 bytes, params: 1, frame: 19
|
||||
var r4;
|
||||
var r2;
|
||||
var object2;
|
||||
var value6;
|
||||
var binding;
|
||||
var id;
|
||||
var id2;
|
||||
var name;
|
||||
var id3;
|
||||
var value7;
|
||||
const guildsProto = UserSettingsProtoStore.getGuildsProto();
|
||||
reducibleJoin2: while (true) {
|
||||
if (guildsProto != null) {
|
||||
r4 = guildsProto;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
r4 = {};
|
||||
break reducibleJoin2;
|
||||
}
|
||||
const guildsArray = GuildStore.getGuildsArray();
|
||||
env0_12 = {};
|
||||
const value4 = _createForOfIteratorHelperLoose_83530(guildsArray);
|
||||
const value5 = value4();
|
||||
let done = value5.done;
|
||||
if (!done) {
|
||||
r2 = value5;
|
||||
reducibleLoop3: while (true) {
|
||||
value6 = r2.value;
|
||||
binding = env0_12;
|
||||
id = value6.id;
|
||||
object2 = {};
|
||||
id2 = value6.id;
|
||||
object2.guildId = id2;
|
||||
name = value6.name;
|
||||
object2.guildName = name;
|
||||
id3 = value6.id;
|
||||
copyDataProperties(object2, r4[id3], name);
|
||||
binding[id] = object2;
|
||||
value7 = value4();
|
||||
done = value7.done;
|
||||
if (done) {
|
||||
break reducibleLoop3;
|
||||
}
|
||||
r2 = value7;
|
||||
continue reducibleLoop3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun83535(a0) { // fn#83535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:1830, offset: 0x01f1e22e, size: 147 bytes, params: 2, frame: 16
|
||||
const closure = GuildIncidentsStore;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(UserSettingsProtoStore, GuildStore, PermissionStore, ExperimentStore);
|
||||
this.syncWith([UserSettingsProtoStore, GuildStore, PermissionStore, ExperimentStore], computeAlertSettings);
|
||||
}}, {key: 'getGuildIncident', value: value_83538}, {key: 'getIncidentsByGuild', value: value_83539},
|
||||
{key: 'getGuildAlertSettings', value: value_83540}]);
|
||||
}
|
||||
|
||||
function CONNECTION_OPEN_83541({guilds}) { // fn#83541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:2497, offset: 0x01f1e31a, size: 189 bytes, params: 2, frame: 20
|
||||
var r2;
|
||||
var incidents_data;
|
||||
var r9;
|
||||
var r7;
|
||||
var value5;
|
||||
var incidentsDataFromServerBinding;
|
||||
var properties;
|
||||
var value6;
|
||||
var value7;
|
||||
var moduleValue;
|
||||
var hasDetectedActivity2;
|
||||
var moduleValue2;
|
||||
var isUnderLockdown2;
|
||||
var binding;
|
||||
var id;
|
||||
var value8;
|
||||
env0_11 = {};
|
||||
const value3 = _createForOfIteratorHelperLoose_83530(guilds);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r2 = value4;
|
||||
while (true) {
|
||||
value5 = r2.value;
|
||||
incidentsDataFromServerBinding = incidentsDataFromServer;
|
||||
properties = value5.properties;
|
||||
incidents_data = properties?.incidents_data;
|
||||
value6 = incidentsDataFromServerBinding(incidents_data);
|
||||
value7 = value6 != null;
|
||||
if (!value7) {
|
||||
r7 = value7;
|
||||
continue;
|
||||
}
|
||||
moduleValue = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
|
||||
hasDetectedActivity2 = moduleValue.hasDetectedActivity(value6);
|
||||
if (hasDetectedActivity2) {
|
||||
r9 = hasDetectedActivity2;
|
||||
continue;
|
||||
}
|
||||
moduleValue2 = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
|
||||
isUnderLockdown2 = moduleValue2.isUnderLockdown(value6);
|
||||
r9 = isUnderLockdown2;
|
||||
r7 = r9;
|
||||
if (!r7) {
|
||||
continue;
|
||||
}
|
||||
binding = env0_11;
|
||||
id = value5.id;
|
||||
binding[id] = value6;
|
||||
value8 = value3();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r2 = value8;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function GUILD_CREATE_83542({guild}) { // fn#83542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:2795, offset: 0x01f1e3d7, size: 135 bytes, params: 2, frame: 17
|
||||
const value3 = incidentsDataFromServer(guild.properties?.incidents_data);
|
||||
if (value3 != null && ((require(8275) /* metro dependency 8275: GuildAntiRaidUtils */).hasDetectedActivity(value3) || (require(8275) /* metro dependency 8275: GuildAntiRaidUtils */).isUnderLockdown(value3))) {
|
||||
env0_11[guild.id] = value3;
|
||||
}
|
||||
}
|
||||
|
||||
function GUILD_UPDATE_83543({guild}) { // fn#83543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11092:3012, offset: 0x01f1e45e, size: 129 bytes, params: 2, frame: 15
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
const value2 = incidentsDataFromServer(guild.incidents_data);
|
||||
if (value2 == null) {
|
||||
delete env0_11[guild.id];
|
||||
} else {
|
||||
moduleValue = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
|
||||
if (moduleValue.hasDetectedActivity(value2)) {
|
||||
env0_11[guild.id] = value2;
|
||||
} else {
|
||||
moduleValue2 = require(8275) /* metro dependency 8275: GuildAntiRaidUtils */;
|
||||
if (moduleValue2.isUnderLockdown(value2)) {
|
||||
env0_11[guild.id] = value2;
|
||||
} else {
|
||||
delete env0_11[guild.id];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/* Metro module 12691; source: modules/guild_antiraid/GuildReportRaidModalConstants.tsx; dependencies: [1244, 2] */
|
||||
function _fun97253(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12881:6, offset: 0x02178cd1, size: 232 bytes, params: 8, frame: 18
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object2 = {DM_SPAM: 'DM_SPAM', MESSAGE_SPAM: 'MESSAGE_SPAM', MENTION_SPAM: 'MENTION_SPAM',
|
||||
SUSPICIOUS_USERS: 'SUSPICIOUS_USERS', SETTINGS_SPAM: 'SETTINGS_SPAM'};
|
||||
const MESSAGE_SPAM = object2.MESSAGE_SPAM;
|
||||
const items2 = [MESSAGE_SPAM];
|
||||
const DM_SPAM = object2.DM_SPAM;
|
||||
items2[1] = DM_SPAM;
|
||||
const MENTION_SPAM = object2.MENTION_SPAM;
|
||||
items2[2] = MENTION_SPAM;
|
||||
const SUSPICIOUS_USERS = object2.SUSPICIOUS_USERS;
|
||||
items2[3] = SUSPICIOUS_USERS;
|
||||
const SETTINGS_SPAM = object2.SETTINGS_SPAM;
|
||||
items2[4] = SETTINGS_SPAM;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/GuildReportRaidModalConstants.tsx');
|
||||
exports.COMMUNITY_PORTAL_SERVER_SAFETY_PAGE = 'https://discord.com/community/securing-your-server';
|
||||
exports.ReportRaidTypes = object2;
|
||||
exports.REPORT_RAID_OPTIONS = items2;
|
||||
exports.getReportRaidTypeLabel = getReportRaidTypeLabel;
|
||||
}
|
||||
|
||||
function getReportRaidTypeLabel(a0) { // fn#97254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12881:603, offset: 0x02178db9, size: 389 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const DM_SPAM = env0_2.DM_SPAM;
|
||||
if (DM_SPAM === a0) {
|
||||
return intl.string(t['9CYNmS']);
|
||||
}
|
||||
const MENTION_SPAM = env0_2.MENTION_SPAM;
|
||||
if (MENTION_SPAM === a0) {
|
||||
return intl.string(t['hR/IdO']);
|
||||
}
|
||||
const MESSAGE_SPAM = env0_2.MESSAGE_SPAM;
|
||||
if (MESSAGE_SPAM === a0) {
|
||||
return intl.string(t.fwloj2);
|
||||
}
|
||||
const SETTINGS_SPAM = env0_2.SETTINGS_SPAM;
|
||||
if (SETTINGS_SPAM === a0) {
|
||||
return intl.string(t.ETFVFw);
|
||||
}
|
||||
const SUSPICIOUS_USERS = env0_2.SUSPICIOUS_USERS;
|
||||
if (SUSPICIOUS_USERS === a0) {
|
||||
return intl.string(t['lKXu+n']);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 10927; source: modules/guild_antiraid/getGuildSafetyAlertsChannelId.tsx; dependencies: [2] */
|
||||
function _fun83736(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11113:6, offset: 0x01f26539, size: 87 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/getGuildSafetyAlertsChannelId.tsx');
|
||||
exports.default = function(a0) {
|
||||
return a0.safetyAlertsChannelId ?? a0.publicUpdatesChannelId;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
/* Metro module 12690; source: modules/guild_antiraid/native/GuildAntiRaidReportModal.tsx; dependencies: [57, 31, 27, 12691, 33, 4501, 697, 1585, 4573, 3853, 6766, 1244, 6231, 8950, 4578, 5282, 11447, 5280, 2] */
|
||||
function _fun97239(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12880:6, offset: 0x02178568, size: 404 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 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(12691) /* metro dependency 12691: GuildReportRaidModalConstants */;
|
||||
const env0_6 = value.COMMUNITY_PORTAL_SERVER_SAFETY_PAGE;
|
||||
const env0_7 = value.getReportRaidTypeLabel;
|
||||
const env0_8 = value.REPORT_RAID_OPTIONS;
|
||||
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;
|
||||
object2 = {};
|
||||
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.container = {'flex': 1, 'paddingHorizontal': 16, 'paddingVertical': 0, 'backgroundColor': null,
|
||||
'flexDirection': 'column', 'height': '100%', 'paddingTop': 8, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
object2.headerSubtitle = {'textAlign': 'center', 'marginTop': 8};
|
||||
object2.formBody = {marginTop: 24};
|
||||
object2.formRow = {paddingVertical: 2};
|
||||
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.submitButtonContainer = {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0,
|
||||
'paddingHorizontal': 16, 'paddingVertical': 16, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/native/GuildAntiRaidReportModal.tsx');
|
||||
exports.default = GuildAntiRaidReportModal;
|
||||
}
|
||||
|
||||
function ReportModal({raidTypes, onChange, onSubmit}) { // fn#97240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12880:719, offset: 0x021786fc, size: 540 bytes, params: 2, frame: 30
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const env0_3 = env0_4.useCallback(_fun97241, [styles]);
|
||||
const value2 = env0_4.useCallback(function() {
|
||||
importDefault(dependencyMap[9]).openURL(COMMUNITY_PORTAL_SERVER_SAFETY_PAGE);
|
||||
}, []);
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const Hg8Ee7 = (require(1244) /* metro dependency 1244: indexNative */).t.Hg8Ee7;
|
||||
const items3 = [<TextWithIOSLinkWorkaround style={styles.headerSubtitle} variant="text-sm/medium" color="text-default">{Reflect.apply(format,
|
||||
intl, [Hg8Ee7, {onClick: value2}])}</TextWithIOSLinkWorkaround>];
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
items3[1] = <View style={styles.formBody}><TableRowGroup hasIcons={false}>{REPORT_RAID_OPTIONS.map(_fun97243)}</TableRowGroup></View>;
|
||||
const items2 = [styles.submitButtonContainer];
|
||||
items2[1] = {paddingBottom: bottom + 16};
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items3[2] = <View style={items2}><Button size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.geKm7t)} onPress={onSubmit} /></View>;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items3}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildAntiRaidReportModal({onCloseModal, guildId}) { // fn#97245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12880:1669, offset: 0x02178a27, size: 205 bytes, params: 2, frame: 20
|
||||
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
|
||||
const [property, env0_3] = env0_3Binding(env0_4.useState([]), 2);
|
||||
const value4 = env0_4.useMemo(_fun97246, [onCloseModal, property, guildId]);
|
||||
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
||||
return (
|
||||
<Navigator
|
||||
screens={value4}
|
||||
initialRouteName="REPORT_RAID"
|
||||
headerStatusBarHeight={top}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun97241(a0) { // fn#97241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12880:823, offset: 0x02178918, size: 91 bytes, params: 2, frame: 15
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
style={styles.formRow}
|
||||
variant="text-md/semibold"
|
||||
color="interactive-text-active"
|
||||
>
|
||||
{getReportRaidTypeLabel(a0)}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun97243(a0, a1) { // fn#97243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12880:1281, offset: 0x0217899d, size: 138 bytes, params: 3, frame: 19
|
||||
const env0_0 = a0;
|
||||
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
|
||||
return (
|
||||
<TableCheckboxRow
|
||||
start={a1 === 0}
|
||||
end={a1 === REPORT_RAID_OPTIONS.length - 1}
|
||||
label={env0_3(a0)}
|
||||
checked={raidTypes.includes(a0)}
|
||||
onPress={onPress_97244}
|
||||
key={a0}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun97246() { // fn#97246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12880:1804, offset: 0x02178af4, size: 65 bytes, params: 1, frame: 12
|
||||
return getScreens_97247({onCloseModal: onCloseModal, raidTypes: env0_2, onChange: onChange_97249,
|
||||
onSubmit: onSubmit_97252});
|
||||
}
|
||||
|
||||
function getScreens_97247({onCloseModal, raidTypes, onChange, onSubmit}) { // fn#97247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12880:1808, offset: 0x02178b35, size: 171 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
const object = {ignoreKeyboard: true};
|
||||
const value = environment.__proto__.__proto__;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uYPGsS);
|
||||
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onCloseModal);
|
||||
object.render = render_97248;
|
||||
return {['REPORT_RAID']: object};
|
||||
}
|
||||
|
||||
function onChange_97249(a0) { // fn#97249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12880:2102, offset: 0x02178c15, size: 32 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
env1_3(_fun97250);
|
||||
}
|
||||
|
||||
function onSubmit_97252() { // fn#97252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12880:2168, offset: 0x02178c83, size: 78 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(11447) /* metro dependency 11447: GuildAntiRaidActionCreators */;
|
||||
const trackReportRaidViewed = value.trackReportRaidViewed;
|
||||
const guildIdBinding = guildId;
|
||||
Reflect.apply(trackReportRaidViewed, value, [guildIdBinding, env1_2]);
|
||||
(require(11447) /* metro dependency 11447: GuildAntiRaidActionCreators */).handleReportRaid(guildIdBinding);
|
||||
onCloseModal();
|
||||
}
|
||||
|
||||
function getScreens_97247Render() { // fn#97248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12880:2007, owner: getScreens_97247.render, offset: 0x02178be0, size: 53 bytes, params: 1, frame: 14
|
||||
return (
|
||||
<ReportModal
|
||||
raidTypes={raidTypes}
|
||||
onChange={onChange}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun97250(a0) { // fn#97250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12880:2109, offset: 0x02178c35, size: 78 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var items2;
|
||||
var value2;
|
||||
if (a0.includes(env0_0)) {
|
||||
r0 = a0.filter(_fun97251);
|
||||
} else {
|
||||
items2 = [];
|
||||
value2 = arraySpread(items2, a0, 0, a0);
|
||||
items2[value2] = env0_0;
|
||||
value2 + 1;
|
||||
r0 = items2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
/* Metro module 11445; source: modules/guild_antiraid/native/GuildIncidentActionsActionSheet.tsx; dependencies: [31, 10906, 11446, 8276, 661, 33, 4501, 6805, 6758, 1244, 6807, 632, 8275, 4080, 1305, 6238, 6231, 6808, 9149, 8129, 6261, 4578, 11447, 683, 11448, 2] */
|
||||
function _fun87602(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11631:6, offset: 0x01fc5006, size: 354 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 guildIncidentsStore = importDefault(10906) /* metro dependency 10906: GuildIncidentsStore */;
|
||||
let value = require(11446) /* metro dependency 11446: GuildIncidentsActionSheetStore */;
|
||||
const env0_5 = value.resetGuildIncidentsActionSheetStore;
|
||||
const env0_6 = value.setInitialTime;
|
||||
const env0_7 = value.setPauseDms;
|
||||
const env0_8 = value.setPauseInvites;
|
||||
const env0_9 = value.setTime;
|
||||
const env0_10 = value.useGuildIncidentsActionSheetStore;
|
||||
const env0_11 = (require(8276) /* metro dependency 8276: GuildAntiRaidConstants */).getTimeframes;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = value.AnalyticEvents;
|
||||
const env0_13 = value.GuildFeatures;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value.jsx;
|
||||
const env0_15 = value.jsxs;
|
||||
const env0_16 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({beta: {marginLeft: -12}});
|
||||
const closure = GuildIncidentActionsActionSheet;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/native/GuildIncidentActionsActionSheet.tsx');
|
||||
exports.default = closure;
|
||||
}
|
||||
|
||||
function DurationSelectionActionSheet({onClose}) { // fn#87603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11631:446, offset: 0x01fc5168, size: 225 bytes, params: 2, frame: 23
|
||||
const timeframes = getTimeframes();
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vKYZzc)} />;
|
||||
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
const Group = ActionSheetRow.Group;
|
||||
return (
|
||||
<ActionSheet>
|
||||
{bottomSheetTitleHeader}
|
||||
<Group hasIcons={false}>
|
||||
{timeframes.map(_fun87604)}
|
||||
</Group>
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildIncidentActionsActionSheet({guild, analyticsData}) { // fn#87606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11631:776, offset: 0x01fc52c0, size: 1608 bytes, params: 2, frame: 39
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const value3 = useGuildIncidentsActionSheetStore();
|
||||
const time = value3.time;
|
||||
const pauseInvites = value3.pauseInvites;
|
||||
const env0_3 = pauseInvites;
|
||||
const pauseDms = value3.pauseDms;
|
||||
const hasTimeChanges = value3.hasTimeChanges;
|
||||
const guildIncident = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildIncidentsStore],
|
||||
function() {
|
||||
return GuildIncidentsStore.getGuildIncident(guild.id);
|
||||
});
|
||||
const hasInvitesDisabled2 = (require(8275) /* metro dependency 8275: GuildAntiRaidUtils */).hasInvitesDisabled(guildIncident);
|
||||
const hasDMsDisabled2 = (require(8275) /* metro dependency 8275: GuildAntiRaidUtils */).hasDMsDisabled(guildIncident);
|
||||
const value4 = (require(8275) /* metro dependency 8275: GuildAntiRaidUtils */).initialLockdownDurationHours(guildIncident);
|
||||
let r12 = guild == null ? undefined : guild.features.has(GuildFeatures.INVITES_DISABLED);
|
||||
const binding = env0_3;
|
||||
binding.useEffect(_fun87608, [hasDMsDisabled2, hasInvitesDisabled2]);
|
||||
binding.useEffect(_fun87609, [value4]);
|
||||
const value6 = binding.useMemo(_fun87610, [time]);
|
||||
const closure = function() {
|
||||
importDefault(dependencyMap[13]).hideActionSheet('GuildIncidentActionsActionSheet');
|
||||
resetGuildIncidentsActionSheetStore();
|
||||
};
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
object2 = {startExpanded: true};
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const oCYAc7 = (require(1244) /* metro dependency 1244: indexNative */).t.oCYAc7;
|
||||
const BetaTag = (require(1305) /* metro dependency 1305: native */).BetaTag;
|
||||
const BetaSizes = (require(1305) /* metro dependency 1305: native */).BetaSizes;
|
||||
const SMALL = BetaSizes.SMALL;
|
||||
object2.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl,
|
||||
[oCYAc7])} leading={<BetaTag size={SMALL} style={styles.beta} />} />;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const TrailingText = TableRow2.TrailingText;
|
||||
const items2 = [<TableRow trailing={<TrailingText text={value6 ?? ''} />} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vKYZzc)} arrow onPress={onPress_87614} start end accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vKYZzc)} accessibilityHint={value6} />];
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
|
||||
string = intl.string;
|
||||
const Uwsjn6 = (require(1244) /* metro dependency 1244: indexNative */).t.Uwsjn6;
|
||||
const tableSwitchRow = <TableSwitchRow label={Reflect.apply(string, intl,
|
||||
[Uwsjn6])} subLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qPJkZh)} value={pauseInvites || r12} onValueChange={function() {
|
||||
setPauseInvites(!pauseInvites);
|
||||
}} disabled={r12} />;
|
||||
if (r12) {
|
||||
r12 = <TableRow icon={((Icon) => <Icon source={importDefault(9149) /* metro dependency 9149 */} IconComponent={(require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon} variant="secondary" />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9GPbsV'])} />;
|
||||
}
|
||||
items2[1] = <TableRowGroup hasIcons>{tableSwitchRow}{r12}</TableRowGroup>;
|
||||
const tableSwitchRowProps = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['wrDmA/'])};
|
||||
string = intl.string;
|
||||
const UQbJW7 = (require(1244) /* metro dependency 1244: indexNative */).t.UQbJW7;
|
||||
tableSwitchRowProps.subLabel = Reflect.apply(string, intl, [UQbJW7]);
|
||||
tableSwitchRowProps.value = pauseDms;
|
||||
tableSwitchRowProps.onValueChange = function() {
|
||||
setPauseDms(!pauseDms);
|
||||
};
|
||||
tableSwitchRowProps.start = true;
|
||||
tableSwitchRowProps.end = true;
|
||||
items2[2] = <TableSwitchRow {...tableSwitchRowProps} />;
|
||||
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const buttonProps = {onPress: onPress_87617,
|
||||
text: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']), variant: 'primary',
|
||||
size: 'md'};
|
||||
let r15 = pauseInvites !== hasInvitesDisabled2 || pauseDms !== hasDMsDisabled2;
|
||||
r15 = !r15 ? hasTimeChanges : r15;
|
||||
buttonProps.disabled = !r15;
|
||||
items2[3] = <ButtonGroup><Button {...buttonProps} /><Button onPress={closure} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])} variant="secondary" size="md" /></ButtonGroup>;
|
||||
return (
|
||||
<ActionSheet {...object2}>
|
||||
{items2}
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87604(a0) { // fn#87604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11631:653, offset: 0x01fc5249, size: 80 bytes, params: 2, frame: 17
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__;
|
||||
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
return (
|
||||
<ActionSheetRow
|
||||
label={a0.label}
|
||||
onPress={onPress_87605}
|
||||
key={a0.value}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87608() { // fn#87608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11631:1116, offset: 0x01fc5928, size: 36 bytes, params: 1, frame: 13
|
||||
setPauseInvites(env0_5);
|
||||
setPauseDms(env0_6);
|
||||
}
|
||||
|
||||
function _fun87609() { // fn#87609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11631:1153, offset: 0x01fc594c, size: 48 bytes, params: 1, frame: 11
|
||||
const getState = useGuildIncidentsActionSheetStore.getState;
|
||||
if (!Reflect.apply(getState, useGuildIncidentsActionSheetStore, []).hasTimeChanges) {
|
||||
setInitialTime(env0_7);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun87610() { // fn#87610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11631:1216, offset: 0x01fc597c, size: 49 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const getTimeframesBinding = getTimeframes;
|
||||
value = undefined;
|
||||
const value3 = getTimeframesBinding().find(function({value}) {
|
||||
return value === time;
|
||||
});
|
||||
return value3 == null ? value : value3.label;
|
||||
}
|
||||
|
||||
function onDurationSelectorClose() { // fn#87612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11631:1317, owner: GuildIncidentActionsActionSheet.onDurationSelectorClose, offset: 0x01fc59c2, size: 90 bytes, params: 1, frame: 18
|
||||
const actionSheetActionCreatorsModule = require(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
const showActionSheet = actionSheetActionCreatorsModule.showActionSheet;
|
||||
const object2 = {};
|
||||
object2.content = <GuildIncidentActionsActionSheet guild={guild} analyticsData={analyticsData} />;
|
||||
object2.key = 'GuildIncidentActionsActionSheet';
|
||||
Reflect.apply(showActionSheet, actionSheetActionCreatorsModule, [object2]);
|
||||
}
|
||||
|
||||
function GuildIncidentActionsActionSheetOnPress_87614() { // fn#87614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11631:1902, owner: GuildIncidentActionsActionSheet.onPress, offset: 0x01fc5a50, size: 82 bytes, params: 1, frame: 17
|
||||
const actionSheetActionCreatorsModule = require(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
const showActionSheet = actionSheetActionCreatorsModule.showActionSheet;
|
||||
const object2 = {};
|
||||
object2.content = <DurationSelectionActionSheet onClose={onDurationSelectorClose} />;
|
||||
object2.key = 'DurationSelectionActionSheet';
|
||||
Reflect.apply(showActionSheet, actionSheetActionCreatorsModule, [object2]);
|
||||
}
|
||||
|
||||
function GuildIncidentActionsActionSheetOnPress_87617() { // fn#87617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11631:2770, owner: GuildIncidentActionsActionSheet.onPress, offset: 0x01fc5ad6, size: 355 bytes, params: 1, frame: 27
|
||||
var moduleValue4;
|
||||
var showActionSheet;
|
||||
const value = environment.__proto__;
|
||||
const guildAntiRaidActionCreatorsModule = require(11447) /* metro dependency 11447: GuildAntiRaidActionCreators */;
|
||||
const setGuildIncidentActions = guildAntiRaidActionCreatorsModule.setGuildIncidentActions;
|
||||
const guildBinding = guild;
|
||||
const id = guildBinding.id;
|
||||
const pauseInvitesBinding = pauseInvites;
|
||||
const pauseDmsBinding = pauseDms;
|
||||
const timeBinding = time;
|
||||
Reflect.apply(setGuildIncidentActions, guildAntiRaidActionCreatorsModule, [id, pauseInvitesBinding, pauseDmsBinding,
|
||||
timeBinding]);
|
||||
onPress_87613();
|
||||
const {source, alertType, messageId} = analyticsData;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_RAID_INTERVENTION_STATE_CHANGE = AnalyticEvents.GUILD_RAID_INTERVENTION_STATE_CHANGE;
|
||||
let object2 = {};
|
||||
object2.guild_id = guildBinding.id;
|
||||
object2.source = source;
|
||||
object2.raid_alert_id = messageId;
|
||||
object2.raid_alert_type = alertType;
|
||||
object2.intervention_type_enabled = (require(8275) /* metro dependency 8275: GuildAntiRaidUtils */).getEnabledInterventions(pauseInvitesBinding,
|
||||
pauseDmsBinding);
|
||||
object2.intervention_type_disabled = (require(8275) /* metro dependency 8275: GuildAntiRaidUtils */).getDisabledInterventions(pauseInvitesBinding,
|
||||
pauseDmsBinding);
|
||||
object2.duration = 60 * timeBinding;
|
||||
Reflect.apply(track, defaultImport, [GUILD_RAID_INTERVENTION_STATE_CHANGE, object2]);
|
||||
let r1 = !env0_5 && !env0_6;
|
||||
r1 = !r1 ? pauseInvites : r1;
|
||||
r1 = !r1 ? pauseDms : r1;
|
||||
if (!r1) {
|
||||
moduleValue4 = require(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
showActionSheet = moduleValue4.showActionSheet;
|
||||
object2 = {};
|
||||
object2.content = ((Component) => <Component guildId={guild.id} />)(importDefault(11448) /* metro dependency 11448: GuildRaidLockdownFeedbackActionSheet */);
|
||||
object2.key = 'GuildRaidLockdownFeedbackActionSheet';
|
||||
Reflect.apply(showActionSheet, moduleValue4, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_87605() { // fn#87605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11631:705, offset: 0x01fc5299, size: 39 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__.__proto__;
|
||||
setTime(env0_0.value);
|
||||
value = environment.__proto__;
|
||||
onClose();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/* Metro module 11446; source: modules/guild_antiraid/native/GuildIncidentsActionSheetStore.tsx; dependencies: [8276, 629, 690, 2] */
|
||||
function _fun87618(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11632:6, offset: 0x01fc5c39, size: 208 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(8276) /* metro dependency 8276: GuildAntiRaidConstants */).DEFAULT_LOCKDOWN_DURATION;
|
||||
let value = require(629) /* metro dependency 629 */;
|
||||
value = value.create(function() {
|
||||
return {'time': null, 'pauseInvites': true, 'pauseDms': true, 'hasTimeChanges': false,
|
||||
time: DEFAULT_LOCKDOWN_DURATION};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/native/GuildIncidentsActionSheetStore.tsx');
|
||||
exports.useGuildIncidentsActionSheetStore = value;
|
||||
exports.setTime = setTime;
|
||||
exports.setInitialTime = setInitialTime;
|
||||
exports.setPauseInvites = setPauseInvites;
|
||||
exports.setPauseDms = setPauseDms;
|
||||
exports.resetGuildIncidentsActionSheetStore = resetGuildIncidentsActionSheetStore;
|
||||
}
|
||||
|
||||
function setTime(a0) { // fn#87620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11632:359, offset: 0x01fc5d26, size: 54 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun87621);
|
||||
}
|
||||
|
||||
function setInitialTime(a0) { // fn#87622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11632:464, offset: 0x01fc5d85, size: 54 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun87623);
|
||||
}
|
||||
|
||||
function setPauseInvites(a0) { // fn#87624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11632:577, offset: 0x01fc5de4, size: 54 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun87625);
|
||||
}
|
||||
|
||||
function setPauseDms(a0) { // fn#87626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11632:677, offset: 0x01fc5e3c, size: 54 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun87627);
|
||||
}
|
||||
|
||||
function resetGuildIncidentsActionSheetStore() { // fn#87628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11632:793, offset: 0x01fc5e94, size: 47 bytes, params: 1, frame: 12
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun87629);
|
||||
}
|
||||
|
||||
function _fun87621() { // fn#87621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11632:401, offset: 0x01fc5d5c, size: 41 bytes, params: 1, frame: 12
|
||||
return env1_3.setState({time: env0_0, hasTimeChanges: true});
|
||||
}
|
||||
|
||||
function _fun87623() { // fn#87623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11632:513, offset: 0x01fc5dbb, size: 41 bytes, params: 1, frame: 12
|
||||
return env1_3.setState({time: env0_0, hasTimeChanges: false});
|
||||
}
|
||||
|
||||
function _fun87625() { // fn#87625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11632:627, offset: 0x01fc5e1a, size: 34 bytes, params: 1, frame: 12
|
||||
return env1_3.setState({pauseInvites: env0_0});
|
||||
}
|
||||
|
||||
function _fun87627() { // fn#87627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11632:723, offset: 0x01fc5e72, size: 34 bytes, params: 1, frame: 12
|
||||
return env1_3.setState({pauseDms: env0_0});
|
||||
}
|
||||
|
||||
function _fun87629() { // fn#87629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11632:862, offset: 0x01fc5ec3, size: 46 bytes, params: 1, frame: 12
|
||||
env1_3.setState({'time': null, 'pauseInvites': true, 'pauseDms': true, 'hasTimeChanges': false,
|
||||
time: DEFAULT_LOCKDOWN_DURATION});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
/* Metro module 11448; source: modules/guild_antiraid/native/GuildRaidLockdownFeedbackActionSheet.tsx; dependencies: [57, 31, 661, 33, 4501, 1244, 5061, 4080, 6805, 6758, 5467, 6231, 8950, 7681, 4578, 4863, 2] */
|
||||
function _fun87648(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11634:6, offset: 0x01fc64ce, size: 235 bytes, params: 8, frame: 19
|
||||
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(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'display': 'flex',
|
||||
'gap': 24}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/native/GuildRaidLockdownFeedbackActionSheet.tsx');
|
||||
exports.default = _default_87649;
|
||||
}
|
||||
|
||||
function _default_87649({guildId}) { // fn#87649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11634:237, offset: 0x01fc65b9, size: 1092 bytes, params: 2, frame: 29
|
||||
var r9;
|
||||
var TextArea;
|
||||
var object5;
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, [[]]);
|
||||
const binding2 = env0_3;
|
||||
const value3 = binding2(value2, 2);
|
||||
const property = value3[0];
|
||||
const env0_2 = value3[1];
|
||||
useState = binding.useState;
|
||||
const value4 = binding2(Reflect.apply(useState, binding, []), 2);
|
||||
const property2 = value4[0];
|
||||
var env0_4 = value4[1];
|
||||
let object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
object2.text = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['//3pvi']]);
|
||||
const RaidLockdownFeedbackType = (require(5061) /* metro dependency 5061: AutomodFeedback */).RaidLockdownFeedbackType;
|
||||
const DM_SPAM = RaidLockdownFeedbackType.DM_SPAM;
|
||||
object2.value = DM_SPAM;
|
||||
const items2 = [object2];
|
||||
string = intl.string;
|
||||
const SdVsip = (require(1244) /* metro dependency 1244: indexNative */).t.SdVsip;
|
||||
const MENTION_SPAM = RaidLockdownFeedbackType.MENTION_SPAM;
|
||||
items2[1] = {text: Reflect.apply(string, intl, [SdVsip]), value: MENTION_SPAM};
|
||||
object2 = {};
|
||||
object2.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uTiSVL);
|
||||
const CHANNEL_SPAM = RaidLockdownFeedbackType.CHANNEL_SPAM;
|
||||
object2.value = CHANNEL_SPAM;
|
||||
items2[2] = object2;
|
||||
string = intl.string;
|
||||
const GQczU8 = (require(1244) /* metro dependency 1244: indexNative */).t.GQczU8;
|
||||
const SUS_NEW_MEMBERS = RaidLockdownFeedbackType.SUS_NEW_MEMBERS;
|
||||
items2[3] = {text: Reflect.apply(string, intl, [GQczU8]), value: SUS_NEW_MEMBERS};
|
||||
string = intl.string;
|
||||
const AAgqy3 = (require(1244) /* metro dependency 1244: indexNative */).t.AAgqy3;
|
||||
const CHANGING_SETTINGS = RaidLockdownFeedbackType.CHANGING_SETTINGS;
|
||||
items2[4] = {text: Reflect.apply(string, intl, [AAgqy3]), value: CHANGING_SETTINGS};
|
||||
object2 = {};
|
||||
object2.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ryPKb7);
|
||||
let OTHER = RaidLockdownFeedbackType.OTHER;
|
||||
object2.value = OTHER;
|
||||
items2[5] = object2;
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
object2 = {startExpanded: true};
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
object2.header = <BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.f5hd9P)} />;
|
||||
const KeyboardAwareView = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const tableRowGroup = <TableRowGroup hasIcons={false}>{items2.map(_fun87650)}</TableRowGroup>;
|
||||
const includes = property.includes;
|
||||
OTHER = RaidLockdownFeedbackType.OTHER;
|
||||
const value6 = Reflect.apply(includes, property, [OTHER]);
|
||||
if (value6) {
|
||||
TextArea = (require(7681) /* metro dependency 7681: TextAreaNative */).TextArea;
|
||||
r9 = <TextArea autoComplete="off" value={property2} placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['PAM+JR'])} onChange={onChange_87656} />;
|
||||
} else {
|
||||
r9 = value6;
|
||||
}
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<ActionSheet {...object2}>
|
||||
<KeyboardAwareView style={styles.container}>
|
||||
{tableRowGroup}
|
||||
{r9}
|
||||
<Button
|
||||
onPress={onPress_87657}
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nAt0rE)}
|
||||
/>
|
||||
</KeyboardAwareView>
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87650({text, value}) { // fn#87650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11634:1163, offset: 0x01fc69fd, size: 102 bytes, params: 2, frame: 18
|
||||
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
|
||||
return (
|
||||
<TableCheckboxRow
|
||||
onPress={function() {
|
||||
_fun87652(value);
|
||||
}}
|
||||
checked={env0_1.includes(value)}
|
||||
label={text}
|
||||
key={value}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_87649OnPress() { // fn#87657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11634:1565, owner: _default_87649.onPress, offset: 0x01fc6ace, size: 117 bytes, params: 1, frame: 18
|
||||
const value = environment.__proto__;
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
|
||||
const GUILD_RAID_LOCKDOWN_FEEDBACK = AnalyticEvents.GUILD_RAID_LOCKDOWN_FEEDBACK;
|
||||
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule, [GUILD_RAID_LOCKDOWN_FEEDBACK,
|
||||
{raid_lockdown_feedback_type: env0_1, raid_lockdown_feedback_other_reason: env0_3, guild_id: guildId}]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('GuildRaidLockdownFeedbackActionSheet');
|
||||
}
|
||||
|
||||
function onPress_87651() { // fn#87651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11634:1220, offset: 0x01fc6a63, size: 25 bytes, params: 1, frame: 11
|
||||
onPress_87651OnCheckboxChange(value);
|
||||
}
|
||||
|
||||
function onPress_87651OnCheckboxChange(a0) { // fn#87652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11634:1224, owner: onPress_87651.onCheckboxChange, offset: 0x01fc6a7c, size: 58 bytes, params: 2, frame: 13
|
||||
const env0_0 = a0;
|
||||
env2_2(env2_1.includes(a0) ? function(a0) {
|
||||
return a0.filter(_fun87654);
|
||||
} : _fun87655);
|
||||
}
|
||||
|
||||
function _fun87653(a0) { // fn#87653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11634:1277, offset: 0x01fc6ab6, size: 24 bytes, params: 2, frame: 11
|
||||
return a0.filter(_fun87654);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
/* Metro module 11452; source: modules/guild_antiraid/native/GuildRaidResolveActionSheet.tsx; dependencies: [57, 31, 27, 661, 6263, 33, 4501, 697, 1244, 5061, 4080, 6805, 5467, 4573, 7972, 1305, 4578, 4863, 11447, 6264, 2] */
|
||||
function _fun87679(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:6, offset: 0x01fc793c, size: 494 bytes, params: 8, frame: 22
|
||||
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 env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_7 = (require(6263) /* metro dependency 6263: Constants */).SafetyToastType;
|
||||
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;
|
||||
object3 = {container: {'paddingVertical': 24, 'paddingHorizontal': 16, 'display': 'flex', 'flexDirection': 'column',
|
||||
'alignItems': 'center'}, title: {'marginBottom': 8, 'textAlign': 'center'}, subtitle: {'marginBottom': 16,
|
||||
'textAlign': 'center'}};
|
||||
const object5 = {'borderColor': null, 'borderWidth': 1, 'borderRadius': null, 'display': 'flex',
|
||||
'flexDirection': 'column', 'marginBottom': 14, 'width': '100%'};
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object5.borderColor = BORDER_SUBTLE;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object3.optionContainer = object5;
|
||||
object3.option = {width: '100%'};
|
||||
object3.textInputContainer = {'paddingLeft': 54, 'paddingRight': 16, 'paddingBottom': 16};
|
||||
const object6 = {'backgroundColor': null, 'width': '100%', 'padding': 8};
|
||||
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
|
||||
object6.backgroundColor = INPUT_BACKGROUND_DEFAULT;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object3.textInput = object6;
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_antiraid/native/GuildRaidResolveActionSheet.tsx');
|
||||
exports.default = _default_87680;
|
||||
}
|
||||
|
||||
function _default_87680({guildId, messageId}) { // fn#87680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:824, offset: 0x01fc7b2a, size: 981 bytes, params: 2, frame: 29
|
||||
const closure = onPress_87682;
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, [[]]);
|
||||
const binding2 = env0_3;
|
||||
const value3 = binding2(value2, 2);
|
||||
var env0_3 = value3[0];
|
||||
var env0_4 = value3[1];
|
||||
useState = binding.useState;
|
||||
const value4 = binding2(Reflect.apply(useState, binding, []), 2);
|
||||
const env0_5 = value4[0];
|
||||
const env0_6 = value4[1];
|
||||
let object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
object2.text = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.yeaXw5]);
|
||||
const RaidResolutionType = (require(5061) /* metro dependency 5061: AutomodFeedback */).RaidResolutionType;
|
||||
const LEGITIMATE_ACTIVITY = RaidResolutionType.LEGITIMATE_ACTIVITY;
|
||||
object2.value = LEGITIMATE_ACTIVITY;
|
||||
const items3 = [object2];
|
||||
object2 = {};
|
||||
object2.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['o++3B8']);
|
||||
const DM_SPAM = RaidResolutionType.DM_SPAM;
|
||||
object2.value = DM_SPAM;
|
||||
items3[1] = object2;
|
||||
string = intl.string;
|
||||
const UfHAwZ = (require(1244) /* metro dependency 1244: indexNative */).t.UfHAwZ;
|
||||
const JOIN_RAID = RaidResolutionType.JOIN_RAID;
|
||||
items3[2] = {text: Reflect.apply(string, intl, [UfHAwZ]), value: JOIN_RAID};
|
||||
string = intl.string;
|
||||
const K3UWeR = (require(1244) /* metro dependency 1244: indexNative */).t.K3UWeR;
|
||||
const OTHER = RaidResolutionType.OTHER;
|
||||
items3[3] = {text: Reflect.apply(string, intl, [K3UWeR]), value: OTHER};
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
const keyboardAwareView = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items2 = [<Text style={styles.title} variant="heading-xl/bold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1zmw/H'])}</Text>];
|
||||
items2[1] = <Text style={styles.subtitle} variant="text-sm/normal" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nF79oO)}</Text>;
|
||||
items2[2] = items3.map(_fun87683);
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const object3 = {onPress: onPress_87689};
|
||||
string = intl.string;
|
||||
const Gh3A0O = (require(1244) /* metro dependency 1244: indexNative */).t.Gh3A0O;
|
||||
object3.text = Reflect.apply(string, intl, [Gh3A0O]);
|
||||
object3.size = 'md';
|
||||
items2[3] = <Button {...object3} />;
|
||||
items2[4] = <Button onPress={closure} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])} variant="secondary" size="md" />;
|
||||
return (
|
||||
<ActionSheet>
|
||||
{((Component) => <Component style={styles.container}>{items2}</Component>)(keyboardAwareView)}
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_87680OnPress() { // fn#87682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:1342, owner: _default_87680.onPress, offset: 0x01fc7f12, size: 44 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('GuildRaidResolveActionSheet');
|
||||
}
|
||||
|
||||
function _fun87683({text, value}) { // fn#87683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:1782, offset: 0x01fc7f3e, size: 422 bytes, params: 2, frame: 28
|
||||
var object;
|
||||
var TextInput;
|
||||
var intl;
|
||||
let stylesBinding = styles;
|
||||
const optionContainer = stylesBinding.optionContainer;
|
||||
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
|
||||
const option = stylesBinding.option;
|
||||
const Checkbox = (require(1305) /* metro dependency 1305: native */).Checkbox;
|
||||
const formRow = <FormRow style={option} onPress={function() {
|
||||
_fun87685(value);
|
||||
}} leading={<Checkbox selected={env0_3.includes(value)} />} label={text} />;
|
||||
const RaidResolutionType = (require(5061) /* metro dependency 5061: AutomodFeedback */).RaidResolutionType;
|
||||
const OTHER = RaidResolutionType.OTHER;
|
||||
let r6 = value === OTHER && env0_3.includes((require(5061) /* metro dependency 5061: AutomodFeedback */).RaidResolutionType.OTHER);
|
||||
if (r6) {
|
||||
object = {};
|
||||
stylesBinding = styles;
|
||||
object.style = stylesBinding.textInputContainer;
|
||||
TextInput = (require(1305) /* metro dependency 1305: native */).TextInput;
|
||||
var textInputProps = {style: stylesBinding.textInput, autoComplete: 'off', value: env0_5};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
textInputProps.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['PAM+JR']);
|
||||
textInputProps.onChangeText = handleTextInputChange;
|
||||
r6 = <View {...object}><TextInput {...textInputProps} /></View>;
|
||||
}
|
||||
return (
|
||||
<View style={optionContainer} key={value}>
|
||||
{formRow}
|
||||
{r6}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_87680OnPress_87689() { // fn#87689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:2364, owner: _default_87680.onPress, offset: 0x01fc814f, size: 231 bytes, params: 1, frame: 23
|
||||
const object2 = {};
|
||||
const RaidAlertType = (require(5061) /* metro dependency 5061: AutomodFeedback */).RaidAlertType;
|
||||
const JOIN_RAID = RaidAlertType.JOIN_RAID;
|
||||
object2.raid_alert_type = JOIN_RAID;
|
||||
const messageIdBinding = messageId;
|
||||
object2.raid_alert_id = messageIdBinding;
|
||||
const binding = env0_3;
|
||||
object2.false_alarm_type = binding.map(function(a0) {
|
||||
return a0.toString();
|
||||
});
|
||||
object2.false_alarm_other_reason = env0_5;
|
||||
const guildIdBinding = guildId;
|
||||
object2.guild_id = guildIdBinding;
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
|
||||
const GUILD_RAID_FEEDBACK = AnalyticEvents.GUILD_RAID_FEEDBACK;
|
||||
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule, [GUILD_RAID_FEEDBACK, object2]);
|
||||
const guildAntiRaidActionCreatorsModule = require(11447) /* metro dependency 11447: GuildAntiRaidActionCreators */;
|
||||
const handleResolveRaid = guildAntiRaidActionCreatorsModule.handleResolveRaid;
|
||||
const automodFeedbackModule = require(5061) /* metro dependency 5061: AutomodFeedback */;
|
||||
const getMostImportantRaidResolutionType = automodFeedbackModule.getMostImportantRaidResolutionType;
|
||||
Reflect.apply(handleResolveRaid, guildAntiRaidActionCreatorsModule, [guildIdBinding, messageIdBinding,
|
||||
Reflect.apply(getMostImportantRaidResolutionType, automodFeedbackModule, [binding])]);
|
||||
onPress_87682();
|
||||
const defaultImport = importDefault(6264) /* metro dependency 6264: SafetyToastsActionCreatorsNative */;
|
||||
const showSuccessToast = defaultImport.showSuccessToast;
|
||||
const SAFETY_FEEDBACK_SUCCESS = SafetyToastType.SAFETY_FEEDBACK_SUCCESS;
|
||||
Reflect.apply(showSuccessToast, defaultImport, [SAFETY_FEEDBACK_SUCCESS]);
|
||||
}
|
||||
|
||||
function onPress_87684() { // fn#87684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:1884, offset: 0x01fc80e4, size: 25 bytes, params: 1, frame: 11
|
||||
onPress_87684OnCheckboxChange(value);
|
||||
}
|
||||
|
||||
function onPress_87684OnCheckboxChange(a0) { // fn#87685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:1888, owner: onPress_87684.onCheckboxChange, offset: 0x01fc80fd, size: 58 bytes, params: 2, frame: 13
|
||||
const env0_0 = a0;
|
||||
env2_4(env2_3.includes(a0) ? function(a0) {
|
||||
return a0.filter(_fun87687);
|
||||
} : _fun87688);
|
||||
}
|
||||
|
||||
function _fun87686(a0) { // fn#87686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:1941, offset: 0x01fc8137, size: 24 bytes, params: 2, frame: 11
|
||||
return a0.filter(_fun87687);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user