Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,179 @@
|
||||
/* Metro module 11921; source: modules/guild_communication_disabled/CommunicationDisabledManager.tsx; dependencies: [6, 7, 15, 17, 18, 1945, 1878, 3773, 694, 4860, 2] */
|
||||
function _fun91420(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12107:6, offset: 0x02063c65, size: 308 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = require(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const env0_8 = value.getGuildIdFromCommunicationDisabledUserKey;
|
||||
const env0_9 = value.getUserIdFromCommunicationDisabledUserKey;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun91425(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_communication_disabled/CommunicationDisabledManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_91421() { // fn#91421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12107:271, offset: 0x02063d99, 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_91421_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function clearGuildMemberTimeout(a0, a1) { // fn#91424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12107:499, offset: 0x02063dfb, size: 400 bytes, params: 3, frame: 18
|
||||
var r7;
|
||||
var r6;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
var object5;
|
||||
var avatar;
|
||||
var value5;
|
||||
var object6;
|
||||
var premiumSince;
|
||||
var value6;
|
||||
var isPending;
|
||||
var object7;
|
||||
var email;
|
||||
var value8;
|
||||
var dispatch;
|
||||
var object8;
|
||||
var value;
|
||||
const member = GuildMemberStore.getMember(a0, a1);
|
||||
const user = UserStore.getUser(a1);
|
||||
if (member != null) {
|
||||
if (user != null) {
|
||||
value4 = undefined;
|
||||
moduleValue = require(3773) /* metro dependency 3773: CommunicationDisabledUtils */;
|
||||
if (!moduleValue.isMemberCommunicationDisabled(member)) {
|
||||
object5 = {};
|
||||
copyDataProperties(object5, member, undefined);
|
||||
object5['guildId'] = a0;
|
||||
r7 = member.nick ?? user.username;
|
||||
object5['nick'] = r7;
|
||||
avatar = member.avatar;
|
||||
value5 = avatar != null;
|
||||
r7 = value5 ? avatar : value4;
|
||||
object5['avatar'] = r7;
|
||||
if (member.avatarDecoration != null) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, member.avatarDecoration, value5);
|
||||
r7 = object6;
|
||||
} else {
|
||||
r7 = value4;
|
||||
}
|
||||
object5['avatarDecoration'] = r7;
|
||||
premiumSince = member.premiumSince;
|
||||
value6 = premiumSince != null;
|
||||
r7 = value6 ? premiumSince : value4;
|
||||
object5['premiumSince'] = r7;
|
||||
isPending = member.isPending;
|
||||
r6 = isPending != null && isPending;
|
||||
object5['isPending'] = r6;
|
||||
object7 = {};
|
||||
copyDataProperties(object7, user, value6);
|
||||
email = user.email;
|
||||
value8 = email != null;
|
||||
r7 = value8 ? email : value4;
|
||||
object7['email'] = r7;
|
||||
r6 = user.phone ?? value4;
|
||||
object7['phone'] = r6;
|
||||
object5['user'] = object7;
|
||||
object5['communicationDisabledUntil'] = null;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatch = value.dispatch;
|
||||
object8 = {type: 'GUILD_MEMBER_UPDATE'};
|
||||
copyDataProperties(object8, object5, value8);
|
||||
Reflect.apply(dispatch, value, [object8]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun91425(a0) { // fn#91425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12107:1039, offset: 0x02063f8b, size: 97 bytes, params: 2, frame: 16
|
||||
const closure = CommunicationDisabledManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: '_initialize', value: function() {
|
||||
env1_12 = global.setInterval(_fun91428, 10000);
|
||||
}}, {key: '_terminate', value: value_91430}]);
|
||||
}
|
||||
|
||||
function CommunicationDisabledManager(a0) { // fn#91426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12107:1051, offset: 0x02063fec, size: 136 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, CommunicationDisabledManager);
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, items2);
|
||||
value = env1_6(CommunicationDisabledManager);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_91421()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items2, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items2);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.clearGuildMemberTimeout = clearGuildMemberTimeout;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_91427() { // fn#91427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12107:1471, offset: 0x02064074, size: 40 bytes, params: 1, frame: 13
|
||||
const value = global.setInterval(_fun91428, 10000);
|
||||
}
|
||||
|
||||
function value_91430() { // fn#91430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12107:1716, offset: 0x0206412f, size: 24 bytes, params: 1, frame: 11
|
||||
global.clearInterval(env1_12);
|
||||
}
|
||||
|
||||
function _fun91428() { // fn#91428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12107:1497, offset: 0x0206409c, size: 64 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = GuildMemberStore.getCommunicationDisabledUserMap();
|
||||
const Object = global.Object;
|
||||
value = Object.keys(value);
|
||||
value.forEach(_fun91429);
|
||||
}
|
||||
|
||||
function _fun91429(a0) { // fn#91429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12107:1576, offset: 0x020640dc, size: 83 bytes, params: 2, frame: 17
|
||||
const guildIdFromCommunicationDisabledUserKey = getGuildIdFromCommunicationDisabledUserKey(a0);
|
||||
const userIdFromCommunicationDisabledUserKey = getUserIdFromCommunicationDisabledUserKey(a0);
|
||||
const property = env0_0[a0];
|
||||
const communicationDisabledUtilsModule = require(3773) /* metro dependency 3773: CommunicationDisabledUtils */;
|
||||
if (!communicationDisabledUtilsModule.isCommunicationDisabled(property)) {
|
||||
clearGuildMemberTimeout(guildIdFromCommunicationDisabledUserKey, userIdFromCommunicationDisabledUserKey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/* Metro module 3773; source: modules/guild_communication_disabled/CommunicationDisabledUtils.tsx; dependencies: [2] */
|
||||
function _fun28571(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#28571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3900:6, offset: 0x00f7dc16, size: 100 bytes, params: 8, frame: 17
|
||||
const closure = function(a0) {
|
||||
var r0;
|
||||
var Date;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
var value = a0 != null;
|
||||
if (value) {
|
||||
Date = global.Date;
|
||||
value2 = new Date(a0);
|
||||
Date = global.Date;
|
||||
value3 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
value4 = new Date();
|
||||
value2 = value2 > (value4 instanceof Object ? value4 : value3);
|
||||
r0 = value2;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_communication_disabled/CommunicationDisabledUtils.tsx');
|
||||
exports.isCommunicationDisabled = closure;
|
||||
exports.isMemberCommunicationDisabled = isMemberCommunicationDisabled;
|
||||
}
|
||||
|
||||
function isMemberCommunicationDisabled(a0) { // fn#28573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3900:348, offset: 0x00f7dcc5, size: 36 bytes, params: 2, frame: 13
|
||||
return isCommunicationDisabled(a0?.communicationDisabledUntil);
|
||||
}
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/* Metro module 10299; source: modules/guild_communication_disabled/GuildDisableCommunicationActionCreators.native.tsx; dependencies: [31, 1878, 33, 5080, 10300, 1962, 4496, 10305, 2] */
|
||||
function _fun79927(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10485:6, offset: 0x01e66f7d, size: 167 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_communication_disabled/GuildDisableCommunicationActionCreators.native.tsx');
|
||||
exports.openDisableCommunication = openDisableCommunication;
|
||||
exports.openEnableCommunication = openEnableCommunication;
|
||||
}
|
||||
|
||||
function openDisableCommunication({guildId, userId, cancelButtonCallback}) { // fn#79928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10485:276, offset: 0x01e67024, size: 130 bytes, params: 2, frame: 18
|
||||
var defaultImport;
|
||||
var pushLazy;
|
||||
var value;
|
||||
const user = UserStore.getUser(userId);
|
||||
if (user != null) {
|
||||
defaultImport = importDefault(dependencyMap[3]);
|
||||
pushLazy = defaultImport.pushLazy;
|
||||
value = require(dependencyMap[5]);
|
||||
value = value(dependencyMap[4], dependencyMap.paths);
|
||||
Reflect.apply(pushLazy, defaultImport, [value, {guildId: guildId, user: user,
|
||||
cancelButtonCallback: cancelButtonCallback}]);
|
||||
}
|
||||
}
|
||||
|
||||
function openEnableCommunication({guildId, userId, cancelButtonCallback}) { // fn#79929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10485:492, offset: 0x01e670a6, size: 85 bytes, params: 2, frame: 13
|
||||
const alertActionCreators = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
|
||||
alertActionCreators.openLazy({importer: importer_79930});
|
||||
}
|
||||
|
||||
function openEnableCommunicationImporter() { // fn#79930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10485:597, owner: openEnableCommunication.importer, offset: 0x01e670fb, size: 64 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = require(dependencyMap[5]);
|
||||
value = value(dependencyMap[7], dependencyMap.paths);
|
||||
return value.then(function({default: env0_0}) {
|
||||
return _fun79932;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun79931({default: env0_0}) { // fn#79931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10485:629, offset: 0x01e6713b, size: 23 bytes, params: 2, frame: 2
|
||||
return _fun79932;
|
||||
}
|
||||
|
||||
function _fun79932(a0) { // fn#79932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10485:644, offset: 0x01e67152, size: 78 bytes, params: 2, frame: 15
|
||||
return ((Component) => <Component {...a0} {...{['guildId']: guildId}} {...{['userId']: userId}} {...{['onCancel']: cancelButtonCallback}} />)(env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/* Metro module 1947; source: modules/guild_communication_disabled/GuildDisableCommunicationConstants.tsx; dependencies: [661, 1244, 1948, 2] */
|
||||
function _fun21701(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2074:6, offset: 0x00ef783b, size: 343 bytes, params: 8, frame: 20
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = getFriendlyDurationString;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const HelpdeskArticles = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
|
||||
object2 = {DURATION_60_SEC: 60};
|
||||
object2[60] = 'DURATION_60_SEC';
|
||||
object2.DURATION_5_MIN = 300;
|
||||
object2[300] = 'DURATION_5_MIN';
|
||||
object2.DURATION_10_MIN = 600;
|
||||
object2[600] = 'DURATION_10_MIN';
|
||||
object2.DURATION_1_HOUR = 3600;
|
||||
object2[3600] = 'DURATION_1_HOUR';
|
||||
object2.DURATION_1_DAY = 86400;
|
||||
object2[86400] = 'DURATION_1_DAY';
|
||||
object2.DURATION_1_WEEK = 604800;
|
||||
object2[604800] = 'DURATION_1_WEEK';
|
||||
let value = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
const getArticleURL = value.getArticleURL;
|
||||
const DISABLE_GUILD_COMMUNICATION = HelpdeskArticles.DISABLE_GUILD_COMMUNICATION;
|
||||
value = Reflect.apply(getArticleURL, value, [DISABLE_GUILD_COMMUNICATION]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_communication_disabled/GuildDisableCommunicationConstants.tsx');
|
||||
exports.DisableCommunicationDuration = object2;
|
||||
exports.getFriendlyDurationString = closure;
|
||||
exports.getDisableCommunicationDurationOptions = getDisableCommunicationDurationOptions;
|
||||
exports.GUILD_COMMUNICATION_DISABLED_RESOURCE_LINK = value;
|
||||
exports.DISMISSED_COMMUNICATION_DISABLED_NOTIFICATION_GUILDS_KEY = 'GuildCommunicationDisabledDismissedGuilds';
|
||||
exports.SET_COMMUNICATION_DISABLED_MODAL_NAME = 'Set Communication Disabled Modal';
|
||||
exports.CLEAR_COMMUNICATION_DISABLED_MODAL_NAME = 'Clear Communication Disabled Modal';
|
||||
exports.MAX_REASON_LENGTH = 512;
|
||||
}
|
||||
|
||||
function getFriendlyDurationString(a0) { // fn#21702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2074:410, offset: 0x00ef7992, size: 521 bytes, params: 2, frame: 16
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const DURATION_60_SEC = env0_2.DURATION_60_SEC;
|
||||
if (DURATION_60_SEC === a0) {
|
||||
return intl.formatToPlainString(t['4zv/jq'], {secs: 60});
|
||||
}
|
||||
const DURATION_5_MIN = env0_2.DURATION_5_MIN;
|
||||
if (DURATION_5_MIN === a0) {
|
||||
return intl.formatToPlainString(t.opVZ9q, {mins: 5});
|
||||
}
|
||||
const DURATION_10_MIN = env0_2.DURATION_10_MIN;
|
||||
if (DURATION_10_MIN === a0) {
|
||||
return intl.formatToPlainString(t.opVZ9q, {mins: 10});
|
||||
}
|
||||
const DURATION_1_HOUR = env0_2.DURATION_1_HOUR;
|
||||
if (DURATION_1_HOUR === a0) {
|
||||
return intl.formatToPlainString(t.xCjYxK, {hours: 1});
|
||||
}
|
||||
const DURATION_1_DAY = env0_2.DURATION_1_DAY;
|
||||
if (DURATION_1_DAY === a0) {
|
||||
return intl.formatToPlainString(t['k2UNz+'], {days: 1});
|
||||
}
|
||||
const DURATION_1_WEEK = env0_2.DURATION_1_WEEK;
|
||||
if (DURATION_1_WEEK === a0) {
|
||||
return intl.formatToPlainString(t.EmoBD2, {weeks: 1});
|
||||
}
|
||||
}
|
||||
|
||||
function getDisableCommunicationDurationOptions() { // fn#21703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2074:1318, offset: 0x00ef7b9b, size: 59 bytes, params: 1, frame: 12
|
||||
const Object = global.Object;
|
||||
let value = Object.keys(env0_2);
|
||||
value = value.filter(function(a0) {
|
||||
return global.isNaN((0, global.Number)(a0));
|
||||
});
|
||||
return value.map(_fun21705);
|
||||
}
|
||||
|
||||
function _fun21705(a0) { // fn#21705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2074:1372, offset: 0x00ef7bf5, size: 65 bytes, params: 2, frame: 14
|
||||
return {id: a0, label: getFriendlyDurationString(env1_2[a0]) ?? '', value: env1_2[a0]};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
/* Metro module 10301; source: modules/guild_communication_disabled/native/GuildDisableCommunication.tsx; dependencies: [5, 57, 31, 27, 1947, 661, 33, 1244, 4501, 697, 5463, 10302, 4594, 683, 10304, 3857, 4617, 8096, 6766, 7988, 7987, 7681, 4578, 2] */
|
||||
function _fun79936(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10487:6, offset: 0x01e67343, size: 592 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(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value2.View;
|
||||
const env0_7 = value2.ScrollView;
|
||||
const guildDisableCommunicationConstantsModule = require(1947) /* metro dependency 1947: GuildDisableCommunicationConstants */;
|
||||
const DisableCommunicationDuration = guildDisableCommunicationConstantsModule.DisableCommunicationDuration;
|
||||
const env0_8 = guildDisableCommunicationConstantsModule.GUILD_COMMUNICATION_DISABLED_RESOURCE_LINK;
|
||||
const env0_9 = guildDisableCommunicationConstantsModule.SET_COMMUNICATION_DISABLED_MODAL_NAME;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value4.jsx;
|
||||
const env0_12 = value4.Fragment;
|
||||
const env0_13 = value4.jsxs;
|
||||
const DURATION_60_SEC = DisableCommunicationDuration.DURATION_60_SEC;
|
||||
const items2 = [{value: DURATION_60_SEC, getLabel: function() {
|
||||
return require(dependencyMap[7]).intl.formatToPlainString(require(dependencyMap[7]).t.iruf5E, {minutes: 1});
|
||||
}}];
|
||||
const DURATION_5_MIN = DisableCommunicationDuration.DURATION_5_MIN;
|
||||
items2[1] = {value: DURATION_5_MIN, getLabel: function() {
|
||||
return require(dependencyMap[7]).intl.formatToPlainString(require(dependencyMap[7]).t.iruf5E, {minutes: 5});
|
||||
}};
|
||||
const DURATION_10_MIN = DisableCommunicationDuration.DURATION_10_MIN;
|
||||
items2[2] = {value: DURATION_10_MIN, getLabel: function() {
|
||||
return require(dependencyMap[7]).intl.formatToPlainString(require(dependencyMap[7]).t.iruf5E, {minutes: 10});
|
||||
}};
|
||||
const DURATION_1_HOUR = DisableCommunicationDuration.DURATION_1_HOUR;
|
||||
items2[3] = {value: DURATION_1_HOUR, getLabel: function() {
|
||||
var intl = require(dependencyMap[7]).intl;
|
||||
var LnvrA3 = require(dependencyMap[7]).t.LnvrA3;
|
||||
return intl.formatToPlainString(LnvrA3, {hours: 1});
|
||||
}};
|
||||
const DURATION_1_DAY = DisableCommunicationDuration.DURATION_1_DAY;
|
||||
items2[4] = {value: DURATION_1_DAY, getLabel: function() {
|
||||
return require(dependencyMap[7]).intl.formatToPlainString(require(dependencyMap[7]).t.jzH70Z, {days: 1});
|
||||
}};
|
||||
const DURATION_1_WEEK = DisableCommunicationDuration.DURATION_1_WEEK;
|
||||
items2[5] = {value: DURATION_1_WEEK, getLabel: function() {
|
||||
return require(dependencyMap[7]).intl.formatToPlainString(require(dependencyMap[7]).t.iVZYyl, {weeks: 1});
|
||||
}};
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.container = {backgroundColor: BACKGROUND_BASE_LOW};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.reasonTextArea = {marginVertical: PX_16};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.buttonContainer = {marginBottom: PX_16};
|
||||
const env0_15 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(GuildDisableCommunication);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_communication_disabled/native/GuildDisableCommunication.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function GuildDisableCommunication({user, guildId, onClose}) { // fn#79943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10487:1177, offset: 0x01e6774b, size: 931 bytes, params: 2, frame: 32
|
||||
const styles = useStyles();
|
||||
const binding = env0_5;
|
||||
const [env0_3, env0_4] = env0_4Binding(binding.useState(0), 2);
|
||||
var env0_5 = binding.useRef('');
|
||||
const value4 = binding.useRef(null);
|
||||
const value5 = binding.useRef(null);
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
|
||||
(importDefault(10302) /* metro dependency 10302: useSafeAreaAvoidingInputsNative */)({insets: insets,
|
||||
inputs: [{ref: value5, offset: {type: 'toBottom'}}], scrollViewRef: value4});
|
||||
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
|
||||
var defaultImport = importDefault(dependencyMap[13]);
|
||||
var OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
|
||||
defaultImport.track(OPEN_MODAL, {type: SET_COMMUNICATION_DISABLED_MODAL_NAME, guild_id: guildId,
|
||||
other_user_id: user.id});
|
||||
});
|
||||
const value6 = _fun79945();
|
||||
const object = {};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.paddingHorizontal = PX_12;
|
||||
object.paddingBottom = insets.bottom;
|
||||
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
const object2 = {};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.marginVertical = PX_16;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const Ns83GT = (require(1244) /* metro dependency 1244: indexNative */).t.Ns83GT;
|
||||
const items2 = [<TextWithIOSLinkWorkaround style={object2} variant="heading-md/semibold">{Reflect.apply(format,
|
||||
intl, [Ns83GT, {helpdeskArticle: GUILD_COMMUNICATION_DISABLED_RESOURCE_LINK}])}</TextWithIOSLinkWorkaround>];
|
||||
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
|
||||
let string = intl.string;
|
||||
items2[1] = <TableRadioGroup title={Reflect.apply(string, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t['9XsExm']])} defaultValue={0} onChange={onChange_79949} hasIcons={false}>{env0_14.map(_fun79950)}</TableRadioGroup>;
|
||||
const TextArea = (require(7681) /* metro dependency 7681: TextAreaNative */).TextArea;
|
||||
const textAreaProps = {ref: value5, containerStyle: styles.reasonTextArea};
|
||||
string = intl.string;
|
||||
const GakiH1 = (require(1244) /* metro dependency 1244: indexNative */).t.GakiH1;
|
||||
textAreaProps.placeholder = Reflect.apply(string, intl, [GakiH1]);
|
||||
textAreaProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ewHW15);
|
||||
textAreaProps.maxLength = 512;
|
||||
textAreaProps.onChange = onChange_79951;
|
||||
items2[2] = <TextArea {...textAreaProps} />;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
string = intl.string;
|
||||
const MlPTIi = (require(1244) /* metro dependency 1244: indexNative */).t.MlPTIi;
|
||||
items2[3] = <View style={styles.buttonContainer}><Button variant="primary" text={Reflect.apply(string, intl,
|
||||
[MlPTIi])} onPress={value6} /></View>;
|
||||
return (
|
||||
<ScrollView
|
||||
style={styles.container}
|
||||
ref={value4}
|
||||
contentContainerStyle={object}
|
||||
>
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun79945() { // fn#79945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10487:1561, offset: 0x01e67b41, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_3(_fun79947);
|
||||
return _fun79948;
|
||||
}
|
||||
|
||||
function _fun79950(a0, a1) { // fn#79950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10487:2386, offset: 0x01e67caf, size: 70 bytes, params: 3, frame: 17
|
||||
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
|
||||
return (
|
||||
<TableRadioRow
|
||||
value={a1}
|
||||
label={a0.getLabel()}
|
||||
key={a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function* _fun79947() { // fn#79947, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10487:1581, offset: 0x01e67b70, size: 300 bytes, params: 1, frame: 28
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
var binding = env3_1;
|
||||
var value3 = binding(env3_2[14]);
|
||||
yield value3.setCommunicationDisabledDuration(importDefault, require.id, env3_14[env2_3].value, env2_5.current);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env3_1;
|
||||
var binding2 = env3_2;
|
||||
var value8 = binding(binding2[15]);
|
||||
var open = value8.open;
|
||||
var object2 = {key: 'GUILD_COMMUNICATION_DISABLED_SUCCESS'};
|
||||
var binding3 = env3_0;
|
||||
var intl = binding3(binding2[7]).intl;
|
||||
var formatToPlainString = intl.formatToPlainString;
|
||||
var O9C3Nt = binding3(binding2[7]).t.O9C3Nt;
|
||||
object2.content = Reflect.apply(formatToPlainString, intl, [O9C3Nt,
|
||||
{user: binding(binding2[16]).getName(importDefault, null, require) ?? ''}]);
|
||||
object2.icon = env3_1(env3_2[17]);
|
||||
Reflect.apply(open, value8, [object2]);
|
||||
dependencyMap();
|
||||
}
|
||||
}
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/* Metro module 10300; source: modules/guild_communication_disabled/native/GuildDisableCommunicationModal.tsx; dependencies: [31, 33, 9882, 9883, 1244, 4617, 10301, 2] */
|
||||
function _fun79933(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10486:6, offset: 0x01e671a0, size: 138 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_communication_disabled/native/GuildDisableCommunicationModal.tsx');
|
||||
exports.default = GuildDisableCommunicationModal;
|
||||
}
|
||||
|
||||
function GuildDisableCommunicationModal({guildId, user, cancelButtonCallback}) { // fn#79934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10486:240, offset: 0x01e6722a, size: 214 bytes, params: 2, frame: 24
|
||||
const env0_2 = (importDefault(9882) /* metro dependency 9882: useNavigatorBackHandlerNative */)({onBeforeGoBack: cancelButtonCallback}).onGoBack;
|
||||
const ModalStackNavigator = importDefault(9883) /* metro dependency 9883: ModalStackNavigator */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const FN7NIS = (require(1244) /* metro dependency 1244: indexNative */).t.FN7NIS;
|
||||
const object = {};
|
||||
object.user = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(guildId, null, user);
|
||||
return (
|
||||
<ModalStackNavigator
|
||||
screenKey="disableCommunication"
|
||||
title={Reflect.apply(formatToPlainString, intl, [FN7NIS, object])}
|
||||
render={render_79935}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildDisableCommunicationModalRender() { // fn#79935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10486:514, owner: GuildDisableCommunicationModal.render, offset: 0x01e67300, size: 67 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component user={user} guildId={guildId} onClose={onGoBack} />)(importDefault(10301) /* metro dependency 10301: GuildDisableCommunication */);
|
||||
}
|
||||
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
/* Metro module 10305; source: modules/guild_communication_disabled/native/GuildEnableCommunicationAlert.tsx; dependencies: [5, 57, 31, 27, 1878, 1947, 661, 33, 4501, 8229, 4594, 683, 10304, 3857, 1244, 8096, 4596, 4573, 4617, 9898, 6766, 2] */
|
||||
function _fun79982(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10491:6, offset: 0x01e68718, size: 373 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(1947) /* metro dependency 1947: GuildDisableCommunicationConstants */;
|
||||
const env0_7 = value.CLEAR_COMMUNICATION_DISABLED_MODAL_NAME;
|
||||
const env0_8 = value.GUILD_COMMUNICATION_DISABLED_RESOURCE_LINK;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_9 = value.AnalyticEvents;
|
||||
const Fonts = value.Fonts;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
|
||||
const env0_12 = Reflect.apply(createStyles, value, [{wrapper: {padding: 16}, body: {paddingTop: 16},
|
||||
description: {lineHeight: 18}, cta: {paddingTop: 8}, countdown: {fontFamily: PRIMARY_SEMIBOLD}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_communication_disabled/native/GuildEnableCommunicationAlert.tsx');
|
||||
exports.default = GuildEnableCommunicationAlert;
|
||||
}
|
||||
|
||||
function GuildEnableCommunicationAlert(a0) { // fn#79983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10491:597, offset: 0x01e6888d, size: 793 bytes, params: 2, frame: 35
|
||||
const guildId = a0.guildId;
|
||||
const userId = a0.userId;
|
||||
const onCancel = a0.onCancel;
|
||||
const object2 = {'guildId': 0, 'userId': 0, 'onCancel': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
let value = copyDataProperties({}, a0, object2, undefined);
|
||||
const value3 = undefined;
|
||||
const styles = useStyles();
|
||||
const env0_3 = env0_4((importDefault(8229) /* metro dependency 8229: useUserCommunicationDisabled */)(userId,
|
||||
guildId), 1)[0];
|
||||
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
|
||||
var defaultImport = importDefault(dependencyMap[11]);
|
||||
var OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
|
||||
defaultImport.track(OPEN_MODAL, {type: CLEAR_COMMUNICATION_DISABLED_MODAL_NAME, guild_id: guildId,
|
||||
other_user_id: userId});
|
||||
});
|
||||
const value5 = _fun79985();
|
||||
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
|
||||
const defaultImport2Props = {...value};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
defaultImport2Props['title'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+ZD3ou']);
|
||||
defaultImport2Props['style'] = styles.wrapper;
|
||||
defaultImport2Props['cancelText'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
|
||||
defaultImport2Props['onClose'] = value == null ? value3 : value.onClose;
|
||||
defaultImport2Props['onCancel'] = onCancel;
|
||||
defaultImport2Props['confirmText'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qXtNtS);
|
||||
defaultImport2Props['onConfirm'] = value5;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
let format = intl.format;
|
||||
const property = (require(1244) /* metro dependency 1244: indexNative */).t['t+abNU'];
|
||||
value = UserStore.getUser(userId);
|
||||
value = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(guildId, null, value);
|
||||
value = <Text style={styles.description} variant="text-sm/medium">{Reflect.apply(format, intl, [property,
|
||||
{username: value ?? '', countdown: countdown}])}</Text>;
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
const items2 = [styles.cta];
|
||||
items2[1] = styles.description;
|
||||
format = intl.format;
|
||||
const KtENkK = (require(1244) /* metro dependency 1244: indexNative */).t.KtENkK;
|
||||
value = <View style={styles.body}>{value}<TextWithIOSLinkWorkaround style={items2} variant="text-sm/medium">{Reflect.apply(format,
|
||||
intl, [KtENkK, {link: GUILD_COMMUNICATION_DISABLED_RESOURCE_LINK}])}</TextWithIOSLinkWorkaround></View>;
|
||||
return (
|
||||
<Alert {...defaultImport2Props}>
|
||||
{value}
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun79985() { // fn#79985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10491:804, offset: 0x01e68bf4, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_3(_fun79987);
|
||||
return _fun79988;
|
||||
}
|
||||
|
||||
function countdown() { // fn#79989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10491:1548, owner: GuildEnableCommunicationAlert.countdown, offset: 0x01e68ce4, size: 115 bytes, params: 1, frame: 15
|
||||
var r4;
|
||||
var Date;
|
||||
var binding;
|
||||
var date;
|
||||
if (env0_3 != null) {
|
||||
Date = global.Date;
|
||||
binding = env0_3;
|
||||
date = new Date();
|
||||
} else {
|
||||
r4 = 0;
|
||||
}
|
||||
return ((Component) => <Component style={styles.countdown} deadline={r4} withUnits />)(importDefault(9898) /* metro dependency 9898: CountDown */);
|
||||
}
|
||||
|
||||
function* _fun79987() { // fn#79987, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10491:824, offset: 0x01e68c23, size: 193 bytes, params: 1, frame: 21
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
var binding = env3_1;
|
||||
var value3 = binding(env3_2[12]);
|
||||
yield value3.setCommunicationDisabledDuration(require, importDefault);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env3_1;
|
||||
var binding2 = env3_2;
|
||||
var value7 = binding(binding2[13]);
|
||||
var open = value7.open;
|
||||
var object2 = {key: 'GUILD_ENABLE_COMMUNICATION_SUCCESS'};
|
||||
var binding3 = env3_0;
|
||||
var intl = binding3(binding2[14]).intl;
|
||||
object2.content = intl.string(binding3(binding2[14]).t['/Mmbfv']);
|
||||
object2.icon = binding(binding2[15]);
|
||||
Reflect.apply(open, value7, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
/* Metro module 8037; source: modules/guild_communication_disabled/useCanToggleCommunicationDisableOnUser.tsx; dependencies: [1422, 1867, 3784, 1878, 661, 3789, 566, 2] */
|
||||
function _fun63726(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8215:6, offset: 0x01b8e2e3, size: 210 bytes, params: 8, frame: 20
|
||||
let env0_0 = require;
|
||||
const closure = canToggleCommunicationDisableOnUser;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(1422) /* metro dependency 1422: GuildRecord */).isGuildOwner;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_communication_disabled/useCanToggleCommunicationDisableOnUser.tsx');
|
||||
exports.default = function(a0, a1) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
return require(dependencyMap[6]).useStateFromStores([UserStore, GuildStore, PermissionStore], _fun63729, [a0,
|
||||
a1]);
|
||||
};
|
||||
exports.canToggleCommunicationDisableOnUser = closure;
|
||||
}
|
||||
|
||||
function canToggleCommunicationDisableOnUser(a0, a1) { // fn#63727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8215:171, offset: 0x01b8e3b5, size: 306 bytes, params: 3, frame: 21
|
||||
var r1;
|
||||
var r0;
|
||||
var r3;
|
||||
var r7;
|
||||
var item3;
|
||||
var item4;
|
||||
var isNonUserBot2;
|
||||
let value = a2;
|
||||
const value2 = undefined;
|
||||
const iterator = (value !== value2 ? value : [UserStore, GuildStore, PermissionStore])[Symbol.iterator]();
|
||||
const iterator2 = iterator.next;
|
||||
let item2 = Reflect.apply(iterator2, iterator, []);
|
||||
let item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
let r2 = item2 === value2 ? value2 : item;
|
||||
if (value) {
|
||||
r0 = item2;
|
||||
r1 = value;
|
||||
r3 = value2;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value = item3 === value2;
|
||||
if (value) {
|
||||
r0 = item3;
|
||||
r1 = value;
|
||||
r3 = value2;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r1 = value;
|
||||
r3 = item;
|
||||
}
|
||||
}
|
||||
if (r1) {
|
||||
r7 = value2;
|
||||
} else {
|
||||
item4 = Reflect.apply(iterator2, r0, []);
|
||||
item = item4.value;
|
||||
item4 = item4.done ? undefined : r0;
|
||||
value = item4 === value2;
|
||||
if (value) {
|
||||
r0 = item4;
|
||||
r1 = value;
|
||||
r7 = value2;
|
||||
} else {
|
||||
r0 = item4;
|
||||
r1 = value;
|
||||
r7 = item;
|
||||
}
|
||||
}
|
||||
if (!r1) {
|
||||
r0.return();
|
||||
}
|
||||
value = r3.getGuild(a0);
|
||||
const user = r2.getUser(a1);
|
||||
r0 = value != null && user != null;
|
||||
if (r0) {
|
||||
isNonUserBot2 = user.isNonUserBot();
|
||||
if (isNonUserBot2) {
|
||||
r1 = !isNonUserBot2;
|
||||
} else {
|
||||
r2 = isGuildOwner(value,
|
||||
user) || (importAll(3789) /* metro dependency 3789: PermissionUtils */).can({permission: Permissions.ADMINISTRATOR,
|
||||
|
||||
|
||||
user: user, context: value});
|
||||
r2 = !r2 && r7.canManageUser(Permissions.MODERATE_MEMBERS, user, value);
|
||||
r1 = r2;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useCanToggleCommunicationDisableOnUser(a0, a1) { // fn#63728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8215:554, offset: 0x01b8e4e7, size: 100 bytes, params: 3, frame: 18
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore, GuildStore, PermissionStore],
|
||||
_fun63729, [a0, a1]);
|
||||
}
|
||||
|
||||
function _fun63729() { // fn#63729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8215:650, offset: 0x01b8e54b, size: 57 bytes, params: 1, frame: 16
|
||||
return canToggleCommunicationDisableOnUser(env0_0, require, [UserStore, GuildStore, PermissionStore]);
|
||||
}
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
/* Metro module 11920; source: modules/guild_communication_disabled/useCommunicationDisabledCountdownCleanup.tsx; dependencies: [31, 7054, 11921, 2] */
|
||||
function _fun91415(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12106:6, offset: 0x02063a3f, size: 128 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = require(31) /* metro dependency 31 */;
|
||||
const env0_2 = value.useEffect;
|
||||
const env0_3 = value.useRef;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_communication_disabled/useCommunicationDisabledCountdownCleanup.tsx');
|
||||
exports.useCommunicationDisabledCountdownCleanup = useCommunicationDisabledCountdownCleanup;
|
||||
}
|
||||
|
||||
function useCommunicationDisabledCountdownCleanup(a0) { // fn#91416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12106:289, offset: 0x02063abf, size: 182 bytes, params: 2, frame: 21
|
||||
const value = a0;
|
||||
const {communicationDisabledUntil, userId, guildId} = value ?? ({});
|
||||
const value5 = (importDefault(7054) /* metro dependency 7054: useCountdown */)(communicationDisabledUntil != null ? global.Date.parse(communicationDisabledUntil) : global.Date.now());
|
||||
const seconds = value5.seconds;
|
||||
const env0_4 = useRef(null);
|
||||
useEffect(_fun91417, [guildId, userId, seconds, communicationDisabledUntil, value]);
|
||||
return value5;
|
||||
}
|
||||
|
||||
function _fun91417() { // fn#91417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12106:491, offset: 0x02063b75, size: 134 bytes, params: 1, frame: 15
|
||||
if (env0_0 == null) {
|
||||
global.clearTimeout(env0_4.current);
|
||||
} else {
|
||||
if (guildId == null) {
|
||||
global.clearTimeout(env0_4.current);
|
||||
return undefined;
|
||||
}
|
||||
if (userId != null) {
|
||||
if (seconds <= 0 && env0_4.current == null) {
|
||||
env0_4.current = global.setTimeout(_fun91418, 1000);
|
||||
}
|
||||
return _fun91419;
|
||||
}
|
||||
global.clearTimeout(env0_4.current);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun91418() { // fn#91418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12106:578, offset: 0x02063bfb, size: 50 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(11921) /* metro dependency 11921: CommunicationDisabledManager */;
|
||||
value.clearGuildMemberTimeout(guildId, userId);
|
||||
}
|
||||
|
||||
function _fun91419() { // fn#91419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12106:628, offset: 0x02063c2d, size: 56 bytes, params: 1, frame: 13
|
||||
if (env1_4.current != null) {
|
||||
global.clearTimeout(env1_4.current);
|
||||
env1_4.current = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/* Metro module 1946; source: modules/guild_communication_disabled/useCommunicationDisabledNoticeStore.tsx; dependencies: [57, 1947, 587, 630, 690, 685, 3769, 2] */
|
||||
function _fun21690(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2073:6, offset: 0x00ef74ac, size: 214 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const DISMISSED_COMMUNICATION_DISABLED_NOTIFICATION_GUILDS_KEY = (require(1947) /* metro dependency 1947: GuildDisableCommunicationConstants */).DISMISSED_COMMUNICATION_DISABLED_NOTIFICATION_GUILDS_KEY;
|
||||
const env0_4 = (require(630) /* metro dependency 630 */).createStore(_fun21691);
|
||||
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
||||
Storage.asyncGet(DISMISSED_COMMUNICATION_DISABLED_NOTIFICATION_GUILDS_KEY, _fun21696);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_communication_disabled/useCommunicationDisabledNoticeStore.tsx');
|
||||
exports.useCommunicationDisabledNoticeStore = useCommunicationDisabledNoticeStore;
|
||||
exports.clearCommunicationDisabledNotice = clearCommunicationDisabledNotice;
|
||||
}
|
||||
|
||||
function _fun21691(a0, a1) { // fn#21691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2073:200, offset: 0x00ef7582, size: 131 bytes, params: 3, frame: 14
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
||||
const r4 = Storage.get(DISMISSED_COMMUNICATION_DISABLED_NOTIFICATION_GUILDS_KEY) ?? [];
|
||||
const Set = global.Set;
|
||||
return {notificationDismissedInGuilds: new Set(r4), dismissNotification: dismissNotification,
|
||||
resetNotification: resetNotification};
|
||||
}
|
||||
|
||||
function _fun21696(a0) { // fn#21696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2073:679, offset: 0x00ef7710, size: 52 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun21697);
|
||||
}
|
||||
|
||||
function useCommunicationDisabledNoticeStore(a0) { // fn#21698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2073:917, offset: 0x00ef7782, size: 123 bytes, params: 2, frame: 18
|
||||
const moduleValue = require(685) /* metro dependency 685 */;
|
||||
const useStoreWithEqualityFn = moduleValue.useStoreWithEqualityFn;
|
||||
const value = env0_2(Reflect.apply(useStoreWithEqualityFn, moduleValue, [env0_4, function(a0) {
|
||||
return [a0.notificationDismissedInGuilds, a0.dismissNotification];
|
||||
}, (require(3769) /* metro dependency 3769 */).shallow]), 2);
|
||||
const property = value[0];
|
||||
return [!property.has(a0), value[1]];
|
||||
}
|
||||
|
||||
function clearCommunicationDisabledNotice(a0) { // fn#21700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2073:1161, offset: 0x00ef781a, size: 33 bytes, params: 2, frame: 11
|
||||
return env0_4.getState().resetNotification(a0);
|
||||
}
|
||||
|
||||
function dismissNotification(a0) { // fn#21692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2073:318, offset: 0x00ef7605, size: 112 bytes, params: 2, frame: 17
|
||||
var environment;
|
||||
const notificationDismissedInGuilds = require().notificationDismissedInGuilds;
|
||||
notificationDismissedInGuilds.add(a0);
|
||||
const value = environment.__proto__;
|
||||
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
||||
Storage.set(DISMISSED_COMMUNICATION_DISABLED_NOTIFICATION_GUILDS_KEY, notificationDismissedInGuilds);
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun21693);
|
||||
}
|
||||
|
||||
function resetNotification(a0) { // fn#21694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2073:480, offset: 0x00ef7693, size: 125 bytes, params: 2, frame: 17
|
||||
var environment;
|
||||
var value;
|
||||
const notificationDismissedInGuilds = require().notificationDismissedInGuilds;
|
||||
if (notificationDismissedInGuilds.has(a0)) {
|
||||
notificationDismissedInGuilds.delete(a0);
|
||||
value = environment.__proto__;
|
||||
(require(587) /* metro dependency 587: Storage */).Storage.set(DISMISSED_COMMUNICATION_DISABLED_NOTIFICATION_GUILDS_KEY,
|
||||
|
||||
notificationDismissedInGuilds);
|
||||
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
|
||||
value.batchUpdates(_fun21695);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun21697() { // fn#21697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2073:705, offset: 0x00ef7744, size: 62 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_4;
|
||||
const setState = binding.setState;
|
||||
const Set = global.Set;
|
||||
return Reflect.apply(setState, binding, [{notificationDismissedInGuilds: new Set(env0_0)}]);
|
||||
}
|
||||
|
||||
function _fun21693() { // fn#21693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2073:418, offset: 0x00ef7675, size: 30 bytes, params: 1, frame: 11
|
||||
return env1_0({notificationDismissedInGuilds: notificationDismissedInGuilds});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/* Metro module 8229; source: modules/guild_communication_disabled/useUserCommunicationDisabled.tsx; dependencies: [1945, 1878, 566, 3773, 2] */
|
||||
function _fun65838(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8414:6, offset: 0x01be15f9, size: 182 bytes, params: 8, frame: 20
|
||||
let env0_0 = require;
|
||||
const getUserGuildMember = function(a0, a1, a2) {
|
||||
var value = null;
|
||||
return value != a1 && value != a0 ? a2.getMember(a1, a0) : value;
|
||||
};
|
||||
const closure = function(a0, a1) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
return isCommunicationDisabled_65840(require(dependencyMap[2]).useStateFromStores([GuildMemberStore], _fun65842,
|
||||
[a1, a0]));
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_communication_disabled/useUserCommunicationDisabled.tsx');
|
||||
exports.default = closure;
|
||||
exports.useCurrentUserCommunicationDisabled = function(a0) {
|
||||
var value2 = undefined;
|
||||
var value3 = require(dependencyMap[2]).useStateFromStores([UserStore], _fun65844);
|
||||
return useUserCommunicationDisabled(value3 == null ? value2 : value3.id, a0);
|
||||
};
|
||||
exports.userCommunicationDisabled = function(a0, a1) {
|
||||
return isCommunicationDisabled_65840(getUserGuildMember(a0, a1, GuildMemberStore));
|
||||
};
|
||||
}
|
||||
|
||||
function isCommunicationDisabled_65840(a0) { // fn#65840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8414:197, offset: 0x01be16da, size: 82 bytes, params: 2, frame: 14
|
||||
let value = null;
|
||||
const communicationDisabledUntil = value == a0 ? undefined : a0.communicationDisabledUntil;
|
||||
const items2 = [value != communicationDisabledUntil ? communicationDisabledUntil : value];
|
||||
value = require(3773) /* metro dependency 3773: CommunicationDisabledUtils */;
|
||||
items2[1] = value.isMemberCommunicationDisabled(a0);
|
||||
return items2;
|
||||
}
|
||||
|
||||
function useUserCommunicationDisabled(a0, a1) { // fn#65841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8414:349, offset: 0x01be172c, size: 95 bytes, params: 3, frame: 19
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const isCommunicationDisabled_65840Binding = isCommunicationDisabled_65840;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
return isCommunicationDisabled_65840Binding(Reflect.apply(useStateFromStores, fluxModule, [[GuildMemberStore],
|
||||
_fun65842, [a1, a0]]));
|
||||
}
|
||||
|
||||
function useCurrentUserCommunicationDisabled(a0) { // fn#65843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8414:674, offset: 0x01be17ac, size: 88 bytes, params: 2, frame: 15
|
||||
const value2 = undefined;
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
return useUserCommunicationDisabled(currentUser == null ? value2 : currentUser.id, a0);
|
||||
}
|
||||
|
||||
function _fun65842() { // fn#65842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8414:455, offset: 0x01be178b, size: 33 bytes, params: 1, frame: 15
|
||||
return getUserGuildMember(env0_0, require, GuildMemberStore);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user