This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,370 +1,380 @@
/* Metro module 6738; source: modules/guild_settings/GuildRoleMemberActionCreators.tsx; dependencies: [5, 6737, 661, 694, 507, 1393, 6593, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module01393 from '../../by-id/module-01393.js'; /* Metro dependency 1393 */
import GuildRoleMemberCountStore from './GuildRoleMemberCountStore.tsx'; /* Metro dependency 6737 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as HTTPUtilsModule from '../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun53188(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:6, offset: 0x01340b05, 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(5) /* metro dependency 5 */;
const guildRoleMemberCountStore = importDefault(6737) /* metro dependency 6737: GuildRoleMemberCountStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).Endpoints;
let value = importDefault(1393) /* metro dependency 1393 */;
let value = Module01393;
value = new value({maxAge: 10000});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/GuildRoleMemberActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildRoleMemberActionCreators.tsx');
exports.fetchMemberCounts = function() {
return _fetchMemberCounts.apply(this, arguments);
};
exports.requestMembersForRole = requestMembersForRole;
}
function _fetchMemberCountsFromBackend() { // fn#53189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:138, offset: 0x01340bf0, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun53191).apply(this, arguments);
function* _fun53191(a0) { // fn#53191, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:219, offset: 0x01340c29, size: 257 bytes, params: 2, frame: 19
var binding;
var binding2;
var property;
var value3;
var dispatch;
var object;
var value4;
var HTTP;
var get;
var GUILD_ROLE_MEMBER_COUNTS;
var value5;
var value6;
var value7;
var value8;
var body;
var binding3;
var value9;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
property = binding2[3];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
dispatch = value3.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object.type = 'GUILD_ROLE_MEMBER_COUNT_FETCH_START';
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object.guildId = a0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
Reflect.apply(dispatch, value3, [object]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
property = binding2[4];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
HTTP = value4.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
get = HTTP.get;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
binding = env2_5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
GUILD_ROLE_MEMBER_COUNTS = binding.GUILD_ROLE_MEMBER_COUNTS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
value5 = Reflect.apply(GUILD_ROLE_MEMBER_COUNTS, binding, [a0]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object.url = value5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object.rejectWithError = true;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
value6 = Reflect.apply(get, HTTP, [object]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
if (value8) {
return value7;
}
try {
body = value7.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
property = binding3[3];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
value9 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
dispatch = value9.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object.type = 'GUILD_ROLE_MEMBER_COUNT_FETCH_SUCCESS';
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object.guildId = a0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object.roleMemberCount = body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
Reflect.apply(dispatch, value9, [object]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
}
}
}
function _fetchMemberCountsFromBackend() { // fn#53189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:138, offset: 0x01340bf0, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun53191).apply(this, arguments);
}
}
function _fetchMemberCounts() { // fn#53192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:605, offset: 0x01340d2a, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun53194).apply(this, arguments);
}
function _fetchMemberCounts() { // fn#53192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:605, offset: 0x01340d2a, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun53194).apply(this, arguments);
function* _fun53194(a0) { // fn#53194, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:664, offset: 0x01340d63, size: 66 bytes, params: 2, frame: 12
var environment;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_4;
if (binding.shouldFetch(a0)) {
yield fetchMemberCountsFromBackend(a0);
if (false) {
return undefined;
}
}
}
function fetchMemberCountsFromBackend() { // fn#53195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:702, offset: 0x00ef878f, size: 30 bytes, params: 1, frame: 13
return env3_7.apply(this, arguments);
}
function requestMembersForRole(a0, a1) { // fn#53197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:1097, offset: 0x01340da5, size: 124 bytes, params: 3, frame: 19
let value = a2;
let r0 = !(value !== undefined) || value;
value = '' + a0 + '-' + a1;
if (r0) {
if (env0_6.get(value) != null) {
r0 = global.Promise.resolve(null);
}
}
function requestMembersForRole(a0, a1) { // fn#53197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:1097, offset: 0x01340da5, size: 124 bytes, params: 3, frame: 19
let value = a2;
let r0 = !(value !== undefined) || value;
value = '' + a0 + '-' + a1;
if (r0) {
if (env0_6.get(value) != null) {
r0 = global.Promise.resolve(null);
} else {
env0_6.set(value, true);
value = doRequestMembersForRole(a0, a1);
r0 = value;
}
} else {
env0_6.set(value, true);
value = doRequestMembersForRole(a0, a1);
r0 = value;
}
} else {
env0_6.set(value, true);
value = doRequestMembersForRole(a0, a1);
r0 = value;
}
return r0;
}
function* _fun53191(a0) { // fn#53191, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:219, offset: 0x01340c29, size: 257 bytes, params: 2, frame: 19
var binding;
var binding2;
var property;
var value3;
var dispatch;
var object2;
var value4;
var HTTP;
var get;
var GUILD_ROLE_MEMBER_COUNTS;
var value5;
var value6;
var value7;
var value8;
var body;
var binding3;
var value9;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
property = binding2[3];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
dispatch = value3.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object2.type = 'GUILD_ROLE_MEMBER_COUNT_FETCH_START';
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object2.guildId = a0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
Reflect.apply(dispatch, value3, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
property = binding2[4];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
HTTP = value4.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
get = HTTP.get;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
binding = env2_5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
GUILD_ROLE_MEMBER_COUNTS = binding.GUILD_ROLE_MEMBER_COUNTS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
value5 = Reflect.apply(GUILD_ROLE_MEMBER_COUNTS, binding, [a0]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object2.url = value5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object2.rejectWithError = true;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
value6 = Reflect.apply(get, HTTP, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
if (value8) {
return value7;
}
try {
body = value7.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
property = binding3[3];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
value9 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
dispatch = value9.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object2.type = 'GUILD_ROLE_MEMBER_COUNT_FETCH_SUCCESS';
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object2.guildId = a0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
object2.roleMemberCount = body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
return undefined;
}
try {
Reflect.apply(dispatch, value9, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE', guildId: a0});
}
}
}
function* _fun53194(a0) { // fn#53194, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:664, offset: 0x01340d63, size: 66 bytes, params: 2, frame: 12
var environment;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_4;
if (binding.shouldFetch(a0)) {
yield fetchMemberCountsFromBackend(a0);
if (false) {
return undefined;
return r0;
function doRequestMembersForRole(a0, a1) { // fn#53198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:1216, owner: requestMembersForRole.doRequestMembersForRole, offset: 0x01340e21, size: 97 bytes, params: 3, frame: 17
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const HTTP = (HTTPUtilsModule).HTTP;
const get = HTTP.get;
const object = {};
object.url = Endpoints.GUILD_ROLE_MEMBER_IDS(a0, a1);
object.rejectWithError = false;
return Reflect.apply(get, HTTP, [object]).then(_fun53199);
function _fun53199(a0) { // fn#53199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:1339, offset: 0x01340e82, size: 67 bytes, params: 2, frame: 16
let value = environment.__proto__.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.requestMembersById(env0_0, a0.body, false);
return a0.body.length;
}
}
}
}
function doRequestMembersForRole(a0, a1) { // fn#53198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:1216, owner: requestMembersForRole.doRequestMembersForRole, offset: 0x01340e21, size: 97 bytes, params: 3, frame: 17
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object2 = {};
object2.url = Endpoints.GUILD_ROLE_MEMBER_IDS(a0, a1);
object2.rejectWithError = false;
return Reflect.apply(get, HTTP, [object2]).then(_fun53199);
}
function _fun53199(a0) { // fn#53199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6916:1339, offset: 0x01340e82, size: 67 bytes, params: 2, frame: 16
let value = environment.__proto__.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.requestMembersById(env0_0, a0.body, false);
return a0.body.length;
}
global.__d(_fun53188, 6738, [5, 6737, 661, 694, 507, 1393, 6593,
2]) /* metro module 6738, dependencies: [5, 6737, 661, 694, 507, 1393, 6593, 2] */;
@@ -1,15 +1,18 @@
/* Metro module 6737; source: modules/guild_settings/GuildRoleMemberCountStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun53173(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:6, offset: 0x013406f5, size: 337 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = {};
const env0_6 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun53177(Store);
value.displayName = 'GuildRoleMemberCountStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -18,144 +21,160 @@ function _fun53173(global, require, importDefault, importAll, module, exports, d
GUILD_ROLE_MEMBER_BULK_ADD: GUILD_ROLE_MEMBER_BULK_ADD, GUILD_ROLE_MEMBER_ADD: GUILD_ROLE_MEMBER_ADD_53184,
GUILD_ROLE_MEMBER_REMOVE: GUILD_ROLE_MEMBER_REMOVE_53185, GUILD_ROLE_CREATE: GUILD_ROLE_CREATE_53186,
GUILD_DELETE: GUILD_DELETE_53187});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/GuildRoleMemberCountStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildRoleMemberCountStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_53174() { // fn#53174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:148, offset: 0x01340846, size: 94 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_53174_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun53177(a0) { // fn#53177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:361, offset: 0x013408a4, size: 91 bytes, params: 2, frame: 16
const closure = GuildRoleMemberCountStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getRoleMemberCount', value: value_53179}, {key: 'shouldFetch', value: value_53180}]);
}
function GUILD_ROLE_MEMBER_COUNT_FETCH_SUCCESS({guildId, roleMemberCount}) { // fn#53181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:986, offset: 0x0134093f, size: 54 bytes, params: 2, frame: 11
env0_5[guildId] = roleMemberCount;
const binding = env0_6;
const Date = global.Date;
binding[guildId] = Date.now();
}
function GUILD_ROLE_MEMBER_COUNT_UPDATE({guildId, roleId, count}) { // fn#53182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1120, offset: 0x01340975, size: 48 bytes, params: 2, frame: 4
const property = env0_5[guildId];
if (property == null) {
return false;
}
property[roleId] = count;
}
function GUILD_ROLE_MEMBER_BULK_ADD({guildId, roleId, added}) { // fn#53183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1258, offset: 0x013409a5, size: 92 bytes, params: 2, frame: 13
const property = env0_5[guildId];
if (property == null) {
return false;
}
if (property[roleId] == null) {
return false;
}
const Object = global.Object;
property[roleId] += Object.keys(added).length;
}
function GUILD_ROLE_MEMBER_ADD_53184({guildId, roleId}) { // fn#53184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1439, offset: 0x01340a01, size: 67 bytes, params: 2, frame: 6
var r1;
var r0;
const property = env0_5[guildId];
let value = property != null;
if (value) {
value = property[roleId] != null;
if (value) {
property[roleId] += 1;
r1 = undefined;
} else {
r1 = value;
function _isNativeReflectConstruct_53174() { // fn#53174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:148, offset: 0x01340846, size: 94 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) {
}
r0 = r1;
} else {
r0 = value;
return (_isNativeReflectConstruct_53174_isNativeReflectConstruct = function() {
return !!result;
})();
}
return r0;
}
function GUILD_ROLE_MEMBER_REMOVE_53185({guildId, roleId}) { // fn#53185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1580, offset: 0x01340a44, size: 88 bytes, params: 2, frame: 17
var r1;
var r0;
var Math;
const property = env0_5[guildId];
let value = property != null;
if (value) {
value = property[roleId] != null;
if (value) {
Math = global.Math;
property[roleId] = Math.max(property[roleId] - 1, 0);
r1 = undefined;
} else {
r1 = value;
function _fun53177(a0) { // fn#53177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:361, offset: 0x013408a4, size: 91 bytes, params: 2, frame: 16
const GuildRoleMemberCountStore2 = GuildRoleMemberCountStore;
Inherits(GuildRoleMemberCountStore2, a0);
return CreateClass(GuildRoleMemberCountStore2, [{key: 'getRoleMemberCount', value: value_53179}, {key: 'shouldFetch',
value: value_53180}]);
function GuildRoleMemberCountStore() { // fn#53178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:373, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, GuildRoleMemberCountStore);
const value3 = env1_3(GuildRoleMemberCountStore);
return env1_2(this, _isNativeReflectConstruct_53174() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
r0 = r1;
} else {
r0 = value;
function value_53179(a0) { // fn#53179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:724, offset: 0x0103ae4f, size: 25 bytes, params: 2, frame: 3
const value = null;
return value != a0 ? env1_5[a0] : value;
}
function value_53180(a0) { // fn#53180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:788, offset: 0x013408ff, size: 64 bytes, params: 2, frame: 11
var r0;
var Date;
if (a0 == null) {
return false;
}
let value = environment.__proto__;
const property = env1_6[a0];
value = property == null;
if (value) {
r0 = value;
} else {
Date = global.Date;
value = Date.now() - property;
value = value > 120000;
r0 = value;
}
return r0;
}
}
return r0;
}
function GUILD_ROLE_CREATE_53186({guildId, role}) { // fn#53186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1729, offset: 0x01340a9c, size: 64 bytes, params: 2, frame: 5
if (env0_5[guildId] == null) {
env0_5[guildId] = {};
function GUILD_ROLE_MEMBER_COUNT_FETCH_SUCCESS({guildId, roleMemberCount}) { // fn#53181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:986, offset: 0x0134093f, size: 54 bytes, params: 2, frame: 11
env0_5[guildId] = roleMemberCount;
const binding = env0_6;
const Date = global.Date;
binding[guildId] = Date.now();
}
env0_5[guildId][role.id] = 0;
}
function GUILD_DELETE_53187({guild}) { // fn#53187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1829, offset: 0x01340adc, size: 41 bytes, params: 2, frame: 4
delete env0_5[guild.id];
delete env0_6[guild.id];
}
function value_53180(a0) { // fn#53180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:788, offset: 0x013408ff, size: 64 bytes, params: 2, frame: 11
var r0;
var Date;
if (a0 == null) {
return false;
function GUILD_ROLE_MEMBER_COUNT_UPDATE({guildId, roleId, count}) { // fn#53182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1120, offset: 0x01340975, size: 48 bytes, params: 2, frame: 4
const property = env0_5[guildId];
if (property == null) {
return false;
}
property[roleId] = count;
}
function GUILD_ROLE_MEMBER_BULK_ADD({guildId, roleId, added}) { // fn#53183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1258, offset: 0x013409a5, size: 92 bytes, params: 2, frame: 13
const property = env0_5[guildId];
if (property == null) {
return false;
}
if (property[roleId] == null) {
return false;
}
const Object = global.Object;
property[roleId] += Object.keys(added).length;
}
let value = environment.__proto__;
const property = env1_6[a0];
value = property == null;
if (value) {
r0 = value;
} else {
Date = global.Date;
value = Date.now() - property;
value = value > 120000;
r0 = value;
function GUILD_ROLE_MEMBER_ADD_53184({guildId, roleId}) { // fn#53184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1439, offset: 0x01340a01, size: 67 bytes, params: 2, frame: 6
var r1;
var r0;
const property = env0_5[guildId];
let value = property != null;
if (value) {
value = property[roleId] != null;
if (value) {
property[roleId] += 1;
r1 = undefined;
} else {
r1 = value;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
}
function GUILD_ROLE_MEMBER_REMOVE_53185({guildId, roleId}) { // fn#53185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1580, offset: 0x01340a44, size: 88 bytes, params: 2, frame: 17
var r1;
var r0;
var Math;
const property = env0_5[guildId];
let value = property != null;
if (value) {
value = property[roleId] != null;
if (value) {
Math = global.Math;
property[roleId] = Math.max(property[roleId] - 1, 0);
r1 = undefined;
} else {
r1 = value;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
}
return r0;
function GUILD_ROLE_CREATE_53186({guildId, role}) { // fn#53186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1729, offset: 0x01340a9c, size: 64 bytes, params: 2, frame: 5
if (env0_5[guildId] == null) {
env0_5[guildId] = {};
}
env0_5[guildId][role.id] = 0;
}
function GUILD_DELETE_53187({guild}) { // fn#53187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1829, offset: 0x01340adc, size: 41 bytes, params: 2, frame: 4
delete env0_5[guild.id];
delete env0_6[guild.id];
}
}
global.__d(_fun53173, 6737, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 6737, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,22 +1,23 @@
/* Metro module 15942; source: modules/guild_settings/GuildSettingsConstants.tsx; dependencies: [1244, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun123113(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16150:6, offset: 0x025814d3, size: 279 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {DISPLAY: 0};
object2[0] = 'DISPLAY';
object2.PERMISSIONS = 1;
object2[1] = 'PERMISSIONS';
object2.MEMBERS = 2;
object2[2] = 'MEMBERS';
object2.VERIFICATIONS = 3;
object2[3] = 'VERIFICATIONS';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/GuildSettingsConstants.tsx');
object = {DISPLAY: 0};
object[0] = 'DISPLAY';
object.PERMISSIONS = 1;
object[1] = 'PERMISSIONS';
object.MEMBERS = 2;
object[2] = 'MEMBERS';
object.VERIFICATIONS = 3;
object[3] = 'VERIFICATIONS';
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildSettingsConstants.tsx');
exports.MAX_SUBCATEGORIES = 5;
exports.MAX_KEYWORDS = 10;
exports.MAX_KEYWORD_LENGTH = 30;
exports.GuildSettingsRoleEditSections = object2;
exports.GuildSettingsRoleEditSections = object;
exports.ERROR_KEY_TO_LABEL_FUNC = {afk_channel_id: function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.KuYcnU);
}, public_updates_channel_id: function() {
@@ -28,16 +29,17 @@ function _fun123113(global, require, importDefault, importAll, module, exports,
}};
exports.getSettingsErrorMessage = getSettingsErrorMessage;
exports.VANITY_URL_INVITE_ENDPOINT = 'https://discord.gg';
}
function getSettingsErrorMessage(a0) { // fn#123118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16150:735, offset: 0x025816e2, size: 136 bytes, params: 2, frame: 18
let Object = global.Object;
if (Object.keys(a0).length === 0) {
return null;
function getSettingsErrorMessage(a0) { // fn#123118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16150:735, offset: 0x025816e2, size: 136 bytes, params: 2, frame: 18
let Object = global.Object;
if (Object.keys(a0).length === 0) {
return null;
}
Object = global.Object;
const property = Object.keys(a0)[0];
const r5 = env0_2[property]?.call(env0_2);
return r5 != null ? '(' + r5 + ') ' + a0[property] : a0[property];
}
Object = global.Object;
const property = Object.keys(a0)[0];
const r5 = env0_2[property]?.call(env0_2);
return r5 != null ? '(' + r5 + ') ' + a0[property] : a0[property];
}
global.__d(_fun123113, 15942, [1244, 2]) /* metro module 15942, dependencies: [1244, 2] */;
@@ -1,117 +1,141 @@
/* Metro module 15904; source: modules/guild_settings/GuildSettingsEmojiStore.tsx; dependencies: [6, 7, 15, 17, 18, 15905, 3969, 1393, 672, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
import Module01393 from '../../by-id/module-01393.js'; /* Metro dependency 1393 */
import SelectedGuildStore from '../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import EmojiRecord from '../../records/EmojiRecord.tsx'; /* Metro dependency 15905 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun122707(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:6, offset: 0x02571fa7, size: 469 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const emojiRecord = importDefault(15905) /* metro dependency 15905: EmojiRecord */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const env0_7 = {};
const env0_8 = {};
let value = importDefault(1393) /* metro dependency 1393 */;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
let value = Module01393;
const Millis = (Durations).Millis;
const HOUR = Millis.HOUR;
value = new value({max: 5, maxAge: HOUR});
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun122711(Store).displayName = 'GuildSettingsEmojiStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {EMOJI_DELETE: EMOJI_DELETE,
EMOJI_FETCH_SUCCESS: EMOJI_FETCH_SUCCESS, EMOJI_FETCH_FAILURE: EMOJI_FETCH_FAILURE,
EMOJI_UPLOAD_START: EMOJI_UPLOAD_START, EMOJI_UPLOAD_STOP: EMOJI_UPLOAD_STOP,
EMOJI_CACHE_RAW_EMOJI_ASSET: EMOJI_CACHE_RAW_EMOJI_ASSET, GUILD_EMOJIS_UPDATE: GUILD_EMOJIS_UPDATE_122726});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/GuildSettingsEmojiStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildSettingsEmojiStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_122708() { // fn#122708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:168, offset: 0x0257217c, 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) {
function _isNativeReflectConstruct_122708() { // fn#122708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:168, offset: 0x0257217c, 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_122708_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_122708_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun122711(a0) { // fn#122711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:436, offset: 0x025721de, size: 180 bytes, params: 2, frame: 16
const closure = GuildSettingsEmojiStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: function() {
this.waitFor(SelectedGuildStore);
}}, {key: 'isUploadingEmoji', value: value_122714}, {key: 'getEmojiRevision', value: value_122715},
{key: 'getEmojis', value: value_122716}, {key: 'getEmojiRawAsset', value: value_122717}]);
}
function EMOJI_DELETE({guildId, emojiId}) { // fn#122718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1142, offset: 0x025722bf, size: 56 bytes, params: 2, frame: 13
const binding = env0_8;
const property = binding[guildId];
binding[guildId] = property.filter(function({id}) {
return id !== emojiId;
});
}
function EMOJI_FETCH_SUCCESS({guildId, emojis}) { // fn#122720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1245, offset: 0x025722f7, size: 48 bytes, params: 2, frame: 13
env0_8[guildId] = emojis.map(_fun122721);
}
function EMOJI_FETCH_FAILURE({guildId}) { // fn#122722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1342, offset: 0x02572347, size: 27 bytes, params: 2, frame: 3
env0_8[guildId] = [];
}
function EMOJI_UPLOAD_START() { // fn#122723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1411, offset: 0x02572362, size: 18 bytes, params: 1, frame: 2
const binding = env0_9;
env0_9 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
function EMOJI_UPLOAD_STOP() { // fn#122724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1466, offset: 0x02572374, size: 18 bytes, params: 1, frame: 2
const binding = env0_9;
env0_9 = typeof binding === 'bigint' ? binding - 1n : +binding - 1;
}
function EMOJI_CACHE_RAW_EMOJI_ASSET({emojiId, userImage}) { // fn#122725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1530, offset: 0x02572386, size: 39 bytes, params: 2, frame: 13
env0_10.set(emojiId, userImage);
}
function GUILD_EMOJIS_UPDATE_122726({guildId}) { // fn#122726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1621, offset: 0x025723ad, size: 48 bytes, params: 2, frame: 5
const binding = env0_7;
binding[guildId] = (binding[guildId] ?? 0) + 1;
}
function value_122714() { // fn#122714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:840, offset: 0x02572292, size: 15 bytes, params: 1, frame: 2
return env1_9 > 0;
}
function value_122715(a0) { // fn#122715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:894, offset: 0x025722a1, size: 30 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_7[a0] ?? 0;
}
function _fun122721(a0) { // fn#122721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1307, offset: 0x02572327, size: 32 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = Object.create(EmojiRecord.prototype, {constructor: {value: EmojiRecord}});
const emojiRecord = new EmojiRecord(a0);
return emojiRecord instanceof Object ? emojiRecord : value;
function _fun122711(a0) { // fn#122711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:436, offset: 0x025721de, size: 180 bytes, params: 2, frame: 16
const GuildSettingsEmojiStore2 = GuildSettingsEmojiStore;
Inherits(GuildSettingsEmojiStore2, a0);
return CreateClass(GuildSettingsEmojiStore2, [{key: 'initialize', value: function() {
this.waitFor(SelectedGuildStore);
}}, {key: 'isUploadingEmoji', value: value_122714}, {key: 'getEmojiRevision', value: value_122715},
{key: 'getEmojis', value: value_122716}, {key: 'getEmojiRawAsset', value: value_122717}]);
function GuildSettingsEmojiStore() { // fn#122712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:448, offset: 0x010a3f4a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, GuildSettingsEmojiStore);
const value3 = env1_3(GuildSettingsEmojiStore);
return env1_2(this, _isNativeReflectConstruct_122708() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_122714() { // fn#122714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:840, offset: 0x02572292, size: 15 bytes, params: 1, frame: 2
return env1_9 > 0;
}
function value_122715(a0) { // fn#122715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:894, offset: 0x025722a1, size: 30 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_7[a0] ?? 0;
}
function value_122716(a0) { // fn#122716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:963, offset: 0x00ff623a, size: 16 bytes, params: 2, frame: 2
return env1_8[a0];
}
function value_122717(a0) { // fn#122717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1019, offset: 0x00f7ec3a, size: 22 bytes, params: 2, frame: 11
return env1_10.get(a0);
}
}
function EMOJI_DELETE({guildId, emojiId}) { // fn#122718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1142, offset: 0x025722bf, size: 56 bytes, params: 2, frame: 13
const binding = env0_8;
const property = binding[guildId];
binding[guildId] = property.filter(function({id}) {
return id !== emojiId;
});
}
function EMOJI_FETCH_SUCCESS({guildId, emojis}) { // fn#122720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1245, offset: 0x025722f7, size: 48 bytes, params: 2, frame: 13
env0_8[guildId] = emojis.map(_fun122721);
function _fun122721(a0) { // fn#122721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1307, offset: 0x02572327, size: 32 bytes, params: 2, frame: 11
let value = environment.__proto__;
const emojiRecordBinding = EmojiRecord;
value = Object.create(emojiRecordBinding.prototype, {constructor: {value: emojiRecordBinding}});
const emojiRecord2 = new emojiRecordBinding(a0);
return emojiRecord2 instanceof Object ? emojiRecord2 : value;
}
}
function EMOJI_FETCH_FAILURE({guildId}) { // fn#122722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1342, offset: 0x02572347, size: 27 bytes, params: 2, frame: 3
env0_8[guildId] = [];
}
function EMOJI_UPLOAD_START() { // fn#122723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1411, offset: 0x02572362, size: 18 bytes, params: 1, frame: 2
const binding = env0_9;
env0_9 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
function EMOJI_UPLOAD_STOP() { // fn#122724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1466, offset: 0x02572374, size: 18 bytes, params: 1, frame: 2
const binding = env0_9;
env0_9 = typeof binding === 'bigint' ? binding - 1n : +binding - 1;
}
function EMOJI_CACHE_RAW_EMOJI_ASSET({emojiId, userImage}) { // fn#122725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1530, offset: 0x02572386, size: 39 bytes, params: 2, frame: 13
env0_10.set(emojiId, userImage);
}
function GUILD_EMOJIS_UPDATE_122726({guildId}) { // fn#122726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1621, offset: 0x025723ad, size: 48 bytes, params: 2, frame: 5
const binding = env0_7;
binding[guildId] = (binding[guildId] ?? 0) + 1;
}
}
global.__d(_fun122707, 15904, [6, 7, 15, 17, 18, 15905, 3969, 1393, 672, 566, 694,
2]) /* metro module 15904, dependencies: [6, 7, 15, 17, 18, 15905, 3969, 1393, 672, 566, 694, 2] */;
@@ -1,67 +1,73 @@
/* Metro module 9117; source: modules/guild_settings/GuildSettingsFetchActionCreators.tsx; dependencies: [5, 4235, 1885, 661, 507, 694, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import UserRecord from '../../records/UserRecord.tsx'; /* Metro dependency 1885 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as HTTPUtilsModule from '../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as ApplicationRecordModule from '../../records/ApplicationRecord.tsx'; /* Metro dependency 4235 */
function _fun71427(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9302:6, offset: 0x01d1f808, size: 204 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(4235) /* metro dependency 4235: ApplicationRecord */).BasicApplicationRecord;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/GuildSettingsFetchActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildSettingsFetchActionCreators.tsx');
exports.fetchGuildIntegrationsApplications = function() {
return _fetchGuildIntegrationsApplications.apply(this, arguments);
};
exports.fetchGuildEmbed = fetchGuildEmbed;
}
function _fetchGuildIntegrationsApplications() { // fn#71428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9302:169, offset: 0x01d1f8d4, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun71430).apply(this, arguments);
function* _fun71430(a0) { // fn#71430, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9302:262, offset: 0x01d1f911, size: 200 bytes, params: 2, frame: 17
var environment;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[4]).HTTP;
const get = HTTP.get;
const object = {};
object.url = env2_6.GUILD_INTEGRATIONS(a0);
object.query = {'include_applications': true, 'include_role_connections_metadata': true};
object.oldFormErrors = true;
object.rejectWithError = false;
yield Reflect.apply(get, HTTP, [object]);
const value3 = undefined;
if (false) {
return value3;
}
const value5 = value3.body.map(_fun71431);
value = env2_1(env2_2[5]);
value.dispatch({type: 'GUILD_SETTINGS_LOADED_INTEGRATIONS', guildId: a0, integrations: value5});
return value5;
function _fun71431(a0) { // fn#71431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9302:452, offset: 0x01d1f9d9, size: 140 bytes, params: 2, frame: 17
const object = {};
copyDataProperties(object, a0, undefined);
const value = undefined;
object['application'] = 'application' in a0 && a0.application != null ? env3_4.createFromServer(a0.application) : value;
object['user'] = 'user' in a0 && a0.user != null ? new env3_5() : value;
return object;
}
function _fetchGuildIntegrationsApplications() { // fn#71428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9302:169, offset: 0x01d1f8d4, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun71430).apply(this, arguments);
}
}
function fetchGuildEmbed(a0) { // fn#71433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9302:991, offset: 0x01d1fa65, size: 95 bytes, params: 2, frame: 14
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
object2.url = Endpoints.GUILD_WIDGET(a0);
return Reflect.apply(get, HTTP, [object2]).then(_fun71434);
}
function* _fun71430(a0) { // fn#71430, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9302:262, offset: 0x01d1f911, size: 200 bytes, params: 2, frame: 17
var environment;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[4]).HTTP;
const get = HTTP.get;
const object2 = {};
object2.url = env2_6.GUILD_INTEGRATIONS(a0);
object2.query = {'include_applications': true, 'include_role_connections_metadata': true};
object2.oldFormErrors = true;
object2.rejectWithError = false;
yield Reflect.apply(get, HTTP, [object2]);
const value3 = undefined;
if (false) {
return value3;
function fetchGuildEmbed(a0) { // fn#71433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9302:991, offset: 0x01d1fa65, size: 95 bytes, params: 2, frame: 14
const HTTP = (HTTPUtilsModule).HTTP;
const get = HTTP.get;
const object = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
object.url = Endpoints.GUILD_WIDGET(a0);
return Reflect.apply(get, HTTP, [object]).then(_fun71434);
function _fun71434(a0) { // fn#71434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9302:1110, offset: 0x01d1fac4, size: 78 bytes, params: 2, frame: 14
const value = environment.__proto__;
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_SET_WIDGET',
enabled: a0.body.enabled, channelId: a0.body.channel_id});
}
}
const value5 = value3.body.map(_fun71431);
value = env2_1(env2_2[5]);
value.dispatch({type: 'GUILD_SETTINGS_LOADED_INTEGRATIONS', guildId: a0, integrations: value5});
return value5;
}
function _fun71434(a0) { // fn#71434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9302:1110, offset: 0x01d1fac4, size: 78 bytes, params: 2, frame: 14
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_SET_WIDGET',
enabled: a0.body.enabled, channelId: a0.body.channel_id});
}
function _fun71431(a0) { // fn#71431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9302:452, offset: 0x01d1f9d9, size: 140 bytes, params: 2, frame: 17
const object2 = {};
copyDataProperties(object2, a0, undefined);
const value = undefined;
object2['application'] = 'application' in a0 && a0.application != null ? env3_4.createFromServer(a0.application) : value;
object2['user'] = 'user' in a0 && a0.user != null ? new env3_5() : value;
return object2;
}
global.__d(_fun71427, 9117, [5, 4235, 1885, 661, 507, 694,
2]) /* metro module 9117, dependencies: [5, 4235, 1885, 661, 507, 694, 2] */;
@@ -1,27 +1,30 @@
/* Metro module 15858; source: modules/guild_settings/GuildSettingsModalChannelsActionCreators.tsx; dependencies: [694, 2] */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun122015(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16066:6, offset: 0x0255760d, size: 142 bytes, params: 8, frame: 17
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {terminate: terminate_122016, startReordering: function(a0) {
object = {terminate: terminate_122016, startReordering: function(a0) {
var r5;
importDefault(dependencyMap[0]).dispatch({type: 'GUILD_SETTINGS_MODAL_CHANNELS_START_REORDER',
sortingType: copyRestArgs(0, r5)});
}, stopReordering: stopReordering, localChannelUpdate: localChannelUpdate};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/GuildSettingsModalChannelsActionCreators.tsx');
exports.default = object2;
}
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildSettingsModalChannelsActionCreators.tsx');
exports.default = object;
function terminate_122016() { // fn#122016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16066:99, offset: 0x0255769b, size: 48 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_CHANNELS_TERMINATE'});
}
function terminate_122016() { // fn#122016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16066:99, offset: 0x0255769b, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_CHANNELS_TERMINATE'});
}
function stopReordering() { // fn#122018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16066:287, offset: 0x02557706, size: 48 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_CHANNELS_STOP_REORDER'});
}
function stopReordering() { // fn#122018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16066:287, offset: 0x02557706, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_CHANNELS_STOP_REORDER'});
}
function localChannelUpdate(a0) { // fn#122019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16066:375, offset: 0x02557736, size: 56 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_LOCAL_SORT_CHANGE',
updates: a0});
}
function localChannelUpdate(a0) { // fn#122019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16066:375, offset: 0x02557736, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_LOCAL_SORT_CHANGE',
updates: a0});
}
global.__d(_fun122015, 15858, [694, 2]) /* metro module 15858, dependencies: [694, 2] */;
@@ -1,4 +1,18 @@
/* Metro module 15860; source: modules/guild_settings/GuildSettingsModalChannelsStore.tsx; dependencies: [6, 7, 15, 17, 18, 29, 1383, 1935, 3784, 661, 5099, 22, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00022 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import GuildChannelStore from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import GetFlattedChannelList from '../channel/getFlattedChannelList.tsx'; /* Metro dependency 5099 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChannelRecordModule from '../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
function _fun122053(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:6, offset: 0x02558ef1, size: 604 bytes, params: 8, frame: 20
const sortCategoryList = function(a0, a1) {
var property = a0.channel;
@@ -15,26 +29,18 @@ function _fun122053(global, require, importDefault, importAll, module, exports,
const env0_2 = ['lock_permissions', 'id'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = importDefault(29) /* metro dependency 29 */;
let value = require(1383) /* metro dependency 1383: ChannelRecord */;
let value = ChannelRecordModule;
const env0_9 = value.isGuildSelectableChannelType;
const env0_10 = value.isGuildVocalChannelType;
value = require(1935) /* metro dependency 1935: GuildChannelStore */;
const env0_11 = value.GUILD_SELECTABLE_CHANNELS_KEY;
const env0_12 = value.GUILD_VOCAL_CHANNELS_KEY;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_15 = value.ChannelTypes;
const env0_16 = value.Permissions;
const env0_23 = {};
const env0_24 = (importDefault(22) /* metro dependency 22 */).debounce(_fun122069, 500);
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const env0_24 = (Module00022).debounce(_fun122069, 500);
const Store = (Flux).Store;
_fun122070(Store).displayName = 'GuildSettingsModalChannelsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{GUILD_SETTINGS_MODAL_CHANNELS_TERMINATE: function() {
@@ -52,197 +58,235 @@ function _fun122053(global, require, importDefault, importAll, module, exports,
updates.forEach(_fun122084);
buildSortedChannels();
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/GuildSettingsModalChannelsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildSettingsModalChannelsStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_122054() { // fn#122054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:397, offset: 0x0255914d, 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_122054_isNativeReflectConstruct = function() {
return !!result;
})();
}
function buildSortedChannels() { // fn#122059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:824, offset: 0x0255922b, size: 186 bytes, params: 1, frame: 14
env0_19 = {_categories: [], null: []};
const Object = global.Object;
const value2 = Object.keys(env0_23);
value2.forEach(_fun122060);
const _categories = env0_19._categories;
_categories.sort(sortCategoryList);
env0_19._categories.forEach(_fun122061);
const value3 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(env0_19._categories,
env0_19);
value3.forEach(setIndex_122058);
setupSortLists();
}
function rebuildChannels_122062() { // fn#122062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1359, offset: 0x02559400, size: 139 bytes, params: 1, frame: 14
const channels = GuildChannelStore.getChannels(env0_17);
if (channels === env0_20) {
return false;
}
env0_23 = {};
channels[GUILD_SELECTABLE_CHANNELS_KEY].forEach(_fun122063);
channels[GUILD_VOCAL_CHANNELS_KEY].forEach(_fun122064);
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
channels[GUILD_CATEGORY].forEach(_fun122065);
buildSortedChannels();
}
function setupSortLists() { // fn#122066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1712, offset: 0x025594f1, size: 94 bytes, params: 1, frame: 17
if (env0_19 != null) {
env0_18 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(env0_19._categories, env0_19,
_fun122067).map(function(a0) {
return a0.channel.id;
});
}
}
function _fun122069() { // fn#122069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1667, offset: 0x02559595, size: 29 bytes, params: 1, frame: 10
rebuildChannels_122062();
env0_25.emitChange();
}
function _fun122070(a0) { // fn#122070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1881, offset: 0x025595b2, size: 224 bytes, params: 2, frame: 16
const closure = GuildSettingsModalChannelsStoreClass;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(GuildChannelStore, PermissionStore);
this.syncWith([GuildChannelStore], _fun122073);
}}, {key: 'initGuild', value: function(a0) {
env1_17 = a0;
rebuildChannels_122062();
}}, {key: 'channels', get: get_122075}, {key: 'order', get: get_122076}, {key: 'sortingType', get: get_122077},
{key: 'channelList', get: get_122078}, {key: 'getLocalChannel', value: value_122079}]);
}
function GUILD_SETTINGS_MODAL_CHANNELS_START_REORDER({sortingType}) { // fn#122081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:2884, offset: 0x02559719, size: 73 bytes, params: 2, frame: 12
if (env0_19 == null) {
return false;
}
const Set = global.Set;
const set = new Set(sortingType);
setupSortLists();
}
function GUILD_SETTINGS_MODAL_LOCAL_SORT_CHANGE({updates}) { // fn#122083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:3116, offset: 0x02559777, size: 43 bytes, params: 2, frame: 11
updates.forEach(_fun122084);
buildSortedChannels();
}
function _fun122060(a0) { // fn#122060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:906, offset: 0x025592e5, size: 222 bytes, params: 2, frame: 15
var value3;
var property2;
var _categories;
const property = env1_23[a0];
if (property != null) {
if (env1_19 != null) {
if (property.type === ChannelTypes.GUILD_CATEGORY) {
_categories = env1_19._categories;
_categories.push({channel: property, index: -1});
if (env1_19[property.id] == null) {
env1_19[property.id] = [];
}
} else {
value3 = global.String(property.parent_id ?? 'null');
if (env1_19[value3] == null) {
env1_19[value3] = [];
}
property2 = env1_19[value3];
property2.push({channel: property, index: -1});
}
function _isNativeReflectConstruct_122054() { // fn#122054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:397, offset: 0x0255914d, 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_122054_isNativeReflectConstruct = function() {
return !!result;
})();
}
}
function _fun122061({channel}) { // fn#122061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1209, offset: 0x025593c3, size: 61 bytes, params: 2, frame: 12
var property;
if (env1_19 != null) {
if (channel != null) {
property = env1_19[channel.id];
function buildSortedChannels() { // fn#122059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:824, offset: 0x0255922b, size: 186 bytes, params: 1, frame: 14
var object2;
object2 = {_categories: [], null: []};
const Object = global.Object;
const value2 = Object.keys(env0_23);
value2.forEach(_fun122060);
const _categories = object2._categories;
_categories.sort(sortCategoryList);
object2._categories.forEach(_fun122061);
const value3 = (GetFlattedChannelList)(object2._categories,
object2);
value3.forEach(setIndex_122058);
setupSortLists();
function _fun122060(a0) { // fn#122060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:906, offset: 0x025592e5, size: 222 bytes, params: 2, frame: 15
var value3;
var property2;
var _categories;
const property = env1_23[a0];
if (property != null) {
property.sort(sortCategoryList);
if (env1_19 != null) {
if (property.type === ChannelTypes.GUILD_CATEGORY) {
_categories = env1_19._categories;
_categories.push({channel: property, index: -1});
if (env1_19[property.id] == null) {
env1_19[property.id] = [];
}
} else {
value3 = global.String(property.parent_id ?? 'null');
if (env1_19[value3] == null) {
env1_19[value3] = [];
}
property2 = env1_19[value3];
property2.push({channel: property, index: -1});
}
}
}
}
function _fun122061({channel}) { // fn#122061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1209, offset: 0x025593c3, size: 61 bytes, params: 2, frame: 12
var property;
if (env1_19 != null) {
if (channel != null) {
property = env1_19[channel.id];
if (property != null) {
property.sort(sortCategoryList);
}
}
}
}
}
}
function _fun122063({channel}) { // fn#122063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1450, offset: 0x0255948b, size: 26 bytes, params: 2, frame: 3
env1_23[channel.id] = channel;
return channel;
}
function rebuildChannels_122062() { // fn#122062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1359, offset: 0x02559400, size: 139 bytes, params: 1, frame: 14
const channels = GuildChannelStore.getChannels(env0_17);
if (channels === env0_20) {
return false;
}
env0_23 = {};
channels[GUILD_SELECTABLE_CHANNELS_KEY].forEach(_fun122063);
channels[GUILD_VOCAL_CHANNELS_KEY].forEach(_fun122064);
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
channels[GUILD_CATEGORY].forEach(_fun122065);
buildSortedChannels();
function _fun122063({channel}) { // fn#122063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1450, offset: 0x0255948b, size: 26 bytes, params: 2, frame: 3
env1_23[channel.id] = channel;
return channel;
}
function _fun122064({channel}) { // fn#122064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1491, offset: 0x0255948b, size: 26 bytes, params: 2, frame: 3
env1_23[channel.id] = channel;
return channel;
}
function _fun122065({channel}) { // fn#122065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1547, offset: 0x025594a5, size: 76 bytes, params: 2, frame: 14
var r0;
var permissionStoreBinding;
let value = channel.id === 'null';
if (value) {
r0 = value;
} else {
value = environment.__proto__;
permissionStoreBinding = PermissionStore;
value = permissionStoreBinding.can(Permissions.VIEW_CHANNEL, channel);
r0 = value;
}
if (r0) {
value = environment.__proto__;
env1_23[channel.id] = channel;
}
}
function _fun122065({channel}) { // fn#122065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1547, offset: 0x025594a5, size: 76 bytes, params: 2, frame: 14
var r0;
let value = channel.id === 'null';
if (value) {
r0 = value;
} else {
value = environment.__proto__;
value = PermissionStore.can(Permissions.VIEW_CHANNEL, channel);
r0 = value;
}
if (r0) {
value = environment.__proto__;
env1_23[channel.id] = channel;
function setupSortLists() { // fn#122066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1712, offset: 0x025594f1, size: 94 bytes, params: 1, frame: 17
if (env0_19 != null) {
env0_18 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(env0_19._categories, env0_19,
_fun122067).map(function(a0) {
return a0.channel.id;
});
}
function _fun122067({channel}) { // fn#122067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1776, offset: 0x0255954f, size: 70 bytes, params: 2, frame: 13
const type = channel.type;
const value = environment.__proto__;
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
return type === GUILD_CATEGORY || env1_21 != null && env1_21.has(channel.type);
}
}
}
function _fun122067({channel}) { // fn#122067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1776, offset: 0x0255954f, size: 70 bytes, params: 2, frame: 13
const type = channel.type;
const value = environment.__proto__;
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
return type === GUILD_CATEGORY || env1_21 != null && env1_21.has(channel.type);
}
function value_122072() { // fn#122072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:2291, offset: 0x02559692, size: 63 bytes, params: 1, frame: 14
this.waitFor(GuildChannelStore, PermissionStore);
this.syncWith([GuildChannelStore], _fun122073);
}
function _fun122084(a0) { // fn#122084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:3171, offset: 0x025597a2, size: 93 bytes, params: 2, frame: 14
var value2;
var property;
let binding = env1_23;
let id = a0.id;
if (binding[id] != null) {
a0.lock_permissions;
a0.id;
binding = env1_8;
value2 = binding(a0, env1_2);
binding = env1_23;
id = a0.id;
property = env1_23[a0.id];
binding[id] = property.merge(value2);
function _fun122069() { // fn#122069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1667, offset: 0x02559595, size: 29 bytes, params: 1, frame: 10
rebuildChannels_122062();
env0_25.emitChange();
}
function _fun122070(a0) { // fn#122070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1881, offset: 0x025595b2, size: 224 bytes, params: 2, frame: 16
const GuildSettingsModalChannelsStoreClass2 = GuildSettingsModalChannelsStoreClass;
Inherits(GuildSettingsModalChannelsStoreClass2, a0);
return CreateClass(GuildSettingsModalChannelsStoreClass2, [{key: 'initialize', value: function() {
this.waitFor(GuildChannelStore, PermissionStore);
this.syncWith([GuildChannelStore], _fun122073);
}}, {key: 'initGuild', value: function(a0) {
env1_17 = a0;
rebuildChannels_122062();
}}, {key: 'channels', get: get_122075}, {key: 'order', get: get_122076}, {key: 'sortingType', get: get_122077},
{key: 'channelList', get: get_122078}, {key: 'getLocalChannel', value: value_122079}]);
function GuildSettingsModalChannelsStoreClass() { // fn#122071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:1893, offset: 0x011a274a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, GuildSettingsModalChannelsStoreClass);
const value3 = env1_6(GuildSettingsModalChannelsStoreClass);
return env1_5(this, _isNativeReflectConstruct_122054() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_122072() { // fn#122072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:2291, offset: 0x02559692, size: 63 bytes, params: 1, frame: 14
this.waitFor(GuildChannelStore, PermissionStore);
this.syncWith([GuildChannelStore], _fun122073);
function _fun122073() { // fn#122073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:2339, offset: 0x025596d1, size: 17 bytes, params: 1, frame: 9
env2_24();
return false;
}
}
function get_122075() { // fn#122075, offset: 0x00d406a2, size: 9 bytes, params: 1, frame: 1
return env1_19;
}
function get_122076() { // fn#122076, offset: 0x00df0e82, size: 9 bytes, params: 1, frame: 1
return env1_18;
}
function get_122077() { // fn#122077, offset: 0x00f854d6, size: 9 bytes, params: 1, frame: 1
return env1_21;
}
function get_122078() { // fn#122078, offset: 0x00e425c8, size: 9 bytes, params: 1, frame: 1
return env1_22;
}
function value_122079(a0) { // fn#122079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:2615, offset: 0x0109f057, size: 16 bytes, params: 2, frame: 2
return env1_23[a0];
}
}
function GUILD_SETTINGS_MODAL_CHANNELS_START_REORDER({sortingType}) { // fn#122081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:2884, offset: 0x02559719, size: 73 bytes, params: 2, frame: 12
if (env0_19 == null) {
return false;
}
const Set = global.Set;
const set = new Set(sortingType);
setupSortLists();
}
function GUILD_SETTINGS_MODAL_LOCAL_SORT_CHANGE({updates}) { // fn#122083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:3116, offset: 0x02559777, size: 43 bytes, params: 2, frame: 11
updates.forEach(_fun122084);
buildSortedChannels();
function _fun122084(a0) { // fn#122084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:3171, offset: 0x025597a2, size: 93 bytes, params: 2, frame: 14
var value2;
var property;
let binding = env1_23;
let id = a0.id;
if (binding[id] != null) {
a0.lock_permissions;
a0.id;
binding = env1_8;
value2 = binding(a0, env1_2);
binding = env1_23;
id = a0.id;
property = env1_23[a0.id];
binding[id] = property.merge(value2);
}
}
}
}
function _fun122073() { // fn#122073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16068:2339, offset: 0x025596d1, size: 17 bytes, params: 1, frame: 9
env2_24();
return false;
}
global.__d(_fun122053, 15860, [6, 7, 15, 17, 18, 29, 1383, 1935, 3784, 661, 5099, 22, 566, 694,
2]) /* metro module 15860, dependencies: [6, 7, 15, 17, 18, 29, 1383, 1935, 3784, 661, 5099, 22, 566, 694, 2] */;
@@ -1,77 +1,80 @@
/* Metro module 10298; source: modules/guild_settings/GuildSettingsModalMembersActionCreators.tsx; dependencies: [661, 694, 507, 1244, 2] */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as HTTPUtilsModule from '../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun79917(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:6, offset: 0x01e66b15, size: 201 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.Endpoints;
const env0_4 = constantsModule.ME;
object2 = {startEditingRoles: startEditingRoles, stopEditingRoles: stopEditingRoles, toggleRole: toggleRole,
object = {startEditingRoles: startEditingRoles, stopEditingRoles: stopEditingRoles, toggleRole: toggleRole,
updateMemberRoles: updateMemberRoles_79921, startEditingNickname: startEditingNickname,
changeNickname: changeNickname_79924};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/GuildSettingsModalMembersActionCreators.tsx');
exports.default = object2;
}
function startEditingRoles(a0, a1) { // fn#79918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:130, offset: 0x01e66bde, size: 63 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_START_EDITING',
guildId: a0, userId: a1});
}
function stopEditingRoles() { // fn#79919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:243, offset: 0x01e66c1d, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_STOP_EDITING'});
}
function toggleRole(a0, a1) { // fn#79920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:332, offset: 0x01e66c4e, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_TOGGLE_ROLE',
roleId: a0, state: a1});
}
function updateMemberRoles_79921(a0, a1, a2) { // fn#79921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:434, offset: 0x01e66c8e, size: 154 bytes, params: 4, frame: 18
var object2;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_ROLES_SAVE'});
const closure = updateMemberRoles_79921OnEnd;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const patch = HTTP.patch;
object2 = {};
object2.url = Endpoints.GUILD_MEMBER(a0, a1);
object2.body = {roles: a2};
object2.oldFormErrors = true;
object2.rejectWithError = true;
Reflect.apply(patch, HTTP, [object2]).then(closure, closure);
}
function startEditingNickname() { // fn#79923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:732, offset: 0x01e66d59, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_START_EDITING_NICKNAME'});
}
function changeNickname_79924(a0, a1, a2) { // fn#79924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:835, offset: 0x01e66d8a, size: 201 bytes, params: 4, frame: 18
const env0_0 = a1;
const r5 = a1 == null ? Endpoints.GUILD_MEMBER_NICK(a0, ME) : Endpoints.GUILD_MEMBER(a0, a1);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_CHANGE_NICKNAME'});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
HTTP.patch({url: r5, body: {nick: a2}, oldFormErrors: true, rejectWithError: false}).then(_fun79925, _fun79926);
}
function updateMemberRoles_79921OnEnd() { // fn#79922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:536, owner: updateMemberRoles_79921.onEnd, offset: 0x01e66d28, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_ROLES_SAVE_COMPLETE'});
}
function _fun79925() { // fn#79925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:1074, offset: 0x01e66e53, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_CHANGE_NICKNAME_SUCCESS'});
}
function _fun79926({status}) { // fn#79926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:1162, offset: 0x01e66e84, size: 249 bytes, params: 2, frame: 17
let value = environment.__proto__;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
let r4 = require == null ? Reflect.apply(string, intl, [t['5LO/Ss']]) : intl.string(t.rJfW6S);
r4 = status === 403 ? intl.formatToMarkdownString(t.Izf9jO, {}) : r4;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_CHANGE_NICKNAME_FAILURE', error: r4});
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildSettingsModalMembersActionCreators.tsx');
exports.default = object;
function startEditingRoles(a0, a1) { // fn#79918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:130, offset: 0x01e66bde, size: 63 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_START_EDITING',
guildId: a0, userId: a1});
}
function stopEditingRoles() { // fn#79919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:243, offset: 0x01e66c1d, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_STOP_EDITING'});
}
function toggleRole(a0, a1) { // fn#79920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:332, offset: 0x01e66c4e, size: 64 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_TOGGLE_ROLE',
roleId: a0, state: a1});
}
function updateMemberRoles_79921(a0, a1, a2) { // fn#79921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:434, offset: 0x01e66c8e, size: 154 bytes, params: 4, frame: 18
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_ROLES_SAVE'});
const updateMemberRoles_79921OnEnd2 = updateMemberRoles_79921OnEnd;
const HTTP = (HTTPUtilsModule).HTTP;
const patch = HTTP.patch;
object = {};
object.url = Endpoints.GUILD_MEMBER(a0, a1);
object.body = {roles: a2};
object.oldFormErrors = true;
object.rejectWithError = true;
Reflect.apply(patch, HTTP, [object]).then(updateMemberRoles_79921OnEnd2, updateMemberRoles_79921OnEnd2);
function updateMemberRoles_79921OnEnd() { // fn#79922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:536, owner: updateMemberRoles_79921.onEnd, offset: 0x01e66d28, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_ROLES_SAVE_COMPLETE'});
}
}
function startEditingNickname() { // fn#79923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:732, offset: 0x01e66d59, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_START_EDITING_NICKNAME'});
}
function changeNickname_79924(a0, a1, a2) { // fn#79924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:835, offset: 0x01e66d8a, size: 201 bytes, params: 4, frame: 18
const env0_0 = a1;
const r5 = a1 == null ? Endpoints.GUILD_MEMBER_NICK(a0, ME) : Endpoints.GUILD_MEMBER(a0, a1);
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_CHANGE_NICKNAME'});
const HTTP = (HTTPUtilsModule).HTTP;
HTTP.patch({url: r5, body: {nick: a2}, oldFormErrors: true, rejectWithError: false}).then(_fun79925, _fun79926);
function _fun79925() { // fn#79925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:1074, offset: 0x01e66e53, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_CHANGE_NICKNAME_SUCCESS'});
}
function _fun79926({status}) { // fn#79926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10484:1162, offset: 0x01e66e84, size: 249 bytes, params: 2, frame: 17
let value = environment.__proto__;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
let r4 = require == null ? Reflect.apply(string, intl, [t['5LO/Ss']]) : intl.string(t.rJfW6S);
r4 = status === 403 ? intl.formatToMarkdownString(t.Izf9jO, {}) : r4;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'GUILD_SETTINGS_MODAL_MEMBERS_CHANGE_NICKNAME_FAILURE', error: r4});
}
}
}
global.__d(_fun79917, 10298, [661, 694, 507, 1244,
2]) /* metro module 10298, dependencies: [661, 694, 507, 1244, 2] */;
@@ -1,4 +1,14 @@
/* Metro module 10297; source: modules/guild_settings/GuildSettingsModalMembersStore.tsx; dependencies: [6, 7, 15, 17, 18, 1945, 661, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun79898(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:6, offset: 0x01e66767, size: 413 bytes, params: 8, frame: 21
const closure = function() {
env0_7 = null;
@@ -12,14 +22,7 @@ function _fun79898(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).FormStates;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun79904(Store);
value.displayName = 'GuildSettingsModalMembersStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -41,66 +44,98 @@ function _fun79898(global, require, importDefault, importAll, module, exports, d
GUILD_SETTINGS_MODAL_MEMBERS_CHANGE_NICKNAME_FAILURE: function(a0) {
env0_9 = a0.error;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/GuildSettingsModalMembersStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildSettingsModalMembersStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_79899() { // fn#79899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:179, offset: 0x01e66904, 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) {
function _isNativeReflectConstruct_79899() { // fn#79899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:179, offset: 0x01e66904, 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_79899_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_79899_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun79904(a0) { // fn#79904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:528, offset: 0x01e66985, size: 199 bytes, params: 2, frame: 16
const closure = GuildSettingsModalMembersStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: function() {
this.waitFor(GuildMemberStore);
}}, {key: 'isSubmitting', get: get_79907}, {key: 'isEditing', get: get_79908}, {key: 'roles', get: get_79909},
{key: 'memberId', get: get_79910}, {key: 'nicknameError', get: get_79911}]);
}
function _fun79904(a0) { // fn#79904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:528, offset: 0x01e66985, size: 199 bytes, params: 2, frame: 16
const GuildSettingsModalMembersStore2 = GuildSettingsModalMembersStore;
Inherits(GuildSettingsModalMembersStore2, a0);
return CreateClass(GuildSettingsModalMembersStore2, [{key: 'initialize', value: function() {
this.waitFor(GuildMemberStore);
}}, {key: 'isSubmitting', get: get_79907}, {key: 'isEditing', get: get_79908}, {key: 'roles', get: get_79909},
{key: 'memberId', get: get_79910}, {key: 'nicknameError', get: get_79911}]);
function GuildSettingsModalMembersStore() { // fn#79905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:540, offset: 0x0118e5fe, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, GuildSettingsModalMembersStore);
const value3 = env1_3(GuildSettingsModalMembersStore);
return env1_2(this, _isNativeReflectConstruct_79899() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function get_79907() { // fn#79907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:961, offset: 0x013a86ca, size: 23 bytes, params: 1, frame: 2
const binding = env1_7;
const SUBMITTING = FormStates.SUBMITTING;
return binding === SUBMITTING;
}
function get_79908() { // fn#79908, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function get_79909() { // fn#79909, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function get_79910() { // fn#79910, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function get_79911() { // fn#79911, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function GUILD_SETTINGS_MODAL_MEMBERS_TOGGLE_ROLE({roleId, state}) { // fn#79913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:1603, offset: 0x01e66a9c, size: 102 bytes, params: 2, frame: 16
var value2;
var items2;
var value3;
if (env0_11 == null) {
return false;
}
const binding = env0_11;
if (state) {
items2 = [];
value3 = arraySpread(items2, binding, 0, binding);
items2[value3] = roleId;
value3 + 1;
} else {
value2 = binding.filter(function(a0) {
return a0 !== roleId;
});
function GUILD_SETTINGS_MODAL_MEMBERS_TOGGLE_ROLE({roleId, state}) { // fn#79913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10483:1603, offset: 0x01e66a9c, size: 102 bytes, params: 2, frame: 16
var value2;
var items2;
var value3;
if (env0_11 == null) {
return false;
}
const binding = env0_11;
if (state) {
items2 = [];
value3 = arraySpread(items2, binding, 0, binding);
items2[value3] = roleId;
value3 + 1;
} else {
value2 = binding.filter(function(a0) {
return a0 !== roleId;
});
}
}
}
global.__d(_fun79898, 10297, [6, 7, 15, 17, 18, 1945, 661, 566, 694,
2]) /* metro module 10297, dependencies: [6, 7, 15, 17, 18, 1945, 661, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,9 @@
/* Metro module 15969; source: modules/guild_settings/GuildSettingsUtils.tsx; dependencies: [1939, 661, 483, 15192, 2] */
import PermissionSpecUtils from '../../utils/PermissionSpecUtils.tsx'; /* Metro dependency 15192 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as GuildRoleRecordModule from '../../records/GuildRoleRecord.tsx'; /* Metro dependency 1939 */
function _fun123455(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16177:6, offset: 0x0258e47b, size: 196 bytes, params: 8, frame: 18
const _arrayLikeToArray_123458 = function(a0, a1) {
var r0;
@@ -45,108 +50,111 @@ function _fun123455(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(1939) /* metro dependency 1939: GuildRoleRecord */).hasPermission;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.ElevatedPermissions;
const env0_5 = constantsModule.ElevatedPermissionsList;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/GuildSettingsUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildSettingsUtils.tsx');
exports.isRolePowerful = function(a0) {
return importAll(dependencyMap[2]).hasAny(a0.permissions, ElevatedPermissions);
};
exports.getPowerfulPermissionTitles = getPowerfulPermissionTitles;
}
function _createForOfIteratorHelperLoose_123456(a0, a1) { // fn#123456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16177:188, offset: 0x0258e53f, 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)) {
function _createForOfIteratorHelperLoose_123456(a0, a1) { // fn#123456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16177:188, offset: 0x0258e53f, 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);
}
return _fun123457;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_123458(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun123457;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_123458(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_123458(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_123458(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun123457;
}
return _fun123457;
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 _fun123457() { // fn#123457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16177:759, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
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 getPowerfulPermissionTitles(a0, a1) { // fn#123460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16177:1295, offset: 0x0258e6e7, size: 134 bytes, params: 3, frame: 19
var r2;
var value5;
var push;
var toString;
var title;
var value6;
const items2 = [];
const guildPermissionSpecMap = (importDefault(15192) /* metro dependency 15192: PermissionSpecUtils */).getGuildPermissionSpecMap(a0);
const value3 = _createForOfIteratorHelperLoose_123456(ElevatedPermissionsList);
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
while (true) {
value5 = r2.value;
if (hasPermission(a1, value5)) {
push = items2.push;
toString = value5.toString;
title = guildPermissionSpecMap[Reflect.apply(toString, value5, [])].title;
Reflect.apply(push, items2, [title]);
function getPowerfulPermissionTitles(a0, a1) { // fn#123460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16177:1295, offset: 0x0258e6e7, size: 134 bytes, params: 3, frame: 19
var r2;
var value5;
var push;
var toString;
var title;
var value6;
const items2 = [];
const guildPermissionSpecMap = (PermissionSpecUtils).getGuildPermissionSpecMap(a0);
const value3 = _createForOfIteratorHelperLoose_123456(ElevatedPermissionsList);
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
while (true) {
value5 = r2.value;
if (hasPermission(a1, value5)) {
push = items2.push;
toString = value5.toString;
title = guildPermissionSpecMap[Reflect.apply(toString, value5, [])].title;
Reflect.apply(push, items2, [title]);
}
value6 = value3();
done = value6.done;
if (done) {
break;
}
r2 = value6;
continue;
}
value6 = value3();
done = value6.done;
if (done) {
break;
}
r2 = value6;
continue;
}
return items2;
}
return items2;
}
global.__d(_fun123455, 15969, [1939, 661, 483, 15192,
2]) /* metro module 15969, dependencies: [1939, 661, 483, 15192, 2] */;
@@ -1,100 +1,117 @@
/* Metro module 15933; source: modules/guild_settings/apps/native/GuildSettingsModalLobbiesLinked.tsx; dependencies: [31, 3793, 1878, 661, 33, 1484, 6777, 6231, 6238, 4805, 6647, 3860, 697, 15866, 22, 7972, 4572, 5462, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as UseChannelNameModule from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as NavScrimAndroidModule from '../../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
function _fun122888(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16141:6, offset: 0x02579606, size: 222 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 relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).GuildSettingsSections;
const value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.Fragment;
const env0_8 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/apps/native/GuildSettingsModalLobbiesLinked.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/apps/native/GuildSettingsModalLobbiesLinked.tsx');
exports.default = GuildSettingsModalLobbiesLinked;
}
function SyncingToGamesItem({applicationId, channels, isOnlySection}) { // fn#122889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16141:196, offset: 0x025796e4, size: 193 bytes, params: 2, frame: 19
const env0_2 = (UseNavigationNativeModule).useNavigation();
if (channels.length === 0) {
return null;
} else {
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup
title={(require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(applicationId)?.name}
hasIcons
>
{channels.map(_fun122890)}
</TableRowGroup>
);
}
function _fun122890(a0) { // fn#122890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16141:444, offset: 0x025797a5, size: 178 bytes, params: 2, frame: 24
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const TableRow = (TableRowNativeModule).TableRow;
const object = {};
object.label = UseChannelNameModule.computeChannelName(a0, UserStore, RelationshipStore);
const TableRow2 = (TableRowNativeModule).TableRow;
const Icon = TableRow2.Icon;
object.icon = (
<Icon IconComponent={(require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconComponent(a0)} />
);
object.arrow = true;
object.onPress = onPress_122891;
return <TableRow {...object} key={a0.id} />;
function onPress_122891() { // fn#122891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16141:606, offset: 0x02579857, size: 85 bytes, params: 1, frame: 17
const value = environment.__proto__;
const binding = env1_2;
const push = binding.push;
const EDIT_LINKED_LOBBY = GuildSettingsSections.EDIT_LINKED_LOBBY;
const isOnlySectionBinding = isOnlySection;
const value4 = 1;
Reflect.apply(push, binding, [EDIT_LINKED_LOBBY, {channel: env0_0,
numScreensToPop: isOnlySectionBinding ? value4 !== channels.length ? value4 : 2 : value4}]);
}
}
function SyncingToGamesItem({applicationId, channels, isOnlySection}) { // fn#122889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16141:196, offset: 0x025796e4, size: 193 bytes, params: 2, frame: 19
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
if (channels.length === 0) {
return null;
} else {
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup
title={(require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(applicationId)?.name}
hasIcons
>
{channels.map(_fun122890)}
</TableRowGroup>
);
}
function GuildSettingsModalLobbiesLinked({contentContainerStyle, guildId}) { // fn#122892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16141:814, offset: 0x025798ac, size: 393 bytes, params: 2, frame: 28
const useToken = UseTokenModule.useToken;
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
const value2 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_PADDING]);
const value4 = (importDefault(22) /* metro dependency 22 */).groupBy((require(15866) /* metro dependency 15866: useChannelsAllowedToUnlink */).useChannelsAllowedToUnlink(guildId),
function({linkedLobby}) {
return linkedLobby?.application_id;
});
const Object = global.Object;
const value5 = Object.keys(value4);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const Form = (NativeModule).Form;
const PX_16 = (Native).space.PX_16;
const items2 = [{paddingTop: PX_16}, contentContainerStyle];
const Stack = (StackNativeModule).Stack;
const object2 = {paddingHorizontal: value2};
const PX_24 = (Native).space.PX_24;
const form = (
<Form contentContainerStyle={items2}>
<Stack style={object2} spacing={PX_24}>
{value5.map(_fun122894)}
</Stack>
</Form>
);
const NavScrim = (NavScrimAndroidModule).NavScrim;
return (
<>
{form}
<NavScrim />
</>
);
function _fun122894(a0) { // fn#122894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16141:1306, offset: 0x02579a51, size: 68 bytes, params: 2, frame: 16
return (
<SyncingToGamesItem
applicationId={a0}
channels={env0_0[a0]}
isOnlySection={env0_1.length === 1}
key={a0}
/>
);
}
}
}
function GuildSettingsModalLobbiesLinked({contentContainerStyle, guildId}) { // fn#122892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16141:814, offset: 0x025798ac, size: 393 bytes, params: 2, frame: 28
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const value2 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
const value4 = (importDefault(22) /* metro dependency 22 */).groupBy((require(15866) /* metro dependency 15866: useChannelsAllowedToUnlink */).useChannelsAllowedToUnlink(guildId),
function({linkedLobby}) {
return linkedLobby?.application_id;
});
const Object = global.Object;
const value5 = Object.keys(value4);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const items2 = [{paddingTop: PX_16}, contentContainerStyle];
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const object = {paddingHorizontal: value2};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const form = <Form contentContainerStyle={items2}><Stack style={object} spacing={PX_24}>{value5.map(_fun122894)}</Stack></Form>;
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<>
{form}
<NavScrim />
</>
);
}
function _fun122890(a0) { // fn#122890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16141:444, offset: 0x025797a5, size: 178 bytes, params: 2, frame: 24
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {};
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
object2.label = useChannelNameModule.computeChannelName(a0, UserStore, RelationshipStore);
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = TableRow2.Icon;
object2.icon = <Icon IconComponent={(require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconComponent(a0)} />;
object2.arrow = true;
object2.onPress = onPress_122891;
return <TableRow {...object2} key={a0.id} />;
}
function _fun122894(a0) { // fn#122894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16141:1306, offset: 0x02579a51, size: 68 bytes, params: 2, frame: 16
return (
<SyncingToGamesItem
applicationId={a0}
channels={env0_0[a0]}
isOnlySection={env0_1.length === 1}
key={a0}
/>
);
}
function onPress_122891() { // fn#122891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16141:606, offset: 0x02579857, size: 85 bytes, params: 1, frame: 17
const value = environment.__proto__;
const binding = env1_2;
const push = binding.push;
const EDIT_LINKED_LOBBY = GuildSettingsSections.EDIT_LINKED_LOBBY;
const isOnlySectionBinding = isOnlySection;
const value4 = 1;
Reflect.apply(push, binding, [EDIT_LINKED_LOBBY, {channel: env0_0,
numScreensToPop: isOnlySectionBinding ? value4 !== channels.length ? value4 : 2 : value4}]);
}
global.__d(_fun122888, 15933, [31, 3793, 1878, 661, 33, 1484, 6777, 6231, 6238, 4805, 6647, 3860, 697, 15866, 22,
7972, 4572, 5462,
2]) /* metro module 15933, dependencies: [31, 3793, 1878, 661, 33, 1484, 6777, 6231, 6238, 4805, 6647, 3860, 697, 15866, 22, 7972, 4572, 5462, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,20 @@
/* Metro module 15878; source: modules/guild_settings/audit_log/GuildSettingsAuditLogStore.tsx; dependencies: [6, 7, 15, 17, 18, 15879, 1383, 1939, 1945, 1938, 1867, 661, 483, 22, 566, 694, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildRoleStore from '../../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import AuditLogRecord from '../../../records/AuditLogRecord.tsx'; /* Metro dependency 15879 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ChannelRecordModule from '../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as GuildRoleRecordModule from '../../../records/GuildRoleRecord.tsx'; /* Metro dependency 1939 */
import * as AuditLogRecordModule from '../../../records/AuditLogRecord.tsx'; /* Metro dependency 15879 */
function _fun122237(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:6, offset: 0x0255f32b, size: 891 bytes, params: 8, frame: 45
const _arrayLikeToArray_122243 = function(a0, a1) {
var r0;
@@ -48,22 +64,10 @@ function _fun122237(global, require, importDefault, importAll, module, exports,
a0.reverse().forEach(_fun122245);
return [];
};
const closure = GUILD_SETTINGS_SET_SECTION_122246;
const GUILD_SETTINGS_SET_SECTION_1222462 = GUILD_SETTINGS_SET_SECTION_122246;
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 auditLogRecord = importDefault(15879) /* metro dependency 15879: AuditLogRecord */;
const env0_8 = (require(15879) /* metro dependency 15879: AuditLogRecord */).AuditLogChange;
const env0_9 = (require(1383) /* metro dependency 1383: ChannelRecord */).isGuildSelectableChannelType;
const env0_10 = (require(1939) /* metro dependency 1939: GuildRoleRecord */).hasAnyPermission;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const AuditLogActions = value.AuditLogActions;
const env0_15 = value.AuditLogActionTypes;
const env0_16 = value.AuditLogTargetTypes;
@@ -99,7 +103,7 @@ function _fun122237(global, require, importDefault, importAll, module, exports,
const env0_29 = [];
let env0_36 = AuditLogActions.ALL;
let env0_38 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun122250(Store).displayName = 'GuildSettingsAuditLogStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {AUDIT_LOG_FETCH_START: function() {
env0_31 = true;
@@ -117,7 +121,8 @@ function _fun122237(global, require, importDefault, importAll, module, exports,
env0_35 = a0.userId;
}, AUDIT_LOG_FILTER_BY_TARGET: function(a0) {
env0_37 = a0.targetId;
}, GUILD_SETTINGS_SET_SECTION: closure, GUILD_SETTINGS_INIT: function({guildId, section}) {
}, GUILD_SETTINGS_SET_SECTION: GUILD_SETTINGS_SET_SECTION_1222462, GUILD_SETTINGS_INIT: function({guildId,
section}) {
env0_21 = guildId;
env0_37 = null;
return GUILD_SETTINGS_SET_SECTION_122246({section: section});
@@ -136,441 +141,517 @@ function _fun122237(global, require, importDefault, importAll, module, exports,
env0_27 = [];
env0_28 = [];
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/audit_log/GuildSettingsAuditLogStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/audit_log/GuildSettingsAuditLogStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_122238() { // fn#122238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:455, offset: 0x0255f6a6, 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_122238_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_122241(a0, a1) { // fn#122241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:648, offset: 0x0255f708, 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) {
function _isNativeReflectConstruct_122238() { // fn#122238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:455, offset: 0x0255f6a6, 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 _fun122242;
return (_isNativeReflectConstruct_122238_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_122243(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') {
function _createForOfIteratorHelperLoose_122241(a0, a1) { // fn#122241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:648, offset: 0x0255f708, 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 _fun122242;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_122243(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_122243(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun122242;
}
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 transformEntries(a0) { // fn#122244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:1908, offset: 0x0255f87c, size: 48 bytes, params: 2, frame: 12
a0.reverse().forEach(_fun122245);
return [];
}
function GUILD_SETTINGS_SET_SECTION_122246({section}) { // fn#122246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:3900, offset: 0x0255fe8a, size: 199 bytes, params: 2, frame: 16
var value4;
const AUDIT_LOG = GuildSettingsSections.AUDIT_LOG;
if (section !== AUDIT_LOG) {
return false;
}
const members = GuildMemberStore.getMembers(env0_21);
let env0_0 = GuildStore.getGuild(env0_21);
if (env0_21 != null) {
value4 = GuildRoleStore.getUnsafeMutableRoles(env0_21);
}
env0_24 = (importDefault(22) /* metro dependency 22 */)(members).filter(function(a0) {
var env0_0 = a0;
return a0.roles.some(_fun122248);
}).map(function(a0) {
return a0.userId;
}).value();
}
function _fun122250(a0) { // fn#122250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4233, offset: 0x0255ffd7, size: 528 bytes, params: 2, frame: 16
const closure = GuildSettingsAuditLogStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(GuildStore, GuildRoleStore, GuildMemberStore);
}}, {key: 'logs', get: get_122253}, {key: 'integrations', get: get_122254}, {key: 'webhooks', get: get_122255},
{key: 'guildScheduledEvents', get: get_122256}, {key: 'automodRules', get: get_122257}, {key: 'threads',
get: get_122258}, {key: 'applicationCommands', get: get_122259}, {key: 'isInitialLoading', get: get_122260},
{key: 'isLoading', get: get_122261}, {key: 'isLoadingNextPage', get: get_122262}, {key: 'hasOlderLogs',
get: get_122263}, {key: 'hasError', get: get_122264}, {key: 'userIds', get: get_122265}, {key: 'userIdFilter',
get: get_122266}, {key: 'targetIdFilter', get: get_122267}, {key: 'actionFilter', get: function() {
return ALL;
}}, {key: 'deletedTargets', get: get_122269}, {key: 'groupedFetchCount', get: get_122270}]);
}
function AUDIT_LOG_FETCH_SUCCESS(a0) { // fn#122272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:5629, offset: 0x0256027b, size: 148 bytes, params: 2, frame: 14
env0_22 = transformEntries(a0.logs);
env0_23 = a0.integrations;
env0_25 = a0.webhooks;
env0_26 = a0.guildScheduledEvents;
env0_27 = a0.automodRules ?? [];
env0_28 = a0.threads;
env0_29 = a0.applicationCommands;
if (a0.logs.length < AUDIT_LOG_PAGE_LIMIT) {
}
}
function AUDIT_LOG_FETCH_NEXT_PAGE_START({isGroupedFetch}) { // fn#122274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:5966, offset: 0x0256032a, size: 36 bytes, params: 2, frame: 3
var binding;
if (isGroupedFetch) {
binding = env0_39;
env0_39 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
function AUDIT_LOG_FETCH_NEXT_PAGE_SUCCESS({logs, integrations, webhooks, guildScheduledEvents, automodRules, threads, applicationCommands}) { // fn#122275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:6067, offset: 0x0256034e, size: 167 bytes, params: 2, frame: 20
var value4;
var binding;
var items2;
if (logs.length === 0 || logs.length < AUDIT_LOG_PAGE_LIMIT) {
}
if (logs.length > 0) {
value4 = transformEntries(logs);
binding = env0_22;
items2 = [];
arraySpread(items2, value4, arraySpread(items2, binding, 0, undefined), undefined);
}
}
function _fun122245(a0) { // fn#122245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:1978, offset: 0x0255f8ac, size: 1502 bytes, params: 2, frame: 29
var r18;
var r2;
var r5;
var r9;
var r10;
var r14;
var r15;
var r16;
var key;
var r1;
var r7;
var r8;
var auto_moderation_rule_name;
var status;
var oldValue;
var push;
var value2;
var REASON;
var prototype;
var value3;
var auditLogChange;
var value5;
var value6;
var value7;
var done;
var value8;
var old_value;
var new_value;
var value9;
var value10;
var NAME;
var TYPE;
var TITLE;
var value11;
var options;
var PRUNE_DELETE_DAYS;
var value14;
var AUTO_MODERATION_TRIGGERED_RULE_NAME;
var value17;
var STATUS;
var value22;
var defaultImport;
var targetType;
var value44;
var merge;
var items2;
const items3 = [];
let reason = a0.reason;
let value = null;
if (value != reason) {
push = items3.push;
value2 = environment.__proto__;
REASON = AuditLogChangeKeys.REASON;
reason = a0.reason;
prototype = AuditLogChange.prototype;
value3 = Object.create(prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(REASON, value, reason);
Reflect.apply(push, items3, [auditLogChange instanceof Object ? auditLogChange : value3]);
}
let changes = a0.changes;
if (value != changes) {
value5 = environment.__proto__;
value6 = _createForOfIteratorHelperLoose_122241(a0.changes);
value7 = value6();
done = value7.done;
if (done) {
r1 = value;
r7 = value;
r8 = value;
} else {
r2 = value7;
r5 = value;
r9 = value;
r10 = value;
while (true) {
value8 = r2.value;
key = value8.key;
old_value = value8.old_value;
new_value = value8.new_value;
prototype = AuditLogChange.prototype;
value9 = Object.create(prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange();
value10 = auditLogChange instanceof Object ? auditLogChange : value9;
items3.push(value10);
key = value10.key;
NAME = AuditLogChangeKeys.NAME;
if (key !== NAME) {
key = value10.key;
TYPE = AuditLogChangeKeys.TYPE;
if (key === TYPE) {
r14 = value10;
r15 = r9;
r16 = r10;
break;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_122243(a0, value);
r6 = value;
} else {
r6 = value;
}
key = value10.key;
TITLE = AuditLogChangeKeys.TITLE;
if (key !== TITLE) {
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun122242;
}
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 _fun122242() { // fn#122242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:1219, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function transformEntries(a0) { // fn#122244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:1908, offset: 0x0255f87c, size: 48 bytes, params: 2, frame: 12
a0.reverse().forEach(_fun122245);
return [];
function _fun122245(a0) { // fn#122245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:1978, offset: 0x0255f8ac, size: 1502 bytes, params: 2, frame: 29
var r18;
var r2;
var r5;
var r9;
var r10;
var r14;
var r15;
var r16;
var key;
var r1;
var r7;
var r8;
var auto_moderation_rule_name;
var status;
var oldValue;
var push;
var value2;
var REASON;
var prototype;
var value3;
var auditLogChange;
var value5;
var value6;
var value7;
var done;
var value8;
var old_value;
var new_value;
var value9;
var value10;
var NAME;
var TYPE;
var TITLE;
var value11;
var options;
var PRUNE_DELETE_DAYS;
var value14;
var AUTO_MODERATION_TRIGGERED_RULE_NAME;
var value17;
var STATUS;
var value22;
var defaultImport;
var targetType;
var value44;
var merge;
var items2;
const items3 = [];
let reason = a0.reason;
let value = null;
if (value != reason) {
push = items3.push;
value2 = environment.__proto__;
REASON = AuditLogChangeKeys.REASON;
reason = a0.reason;
prototype = AuditLogChange.prototype;
value3 = Object.create(prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(REASON, value, reason);
Reflect.apply(push, items3, [auditLogChange instanceof Object ? auditLogChange : value3]);
}
let changes = a0.changes;
if (value != changes) {
value5 = environment.__proto__;
value6 = _createForOfIteratorHelperLoose_122241(a0.changes);
value7 = value6();
done = value7.done;
if (done) {
r1 = value;
r7 = value;
r8 = value;
} else {
r2 = value7;
r5 = value;
r9 = value;
r10 = value;
while (true) {
value8 = r2.value;
key = value8.key;
old_value = value8.old_value;
new_value = value8.new_value;
prototype = AuditLogChange.prototype;
value9 = Object.create(prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange();
value10 = auditLogChange instanceof Object ? auditLogChange : value9;
items3.push(value10);
key = value10.key;
NAME = AuditLogChangeKeys.NAME;
if (key !== NAME) {
key = value10.key;
TYPE = AuditLogChangeKeys.TYPE;
if (key === TYPE) {
r14 = value10;
r15 = r9;
r16 = r10;
break;
}
key = value10.key;
TITLE = AuditLogChangeKeys.TITLE;
if (key !== TITLE) {
r14 = r5;
r15 = r9;
r16 = r10;
break;
}
r14 = r5;
r15 = value10;
r16 = r10;
break;
}
r14 = r5;
r15 = r9;
r16 = r10;
break;
r16 = value10;
value11 = value6();
done = value11.done;
if (done) {
r1 = r16;
r7 = r14;
r8 = r15;
r18 = key;
break;
}
r2 = value11;
r5 = r14;
r9 = r15;
r10 = r16;
continue;
}
r14 = r5;
r15 = value10;
r16 = r10;
break;
}
r14 = r5;
r15 = r9;
r16 = value10;
value11 = value6();
done = value11.done;
if (done) {
r1 = r16;
r7 = r14;
r8 = r15;
r18 = key;
break;
}
r2 = value11;
r5 = r14;
r9 = r15;
r10 = r16;
continue;
} else {
r1 = value;
r7 = value;
r8 = value;
}
}
} else {
r1 = value;
r7 = value;
r8 = value;
}
let action_type = a0.action_type;
const MEMBER_PRUNE = AuditLogActions.MEMBER_PRUNE;
if (action_type === MEMBER_PRUNE) {
r10 = value != a0 && value != a0.options && value != a0.options.delete_member_days ? a0.options.delete_member_days : 1;
PRUNE_DELETE_DAYS = AuditLogChangeKeys.PRUNE_DELETE_DAYS;
value14 = Object.create(AuditLogChange.prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(PRUNE_DELETE_DAYS, value);
items3.push(auditLogChange instanceof Object ? auditLogChange : value14);
}
action_type = a0.action_type;
const AUTO_MODERATION_BLOCK_MESSAGE = AuditLogActions.AUTO_MODERATION_BLOCK_MESSAGE;
if (action_type === AUTO_MODERATION_BLOCK_MESSAGE) {
options = a0.options;
auto_moderation_rule_name = value == options ? undefined : options.auto_moderation_rule_name;
if (value != auto_moderation_rule_name) {
push = items3.push;
AUTO_MODERATION_TRIGGERED_RULE_NAME = AuditLogChangeKeys.AUTO_MODERATION_TRIGGERED_RULE_NAME;
auto_moderation_rule_name = a0.options.auto_moderation_rule_name;
value17 = Object.create(AuditLogChange.prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(AUTO_MODERATION_TRIGGERED_RULE_NAME, value);
Reflect.apply(push, items3, [auditLogChange instanceof Object ? auditLogChange : value17]);
}
}
action_type = a0.action_type;
const VOICE_CHANNEL_STATUS_CREATE = AuditLogActions.VOICE_CHANNEL_STATUS_CREATE;
if (action_type === VOICE_CHANNEL_STATUS_CREATE && value != (value == a0.options ? undefined : a0.options.status)) {
push = items3.push;
STATUS = AuditLogChangeKeys.STATUS;
status = a0.options.status;
value22 = Object.create(AuditLogChange.prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(STATUS, value);
Reflect.apply(push, items3, [auditLogChange instanceof Object ? auditLogChange : value22]);
}
const user_id = a0.user_id;
const auditLogRecord = new AuditLogRecord({id: a0.id, action: a0.action_type, targetId: a0.target_id,
userId: user_id, changes: items3, options: a0.options});
const property = env0_0[0];
let binding = env0_1;
r9 = value != property && property.action === auditLogRecord.action && property.targetId === auditLogRecord.targetId && property.userId === auditLogRecord.userId;
if (r9) {
defaultImport = importDefault(22) /* metro dependency 22 */;
r9 = defaultImport.isEqual(property.options, auditLogRecord.options);
}
r9 = r9 && auditLogRecord.timestampStart.diff(property.timestampStart, 'minutes') < 30 && binding < 50;
r9 = r9 && auditLogRecord.targetType !== AuditLogTargetTypes.INVITE && auditLogRecord.action !== AuditLogActions.MESSAGE_DELETE;
r9 = r9 && auditLogRecord.action !== AuditLogActions.MESSAGE_BULK_DELETE && auditLogRecord.action !== AuditLogActions.MESSAGE_PIN;
r9 = r9 && auditLogRecord.action !== AuditLogActions.MESSAGE_UNPIN && auditLogRecord.action !== AuditLogActions.MEMBER_MOVE;
r9 = r9 && auditLogRecord.action !== AuditLogActions.MEMBER_DISCONNECT && auditLogRecord.action !== AuditLogActions.BOT_ADD;
r9 = r9 && auditLogRecord.action !== AuditLogActions.APPLICATION_COMMAND_PERMISSION_UPDATE && auditLogRecord.action !== AuditLogActions.MEMBER_PRUNE;
if (r9) {
binding = env0_0;
merge = property.merge;
changes = property.changes;
items2 = [];
value = arraySpread(items2, changes, 0, r18);
changes = auditLogRecord.changes;
arraySpread(items2, changes, value, r18);
binding[0] = Reflect.apply(merge, property, [{changes: items2, timestampEnd: auditLogRecord.timestampStart}]);
binding = env0_1;
value = typeof binding === 'bigint' ? binding : +binding;
env0_1 = typeof value === 'bigint' ? value + 1n : +value + 1;
} else {
var actionType = auditLogRecord.actionType;
var DELETE = AuditLogActionTypes.DELETE;
if (actionType === DELETE) {
if (value != r1) {
value44 = undefined;
oldValue = value == r1 ? value44 : r1.oldValue;
r9 = value != oldValue ? oldValue : value == r8 ? value44 : r8.oldValue;
targetType = auditLogRecord.targetType;
r1 = targetType !== AuditLogTargetTypes.CHANNEL && auditLogRecord.targetType !== AuditLogTargetTypes.CHANNEL_OVERWRITE;
r1 = !r1 ? value === r7 : r1;
r1 = !r1 ? !isGuildSelectableChannelType(r7.oldValue) : r1;
r8 = r1 ? r9 : '#' + r9;
binding = env1_38;
targetType = auditLogRecord.targetType;
if (value == binding[targetType]) {
env1_38[auditLogRecord.targetType] = {[auditLogRecord.targetId]: r8};
} else {
env1_38[auditLogRecord.targetType][auditLogRecord.targetId] = r8;
}
} else if (value != r8) {
value44 = undefined;
oldValue = value == r1 ? value44 : r1.oldValue;
r9 = value != oldValue ? oldValue : value == r8 ? value44 : r8.oldValue;
targetType = auditLogRecord.targetType;
r1 = targetType !== AuditLogTargetTypes.CHANNEL && auditLogRecord.targetType !== AuditLogTargetTypes.CHANNEL_OVERWRITE;
r1 = !r1 ? value === r7 : r1;
r1 = !r1 ? !isGuildSelectableChannelType(r7.oldValue) : r1;
r8 = r1 ? r9 : '#' + r9;
binding = env1_38;
targetType = auditLogRecord.targetType;
if (value == binding[targetType]) {
env1_38[auditLogRecord.targetType] = {[auditLogRecord.targetId]: r8};
} else {
env1_38[auditLogRecord.targetType][auditLogRecord.targetId] = r8;
let action_type = a0.action_type;
const MEMBER_PRUNE = AuditLogActions.MEMBER_PRUNE;
if (action_type === MEMBER_PRUNE) {
r10 = value != a0 && value != a0.options && value != a0.options.delete_member_days ? a0.options.delete_member_days : 1;
PRUNE_DELETE_DAYS = AuditLogChangeKeys.PRUNE_DELETE_DAYS;
value14 = Object.create(AuditLogChange.prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(PRUNE_DELETE_DAYS, value);
items3.push(auditLogChange instanceof Object ? auditLogChange : value14);
}
action_type = a0.action_type;
const AUTO_MODERATION_BLOCK_MESSAGE = AuditLogActions.AUTO_MODERATION_BLOCK_MESSAGE;
if (action_type === AUTO_MODERATION_BLOCK_MESSAGE) {
options = a0.options;
auto_moderation_rule_name = value == options ? undefined : options.auto_moderation_rule_name;
if (value != auto_moderation_rule_name) {
push = items3.push;
AUTO_MODERATION_TRIGGERED_RULE_NAME = AuditLogChangeKeys.AUTO_MODERATION_TRIGGERED_RULE_NAME;
auto_moderation_rule_name = a0.options.auto_moderation_rule_name;
value17 = Object.create(AuditLogChange.prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(AUTO_MODERATION_TRIGGERED_RULE_NAME, value);
Reflect.apply(push, items3, [auditLogChange instanceof Object ? auditLogChange : value17]);
}
}
action_type = a0.action_type;
const VOICE_CHANNEL_STATUS_CREATE = AuditLogActions.VOICE_CHANNEL_STATUS_CREATE;
if (action_type === VOICE_CHANNEL_STATUS_CREATE && value != (value == a0.options ? undefined : a0.options.status)) {
push = items3.push;
STATUS = AuditLogChangeKeys.STATUS;
status = a0.options.status;
value22 = Object.create(AuditLogChange.prototype, {constructor: {value: AuditLogChange}});
auditLogChange = new AuditLogChange(STATUS, value);
Reflect.apply(push, items3, [auditLogChange instanceof Object ? auditLogChange : value22]);
}
const auditLogRecordBinding = AuditLogRecord;
const user_id = a0.user_id;
const auditLogRecord2 = new auditLogRecordBinding({id: a0.id, action: a0.action_type, targetId: a0.target_id,
userId: user_id, changes: items3, options: a0.options});
const property = env0_0[0];
let binding = env0_1;
r9 = value != property && property.action === auditLogRecord2.action && property.targetId === auditLogRecord2.targetId && property.userId === auditLogRecord2.userId;
if (r9) {
defaultImport = importDefault(22) /* metro dependency 22 */;
r9 = defaultImport.isEqual(property.options, auditLogRecord2.options);
}
r9 = r9 && auditLogRecord2.timestampStart.diff(property.timestampStart, 'minutes') < 30 && binding < 50;
r9 = r9 && auditLogRecord2.targetType !== AuditLogTargetTypes.INVITE && auditLogRecord2.action !== AuditLogActions.MESSAGE_DELETE;
r9 = r9 && auditLogRecord2.action !== AuditLogActions.MESSAGE_BULK_DELETE && auditLogRecord2.action !== AuditLogActions.MESSAGE_PIN;
r9 = r9 && auditLogRecord2.action !== AuditLogActions.MESSAGE_UNPIN && auditLogRecord2.action !== AuditLogActions.MEMBER_MOVE;
r9 = r9 && auditLogRecord2.action !== AuditLogActions.MEMBER_DISCONNECT && auditLogRecord2.action !== AuditLogActions.BOT_ADD;
r9 = r9 && auditLogRecord2.action !== AuditLogActions.APPLICATION_COMMAND_PERMISSION_UPDATE && auditLogRecord2.action !== AuditLogActions.MEMBER_PRUNE;
if (r9) {
binding = env0_0;
merge = property.merge;
changes = property.changes;
items2 = [];
value = arraySpread(items2, changes, 0, r18);
changes = auditLogRecord2.changes;
arraySpread(items2, changes, value, r18);
binding[0] = Reflect.apply(merge, property, [{changes: items2, timestampEnd: auditLogRecord2.timestampStart}]);
binding = env0_1;
value = typeof binding === 'bigint' ? binding : +binding;
env0_1 = typeof value === 'bigint' ? value + 1n : +value + 1;
} else {
var actionType = auditLogRecord2.actionType;
var DELETE = AuditLogActionTypes.DELETE;
if (actionType === DELETE) {
if (value != r1) {
value44 = undefined;
oldValue = value == r1 ? value44 : r1.oldValue;
r9 = value != oldValue ? oldValue : value == r8 ? value44 : r8.oldValue;
targetType = auditLogRecord2.targetType;
r1 = targetType !== AuditLogTargetTypes.CHANNEL && auditLogRecord2.targetType !== AuditLogTargetTypes.CHANNEL_OVERWRITE;
r1 = !r1 ? value === r7 : r1;
r1 = !r1 ? !isGuildSelectableChannelType(r7.oldValue) : r1;
r8 = r1 ? r9 : '#' + r9;
binding = env1_38;
targetType = auditLogRecord2.targetType;
if (value == binding[targetType]) {
env1_38[auditLogRecord2.targetType] = {[auditLogRecord2.targetId]: r8};
} else {
env1_38[auditLogRecord2.targetType][auditLogRecord2.targetId] = r8;
}
} else if (value != r8) {
value44 = undefined;
oldValue = value == r1 ? value44 : r1.oldValue;
r9 = value != oldValue ? oldValue : value == r8 ? value44 : r8.oldValue;
targetType = auditLogRecord2.targetType;
r1 = targetType !== AuditLogTargetTypes.CHANNEL && auditLogRecord2.targetType !== AuditLogTargetTypes.CHANNEL_OVERWRITE;
r1 = !r1 ? value === r7 : r1;
r1 = !r1 ? !isGuildSelectableChannelType(r7.oldValue) : r1;
r8 = r1 ? r9 : '#' + r9;
binding = env1_38;
targetType = auditLogRecord2.targetType;
if (value == binding[targetType]) {
env1_38[auditLogRecord2.targetType] = {[auditLogRecord2.targetId]: r8};
} else {
env1_38[auditLogRecord2.targetType][auditLogRecord2.targetId] = r8;
}
}
}
binding = env0_0;
binding.unshift(auditLogRecord2);
}
}
binding = env0_0;
binding.unshift(auditLogRecord);
}
}
function _fun122247(a0) { // fn#122247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4079, offset: 0x0255ff51, size: 35 bytes, params: 2, frame: 11
const env0_0 = a0;
return a0.roles.some(_fun122248);
}
function GuildSettingsAuditLogStore() { // fn#122251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4245, offset: 0x025601e7, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, GuildSettingsAuditLogStore);
const value3 = env1_5(GuildSettingsAuditLogStore);
return env1_4(this, _isNativeReflectConstruct_122238() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function _fun122248(a0) { // fn#122248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4096, offset: 0x0255ff74, size: 99 bytes, params: 2, frame: 14
var r3;
var r0;
let value = environment.__proto__;
if (env1_0 != null) {
if (env0_0.userId === env1_0.ownerId) {
return true;
function GUILD_SETTINGS_SET_SECTION_122246({section}) { // fn#122246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:3900, offset: 0x0255fe8a, size: 199 bytes, params: 2, frame: 16
var value4;
const AUDIT_LOG = GuildSettingsSections.AUDIT_LOG;
if (section !== AUDIT_LOG) {
return false;
}
r3 = env1_1?.[a0];
value = r3 != null;
if (value) {
value = environment.__proto__.__proto__;
value = hasAnyPermission(r3, env2_20);
r0 = value;
} else {
r0 = value;
const members = GuildMemberStore.getMembers(env0_21);
let env0_0 = GuildStore.getGuild(env0_21);
if (env0_21 != null) {
value4 = GuildRoleStore.getUnsafeMutableRoles(env0_21);
}
return r0;
env0_24 = (importDefault(22) /* metro dependency 22 */)(members).filter(function(a0) {
var env0_0 = a0;
return a0.roles.some(_fun122248);
}).map(function(a0) {
return a0.userId;
}).value();
function _fun122247(a0) { // fn#122247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4079, offset: 0x0255ff51, size: 35 bytes, params: 2, frame: 11
const env0_0 = a0;
return a0.roles.some(_fun122248);
function _fun122248(a0) { // fn#122248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4096, offset: 0x0255ff74, size: 99 bytes, params: 2, frame: 14
var r3;
var r0;
let value = environment.__proto__;
if (env1_0 != null) {
if (env0_0.userId === env1_0.ownerId) {
return true;
}
r3 = env1_1?.[a0];
value = r3 != null;
if (value) {
value = environment.__proto__.__proto__;
value = hasAnyPermission(r3, env2_20);
r0 = value;
} else {
r0 = value;
}
return r0;
}
}
}
}
function _fun122250(a0) { // fn#122250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4233, offset: 0x0255ffd7, size: 528 bytes, params: 2, frame: 16
const GuildSettingsAuditLogStore2 = GuildSettingsAuditLogStore;
Inherits(GuildSettingsAuditLogStore2, a0);
return CreateClass(GuildSettingsAuditLogStore2, [{key: 'initialize', value: function() {
this.waitFor(GuildStore, GuildRoleStore, GuildMemberStore);
}}, {key: 'logs', get: get_122253}, {key: 'integrations', get: get_122254}, {key: 'webhooks', get: get_122255},
{key: 'guildScheduledEvents', get: get_122256}, {key: 'automodRules', get: get_122257}, {key: 'threads',
get: get_122258}, {key: 'applicationCommands', get: get_122259}, {key: 'isInitialLoading', get: get_122260},
{key: 'isLoading', get: get_122261}, {key: 'isLoadingNextPage', get: get_122262}, {key: 'hasOlderLogs',
get: get_122263}, {key: 'hasError', get: get_122264}, {key: 'userIds', get: get_122265}, {key: 'userIdFilter',
get: get_122266}, {key: 'targetIdFilter', get: get_122267}, {key: 'actionFilter', get: function() {
return ALL;
}}, {key: 'deletedTargets', get: get_122269}, {key: 'groupedFetchCount', get: get_122270}]);
function GuildSettingsAuditLogStore() { // fn#122251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:4245, offset: 0x025601e7, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, GuildSettingsAuditLogStore);
const value3 = env1_5(GuildSettingsAuditLogStore);
return env1_4(this, _isNativeReflectConstruct_122238() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function get_122253() { // fn#122253, offset: 0x00e425c8, size: 9 bytes, params: 1, frame: 1
return env1_22;
}
function get_122254() { // fn#122254, offset: 0x00df3ac4, size: 9 bytes, params: 1, frame: 1
return env1_23;
}
function get_122255() { // fn#122255, offset: 0x00df3ad6, size: 9 bytes, params: 1, frame: 1
return env1_25;
}
function get_122256() { // fn#122256, offset: 0x00df3adf, size: 9 bytes, params: 1, frame: 1
return env1_26;
}
function get_122257() { // fn#122257, offset: 0x00df3b32, size: 9 bytes, params: 1, frame: 1
return env1_27;
}
function get_122258() { // fn#122258, offset: 0x0108042c, size: 9 bytes, params: 1, frame: 1
return env1_28;
}
function get_122259() { // fn#122259, offset: 0x00ef0ca7, size: 9 bytes, params: 1, frame: 1
return env1_29;
}
function get_122260() { // fn#122260, offset: 0x00e45481, size: 9 bytes, params: 1, frame: 1
return env1_30;
}
function get_122261() { // fn#122261, offset: 0x00df3abb, size: 9 bytes, params: 1, frame: 1
return env1_31;
}
function get_122262() { // fn#122262, offset: 0x01080587, size: 9 bytes, params: 1, frame: 1
return env1_32;
}
function get_122263() { // fn#122263, offset: 0x0117839e, size: 9 bytes, params: 1, frame: 1
return env1_33;
}
function get_122264() { // fn#122264, offset: 0x00df3b9e, size: 9 bytes, params: 1, frame: 1
return env1_34;
}
function get_122265() { // fn#122265, offset: 0x00df3acd, size: 9 bytes, params: 1, frame: 1
return env1_24;
}
function get_122266() { // fn#122266, offset: 0x00e427c1, size: 9 bytes, params: 1, frame: 1
return env1_35;
}
function get_122267() { // fn#122267, offset: 0x00e42916, size: 9 bytes, params: 1, frame: 1
return env1_37;
}
function get_122269() { // fn#122269, offset: 0x010e2754, size: 9 bytes, params: 1, frame: 1
return env1_38;
}
function get_122270() { // fn#122270, offset: 0x01d1de51, size: 9 bytes, params: 1, frame: 1
return env1_39;
}
}
function AUDIT_LOG_FETCH_SUCCESS(a0) { // fn#122272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:5629, offset: 0x0256027b, size: 148 bytes, params: 2, frame: 14
env0_22 = transformEntries(a0.logs);
env0_23 = a0.integrations;
env0_25 = a0.webhooks;
env0_26 = a0.guildScheduledEvents;
env0_27 = a0.automodRules ?? [];
env0_28 = a0.threads;
env0_29 = a0.applicationCommands;
if (a0.logs.length < AUDIT_LOG_PAGE_LIMIT) {
}
}
function AUDIT_LOG_FETCH_NEXT_PAGE_START({isGroupedFetch}) { // fn#122274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:5966, offset: 0x0256032a, size: 36 bytes, params: 2, frame: 3
var binding;
if (isGroupedFetch) {
binding = env0_39;
env0_39 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
function AUDIT_LOG_FETCH_NEXT_PAGE_SUCCESS({logs, integrations, webhooks, guildScheduledEvents, automodRules, threads, applicationCommands}) { // fn#122275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16086:6067, offset: 0x0256034e, size: 167 bytes, params: 2, frame: 20
var value4;
var binding;
var items2;
if (logs.length === 0 || logs.length < AUDIT_LOG_PAGE_LIMIT) {
}
if (logs.length > 0) {
value4 = transformEntries(logs);
binding = env0_22;
items2 = [];
arraySpread(items2, value4, arraySpread(items2, binding, 0, undefined), undefined);
}
}
}
global.__d(_fun122237, 15878, [6, 7, 15, 17, 18, 15879, 1383, 1939, 1945, 1938, 1867, 661, 483, 22, 566, 694,
2]) /* metro module 15878, dependencies: [6, 7, 15, 17, 18, 15879, 1383, 1939, 1945, 1938, 1867, 661, 483, 22, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,19 +1,28 @@
/* Metro module 15877; source: modules/guild_settings/audit_log/native/GuildSettingsModalAuditLog.tsx; dependencies: [57, 31, 27, 1379, 1867, 1934, 1878, 15878, 661, 33, 4501, 697, 1484, 566, 15880, 1244, 6802, 15887, 15897, 5277, 15888, 5461, 6238, 4573, 6243, 1305, 15898, 5462, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import SelectedChannelStore from '../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import GuildSettingsAuditLogStore from '../GuildSettingsAuditLogStore.tsx'; /* Metro dependency 15878 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as HeaderActionButtonNativeModule from '../../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as ActivityIndicatorNativeModule from '../../../../design/components/ActivityIndicator/native/ActivityIndicator.native.tsx'; /* Metro dependency 5461 */
import * as NavScrimAndroidModule from '../../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
import * as GuildSettingsModalAuditLogFilterModule from './GuildSettingsModalAuditLogFilter.tsx'; /* Metro dependency 15887 */
function _fun122220(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:6, offset: 0x0255e655, size: 549 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.View;
const env0_7 = value.FlatList;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const guildSettingsAuditLogStore = importDefault(15878) /* metro dependency 15878: GuildSettingsAuditLogStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_13 = value.GuildSettingsSections;
const env0_14 = value.AuditLogFilterTypes;
@@ -23,249 +32,289 @@ function _fun122220(global, require, importDefault, importAll, module, exports,
const env0_17 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.listView = {marginVertical: 12};
object2.spinner = {marginTop: 40};
const object3 = {'borderRadius': null, 'paddingVertical': 6, 'paddingHorizontal': 8};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object = {};
object.listView = {marginVertical: 12};
object.spinner = {marginTop: 40};
const object4 = {'borderRadius': null, 'paddingVertical': 6, 'paddingHorizontal': 8};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
object3.backgroundColor = INPUT_BACKGROUND_DEFAULT;
object2.filterTextWrapper = object3;
const object6 = {};
object4.backgroundColor = INPUT_BACKGROUND_DEFAULT;
object.filterTextWrapper = object4;
const object5 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.paddingTop = PX_12;
object5.paddingTop = PX_12;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.paddingHorizontal = PX_8;
object2.filtersWrapper = object6;
object2.firstAuditRow = {marginTop: 0};
object2.lastAuditRow = {marginBottom: 0};
object2.filterTrailing = {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', 'gap': 8};
const env0_18 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/audit_log/native/GuildSettingsModalAuditLog.tsx');
object5.paddingHorizontal = PX_8;
object.filtersWrapper = object5;
object.firstAuditRow = {marginTop: 0};
object.lastAuditRow = {marginBottom: 0};
object.filterTrailing = {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', 'gap': 8};
const env0_18 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/audit_log/native/GuildSettingsModalAuditLog.tsx');
exports.default = ConnectedGuildSettingsModalAuditLog;
}
function ConnectedGuildSettingsModalAuditLog({guildId, contentContainerStyle}) { // fn#122221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:862, offset: 0x0255e87a, size: 1349 bytes, params: 2, frame: 47
var r13;
var r6;
var jsxRuntimeEnv0_17Binding2;
var TableRow;
var object;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var filterTextWrapper;
var items3;
var items2;
var EmptyState;
var object2;
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore,
SelectedChannelStore], function() {
return ChannelStore.getChannel(SelectedChannelStore.getChannelId());
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsAuditLogStore,
UserStore], _fun122223);
const isInitialLoading = value3.isInitialLoading;
const isLoading = value3.isLoading;
const isLoadingNextPage = value3.isLoadingNextPage;
const hasError = value3.hasError;
const actionFilter = value3.actionFilter;
const env0_4 = actionFilter;
const userIdFilter = value3.userIdFilter;
const env0_5 = userIdFilter;
const userIdFilterLabel = value3.userIdFilterLabel;
const actionFilterLabel = value3.actionFilterLabel;
const _logs = value3._logs;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const binding = env0_5;
const value4 = binding.useMemo(_fun122226, [_logs, guild]);
const [property, env0_10] = env0_4(binding.useState({'current': null, 'prev': null}), 2);
const value7 = binding.useCallback(_fun122227, [actionFilter, userIdFilter, value2]);
const value8 = binding.useCallback(_fun122230, [styles, property, channel, guildId, value4.length]);
binding.useLayoutEffect(_fun122232, [value7, value2]);
binding.useEffect(_fun122234, [guildId]);
const ActivityIndicator = (require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator;
const activityIndicator = <ActivityIndicator style={styles.spinner} />;
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
if (isLoading) {
r6 = activityIndicator;
} else if (isInitialLoading) {
r6 = activityIndicator;
} else {
jsxRuntimeEnv0_17Binding2 = jsxRuntimeEnv0_17;
var viewBindingProps = {style: styles.filtersWrapper};
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object = {'start': true, 'end': true};
string = intl.string;
object.icon = <Text variant="text-md/semibold">{Reflect.apply(string, intl, [t.kP6oFy])}</Text>;
var viewBindingProps2 = {style: styles.filterTrailing};
filterTextWrapper = styles.filterTextWrapper;
items3 = [<View style={filterTextWrapper}><Text variant="text-sm/semibold">{userIdFilterLabel}</Text></View>];
filterTextWrapper = styles.filterTextWrapper;
items3[1] = <View style={filterTextWrapper}><Text variant="text-sm/semibold">{actionFilterLabel}</Text></View>;
object.label = <View {...viewBindingProps2}>{items3}</View>;
object.onPress = value7;
object.trailing = ((TableRowArrow) => <TableRowArrow />)((require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow);
items2 = [<View {...viewBindingProps}><TableRow {...object} /></View>];
if (value4.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
object2 = {};
string = intl.string;
object2.body = hasError ? Reflect.apply(string, intl, [t.tzkaD7]) : Reflect.apply(string, intl, [t.lNuYhh]);
string = intl.string;
object2.title = hasError ? Reflect.apply(string, intl, [t.Ww5Tjy]) : Reflect.apply(string, intl,
[t['RHhk+P']]);
object2.Illustration = (require(15898) /* metro dependency 15898: EmptyServerSettingsAuditLog */).EmptyServerSettingsAuditLog;
r13 = <EmptyState {...object2} />;
function ConnectedGuildSettingsModalAuditLog({guildId, contentContainerStyle}) { // fn#122221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:862, offset: 0x0255e87a, size: 1349 bytes, params: 2, frame: 47
var r13;
var r6;
var jsxRuntimeEnv0_17Binding2;
var TableRow;
var object3;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var filterTextWrapper;
var items3;
var items2;
var EmptyState;
var object4;
const styles = useStyles();
const value2 = (UseNavigationNativeModule).useNavigation();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore,
SelectedChannelStore], function() {
return ChannelStore.getChannel(SelectedChannelStore.getChannelId());
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsAuditLogStore,
UserStore], _fun122223);
const isInitialLoading = value3.isInitialLoading;
const isLoading = value3.isLoading;
const isLoadingNextPage = value3.isLoadingNextPage;
const hasError = value3.hasError;
const actionFilter = value3.actionFilter;
const actionFilter2 = actionFilter;
const userIdFilter = value3.userIdFilter;
const userIdFilter2 = userIdFilter;
const userIdFilterLabel = value3.userIdFilterLabel;
const actionFilterLabel = value3.actionFilterLabel;
const _logs = value3._logs;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const binding = userIdFilter2;
const value4 = binding.useMemo(_fun122226, [_logs, guild]);
const [property, env0_10] = actionFilter2(binding.useState({'current': null, 'prev': null}), 2);
const value7 = binding.useCallback(_fun122227, [actionFilter, userIdFilter, value2]);
const value8 = binding.useCallback(_fun122230, [styles, property, channel, guildId, value4.length]);
binding.useLayoutEffect(_fun122232, [value7, value2]);
binding.useEffect(_fun122234, [guildId]);
const ActivityIndicator = (ActivityIndicatorNativeModule).ActivityIndicator;
const activityIndicator = <ActivityIndicator style={styles.spinner} />;
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
if (isLoading) {
r6 = activityIndicator;
} else if (isInitialLoading) {
r6 = activityIndicator;
} else {
r13 = <FlatList style={[styles.listView]} contentContainerStyle={contentContainerStyle} data={value4} extraData={property} keyExtractor={function(a0) {
return a0.id;
}} renderItem={value8} onEndReached={onEndReached} />;
jsxRuntimeEnv0_17Binding2 = jsxRuntimeEnv0_17;
var viewBindingProps = {style: styles.filtersWrapper};
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object3 = {'start': true, 'end': true};
string = intl.string;
object3.icon = (
<Text variant="text-md/semibold">
{Reflect.apply(string, intl, [t.kP6oFy])}
</Text>
);
var viewBindingProps2 = {style: styles.filterTrailing};
filterTextWrapper = styles.filterTextWrapper;
items3 = [
<View style={filterTextWrapper}>
<Text variant="text-sm/semibold">
{userIdFilterLabel}
</Text>
</View>,
];
filterTextWrapper = styles.filterTextWrapper;
items3[1] = (
<View style={filterTextWrapper}>
<Text variant="text-sm/semibold">
{actionFilterLabel}
</Text>
</View>
);
object3.label = (
<View {...viewBindingProps2}>
{items3}
</View>
);
object3.onPress = value7;
object3.trailing = ((TableRowArrow) => <TableRowArrow />)((require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow);
items2 = [
<View {...viewBindingProps}>
<TableRow {...object3} />
</View>,
];
if (value4.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
object4 = {};
string = intl.string;
object4.body = hasError ? Reflect.apply(string, intl, [t.tzkaD7]) : Reflect.apply(string, intl, [t.lNuYhh]);
string = intl.string;
object4.title = hasError ? Reflect.apply(string, intl, [t.Ww5Tjy]) : Reflect.apply(string, intl,
[t['RHhk+P']]);
object4.Illustration = (require(15898) /* metro dependency 15898: EmptyServerSettingsAuditLog */).EmptyServerSettingsAuditLog;
r13 = <EmptyState {...object4} />;
} else {
r13 = (
<FlatList
style={[styles.listView]}
contentContainerStyle={contentContainerStyle}
data={value4}
extraData={property}
keyExtractor={function(a0) {
return a0.id;
}}
renderItem={value8}
onEndReached={onEndReached_122236}
/>
);
}
items2[1] = r13;
items2[2] = isLoadingNextPage ? activityIndicator : null;
r6 = (
<>
{items2}
</>
);
}
items2[1] = r13;
items2[2] = isLoadingNextPage ? activityIndicator : null;
r6 = <>{items2}</>;
const NavScrim = (NavScrimAndroidModule).NavScrim;
return (
<>
{r6}
<NavScrim />
</>
);
function _fun122223() { // fn#122223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:1098, offset: 0x0255ede0, size: 324 bytes, params: 1, frame: 17
var environment;
var r2;
var intl;
const value = environment.__proto__;
const property = (importAll(15880) /* metro dependency 15880: AuditLogUtils */).ACTION_FILTER_ITEMS().filter(function({value}) {
return value === GuildSettingsAuditLogStore.actionFilter;
})[0];
let userIdFilter = GuildSettingsAuditLogStore.userIdFilter;
const value4 = null;
const r3 = value4 != userIdFilter ? UserStore.getUser(GuildSettingsAuditLogStore.userIdFilter) : value4;
const object = {};
guildSettingsAuditLogStoreBinding = GuildSettingsAuditLogStore;
object.isInitialLoading = guildSettingsAuditLogStoreBinding.isInitialLoading;
object.isLoading = guildSettingsAuditLogStoreBinding.isLoading;
object.isLoadingNextPage = guildSettingsAuditLogStoreBinding.isLoadingNextPage;
object.showLoadMore = guildSettingsAuditLogStoreBinding.groupedFetchCount > 2;
object.hasError = guildSettingsAuditLogStoreBinding.hasError;
object.hasOlderLogs = guildSettingsAuditLogStoreBinding.hasOlderLogs;
object.actionFilter = guildSettingsAuditLogStoreBinding.actionFilter;
object.actionFilterLabel = value4 != property ? property.label : '';
userIdFilter = GuildSettingsAuditLogStore.userIdFilter;
object.userIdFilter = userIdFilter;
if (value4 != r3) {
r2 = r3.tag;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZRFdsL);
}
object.userIdFilterLabel = r2;
object._logs = GuildSettingsAuditLogStore.logs;
return object;
}
function _fun122226() { // fn#122226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:1829, offset: 0x0255ef3f, size: 74 bytes, params: 1, frame: 14
var r0;
var value2;
var moduleValue;
if (_logs == null) {
r0 = [];
} else if (guild != null) {
value2 = environment.__proto__;
moduleValue = importAll(15880) /* metro dependency 15880: AuditLogUtils */;
r0 = moduleValue.transformLogs(_logs, guild);
} else {
r0 = [];
}
return r0;
}
function _fun122227() { // fn#122227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:1968, offset: 0x0255ef89, size: 197 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
value = require(6802) /* metro dependency 6802: showSimpleActionSheet */;
const showSimpleActionSheet = value.showSimpleActionSheet;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
Reflect.apply(showSimpleActionSheet, value, [{'key': 'GuildSettingsAuditLogFilter', 'options': null,
'hasIcons': false, options: [{label: Reflect.apply(string, intl, [t['hxnY/q']]), onPress: onPress_122228},
{label: intl.string(t.rautds), onPress: onPress_122229}]}]);
function onPress_122228() { // fn#122228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2098, offset: 0x0255f04e, size: 106 bytes, params: 1, frame: 19
const binding = env1_2;
const push = binding.push;
const AUDIT_LOG_FILTER = GuildSettingsSections.AUDIT_LOG_FILTER;
const object = {};
const USER = AuditLogFilterTypes.USER;
object.filterType = USER;
const value3 = undefined;
const createAuditLogFilterUserData = GuildSettingsModalAuditLogFilterModule.createAuditLogFilterUserData;
const userIdFilter2 = userIdFilter ?? value3;
object.data = Reflect.apply(createAuditLogFilterUserData, GuildSettingsModalAuditLogFilterModule, [userIdFilter2]);
Reflect.apply(push, binding, [AUDIT_LOG_FILTER, object]);
return value3;
}
function onPress_122229() { // fn#122229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2265, offset: 0x0255f0b8, size: 91 bytes, params: 1, frame: 17
const binding = env1_2;
const push = binding.push;
const AUDIT_LOG_FILTER = GuildSettingsSections.AUDIT_LOG_FILTER;
const object = {};
const ACTION = AuditLogFilterTypes.ACTION;
object.filterType = ACTION;
object.data = GuildSettingsModalAuditLogFilterModule.createAuditLogFilterActionData(actionFilter);
Reflect.apply(push, binding, [AUDIT_LOG_FILTER, object]);
}
}
function _fun122230({item, index}) { // fn#122230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2417, offset: 0x0255f113, size: 210 bytes, params: 2, frame: 23
const binding = env0_9;
return ((Component) => <Component containerStyle={[index === 0 && styles.firstAuditRow,
index === env0_8.length - 1 && styles.lastAuditRow]} onHeaderClick={onHeaderClick} log={item} expanded={binding.current === item.id} lastExpanded={binding.prev === item.id} guildId={guildId} channel={channel} key={item.id} />)(importDefault(15897) /* metro dependency 15897: AuditLog */);
function onHeaderClick(a0) { // fn#122231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2585, offset: 0x0255f1e5, size: 91 bytes, params: 2, frame: 13
if (env1_9.current !== a0.id) {
env1_10({current: a0.id, prev: env1_9.current});
} else {
env1_10({'current': null, 'prev': null});
}
}
}
function _fun122232() { // fn#122232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2768, offset: 0x0255f240, size: 38 bytes, params: 1, frame: 12
const binding = env0_2;
binding.setOptions({headerRight: headerRight_122233});
function headerRight_122233() { // fn#122233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2799, offset: 0x0255f266, size: 107 bytes, params: 1, frame: 18
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const headerActionButtonProps = {onPress: env1_11};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pEasFX);
return <HeaderActionButton {...headerActionButtonProps} />;
}
}
function _fun122234() { // fn#122234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2915, offset: 0x0255f2d1, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
value.fetchLogs(guildId);
}
function ConnectedGuildSettingsModalAuditLogOnEndReached() { // fn#122236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:3898, owner: ConnectedGuildSettingsModalAuditLog.onEndReached, offset: 0x0255f2fe, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
value.fetchNextLogPage(guildId);
}
}
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<>
{r6}
<NavScrim />
</>
);
}
function _fun122223() { // fn#122223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:1098, offset: 0x0255ede0, size: 324 bytes, params: 1, frame: 17
var environment;
var r2;
var intl;
const value = environment.__proto__;
const property = (importAll(15880) /* metro dependency 15880: AuditLogUtils */).ACTION_FILTER_ITEMS().filter(function({value}) {
return value === GuildSettingsAuditLogStore.actionFilter;
})[0];
let userIdFilter = GuildSettingsAuditLogStore.userIdFilter;
const value4 = null;
const r3 = value4 != userIdFilter ? UserStore.getUser(GuildSettingsAuditLogStore.userIdFilter) : value4;
const object2 = {};
object2.isInitialLoading = GuildSettingsAuditLogStore.isInitialLoading;
object2.isLoading = GuildSettingsAuditLogStore.isLoading;
object2.isLoadingNextPage = GuildSettingsAuditLogStore.isLoadingNextPage;
object2.showLoadMore = GuildSettingsAuditLogStore.groupedFetchCount > 2;
object2.hasError = GuildSettingsAuditLogStore.hasError;
object2.hasOlderLogs = GuildSettingsAuditLogStore.hasOlderLogs;
object2.actionFilter = GuildSettingsAuditLogStore.actionFilter;
object2.actionFilterLabel = value4 != property ? property.label : '';
userIdFilter = GuildSettingsAuditLogStore.userIdFilter;
object2.userIdFilter = userIdFilter;
if (value4 != r3) {
r2 = r3.tag;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZRFdsL);
}
object2.userIdFilterLabel = r2;
object2._logs = GuildSettingsAuditLogStore.logs;
return object2;
}
function _fun122226() { // fn#122226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:1829, offset: 0x0255ef3f, size: 74 bytes, params: 1, frame: 14
var r0;
var value2;
var moduleValue;
if (_logs == null) {
r0 = [];
} else if (guild != null) {
value2 = environment.__proto__;
moduleValue = importAll(15880) /* metro dependency 15880: AuditLogUtils */;
r0 = moduleValue.transformLogs(_logs, guild);
} else {
r0 = [];
}
return r0;
}
function _fun122227() { // fn#122227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:1968, offset: 0x0255ef89, size: 197 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
value = require(6802) /* metro dependency 6802: showSimpleActionSheet */;
const showSimpleActionSheet = value.showSimpleActionSheet;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
Reflect.apply(showSimpleActionSheet, value, [{'key': 'GuildSettingsAuditLogFilter', 'options': null,
'hasIcons': false, options: [{label: Reflect.apply(string, intl, [t['hxnY/q']]), onPress: onPress_122228},
{label: intl.string(t.rautds), onPress: onPress_122229}]}]);
}
function _fun122230({item, index}) { // fn#122230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2417, offset: 0x0255f113, size: 210 bytes, params: 2, frame: 23
const binding = env0_9;
return ((Component) => <Component containerStyle={[index === 0 && styles.firstAuditRow,
index === env0_8.length - 1 && styles.lastAuditRow]} onHeaderClick={onHeaderClick} log={item} expanded={binding.current === item.id} lastExpanded={binding.prev === item.id} guildId={guildId} channel={channel} key={item.id} />)(importDefault(15897) /* metro dependency 15897: AuditLog */);
}
function _fun122232() { // fn#122232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2768, offset: 0x0255f240, size: 38 bytes, params: 1, frame: 12
const binding = env0_2;
binding.setOptions({headerRight: headerRight_122233});
}
function _fun122234() { // fn#122234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2915, offset: 0x0255f2d1, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
value.fetchLogs(guildId);
}
function ConnectedGuildSettingsModalAuditLogOnEndReached() { // fn#122236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:3898, owner: ConnectedGuildSettingsModalAuditLog.onEndReached, offset: 0x0255f2fe, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
value.fetchNextLogPage(guildId);
}
function onPress_122228() { // fn#122228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2098, offset: 0x0255f04e, size: 106 bytes, params: 1, frame: 19
const binding = env1_2;
const push = binding.push;
const AUDIT_LOG_FILTER = GuildSettingsSections.AUDIT_LOG_FILTER;
const object2 = {};
const USER = AuditLogFilterTypes.USER;
object2.filterType = USER;
const value3 = undefined;
const guildSettingsModalAuditLogFilterModule = require(15887) /* metro dependency 15887: GuildSettingsModalAuditLogFilter */;
const createAuditLogFilterUserData = guildSettingsModalAuditLogFilterModule.createAuditLogFilterUserData;
const userIdFilter2 = userIdFilter ?? value3;
object2.data = Reflect.apply(createAuditLogFilterUserData, guildSettingsModalAuditLogFilterModule, [userIdFilter2]);
Reflect.apply(push, binding, [AUDIT_LOG_FILTER, object2]);
return value3;
}
function onPress_122229() { // fn#122229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2265, offset: 0x0255f0b8, size: 91 bytes, params: 1, frame: 17
const binding = env1_2;
const push = binding.push;
const AUDIT_LOG_FILTER = GuildSettingsSections.AUDIT_LOG_FILTER;
const object2 = {};
const ACTION = AuditLogFilterTypes.ACTION;
object2.filterType = ACTION;
const guildSettingsModalAuditLogFilterModule = require(15887) /* metro dependency 15887: GuildSettingsModalAuditLogFilter */;
object2.data = guildSettingsModalAuditLogFilterModule.createAuditLogFilterActionData(actionFilter);
Reflect.apply(push, binding, [AUDIT_LOG_FILTER, object2]);
}
function onHeaderClick(a0) { // fn#122231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2585, offset: 0x0255f1e5, size: 91 bytes, params: 2, frame: 13
if (env1_9.current !== a0.id) {
env1_10({current: a0.id, prev: env1_9.current});
} else {
env1_10({'current': null, 'prev': null});
}
}
function headerRight_122233() { // fn#122233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16085:2799, offset: 0x0255f266, size: 107 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const headerActionButtonProps = {onPress: env1_11};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pEasFX);
return <HeaderActionButton {...headerActionButtonProps} />;
}
global.__d(_fun122220, 15877, [57, 31, 27, 1379, 1867, 1934, 1878, 15878, 661, 33, 4501, 697, 1484, 566, 15880,
1244, 6802, 15887, 15897, 5277, 15888, 5461, 6238, 4573, 6243, 1305, 15898, 5462,
2]) /* metro module 15877, dependencies: [57, 31, 27, 1379, 1867, 1934, 1878, 15878, 661, 33, 4501, 697, 1484, 566, 15880, 1244, 6802, 15887, 15897, 5277, 15888, 5461, 6238, 4573, 6243, 1305, 15898, 5462, 2] */;
@@ -1,241 +1,293 @@
/* Metro module 15887; source: modules/guild_settings/audit_log/native/GuildSettingsModalAuditLogFilter.tsx; dependencies: [57, 31, 27, 1878, 15878, 661, 33, 4501, 697, 1244, 3995, 15880, 1585, 1484, 6590, 15888, 12140, 7989, 6238, 1305, 10856, 15889, 6984, 8754, 8416, 5462, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildSettingsAuditLogStore from '../GuildSettingsAuditLogStore.tsx'; /* Metro dependency 15878 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as NavScrimAndroidModule from '../../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as SearchFieldNativeModule from '../../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
import * as AuditLogUtilsModule from '../AuditLogUtils.tsx'; /* Metro dependency 15880 */
function _fun122593(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:6, offset: 0x0256cf7b, size: 383 bytes, params: 8, frame: 22
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 userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const guildSettingsAuditLogStore = importDefault(15878) /* metro dependency 15878: GuildSettingsAuditLogStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AuditLogFilterTypes;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_9 = value.jsx;
const env0_10 = value.Fragment;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingHorizontal = PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingVertical = PX_16;
const env0_12 = Reflect.apply(createStyles, value, [{searchBar: object, allUsersIconContainer: {'height': 30,
const object2 = {};
const PX_12 = (Native).space.PX_12;
object2.paddingHorizontal = PX_12;
const PX_16 = (Native).space.PX_16;
object2.paddingVertical = PX_16;
const env0_12 = Reflect.apply(createStyles, value, [{searchBar: object2, allUsersIconContainer: {'height': 30,
'width': 30, 'alignItems': 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/audit_log/native/GuildSettingsModalAuditLogFilter.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/audit_log/native/GuildSettingsModalAuditLogFilter.tsx');
exports.default = GuildSettingsModalAuditLogFilter;
exports.createAuditLogFilterUserData = createAuditLogFilterUserData;
exports.createAuditLogFilterActionData = createAuditLogFilterActionData;
}
function GuildSettingsModalAuditLogFilter({data, filterType, guildId}) { // fn#122594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:519, offset: 0x0256d0fa, size: 959 bytes, params: 2, frame: 31
var r6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var FlashList;
var object;
var object2;
var EmptyState;
var object6;
const styles = useStyles();
const env0_3 = styles;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const binding = value2;
const [property, property2] = env0_3(binding.useState(''), 2);
const {data, keyExtractor} = binding.useMemo(function() {
var object = {};
object.data = data.filter(_fun122596);
object.keyExtractor = _fun122597;
return object;
}, [property, dataBinding]);
binding.useEffect(_fun122598, [filterType, value2]);
const value7 = binding.useCallback(_fun122600, [filterType, guildId, binding.useCallback(_fun122599, [filterType,
guildId, value2]), dataBinding.length, styles.allUsersIconContainer]);
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
const USER = AuditLogFilterTypes.USER;
const view = <View style={styles.searchBar}><SearchField size="md" placeholder={filterType === USER ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pYHobK) : filterType === AuditLogFilterTypes.ACTION ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.I288Zx) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])} onChange={property2} /></View>;
if (dataBinding.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r6 = <EmptyState body={intl.string(t.V6nAfF)} title={intl.formatToPlainString(t.ZGVL3g,
{count: 0})} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} />;
} else {
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
object = {keyExtractor: keyExtractor, renderItem: value7, estimatedItemSize: 50, data: dataBinding};
object2 = {};
object2.paddingHorizontal = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.paddingBottom = bottom;
object.contentContainerStyle = object2;
r6 = <FlashList {...object} />;
}
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<>
{view}
{r6}
<NavScrim />
</>
);
}
function createAuditLogFilterUserData(a0) { // fn#122603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:2472, offset: 0x0256d91f, size: 227 bytes, params: 2, frame: 20
const env0_0 = a0;
const items2 = [];
const push = items2.push;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const ZRFdsL = (require(1244) /* metro dependency 1244: indexNative */).t.ZRFdsL;
Reflect.apply(push, items2, [{label: Reflect.apply(string, intl, [ZRFdsL]), value: null, selected: a0 == null,
index: 0}]);
const Set = global.Set;
const set = new Set();
GuildSettingsAuditLogStore.logs.forEach(function({userId}) {
userIdResolver(userId);
});
const userIds = GuildSettingsAuditLogStore.userIds;
userIds.forEach(function(a0) {
userIdResolver(a0);
});
items2.sort(function(a0, a1) {
return a0.selected ? -1 : a1.selected ? 1 : a0.index - a1.index;
});
return items2;
}
function createAuditLogFilterActionData(a0) { // fn#122608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:2987, offset: 0x0256daed, size: 81 bytes, params: 2, frame: 12
const env0_0 = a0;
let value = require(15880) /* metro dependency 15880: AuditLogUtils */;
value = value.ACTION_FILTER_ITEMS();
value = value.map(_fun122609);
return value.sort(function(a0, a1) {
return a0.selected ? -1 : a1.selected ? 1 : a0.index - a1.index;
});
}
function _fun122595() { // fn#122595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:704, offset: 0x0256d4b9, size: 46 bytes, params: 1, frame: 13
const object2 = {};
object2.data = data.filter(_fun122596);
object2.keyExtractor = function(a0) {
return a0.value != null ? a0.value.toString() : a0.index.toString();
};
return object2;
}
function _fun122598() { // fn#122598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:895, offset: 0x0256d559, size: 242 bytes, params: 1, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const binding = env0_4;
const setOptions = binding.setOptions;
const filterTypeBinding = filterType;
const value = environment.__proto__;
const USER = AuditLogFilterTypes.USER;
Reflect.apply(setOptions, binding,
[{headerTitle: USER === filterTypeBinding ? intl.string(t['hxnY/q']) : AuditLogFilterTypes.ACTION === filterTypeBinding ? intl.string(t.rautds) : intl.string(t.pEasFX)}]);
}
function _fun122599(a0, a1) { // fn#122599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1151, offset: 0x0256d64b, size: 164 bytes, params: 3, frame: 15
var filterTypeBinding;
var value2;
var moduleValue;
var moduleValue2;
var value3;
if (a0) {
filterTypeBinding = filterType;
value2 = environment.__proto__;
if (filterTypeBinding === AuditLogFilterTypes.USER) {
moduleValue2 = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
value3 = null;
moduleValue2.filterByUserId(value3 != a1 ? a1.id : value3, guildId);
} else if (filterType === AuditLogFilterTypes.ACTION) {
moduleValue = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
moduleValue.filterByAction(a1, guildId);
function GuildSettingsModalAuditLogFilter({data, filterType, guildId}) { // fn#122594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:519, offset: 0x0256d0fa, size: 959 bytes, params: 2, frame: 31
var r6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var FlashList;
var object4;
var object5;
var EmptyState;
var object3;
const styles = useStyles();
const styles2 = styles;
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value2 = (UseNavigationNativeModule).useNavigation();
const binding = value2;
const [property, property2] = styles2(binding.useState(''), 2);
const {data, keyExtractor} = binding.useMemo(function() {
var object = {};
object.data = data.filter(_fun122596);
object.keyExtractor = _fun122597;
return object;
}, [property, dataBinding]);
binding.useEffect(_fun122598, [filterType, value2]);
const value7 = binding.useCallback(_fun122600, [filterType, guildId, binding.useCallback(_fun122599, [filterType,
guildId, value2]), dataBinding.length, styles.allUsersIconContainer]);
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const SearchField = (SearchFieldNativeModule).SearchField;
const USER = AuditLogFilterTypes.USER;
const view = (
<View style={styles.searchBar}>
<SearchField
size="md"
placeholder={filterType === USER ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pYHobK) : filterType === AuditLogFilterTypes.ACTION ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.I288Zx) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])}
onChange={property2}
/>
</View>
);
if (dataBinding.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r6 = (
<EmptyState
body={intl.string(t.V6nAfF)}
title={intl.formatToPlainString(t.ZGVL3g, {count: 0})}
Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults}
/>
);
} else {
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
object4 = {keyExtractor: keyExtractor, renderItem: value7, estimatedItemSize: 50, data: dataBinding};
object5 = {};
object5.paddingHorizontal = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingBottom = bottom;
object4.contentContainerStyle = object5;
r6 = <FlashList {...object4} />;
}
env0_4.pop();
const NavScrim = (NavScrimAndroidModule).NavScrim;
return (
<>
{view}
{r6}
<NavScrim />
</>
);
function _fun122595() { // fn#122595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:704, offset: 0x0256d4b9, size: 46 bytes, params: 1, frame: 13
const object = {};
object.data = data.filter(_fun122596);
object.keyExtractor = function(a0) {
return a0.value != null ? a0.value.toString() : a0.index.toString();
};
return object;
function _fun122596({label}) { // fn#122596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:725, offset: 0x0256d4e7, size: 68 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(6590) /* metro dependency 6590 */;
const binding = env1_5;
return value(binding.toLowerCase(), label.toLowerCase());
}
}
function _fun122598() { // fn#122598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:895, offset: 0x0256d559, size: 242 bytes, params: 1, frame: 19
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const setOptions = ReactModule.setOptions;
const filterTypeBinding = filterType;
const value = environment.__proto__;
const USER = AuditLogFilterTypes.USER;
Reflect.apply(setOptions, ReactModule,
[{headerTitle: USER === filterTypeBinding ? intl.string(t['hxnY/q']) : AuditLogFilterTypes.ACTION === filterTypeBinding ? intl.string(t.rautds) : intl.string(t.pEasFX)}]);
}
function _fun122599(a0, a1) { // fn#122599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1151, offset: 0x0256d64b, size: 164 bytes, params: 3, frame: 15
var filterTypeBinding;
var value2;
var moduleValue;
var moduleValue2;
var value3;
if (a0) {
filterTypeBinding = filterType;
value2 = environment.__proto__;
if (filterTypeBinding === AuditLogFilterTypes.USER) {
moduleValue2 = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
value3 = null;
moduleValue2.filterByUserId(value3 != a1 ? a1.id : value3, guildId);
} else if (filterType === AuditLogFilterTypes.ACTION) {
moduleValue = require(15888) /* metro dependency 15888: AuditLogActionCreators */;
moduleValue.filterByAction(a1, guildId);
}
ReactModule.pop();
}
}
function _fun122600({item, index}) { // fn#122600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1299, offset: 0x0256d6ef, size: 529 bytes, params: 2, frame: 29
var r8;
var r0;
const TableRow = (TableRowNativeModule).TableRow;
let value = item.value;
const selected = item.selected;
const label = item.label;
const filterTypeBinding = filterType;
const USER = AuditLogFilterTypes.USER;
if (filterTypeBinding !== USER) {
var tableRowProps = {start: index === 0, end: index === data.length - 1};
if (filterType === AuditLogFilterTypes.USER) {
r8 = (
<View style={styles.allUsersIconContainer}>
{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM} source={importDefault(10856) /* metro dependency 10856 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</View>
);
} else {
value = ((Component) => <Component action={value} />)(importDefault(15889) /* metro dependency 15889: AuditLogActionIcon */);
r8 = value;
}
tableRowProps.icon = r8;
tableRowProps.label = label;
tableRowProps.onPress = onPress_122602;
tableRowProps.trailing = ((FormRadio) => <FormRadio selected={selected} />)((require(7989) /* metro dependency 7989: FormRadioNative */).FormRadio);
value = <TableRow {...tableRowProps} />;
r0 = value;
} else if (value !== null) {
value = ((Component) => <Component start={index === 0} end={index === data.length - 1} userId={value.id} guildId={guildId} onPress={onPress_122601} trailing={((FormRadio) => <FormRadio selected={selected} />)((require(7989) /* metro dependency 7989: FormRadioNative */).FormRadio)} />)(importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */);
r0 = value;
} else {
var tableRowProps = {start: index === 0, end: index === data.length - 1};
if (filterType === AuditLogFilterTypes.USER) {
r8 = (
<View style={styles.allUsersIconContainer}>
{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM} source={importDefault(10856) /* metro dependency 10856 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</View>
);
} else {
value = ((Component) => <Component action={value} />)(importDefault(15889) /* metro dependency 15889: AuditLogActionIcon */);
r8 = value;
}
tableRowProps.icon = r8;
tableRowProps.label = label;
tableRowProps.onPress = onPress_122602;
tableRowProps.trailing = ((FormRadio) => <FormRadio selected={selected} />)((require(7989) /* metro dependency 7989: FormRadioNative */).FormRadio);
value = <TableRow {...tableRowProps} />;
r0 = value;
}
return r0;
function onPress_122601() { // fn#122601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1440, offset: 0x0256d900, size: 31 bytes, params: 1, frame: 13
return env1_7(!selected, value);
}
function onPress_122602() { // fn#122602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1718, offset: 0x0256d900, size: 31 bytes, params: 1, frame: 13
return env1_7(!selected, value);
}
}
}
function createAuditLogFilterUserData(a0) { // fn#122603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:2472, offset: 0x0256d91f, size: 227 bytes, params: 2, frame: 20
const env0_0 = a0;
const items2 = [];
const push = items2.push;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const ZRFdsL = (IndexNativeModule).t.ZRFdsL;
Reflect.apply(push, items2, [{label: Reflect.apply(string, intl, [ZRFdsL]), value: null, selected: a0 == null,
index: 0}]);
const Set = global.Set;
const set = new Set();
const guildSettingsAuditLogStoreBinding = GuildSettingsAuditLogStore;
guildSettingsAuditLogStoreBinding.logs.forEach(function({userId}) {
userIdResolver(userId);
});
const userIds = guildSettingsAuditLogStoreBinding.userIds;
userIds.forEach(function(a0) {
userIdResolver(a0);
});
items2.sort(function(a0, a1) {
return a0.selected ? -1 : a1.selected ? 1 : a0.index - a1.index;
});
return items2;
function userIdResolver(a0) { // fn#122604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:2641, owner: createAuditLogFilterUserData.userIdResolver, offset: 0x0256da02, size: 159 bytes, params: 2, frame: 16
var value;
var user;
var binding;
var push;
var object;
if (a0 != null) {
value = environment.__proto__;
user = UserStore.getUser(a0);
binding = env0_2;
if (!(binding.has(a0) || user == null)) {
binding = env0_2;
binding.add(a0);
binding = env0_1;
push = binding.push;
object = {};
object.label = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(user);
object.value = user;
object.selected = user.id === env0_0;
object.index = binding.length;
Reflect.apply(push, binding, [object]);
}
}
}
}
function createAuditLogFilterActionData(a0) { // fn#122608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:2987, offset: 0x0256daed, size: 81 bytes, params: 2, frame: 12
const env0_0 = a0;
let value = AuditLogUtilsModule;
value = value.ACTION_FILTER_ITEMS();
value = value.map(_fun122609);
return value.sort(function(a0, a1) {
return a0.selected ? -1 : a1.selected ? 1 : a0.index - a1.index;
});
function _fun122609(a0, a1) { // fn#122609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:3073, offset: 0x0256db3e, size: 53 bytes, params: 3, frame: 3
return {label: a0.label, value: a0.value, selected: env0_0 === a0.value, index: a1};
}
}
}
function _fun122600({item, index}) { // fn#122600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1299, offset: 0x0256d6ef, size: 529 bytes, params: 2, frame: 29
var r8;
function keyExtractor_122597(a0) { // fn#122597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:791, offset: 0x0256d52b, size: 46 bytes, params: 2, frame: 10
var r0;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
let value = item.value;
const selected = item.selected;
const label = item.label;
const filterTypeBinding = filterType;
const USER = AuditLogFilterTypes.USER;
if (filterTypeBinding !== USER) {
var tableRowProps = {start: index === 0, end: index === data.length - 1};
if (filterType === AuditLogFilterTypes.USER) {
r8 = <View style={styles.allUsersIconContainer}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM} source={importDefault(10856) /* metro dependency 10856 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
} else {
value = ((Component) => <Component action={value} />)(importDefault(15889) /* metro dependency 15889: AuditLogActionIcon */);
r8 = value;
}
tableRowProps.icon = r8;
tableRowProps.label = label;
tableRowProps.onPress = onPress_122602;
tableRowProps.trailing = ((FormRadio) => <FormRadio selected={selected} />)((require(7989) /* metro dependency 7989: FormRadioNative */).FormRadio);
value = <TableRow {...tableRowProps} />;
r0 = value;
} else if (value !== null) {
value = ((Component) => <Component start={index === 0} end={index === data.length - 1} userId={value.id} guildId={guildId} onPress={onPress_122601} trailing={((FormRadio) => <FormRadio selected={selected} />)((require(7989) /* metro dependency 7989: FormRadioNative */).FormRadio)} />)(importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */);
let value = a0.value;
if (value != null) {
value = a0.value;
value = value.toString();
r0 = value;
} else {
var tableRowProps = {start: index === 0, end: index === data.length - 1};
if (filterType === AuditLogFilterTypes.USER) {
r8 = <View style={styles.allUsersIconContainer}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM} source={importDefault(10856) /* metro dependency 10856 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
} else {
value = ((Component) => <Component action={value} />)(importDefault(15889) /* metro dependency 15889: AuditLogActionIcon */);
r8 = value;
}
tableRowProps.icon = r8;
tableRowProps.label = label;
tableRowProps.onPress = onPress_122602;
tableRowProps.trailing = ((FormRadio) => <FormRadio selected={selected} />)((require(7989) /* metro dependency 7989: FormRadioNative */).FormRadio);
value = <TableRow {...tableRowProps} />;
r0 = value;
r0 = a0.index.toString();
}
return r0;
}
function userIdResolver(a0) { // fn#122604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:2641, owner: createAuditLogFilterUserData.userIdResolver, offset: 0x0256da02, size: 159 bytes, params: 2, frame: 16
var value;
var user;
var binding;
var push;
var object2;
if (a0 != null) {
value = environment.__proto__;
user = UserStore.getUser(a0);
binding = env0_2;
if (!(binding.has(a0) || user == null)) {
binding = env0_2;
binding.add(a0);
binding = env0_1;
push = binding.push;
object2 = {};
object2.label = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(user);
object2.value = user;
object2.selected = user.id === env0_0;
object2.index = binding.length;
Reflect.apply(push, binding, [object2]);
}
}
}
function _fun122609(a0, a1) { // fn#122609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:3073, offset: 0x0256db3e, size: 53 bytes, params: 3, frame: 3
return {label: a0.label, value: a0.value, selected: env0_0 === a0.value, index: a1};
}
function _fun122596({label}) { // fn#122596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:725, offset: 0x0256d4e7, size: 68 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(6590) /* metro dependency 6590 */;
const binding = env1_5;
return value(binding.toLowerCase(), label.toLowerCase());
}
function onPress_122601() { // fn#122601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16095:1440, offset: 0x0256d900, size: 31 bytes, params: 1, frame: 13
return env1_7(!selected, value);
}
global.__d(_fun122593, 15887, [57, 31, 27, 1878, 15878, 661, 33, 4501, 697, 1244, 3995, 15880, 1585, 1484, 6590,
15888, 12140, 7989, 6238, 1305, 10856, 15889, 6984, 8754, 8416, 5462,
2]) /* metro module 15887, dependencies: [57, 31, 27, 1878, 15878, 661, 33, 4501, 697, 1244, 3995, 15880, 1585, 1484, 6590, 15888, 12140, 7989, 6238, 1305, 10856, 15889, 6984, 8754, 8416, 5462, 2] */;
@@ -1,18 +1,32 @@
/* Metro module 15992; source: modules/guild_settings/community/native/GuildSettingsModalCommunity.tsx; dependencies: [31, 1379, 1935, 3784, 3793, 1878, 9113, 14840, 661, 33, 4501, 697, 3860, 1484, 566, 9112, 1244, 5277, 5282, 4805, 4080, 9059, 1962, 7972, 4572, 6231, 6238, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildChannelStore from '../../../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import RelationshipStore from '../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import GuildSettingsActionCreators from '../../GuildSettingsActionCreators.tsx'; /* Metro dependency 9112 */
import GuildSettingsStore from '../../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as GuildChannelStoreModule from '../../../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as UseChannelNameModule from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as HeaderActionButtonNativeModule from '../../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as NavigatorHeaderNativeModule from '../../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as GuildSettingsDiscoveryConstantsModule from '../../discovery/GuildSettingsDiscoveryConstants.tsx'; /* Metro dependency 14840 */
function _fun123686(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:6, offset: 0x025978c0, size: 413 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const env0_6 = (require(1935) /* metro dependency 1935: GuildChannelStore */).GUILD_SELECTABLE_CHANNELS_KEY;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
const env0_11 = (require(14840) /* metro dependency 14840: GuildSettingsDiscoveryConstants */).calculateLocaleOptions;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_12 = value.ChannelTypes;
const env0_13 = value.GuildFeatures;
const env0_14 = value.GuildSettingsSections;
@@ -22,373 +36,398 @@ function _fun123686(global, require, importDefault, importAll, module, exports,
const env0_17 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const PX_16 = (Native).space.PX_16;
const env0_18 = Reflect.apply(createStyles, value, [{overview: {flex: 1}, overviewContent: {paddingTop: PX_16}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/community/native/GuildSettingsModalCommunity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/community/native/GuildSettingsModalCommunity.tsx');
exports.default = GuildSettingsModalCommunity;
}
function GuildSettingsModalCommunity({guildId, onClose}) { // fn#123687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:564, offset: 0x02597a5d, size: 1581 bytes, params: 2, frame: 45
var r31;
var r30;
var r9;
var r0;
var Form;
var Stack;
var moduleValue6;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
var object4;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object5;
var TrailingText;
var value16;
var items2;
var moduleValue7;
var object7;
var object8;
var object10;
var object11;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
let value3 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
const styles = useStyles();
const value4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsStore],
function() {
return GuildSettingsStore.getProps();
});
const submitting = value5.submitting;
const env0_3 = submitting;
const hasChanges = value5.hasChanges;
const guild = value5.guild;
const {canManage,
isAdmin} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PermissionStore],
_fun123689);
const {rulesChannel,
publicUpdatesChannel} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore],
function() {
var object = {};
var getChannel = ChannelStore.getChannel;
var guildBinding = guild;
var value3 = undefined;
object.rulesChannel = Reflect.apply(getChannel, ChannelStore,
[guildBinding == null ? value3 : guild.rulesChannelId]);
object.publicUpdatesChannel = ChannelStore.getChannel(guild == null ? value3 : guild.publicUpdatesChannelId);
return object;
});
let binding = env0_3;
binding.useEffect(_fun123691, [guild, value4, onClose]);
const value8 = binding.useCallback(_fun123692, [guild]);
const value10 = guild != null;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r18 = value10 ? Reflect.apply(string, intl, [t.aQzVF8]) : Reflect.apply(string, intl, [t.kQzUNk]);
binding = env0_3;
binding.useEffect(_fun123693, [guild, value4, submitting, hasChanges, onClose]);
const value13 = binding.useCallback(_fun123700, [guildId]);
const value14 = binding.useCallback(_fun123703, [value13, rulesChannel]);
const value15 = binding.useCallback(_fun123705, [value13, publicUpdatesChannel]);
const env0_11 = env0_3.useCallback(_fun123707, [guild?.preferredLocale]);
if (guild == null) {
r0 = null;
} else {
Form = (require(7972) /* metro dependency 7972: native */).Form;
var formProps = {style: styles.overview, contentContainerStyle: styles.overviewContent};
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
var stackProps = {style: {paddingHorizontal: value3},
spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_24};
if (rulesChannel != null) {
moduleValue6 = require(4805) /* metro dependency 4805: useChannelName */;
r31 = moduleValue6.computeChannelName(rulesChannel, UserStore, RelationshipStore, true);
} else {
r31 = null;
}
var tableRowGroupProps = {helperText: intl.string(t['3q1TEo']), hasIcons: false};
var tableRowProps = {label: intl.string(t.U5BW0c), disabled: !canManage};
TrailingText = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow.TrailingText;
value16 = '';
r30 = r31 ?? value16;
tableRowProps.trailing = <TrailingText text={r30} />;
tableRowProps.arrow = true;
tableRowProps.onPress = value14;
items2 = [<TableRowGroup {...tableRowGroupProps}><TableRow {...tableRowProps} /></TableRowGroup>];
if (publicUpdatesChannel != null) {
moduleValue7 = require(4805) /* metro dependency 4805: useChannelName */;
r30 = moduleValue7.computeChannelName(publicUpdatesChannel, UserStore, RelationshipStore, true);
} else {
r30 = null;
}
var tableRowGroupProps2 = {helperText: intl.string(t['Fg6O/5']), hasIcons: false};
var tableRowProps2 = {label: intl.string(t.vAyDGU), disabled: !isAdmin};
TrailingText = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow.TrailingText;
tableRowProps2.trailing = <TrailingText text={r30 ?? value16} />;
tableRowProps2.arrow = true;
tableRowProps2.onPress = value15;
items2[1] = <TableRowGroup {...tableRowGroupProps2}><TableRow {...tableRowProps2} /></TableRowGroup>;
items2[2] = _fun123709();
if (isAdmin) {
r9 = <TableRowGroup helperText={r18} hasIcons={false}><TableRow variant="danger" onPress={value8} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.c1BmbC)} disabled={!value10} /></TableRowGroup>;
} else {
r9 = null;
}
items2[3] = r9;
r0 = <Form {...formProps}><Stack {...stackProps}>{items2}</Stack></Form>;
}
return r0;
}
function _fun123689() { // fn#123689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:865, offset: 0x0259809d, size: 107 bytes, params: 1, frame: 17
return {canManage: guild != null && PermissionStore.can(Permissions.MANAGE_GUILD, guild),
isAdmin: guild != null && PermissionStore.can(Permissions.ADMINISTRATOR, guild)};
}
function _fun123691() { // fn#123691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:1226, offset: 0x02598168, size: 134 bytes, params: 1, frame: 14
var value5;
var defaultImport;
var setSection;
var COMMUNITY_INTRO;
var binding;
var replace;
if (!(guild != null && guild.features.has(GuildFeatures.COMMUNITY))) {
value5 = environment.__proto__;
defaultImport = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
setSection = defaultImport.setSection;
COMMUNITY_INTRO = GuildSettingsSections.COMMUNITY_INTRO;
Reflect.apply(setSection, defaultImport, [COMMUNITY_INTRO]);
binding = env0_2;
replace = binding.replace;
COMMUNITY_INTRO = GuildSettingsSections.COMMUNITY_INTRO;
Reflect.apply(replace, binding, [COMMUNITY_INTRO, {onClose: onClose}]);
}
}
function _fun123692() { // fn#123692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:1383, offset: 0x025981ee, size: 167 bytes, params: 1, frame: 15
var Set;
var features;
var set;
var value2;
var defaultImport;
let guildBinding = guild;
if (guildBinding != null) {
Set = global.Set;
guildBinding = guild;
features = guildBinding.features;
set = new Set();
value2 = environment.__proto__;
set.delete(GuildFeatures.COMMUNITY);
set.delete(GuildFeatures.DISCOVERABLE);
defaultImport = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
defaultImport.saveGuild(guildBinding.id, {'features': null, 'rulesChannelId': null,
'publicUpdatesChannelId': null,
features: set, preferredLocale: guildBinding.preferredLocale});
}
}
function _fun123693() { // fn#123693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:1708, offset: 0x02598295, size: 122 bytes, params: 1, frame: 15
env0_2.setOptions({headerLeft: submitting ? function() {
return null;
} : hasChanges ? _fun123697 : undefined,
headerRight: submitting ? _fun123698 : hasChanges ? _fun123699 : undefined});
}
function _fun123700() { // fn#123700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2475, offset: 0x025984da, size: 81 bytes, params: 1, frame: 13
var environment;
var r0;
let value = environment.__proto__;
const channels = GuildChannelStore.getChannels(guildId);
if (channels == null) {
r0 = [];
} else {
value = channels[GUILD_SELECTABLE_CHANNELS_KEY].filter(function(a0) {
return a0.channel.type === ChannelTypes.GUILD_TEXT;
function GuildSettingsModalCommunity({guildId, onClose}) { // fn#123687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:564, offset: 0x02597a5d, size: 1581 bytes, params: 2, frame: 45
var r31;
var r30;
var r9;
var r0;
var Form;
var Stack;
var moduleValue6;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
var object;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object2;
var TrailingText;
var value16;
var items2;
var moduleValue7;
var object3;
var object6;
var object9;
var object12;
const useToken = UseTokenModule.useToken;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
let value3 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_PADDING]);
const styles = useStyles();
const value4 = (UseNavigationNativeModule).useNavigation();
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsStore],
function() {
return GuildSettingsStore.getProps();
});
value = value.map(_fun123702);
r0 = value;
const submitting = value5.submitting;
const submitting2 = submitting;
const hasChanges = value5.hasChanges;
const guild = value5.guild;
const {canManage,
isAdmin} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PermissionStore],
_fun123689);
const {rulesChannel,
publicUpdatesChannel} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore],
function() {
var object = {};
var channelStoreBinding = ChannelStore;
var getChannel = channelStoreBinding.getChannel;
var guildBinding = guild;
var value3 = undefined;
object.rulesChannel = Reflect.apply(getChannel, channelStoreBinding,
[guildBinding == null ? value3 : guild.rulesChannelId]);
object.publicUpdatesChannel = ChannelStore.getChannel(guild == null ? value3 : guild.publicUpdatesChannelId);
return object;
});
let binding = submitting2;
binding.useEffect(_fun123691, [guild, value4, onClose]);
const value8 = binding.useCallback(_fun123692, [guild]);
const value10 = guild != null;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r18 = value10 ? Reflect.apply(string, intl, [t.aQzVF8]) : Reflect.apply(string, intl, [t.kQzUNk]);
binding = submitting2;
binding.useEffect(_fun123693, [guild, value4, submitting, hasChanges, onClose]);
const value13 = binding.useCallback(_fun123700, [guildId]);
const value14 = binding.useCallback(_fun123703, [value13, rulesChannel]);
const value15 = binding.useCallback(_fun123705, [value13, publicUpdatesChannel]);
const env0_11 = submitting2.useCallback(_fun123707, [guild?.preferredLocale]);
if (guild == null) {
r0 = null;
} else {
Form = (require(7972) /* metro dependency 7972: native */).Form;
var formProps = {style: styles.overview, contentContainerStyle: styles.overviewContent};
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
var stackProps = {style: {paddingHorizontal: value3},
spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_24};
if (rulesChannel != null) {
moduleValue6 = require(4805) /* metro dependency 4805: useChannelName */;
r31 = moduleValue6.computeChannelName(rulesChannel, UserStore, RelationshipStore, true);
} else {
r31 = null;
}
var tableRowGroupProps = {helperText: intl.string(t['3q1TEo']), hasIcons: false};
var tableRowProps = {label: intl.string(t.U5BW0c), disabled: !canManage};
TrailingText = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow.TrailingText;
value16 = '';
r30 = r31 ?? value16;
tableRowProps.trailing = <TrailingText text={r30} />;
tableRowProps.arrow = true;
tableRowProps.onPress = value14;
items2 = [
<TableRowGroup {...tableRowGroupProps}>
<TableRow {...tableRowProps} />
</TableRowGroup>,
];
if (publicUpdatesChannel != null) {
moduleValue7 = require(4805) /* metro dependency 4805: useChannelName */;
r30 = moduleValue7.computeChannelName(publicUpdatesChannel, UserStore, RelationshipStore, true);
} else {
r30 = null;
}
var tableRowGroupProps2 = {helperText: intl.string(t['Fg6O/5']), hasIcons: false};
var tableRowProps2 = {label: intl.string(t.vAyDGU), disabled: !isAdmin};
TrailingText = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow.TrailingText;
tableRowProps2.trailing = <TrailingText text={r30 ?? value16} />;
tableRowProps2.arrow = true;
tableRowProps2.onPress = value15;
items2[1] = (
<TableRowGroup {...tableRowGroupProps2}>
<TableRow {...tableRowProps2} />
</TableRowGroup>
);
items2[2] = _fun123709();
if (isAdmin) {
r9 = (
<TableRowGroup helperText={r18} hasIcons={false}>
<TableRow
variant="danger"
onPress={value8}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.c1BmbC)}
disabled={!value10}
/>
</TableRowGroup>
);
} else {
r9 = null;
}
items2[3] = r9;
r0 = (
<Form {...formProps}>
<Stack {...stackProps}>
{items2}
</Stack>
</Form>
);
}
return r0;
function _fun123689() { // fn#123689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:865, offset: 0x0259809d, size: 107 bytes, params: 1, frame: 17
return {canManage: guild != null && PermissionStore.can(Permissions.MANAGE_GUILD, guild),
isAdmin: guild != null && PermissionStore.can(Permissions.ADMINISTRATOR, guild)};
}
function _fun123691() { // fn#123691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:1226, offset: 0x02598168, size: 134 bytes, params: 1, frame: 14
var value5;
var defaultImport;
var setSection;
var COMMUNITY_INTRO;
var binding;
var replace;
if (!(guild != null && guild.features.has(GuildFeatures.COMMUNITY))) {
value5 = environment.__proto__;
defaultImport = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
setSection = defaultImport.setSection;
COMMUNITY_INTRO = GuildSettingsSections.COMMUNITY_INTRO;
Reflect.apply(setSection, defaultImport, [COMMUNITY_INTRO]);
binding = env0_2;
replace = binding.replace;
COMMUNITY_INTRO = GuildSettingsSections.COMMUNITY_INTRO;
Reflect.apply(replace, binding, [COMMUNITY_INTRO, {onClose: onClose}]);
}
}
function _fun123692() { // fn#123692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:1383, offset: 0x025981ee, size: 167 bytes, params: 1, frame: 15
var Set;
var features;
var set;
var value2;
var defaultImport;
let guildBinding = guild;
if (guildBinding != null) {
Set = global.Set;
guildBinding = guild;
features = guildBinding.features;
set = new Set();
value2 = environment.__proto__;
set.delete(GuildFeatures.COMMUNITY);
set.delete(GuildFeatures.DISCOVERABLE);
defaultImport = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
defaultImport.saveGuild(guildBinding.id, {'features': null, 'rulesChannelId': null,
'publicUpdatesChannelId': null,
features: set, preferredLocale: guildBinding.preferredLocale});
}
}
function _fun123693() { // fn#123693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:1708, offset: 0x02598295, size: 122 bytes, params: 1, frame: 15
env0_2.setOptions({headerLeft: submitting ? function() {
return null;
} : hasChanges ? _fun123697 : undefined,
headerRight: submitting ? _fun123698 : hasChanges ? _fun123699 : undefined});
function handlePublicCancelChanges() { // fn#123694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:1713, offset: 0x0259830f, size: 80 bytes, params: 1, frame: 13
var value2;
var defaultImport;
if (guild != null) {
value2 = environment.__proto__.__proto__;
defaultImport = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
defaultImport.cancelChanges(guild.id);
}
if (onClose != null) {
onClose();
}
}
function handlePublicSaveChanges() { // fn#123695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:1801, offset: 0x0259835f, size: 120 bytes, params: 1, frame: 18
var id;
var rulesChannelId;
var publicUpdatesChannelId;
var preferredLocale;
var features;
var safetyAlertsChannelId;
let value = environment.__proto__;
let guildBinding = guild;
if (guildBinding != null) {
guildBinding = guild;
id = guildBinding.id;
rulesChannelId = guildBinding.rulesChannelId;
publicUpdatesChannelId = guildBinding.publicUpdatesChannelId;
preferredLocale = guildBinding.preferredLocale;
features = guildBinding.features;
safetyAlertsChannelId = guildBinding.safetyAlertsChannelId;
value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.saveGuild(id, {rulesChannelId: rulesChannelId, safetyAlertsChannelId: safetyAlertsChannelId,
publicUpdatesChannelId: publicUpdatesChannelId, preferredLocale: preferredLocale, features: features});
}
}
function _fun123697() { // fn#123697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2122, offset: 0x025983d7, size: 107 bytes, params: 1, frame: 18
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const handlePublicCancelChangesBinding = handlePublicCancelChanges;
const intl = (IndexNativeModule).intl;
return (
<HeaderActionButton
onPress={handlePublicCancelChangesBinding}
text={intl.string((IndexNativeModule).t['ETE/oC'])}
/>
);
}
function _fun123698() { // fn#123698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2262, offset: 0x02598442, size: 45 bytes, params: 1, frame: 13
const HeaderSubmittingIndicator = (NavigatorHeaderNativeModule).HeaderSubmittingIndicator;
return <HeaderSubmittingIndicator />;
}
function _fun123699() { // fn#123699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2309, offset: 0x0259846f, size: 107 bytes, params: 1, frame: 18
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const handlePublicSaveChangesBinding = handlePublicSaveChanges;
const intl = (IndexNativeModule).intl;
return (
<HeaderActionButton
onPress={handlePublicSaveChangesBinding}
text={intl.string((IndexNativeModule).t['R3BPH+'])}
/>
);
}
}
function _fun123700() { // fn#123700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2475, offset: 0x025984da, size: 81 bytes, params: 1, frame: 13
var environment;
var r0;
let value = environment.__proto__;
const channels = GuildChannelStore.getChannels(guildId);
if (channels == null) {
r0 = [];
} else {
value = channels[GUILD_SELECTABLE_CHANNELS_KEY].filter(function(a0) {
return a0.channel.type === ChannelTypes.GUILD_TEXT;
});
value = value.map(_fun123702);
r0 = value;
}
return r0;
function _fun123702({channel}) { // fn#123702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2584, offset: 0x0259854b, size: 76 bytes, params: 2, frame: 18
const object = {};
object.value = channel.id;
object.label = UseChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore, true);
return object;
}
}
function _fun123703() { // fn#123703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2687, offset: 0x02598597, size: 199 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[20]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[22]);
value = value(dependencyMap[21], dependencyMap.paths);
const object = {};
const intl = require(dependencyMap[16]).intl;
const string = intl.string;
const Yr6nGx = require(dependencyMap[16]).t.Yr6nGx;
object.title = Reflect.apply(string, intl, [Yr6nGx]);
object.items = env0_9();
object.onItemSelect = onItemSelect_123704;
object.selectedItem = rulesChannel == null ? value2 : rulesChannel.id;
object.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value, 'SelectRulesChannel', object]);
return value2;
function onItemSelect_123704(a0) { // fn#123704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2825, offset: 0x0259865e, size: 70 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
(GuildSettingsActionCreators).updateGuild({rulesChannelId: a0});
(ActionSheetActionCreators).hideActionSheet();
}
}
function _fun123705() { // fn#123705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2971, offset: 0x025986a4, size: 199 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[20]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[22]);
value = value(dependencyMap[21], dependencyMap.paths);
const object = {};
const intl = require(dependencyMap[16]).intl;
const string = intl.string;
const VqhxxN = require(dependencyMap[16]).t.VqhxxN;
object.title = Reflect.apply(string, intl, [VqhxxN]);
object.items = env0_9();
object.onItemSelect = onItemSelect_123706;
object.selectedItem = publicUpdatesChannel == null ? value2 : publicUpdatesChannel.id;
object.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value, 'SelectUpdatesChannel', object]);
return value2;
function onItemSelect_123706(a0) { // fn#123706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:3111, offset: 0x0259876b, size: 70 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
(GuildSettingsActionCreators).updateGuild({publicUpdatesChannelId: a0});
(ActionSheetActionCreators).hideActionSheet();
}
}
function _fun123707() { // fn#123707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:3300, offset: 0x025987b1, size: 181 bytes, params: 1, frame: 21
const defaultImport = importDefault(dependencyMap[20]);
const openLazy = defaultImport.openLazy;
const value2 = require(dependencyMap[22])(dependencyMap[21], dependencyMap.paths);
const object = {};
const intl = require(dependencyMap[16]).intl;
object.title = intl.string(require(dependencyMap[16]).t['dXE8/D']);
object.items = calculateLocaleOptions();
object.onItemSelect = onItemSelect_123708;
object.selectedItem = preferredLocale;
object.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value2, 'SelectLocale', object]);
function onItemSelect_123708(a0) { // fn#123708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:3435, offset: 0x02598866, size: 70 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
(GuildSettingsActionCreators).updateGuild({preferredLocale: a0});
(ActionSheetActionCreators).hideActionSheet();
}
}
function _fun123709() { // fn#123709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:4376, offset: 0x025988ac, size: 325 bytes, params: 1, frame: 24
const env0_0 = guild.preferredLocale;
const calculateLocaleOptionsBinding = calculateLocaleOptions;
const value3 = undefined;
const value5 = calculateLocaleOptionsBinding().find(function({value}) {
return value === preferredLocale;
});
const label = value5 == null ? value3 : value5.label;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.helperText = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['l2g81/']]);
object.hasIcons = false;
const TableRow = (TableRowNativeModule).TableRow;
string = intl.string;
const VeC8vc = (require(1244) /* metro dependency 1244: indexNative */).t.VeC8vc;
const canManageBinding = canManage;
const TableRow2 = (TableRowNativeModule).TableRow;
const TrailingText = TableRow2.TrailingText;
return (
<TableRowGroup {...object}>
<TableRow
label={Reflect.apply(string, intl, [VeC8vc])}
disabled={!canManageBinding}
trailing={<TrailingText text={label ?? ''} />}
arrow
onPress={env0_11}
/>
</TableRowGroup>
);
}
}
return r0;
}
function _fun123703() { // fn#123703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2687, offset: 0x02598597, size: 199 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[20]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[22]);
value = value(dependencyMap[21], dependencyMap.paths);
const object2 = {};
const intl = require(dependencyMap[16]).intl;
const string = intl.string;
const Yr6nGx = require(dependencyMap[16]).t.Yr6nGx;
object2.title = Reflect.apply(string, intl, [Yr6nGx]);
object2.items = env0_9();
object2.onItemSelect = onItemSelect_123704;
object2.selectedItem = rulesChannel == null ? value2 : rulesChannel.id;
object2.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value, 'SelectRulesChannel', object2]);
return value2;
}
function _fun123705() { // fn#123705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2971, offset: 0x025986a4, size: 199 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[20]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[22]);
value = value(dependencyMap[21], dependencyMap.paths);
const object2 = {};
const intl = require(dependencyMap[16]).intl;
const string = intl.string;
const VqhxxN = require(dependencyMap[16]).t.VqhxxN;
object2.title = Reflect.apply(string, intl, [VqhxxN]);
object2.items = env0_9();
object2.onItemSelect = onItemSelect_123706;
object2.selectedItem = publicUpdatesChannel == null ? value2 : publicUpdatesChannel.id;
object2.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value, 'SelectUpdatesChannel', object2]);
return value2;
}
function _fun123707() { // fn#123707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:3300, offset: 0x025987b1, size: 181 bytes, params: 1, frame: 21
const defaultImport = importDefault(dependencyMap[20]);
const openLazy = defaultImport.openLazy;
const value2 = require(dependencyMap[22])(dependencyMap[21], dependencyMap.paths);
const object2 = {};
const intl = require(dependencyMap[16]).intl;
object2.title = intl.string(require(dependencyMap[16]).t['dXE8/D']);
object2.items = calculateLocaleOptions();
object2.onItemSelect = onItemSelect_123708;
object2.selectedItem = preferredLocale;
object2.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value2, 'SelectLocale', object2]);
}
function _fun123709() { // fn#123709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:4376, offset: 0x025988ac, size: 325 bytes, params: 1, frame: 24
const env0_0 = guild.preferredLocale;
const calculateLocaleOptionsBinding = calculateLocaleOptions;
const value3 = undefined;
const value5 = calculateLocaleOptionsBinding().find(function({value}) {
return value === preferredLocale;
});
const label = value5 == null ? value3 : value5.label;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.helperText = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['l2g81/']]);
object2.hasIcons = false;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
string = intl.string;
const VeC8vc = (require(1244) /* metro dependency 1244: indexNative */).t.VeC8vc;
const canManageBinding = canManage;
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const TrailingText = TableRow2.TrailingText;
return (
<TableRowGroup {...object2}>
<TableRow
label={Reflect.apply(string, intl, [VeC8vc])}
disabled={!canManageBinding}
trailing={<TrailingText text={label ?? ''} />}
arrow
onPress={env0_11}
/>
</TableRowGroup>
);
}
function handlePublicCancelChanges() { // fn#123694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:1713, offset: 0x0259830f, size: 80 bytes, params: 1, frame: 13
var value2;
var defaultImport;
if (guild != null) {
value2 = environment.__proto__.__proto__;
defaultImport = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
defaultImport.cancelChanges(guild.id);
}
if (onClose != null) {
onClose();
}
}
function handlePublicSaveChanges() { // fn#123695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:1801, offset: 0x0259835f, size: 120 bytes, params: 1, frame: 18
var id;
var rulesChannelId;
var publicUpdatesChannelId;
var preferredLocale;
var features;
var safetyAlertsChannelId;
let value = environment.__proto__;
let guildBinding = guild;
if (guildBinding != null) {
guildBinding = guild;
id = guildBinding.id;
rulesChannelId = guildBinding.rulesChannelId;
publicUpdatesChannelId = guildBinding.publicUpdatesChannelId;
preferredLocale = guildBinding.preferredLocale;
features = guildBinding.features;
safetyAlertsChannelId = guildBinding.safetyAlertsChannelId;
value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.saveGuild(id, {rulesChannelId: rulesChannelId, safetyAlertsChannelId: safetyAlertsChannelId,
publicUpdatesChannelId: publicUpdatesChannelId, preferredLocale: preferredLocale, features: features});
}
}
function _fun123697() { // fn#123697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2122, offset: 0x025983d7, size: 107 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const handlePublicCancelChangesBinding = handlePublicCancelChanges;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HeaderActionButton
onPress={handlePublicCancelChangesBinding}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
/>
);
}
function _fun123698() { // fn#123698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2262, offset: 0x02598442, size: 45 bytes, params: 1, frame: 13
const HeaderSubmittingIndicator = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).HeaderSubmittingIndicator;
return <HeaderSubmittingIndicator />;
}
function _fun123699() { // fn#123699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2309, offset: 0x0259846f, size: 107 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const handlePublicSaveChangesBinding = handlePublicSaveChanges;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HeaderActionButton
onPress={handlePublicSaveChangesBinding}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+'])}
/>
);
}
function _fun123702({channel}) { // fn#123702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2584, offset: 0x0259854b, size: 76 bytes, params: 2, frame: 18
const object2 = {};
object2.value = channel.id;
object2.label = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore,
RelationshipStore, true);
return object2;
}
function onItemSelect_123704(a0) { // fn#123704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:2825, offset: 0x0259865e, size: 70 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
(importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).updateGuild({rulesChannelId: a0});
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function onItemSelect_123706(a0) { // fn#123706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:3111, offset: 0x0259876b, size: 70 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
(importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).updateGuild({publicUpdatesChannelId: a0});
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function onItemSelect_123708(a0) { // fn#123708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16200:3435, offset: 0x02598866, size: 70 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
(importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).updateGuild({preferredLocale: a0});
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun123686, 15992, [31, 1379, 1935, 3784, 3793, 1878, 9113, 14840, 661, 33, 4501, 697, 3860, 1484, 566,
9112, 1244, 5277, 5282, 4805, 4080, 9059, 1962, 7972, 4572, 6231, 6238,
2]) /* metro module 15992, dependencies: [31, 1379, 1935, 3784, 3793, 1878, 9113, 14840, 661, 33, 4501, 697, 3860, 1484, 566, 9112, 1244, 5277, 5282, 4805, 4080, 9059, 1962, 7972, 4572, 6231, 6238, 2] */;
@@ -1,16 +1,29 @@
/* Metro module 15993; source: modules/guild_settings/community/native/GuildSettingsModalCommunityIntro.tsx; dependencies: [31, 27, 1867, 3784, 661, 33, 4501, 697, 11046, 1244, 4573, 14783, 4068, 1484, 566, 694, 9112, 15994, 6766, 1948, 4578, 15998, 3856, 5462, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import HelpdeskUtils from '../../../../utils/HelpdeskUtils.tsx'; /* Metro dependency 1948 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CircleInformationIconModule from '../../../../design/components/Icon/native/redesign/generated/CircleInformationIcon.tsx'; /* Metro dependency 4068 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavScrimAndroidModule from '../../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
import * as TextWithIOSLinkWorkaroundModule from '../../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
import * as AnalyticsIconModule from '../../../../design/components/Icon/native/redesign/generated/AnalyticsIcon.tsx'; /* Metro dependency 11046 */
import * as LightbulbIconModule from '../../../../design/components/Icon/native/redesign/generated/LightbulbIcon.tsx'; /* Metro dependency 14783 */
import * as IntroHeaderModule from '../../../../design/components/Illustration/native/redesign/generated/IntroHeader.tsx'; /* Metro dependency 15994 */
function _fun123711(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:6, offset: 0x025989f1, size: 578 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.Image;
const env0_6 = value.ScrollView;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_9 = value.HelpdeskArticles;
const env0_10 = value.GuildFeatures;
@@ -22,174 +35,239 @@ function _fun123711(global, require, importDefault, importAll, module, exports,
const env0_15 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.container = {height: '100%'};
object2.contentPadding = {padding: 16};
object2.header = {'textAlign': 'center', 'marginBottom': 8};
object2.body = {'textAlign': 'center', 'marginBottom': 24};
object2.details = {'textAlign': 'center', 'marginTop': 24};
object2.headerImage = {width: '100%'};
object2.features = {'marginTop': 32, 'marginBottom': 32};
const object3 = {'backgroundColor': null, 'flex': 1, 'flexDirection': 'row', 'padding': 16, 'borderRadius': null,
object = {};
object.container = {height: '100%'};
object.contentPadding = {padding: 16};
object.header = {'textAlign': 'center', 'marginBottom': 8};
object.body = {'textAlign': 'center', 'marginBottom': 24};
object.details = {'textAlign': 'center', 'marginTop': 24};
object.headerImage = {width: '100%'};
object.features = {'marginTop': 32, 'marginBottom': 32};
const object4 = {'backgroundColor': null, 'flex': 1, 'flexDirection': 'row', 'padding': 16, 'borderRadius': null,
'marginTop': 8, 'alignItems': 'flex-start'};
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object3.backgroundColor = CARD_BACKGROUND_DEFAULT;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.featureCard = object3;
object4.backgroundColor = CARD_BACKGROUND_DEFAULT;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.featureCard = object4;
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object2.featureIcon = {'backgroundColor': null, 'borderRadius': 40, 'marginRight': 16, 'padding': 8,
object.featureIcon = {'backgroundColor': null, 'borderRadius': 40, 'marginRight': 16, 'padding': 8,
backgroundColor: BACKGROUND_MOD_STRONG};
object2.featureDescription = {'overflow': 'hidden', 'flex': 1};
const env0_16 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/community/native/GuildSettingsModalCommunityIntro.tsx');
object.featureDescription = {'overflow': 'hidden', 'flex': 1};
const env0_16 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/community/native/GuildSettingsModalCommunityIntro.tsx');
exports.default = GuildSettingsModalCommunityIntro;
}
function FeatureCard({icon, header, body}) { // fn#123712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:914, offset: 0x02598c33, size: 223 bytes, params: 2, frame: 23
const styles = useStyles();
const view = <View style={styles.featureIcon}>{icon()}</View>;
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
const heading = <Heading variant="text-md/semibold" color="mobile-text-heading-primary">{header}</Heading>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.featureCard}>
{view}
<View style={styles.featureDescription}>
{heading}
<Text variant="text-sm/medium" color="text-default">
{body}
</Text>
function FeatureCard({icon, header, body}) { // fn#123712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:914, offset: 0x02598c33, size: 223 bytes, params: 2, frame: 23
const styles = useStyles();
const view = (
<View style={styles.featureIcon}>
{icon()}
</View>
</View>
);
}
);
const Heading = (TextModule).Heading;
const heading = (
<Heading variant="text-md/semibold" color="mobile-text-heading-primary">
{header}
</Heading>
);
const Text = (TextModule).Text;
return (
<View style={styles.featureCard}>
{view}
<View style={styles.featureDescription}>
{heading}
<Text variant="text-sm/medium" color="text-default">
{body}
</Text>
</View>
</View>
);
}
function GuildSettingsModalCommunityIntro({guildId, onClose, contentContainerStyle}) { // fn#123713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:1377, offset: 0x02598d12, size: 1273 bytes, params: 2, frame: 34
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const env0_3 = guild;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun123715);
env0_3.useEffect(_fun123716, [guild, value2, onClose]);
const value4 = (require(15994) /* metro dependency 15994: IntroHeader */).useIntroHeaderSource();
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
const items4 = [styles.contentPadding, contentContainerStyle];
const items2 = [<Image resizeMode="contain" source={value4} style={styles.headerImage} />];
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = <Heading style={styles.header} variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t['M/gBcA']])}</Heading>;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
let format = intl.format;
const property = (require(1244) /* metro dependency 1244: indexNative */).t['52EgsM'];
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport.getArticleURL;
const FRIEND_COMMUNITY_DISCOVERABLE_GUILD_TYPES = HelpdeskArticles.FRIEND_COMMUNITY_DISCOVERABLE_GUILD_TYPES;
items2[2] = <TextWithIOSLinkWorkaround style={styles.body} variant="text-md/medium" color="text-default">{Reflect.apply(format,
intl, [property, {helpdeskArticle: Reflect.apply(getArticleURL, defaultImport,
[FRIEND_COMMUNITY_DISCOVERABLE_GUILD_TYPES])}])}</TextWithIOSLinkWorkaround>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const LhlgY9 = (require(1244) /* metro dependency 1244: indexNative */).t.LhlgY9;
items2[3] = <Button text={Reflect.apply(string, intl, [LhlgY9])} onPress={onPress_123718} disabled={!value3} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const HgTI2N = (require(1244) /* metro dependency 1244: indexNative */).t.HgTI2N;
items2[4] = <Text style={styles.details} variant="text-sm/medium" color="text-default">{Reflect.apply(string, intl,
[HgTI2N])}</Text>;
const object = {icon: icon_123719};
object.header = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oVQF2y);
format = intl.format;
const A6G7ak = (require(1244) /* metro dependency 1244: indexNative */).t.A6G7ak;
object.body = Reflect.apply(format, intl, [A6G7ak, {featureHook: featureHook}]);
const items3 = [object];
const object2 = {icon: icon_123721};
object2.header = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0rJl9y']);
format = intl.format;
const XsCNky = (require(1244) /* metro dependency 1244: indexNative */).t.XsCNky;
object2.body = Reflect.apply(format, intl, [XsCNky, {infoHook: function() {
return null;
}, featureHook: featureHook_123723}]);
items3[1] = object2;
const object3 = {icon: icon_123724};
string = intl.string;
const W2kLJC = (require(1244) /* metro dependency 1244: indexNative */).t.W2kLJC;
object3.header = Reflect.apply(string, intl, [W2kLJC]);
object3.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hyNkHz);
items3[2] = object3;
items2[5] = <View style={styles.features}>{items3.map(_fun123725)}</View>;
const scrollView = <ScrollView style={styles.container} contentContainerStyle={items4}>{items2}</ScrollView>;
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<>
{scrollView}
<NavScrim />
</>
);
}
function _fun123715() { // fn#123715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:1593, offset: 0x0259920b, size: 51 bytes, params: 1, frame: 14
return guild != null && PermissionStore.can(Permissions.ADMINISTRATOR, guild);
}
function _fun123716() { // fn#123716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:1646, offset: 0x0259923e, size: 137 bytes, params: 1, frame: 14
var environment;
var value5;
var binding;
if (guild != null && guild.features.has(GuildFeatures.COMMUNITY)) {
value5 = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(function() {
return importDefault(dependencyMap[16]).setSection(GuildSettingsSections.COMMUNITY);
function GuildSettingsModalCommunityIntro({guildId, onClose, contentContainerStyle}) { // fn#123713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:1377, offset: 0x02598d12, size: 1273 bytes, params: 2, frame: 34
const styles = useStyles();
const value2 = (UseNavigationNativeModule).useNavigation();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
binding = env0_2;
binding.replace(GuildSettingsSections.COMMUNITY, {onClose: onClose});
const guild2 = guild;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun123715);
guild2.useEffect(_fun123716, [guild, value2, onClose]);
const value4 = (IntroHeaderModule).useIntroHeaderSource();
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
const items4 = [styles.contentPadding, contentContainerStyle];
const items2 = [
<Image
resizeMode="contain"
source={value4}
style={styles.headerImage}
/>,
];
const Heading = (TextModule).Heading;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = (
<Heading
style={styles.header}
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['M/gBcA']])}
</Heading>
);
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
let format = intl.format;
const property = (require(1244) /* metro dependency 1244: indexNative */).t['52EgsM'];
const defaultImport = HelpdeskUtils;
const getArticleURL = defaultImport.getArticleURL;
const FRIEND_COMMUNITY_DISCOVERABLE_GUILD_TYPES = HelpdeskArticles.FRIEND_COMMUNITY_DISCOVERABLE_GUILD_TYPES;
items2[2] = (
<TextWithIOSLinkWorkaround
style={styles.body}
variant="text-md/medium"
color="text-default"
>
{Reflect.apply(format, intl, [property, {helpdeskArticle: Reflect.apply(getArticleURL, defaultImport,
[FRIEND_COMMUNITY_DISCOVERABLE_GUILD_TYPES])}])}
</TextWithIOSLinkWorkaround>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const LhlgY9 = (require(1244) /* metro dependency 1244: indexNative */).t.LhlgY9;
items2[3] = (
<Button
text={Reflect.apply(string, intl, [LhlgY9])}
onPress={onPress_123718}
disabled={!value3}
/>
);
const Text = (TextModule).Text;
string = intl.string;
const HgTI2N = (require(1244) /* metro dependency 1244: indexNative */).t.HgTI2N;
items2[4] = (
<Text
style={styles.details}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(string, intl, [HgTI2N])}
</Text>
);
const object4 = {icon: icon_123719};
object4.header = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oVQF2y);
format = intl.format;
const A6G7ak = (require(1244) /* metro dependency 1244: indexNative */).t.A6G7ak;
object4.body = Reflect.apply(format, intl, [A6G7ak, {featureHook: featureHook}]);
const items3 = [object4];
const object5 = {icon: icon_123721};
object5.header = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0rJl9y']);
format = intl.format;
const XsCNky = (require(1244) /* metro dependency 1244: indexNative */).t.XsCNky;
object5.body = Reflect.apply(format, intl, [XsCNky, {infoHook: function() {
return null;
}, featureHook: featureHook_123723}]);
items3[1] = object5;
const object6 = {icon: icon_123724};
string = intl.string;
const W2kLJC = (require(1244) /* metro dependency 1244: indexNative */).t.W2kLJC;
object6.header = Reflect.apply(string, intl, [W2kLJC]);
object6.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hyNkHz);
items3[2] = object6;
items2[5] = (
<View style={styles.features}>
{items3.map(_fun123725)}
</View>
);
const scrollView = (
<ScrollView style={styles.container} contentContainerStyle={items4}>
{items2}
</ScrollView>
);
const NavScrim = (NavScrimAndroidModule).NavScrim;
return (
<>
{scrollView}
<NavScrim />
</>
);
function _fun123715() { // fn#123715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:1593, offset: 0x0259920b, size: 51 bytes, params: 1, frame: 14
return guild != null && PermissionStore.can(Permissions.ADMINISTRATOR, guild);
}
function _fun123716() { // fn#123716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:1646, offset: 0x0259923e, size: 137 bytes, params: 1, frame: 14
var environment;
var value5;
var binding;
if (guild != null && guild.features.has(GuildFeatures.COMMUNITY)) {
value5 = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(function() {
return importDefault(dependencyMap[16]).setSection(GuildSettingsSections.COMMUNITY);
});
binding = env0_2;
binding.replace(GuildSettingsSections.COMMUNITY, {onClose: onClose});
}
}
function GuildSettingsModalCommunityIntroOnPress() { // fn#123718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:2443, owner: GuildSettingsModalCommunityIntro.onPress, offset: 0x025992f7, size: 83 bytes, params: 1, frame: 12
const value = environment.__proto__;
if (env0_4) {
(importDefault(15998) /* metro dependency 15998: EnableCommunityModalActionCreators */).open();
} else {
(require(3856) /* metro dependency 3856: ToastUtils */).communityAdminOnly();
}
}
function GuildSettingsModalCommunityIntroIcon() { // fn#123719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:2677, owner: GuildSettingsModalCommunityIntro.icon, offset: 0x0259934a, size: 76 bytes, params: 1, frame: 16
const AnalyticsIcon = (AnalyticsIconModule).AnalyticsIcon;
const GREEN_360 = (Native).unsafe_rawColors.GREEN_360;
return <AnalyticsIcon color={GREEN_360} />;
}
function GuildSettingsModalCommunityIntroFeatureHook(a0, a1) { // fn#123720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:2849, owner: GuildSettingsModalCommunityIntro.featureHook, offset: 0x02599396, size: 67 bytes, params: 3, frame: 15
const Text = (TextModule).Text;
return (
<Text
variant="text-sm/semibold"
color="mobile-text-heading-primary"
key={a1}
>
{a0}
</Text>
);
}
function GuildSettingsModalCommunityIntroIcon_123721() { // fn#123721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:2960, owner: GuildSettingsModalCommunityIntro.icon, offset: 0x025993d9, size: 76 bytes, params: 1, frame: 16
const LightbulbIcon = (LightbulbIconModule).LightbulbIcon;
const YELLOW_300 = (Native).unsafe_rawColors.YELLOW_300;
return <LightbulbIcon color={YELLOW_300} />;
}
function GuildSettingsModalCommunityIntroFeatureHook_123723(a0, a1) { // fn#123723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:3155, owner: GuildSettingsModalCommunityIntro.featureHook, offset: 0x02599396, size: 67 bytes, params: 3, frame: 15
const Text = (TextModule).Text;
return (
<Text
variant="text-sm/semibold"
color="mobile-text-heading-primary"
key={a1}
>
{a0}
</Text>
);
}
function GuildSettingsModalCommunityIntroIcon_123724() { // fn#123724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:3266, owner: GuildSettingsModalCommunityIntro.icon, offset: 0x02599425, size: 76 bytes, params: 1, frame: 16
const CircleInformationIcon = (CircleInformationIconModule).CircleInformationIcon;
const PLATFORM_PARTNER = (Native).unsafe_rawColors.PLATFORM_PARTNER;
return <CircleInformationIcon color={PLATFORM_PARTNER} />;
}
function _fun123725(a0, a1) { // fn#123725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:3449, offset: 0x02599471, size: 37 bytes, params: 3, frame: 15
return <FeatureCard {...a0} key={a1} />;
}
}
}
function GuildSettingsModalCommunityIntroOnPress() { // fn#123718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:2443, owner: GuildSettingsModalCommunityIntro.onPress, offset: 0x025992f7, size: 83 bytes, params: 1, frame: 12
const value = environment.__proto__;
if (env0_4) {
(importDefault(15998) /* metro dependency 15998: EnableCommunityModalActionCreators */).open();
} else {
(require(3856) /* metro dependency 3856: ToastUtils */).communityAdminOnly();
}
}
function GuildSettingsModalCommunityIntroIcon() { // fn#123719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:2677, owner: GuildSettingsModalCommunityIntro.icon, offset: 0x0259934a, size: 76 bytes, params: 1, frame: 16
const AnalyticsIcon = (require(11046) /* metro dependency 11046: AnalyticsIcon */).AnalyticsIcon;
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
return <AnalyticsIcon color={GREEN_360} />;
}
function GuildSettingsModalCommunityIntroFeatureHook(a0, a1) { // fn#123720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:2849, owner: GuildSettingsModalCommunityIntro.featureHook, offset: 0x02599396, size: 67 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-sm/semibold"
color="mobile-text-heading-primary"
key={a1}
>
{a0}
</Text>
);
}
function GuildSettingsModalCommunityIntroIcon_123721() { // fn#123721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:2960, owner: GuildSettingsModalCommunityIntro.icon, offset: 0x025993d9, size: 76 bytes, params: 1, frame: 16
const LightbulbIcon = (require(14783) /* metro dependency 14783: LightbulbIcon */).LightbulbIcon;
const YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
return <LightbulbIcon color={YELLOW_300} />;
}
function GuildSettingsModalCommunityIntroIcon_123724() { // fn#123724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:3266, owner: GuildSettingsModalCommunityIntro.icon, offset: 0x02599425, size: 76 bytes, params: 1, frame: 16
const CircleInformationIcon = (require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon;
const PLATFORM_PARTNER = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_PARTNER;
return <CircleInformationIcon color={PLATFORM_PARTNER} />;
}
function _fun123725(a0, a1) { // fn#123725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16201:3449, offset: 0x02599471, size: 37 bytes, params: 3, frame: 15
return <FeatureCard {...a0} key={a1} />;
}
global.__d(_fun123711, 15993, [31, 27, 1867, 3784, 661, 33, 4501, 697, 11046, 1244, 4573, 14783, 4068, 1484, 566,
694, 9112, 15994, 6766, 1948, 4578, 15998, 3856, 5462,
2]) /* metro module 15993, dependencies: [31, 27, 1867, 3784, 661, 33, 4501, 697, 11046, 1244, 4573, 14783, 4068, 1484, 566, 694, 9112, 15994, 6766, 1948, 4578, 15998, 3856, 5462, 2] */;
@@ -1,23 +1,27 @@
/* Metro module 6849; source: modules/guild_settings/creator_monetization/canUserSeeMonetizationOnboarding.tsx; dependencies: [1878, 6850, 6851, 3777, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CreatorMonetizationRestrictionsUtilsModule from '../../creator_monetization_review/CreatorMonetizationRestrictionsUtils.tsx'; /* Metro dependency 3777 */
function _fun54039(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7027:6, offset: 0x0135b410, size: 112 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/creator_monetization/canUserSeeMonetizationOnboarding.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/creator_monetization/canUserSeeMonetizationOnboarding.tsx');
exports.canUserSeeMonetizationOnboarding = canUserSeeMonetizationOnboarding;
function canUserSeeMonetizationOnboarding(a0) { // fn#54040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7027:255, offset: 0x0135b480, size: 176 bytes, params: 2, frame: 19
const ownerId = a0.ownerId;
const id = UserStore.getCurrentUser()?.id;
const value = require(6850) /* metro dependency 6850: GuildRoleSubscriptionSettingUtils */;
const canSeeGuildRoleSubscriptionSettings = value.canSeeGuildRoleSubscriptionSettings;
const object = {guild: a0, isOwner: ownerId === id};
object.canManageGuildRoleSubscriptions = (require(6850) /* metro dependency 6850: GuildRoleSubscriptionSettingUtils */).canManageGuildRoleSubscriptions(a0);
object.isUserInCreatorMonetizationEligibleCountry = (require(6851) /* metro dependency 6851: CreatorMonetizationEligibilityExperimentUtils */).isUserInCreatorMonetizationEligibleCountry();
object.shouldRestrictUpdatingRoleSubscriptionSettings = CreatorMonetizationRestrictionsUtilsModule.shouldRestrictUpdatingCreatorMonetizationSettings(a0.id);
return Reflect.apply(canSeeGuildRoleSubscriptionSettings, value, [object]);
}
}
function canUserSeeMonetizationOnboarding(a0) { // fn#54040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7027:255, offset: 0x0135b480, size: 176 bytes, params: 2, frame: 19
const ownerId = a0.ownerId;
const id = UserStore.getCurrentUser()?.id;
const value = require(6850) /* metro dependency 6850: GuildRoleSubscriptionSettingUtils */;
const canSeeGuildRoleSubscriptionSettings = value.canSeeGuildRoleSubscriptionSettings;
const object2 = {guild: a0, isOwner: ownerId === id};
object2.canManageGuildRoleSubscriptions = (require(6850) /* metro dependency 6850: GuildRoleSubscriptionSettingUtils */).canManageGuildRoleSubscriptions(a0);
object2.isUserInCreatorMonetizationEligibleCountry = (require(6851) /* metro dependency 6851: CreatorMonetizationEligibilityExperimentUtils */).isUserInCreatorMonetizationEligibleCountry();
const creatorMonetizationRestrictionsUtilsModule = require(3777) /* metro dependency 3777: CreatorMonetizationRestrictionsUtils */;
object2.shouldRestrictUpdatingRoleSubscriptionSettings = creatorMonetizationRestrictionsUtilsModule.shouldRestrictUpdatingCreatorMonetizationSettings(a0.id);
return Reflect.apply(canSeeGuildRoleSubscriptionSettings, value, [object2]);
}
global.__d(_fun54039, 6849, [1878, 6850, 6851, 3777,
2]) /* metro module 6849, dependencies: [1878, 6850, 6851, 3777, 2] */;
@@ -1,44 +1,46 @@
/* Metro module 14840; source: modules/guild_settings/discovery/GuildSettingsDiscoveryConstants.tsx; dependencies: [1244, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun111995(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15037:6, offset: 0x023baa5f, size: 2210 bytes, params: 8, frame: 20
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object3 = {GENERAL_CHATTING: 14};
object3[14] = 'GENERAL_CHATTING';
object3.GAMING = 1;
object3[1] = 'GAMING';
object3.MUSIC = 2;
object3[2] = 'MUSIC';
object3.ENTERTAINMENT = 3;
object3[3] = 'ENTERTAINMENT';
object3.CREATIVE_ARTS = 4;
object3[4] = 'CREATIVE_ARTS';
object3.SCIENCE_AND_TECH = 5;
object3[5] = 'SCIENCE_AND_TECH';
object3.EDUCATION = 6;
object3[6] = 'EDUCATION';
object3.SPORTS = 7;
object3[7] = 'SPORTS';
object3.FASHION_AND_BEAUTY = 8;
object3[8] = 'FASHION_AND_BEAUTY';
object3.RELATIONSHIPS_AND_IDENTITY = 9;
object3[9] = 'RELATIONSHIPS_AND_IDENTITY';
object3.TRAVEL_AND_FOOD = 10;
object3[10] = 'TRAVEL_AND_FOOD';
object3.FITNESS_AND_HEALTH = 11;
object3[11] = 'FITNESS_AND_HEALTH';
object3.FINANCE = 12;
object3[12] = 'FINANCE';
object3.OTHER = 13;
object3[13] = 'OTHER';
object3.EMOJI = 43;
object3[43] = 'EMOJI';
object3.BOTS = 49;
object3[49] = 'BOTS';
const object4 = {};
const GENERAL_CHATTING = object3.GENERAL_CHATTING;
object4[GENERAL_CHATTING] = [function() {
object = {GENERAL_CHATTING: 14};
object[14] = 'GENERAL_CHATTING';
object.GAMING = 1;
object[1] = 'GAMING';
object.MUSIC = 2;
object[2] = 'MUSIC';
object.ENTERTAINMENT = 3;
object[3] = 'ENTERTAINMENT';
object.CREATIVE_ARTS = 4;
object[4] = 'CREATIVE_ARTS';
object.SCIENCE_AND_TECH = 5;
object[5] = 'SCIENCE_AND_TECH';
object.EDUCATION = 6;
object[6] = 'EDUCATION';
object.SPORTS = 7;
object[7] = 'SPORTS';
object.FASHION_AND_BEAUTY = 8;
object[8] = 'FASHION_AND_BEAUTY';
object.RELATIONSHIPS_AND_IDENTITY = 9;
object[9] = 'RELATIONSHIPS_AND_IDENTITY';
object.TRAVEL_AND_FOOD = 10;
object[10] = 'TRAVEL_AND_FOOD';
object.FITNESS_AND_HEALTH = 11;
object[11] = 'FITNESS_AND_HEALTH';
object.FINANCE = 12;
object[12] = 'FINANCE';
object.OTHER = 13;
object[13] = 'OTHER';
object.EMOJI = 43;
object[43] = 'EMOJI';
object.BOTS = 49;
object[49] = 'BOTS';
const object2 = {};
const GENERAL_CHATTING = object.GENERAL_CHATTING;
object2[GENERAL_CHATTING] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.D7iWE8);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['/L7rG6']);
@@ -59,8 +61,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.i2qs5h);
}];
const GAMING = object3.GAMING;
object4[GAMING] = [function() {
const GAMING = object.GAMING;
object2[GAMING] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['GIaXW+']);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['/L7rG6']);
@@ -81,8 +83,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.Kma1jy);
}];
const MUSIC = object3.MUSIC;
object4[MUSIC] = [function() {
const MUSIC = object.MUSIC;
object2[MUSIC] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.bt4I06);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.kPJLKg);
@@ -103,8 +105,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['rD/nte']);
}];
const ENTERTAINMENT = object3.ENTERTAINMENT;
object4[ENTERTAINMENT] = [function() {
const ENTERTAINMENT = object.ENTERTAINMENT;
object2[ENTERTAINMENT] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.XuOAEC);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.cGIWjd);
@@ -123,8 +125,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['+1/7Z9']);
}];
const CREATIVE_ARTS = object3.CREATIVE_ARTS;
object4[CREATIVE_ARTS] = [function() {
const CREATIVE_ARTS = object.CREATIVE_ARTS;
object2[CREATIVE_ARTS] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.ZtggfH);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.XuOAEC);
@@ -145,8 +147,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.eyEy1Y);
}];
const SCIENCE_AND_TECH = object3.SCIENCE_AND_TECH;
object4[SCIENCE_AND_TECH] = [function() {
const SCIENCE_AND_TECH = object.SCIENCE_AND_TECH;
object2[SCIENCE_AND_TECH] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.b7SNGt);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['3QIvxd']);
@@ -167,8 +169,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['mJwTU+']);
}];
const EDUCATION = object3.EDUCATION;
object4[EDUCATION] = [function() {
const EDUCATION = object.EDUCATION;
object2[EDUCATION] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['7F8qdf']);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.XmPLhd);
@@ -189,8 +191,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.cGIWjd);
}];
const SPORTS = object3.SPORTS;
object4[SPORTS] = [function() {
const SPORTS = object.SPORTS;
object2[SPORTS] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.PMk3Os);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.WzM5YA);
@@ -211,8 +213,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['6dJGyT']);
}];
const FASHION_AND_BEAUTY = object3.FASHION_AND_BEAUTY;
object4[FASHION_AND_BEAUTY] = [function() {
const FASHION_AND_BEAUTY = object.FASHION_AND_BEAUTY;
object2[FASHION_AND_BEAUTY] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['4J2PYL']);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.splt1M);
@@ -231,8 +233,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['+zpNOK']);
}];
const RELATIONSHIPS_AND_IDENTITY = object3.RELATIONSHIPS_AND_IDENTITY;
object4[RELATIONSHIPS_AND_IDENTITY] = [function() {
const RELATIONSHIPS_AND_IDENTITY = object.RELATIONSHIPS_AND_IDENTITY;
object2[RELATIONSHIPS_AND_IDENTITY] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['MR5I+r']);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.XuOAEC);
@@ -243,8 +245,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.BXJCGj);
}];
const TRAVEL_AND_FOOD = object3.TRAVEL_AND_FOOD;
object4[TRAVEL_AND_FOOD] = [function() {
const TRAVEL_AND_FOOD = object.TRAVEL_AND_FOOD;
object2[TRAVEL_AND_FOOD] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.rOhu7l);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.f1Zj06);
@@ -259,8 +261,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.YkEzAe);
}];
const FITNESS_AND_HEALTH = object3.FITNESS_AND_HEALTH;
object4[FITNESS_AND_HEALTH] = [function() {
const FITNESS_AND_HEALTH = object.FITNESS_AND_HEALTH;
object2[FITNESS_AND_HEALTH] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['kg/vN2']);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['1S1Wfl']);
@@ -281,8 +283,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['9reexT']);
}];
const FINANCE = object3.FINANCE;
object4[FINANCE] = [function() {
const FINANCE = object.FINANCE;
object2[FINANCE] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.rAnIoO);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.f9SRFh);
@@ -301,8 +303,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['DZeh+8']);
}];
const OTHER = object3.OTHER;
object4[OTHER] = [function() {
const OTHER = object.OTHER;
object2[OTHER] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.D7iWE8);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.cGIWjd);
@@ -319,8 +321,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.QiafXT);
}];
const EMOJI = object3.EMOJI;
object4[EMOJI] = [function() {
const EMOJI = object.EMOJI;
object2[EMOJI] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.dl70Jj);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.R58PcO);
@@ -339,8 +341,8 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.QiafXT);
}];
const BOTS = object3.BOTS;
object4[BOTS] = [function() {
const BOTS = object.BOTS;
object2[BOTS] = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.QYvZFr);
}, function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.C2TrLo);
@@ -356,39 +358,40 @@ function _fun111995(global, require, importDefault, importAll, module, exports,
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.QiafXT);
}];
const env0_2 = ['en-GB'];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/discovery/GuildSettingsDiscoveryConstants.tsx');
exports.GuildPrimaryCategory = object3;
exports.SUGGESTED_TAGS_FOR_CATEGORIES = object4;
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/discovery/GuildSettingsDiscoveryConstants.tsx');
exports.GuildPrimaryCategory = object;
exports.SUGGESTED_TAGS_FOR_CATEGORIES = object2;
exports.calculateLocaleOptions = calculateLocaleOptions;
}
function calculateLocaleOptions() { // fn#112139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15037:7296, offset: 0x023bccb2, size: 72 bytes, params: 1, frame: 12
let value = IndexNativeModule;
value = value.getAvailableLocales();
value = value.map(_fun112140);
return value.filter(_fun112141);
function _fun112140({value, name}) { // fn#112140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15037:7372, offset: 0x023bccfa, size: 129 bytes, params: 2, frame: 16
var r0;
var object;
var intl;
if (__proto__ === 'en-US') {
object = {id: __proto__, value: __proto__};
__proto__ = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WKEPHR);
object.image = undefined;
r0 = object;
} else {
r0 = {id: __proto__, value: __proto__, label: name, image: undefined};
}
return r0;
}
function calculateLocaleOptions() { // fn#112139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15037:7296, offset: 0x023bccb2, size: 72 bytes, params: 1, frame: 12
let value = require(1244) /* metro dependency 1244: indexNative */;
value = value.getAvailableLocales();
value = value.map(_fun112140);
return value.filter(_fun112141);
}
function _fun112141({value}) { // fn#112141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15037:7528, offset: 0x023bcd7b, size: 30 bytes, params: 2, frame: 11
const __proto__ = environment.__proto__;
const binding = env1_2;
return !binding.includes(__proto__);
}
function _fun112140({value, name}) { // fn#112140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15037:7372, offset: 0x023bccfa, size: 129 bytes, params: 2, frame: 16
var r0;
var object2;
var intl;
if (__proto__ === 'en-US') {
object2 = {id: __proto__, value: __proto__};
__proto__ = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WKEPHR);
object2.image = undefined;
r0 = object2;
} else {
r0 = {id: __proto__, value: __proto__, label: name, image: undefined};
}
return r0;
}
function _fun112141({value}) { // fn#112141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15037:7528, offset: 0x023bcd7b, size: 30 bytes, params: 2, frame: 11
const __proto__ = environment.__proto__;
const binding = env1_2;
return !binding.includes(__proto__);
}
global.__d(_fun111995, 14840, [1244, 2]) /* metro module 14840, dependencies: [1244, 2] */;
@@ -1,368 +1,400 @@
/* Metro module 15931; source: modules/guild_settings/integrations/native/GuildSettingsModalIntegrationPlatform.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 9113, 661, 33, 4501, 697, 9112, 4496, 1244, 4596, 15902, 15932, 4915, 1423, 4002, 6231, 6238, 6808, 3860, 1484, 566, 4048, 5282, 5277, 7007, 1948, 7972, 4572, 4573, 5462, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import GuildSettingsStore from '../../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as NavScrimAndroidModule from '../../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
import * as NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as GuildSettingsModalIntegrationsModule from './GuildSettingsModalIntegrations.tsx'; /* Metro dependency 15902 */
function _fun122865(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:6, offset: 0x02578670, size: 479 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_8 = value2.ActivityIndicator;
const env0_9 = value2.Image;
const env0_10 = value2.View;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_12 = constantsModule.GuildSettingsSections;
const env0_13 = constantsModule.HelpdeskArticles;
const env0_14 = constantsModule.PlatformTypes;
const env0_15 = constantsModule.UserSettingsSections;
const value4 = require(33) /* metro dependency 33 */;
const env0_16 = value4.jsx;
const env0_17 = value4.jsxs;
const env0_18 = value4.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const env0_19 = Reflect.apply(createStyles, createStylesModule, [{form: {paddingTop: PX_16},
const createStyles = CreateStylesModule.createStyles;
const PX_16 = (Native).space.PX_16;
const env0_19 = Reflect.apply(createStyles, CreateStylesModule, [{form: {paddingTop: PX_16},
trailingWrapper: {'flexDirection': 'row', 'alignItems': 'center'}, platformIcon: {'width': 24, 'height': 24}}]);
const Component = value.Component;
const Component = ReactModule.Component;
const env0_20 = _fun122869(Component);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/integrations/native/GuildSettingsModalIntegrationPlatform.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/integrations/native/GuildSettingsModalIntegrationPlatform.tsx');
exports.default = GuildSettingsModalIntegrationPlatform;
}
function _isNativeReflectConstruct_122866() { // fn#122866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:366, offset: 0x0257884f, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_122866_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _isNativeReflectConstruct_122866() { // fn#122866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:366, offset: 0x0257884f, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
function _fun122869(a0) { // fn#122869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:724, offset: 0x025788b1, size: 102 bytes, params: 2, frame: 17
const IntegrationItem2 = IntegrationItem;
Inherits(IntegrationItem2, a0);
return CreateClass(IntegrationItem2, [{key: 'render', value: value_122874}], [{key: 'getDerivedStateFromProps',
value: function({integration}, {enabled}) {
var value = null;
return enabled ? integration.syncing !== false || integration.enabled === enabled ? value : {enabled: integration.enabled} : value;
}}]);
function IntegrationItem(a0) { // fn#122870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:736, offset: 0x02578917, size: 173 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, IntegrationItem);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(IntegrationItem);
binding = env1_5;
if (_isNativeReflectConstruct_122866()) {
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.state = {enabled: value.props.integration.enabled};
value.handleToggleEnabled = handleToggleEnabled;
return value;
function handleToggleEnabled() { // fn#122871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:1035, owner: IntegrationItem.handleToggleEnabled, offset: 0x025789c4, size: 536 bytes, params: 1, frame: 22
var environment;
var enabled;
var binding;
var setState;
var object;
var defaultImport;
var show;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var value;
const props = guild2.props;
const guild = props.guild;
var guild2 = guild;
const integration = props.integration;
if (!integration.syncing) {
enabled = integration.enabled;
binding = guild2;
setState = binding.setState;
object = {};
if (enabled) {
object.enabled = false;
Reflect.apply(setState, binding, [object]);
value = environment.__proto__.__proto__;
defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = defaultImport.show;
object = {};
object.title = intl.string(t.emx3lN);
object.body = integration.type === 'youtube' ? intl.string(t.anKQWU) : intl.string(t['BW/xtn']);
object.confirmText = intl.string(t.R9GHya);
object.cancelText = intl.string(t['ETE/oC']);
object.onConfirm = onConfirm_122872;
object.onCancel = onCancel_122873;
object.confirmColor = (importDefault(4596) /* metro dependency 4596: Alert */).Colors.RED;
Reflect.apply(show, defaultImport, [object]);
} else {
object.enabled = true;
Reflect.apply(setState, binding, [object]);
value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.enableIntegration(guild.id, integration.type, integration.id);
}
}
function handleToggleEnabledOnConfirm() { // fn#122872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:1413, owner: IntegrationItem.handleToggleEnabled.onConfirm, offset: 0x02578bdc, size: 60 bytes, params: 1, frame: 13
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
return value.disableIntegration(guild.id, integration.id);
}
function handleToggleEnabledOnCancel() { // fn#122873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:1466, owner: IntegrationItem.handleToggleEnabled.onCancel, offset: 0x02578c18, size: 28 bytes, params: 1, frame: 12
return env1_0.setState({enabled: true});
}
}
}
function value_122874() { // fn#122874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:1676, offset: 0x02578c34, size: 776 bytes, params: 1, frame: 29
var r13;
var r12;
var defaultImport;
var get;
var value4;
var value5;
var moduleValue;
var makeSource;
var isThemeDark2;
var icon;
var TableRowGroup;
var TableRow;
var object2;
var user;
var syncing;
var enabled;
var items2;
var TableSwitchRow;
var object4;
var Boolean;
var intl;
const props = this.props;
const integration = props.integration;
const env0_1 = props.onPress;
const theme = props.theme;
const styles = props.styles;
const value2 = undefined;
const SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS = (GuildSettingsModalIntegrationsModule).SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS;
const includes = SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS.includes;
let type = integration.type;
if (Reflect.apply(includes, SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS, [type])) {
type = integration.type;
r13 = (require(15932) /* metro dependency 15932: IntegrationTypes */).IntegrationTypes.YOUTUBE === type ? integration.account == null ? value2 : integration.account.name : (require(15932) /* metro dependency 15932: IntegrationTypes */).IntegrationTypes.TWITCH !== type ? value2 : 'twitch.tv/' + integration.name;
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
get = defaultImport.get;
type = integration.type;
value4 = Reflect.apply(get, defaultImport, [type]);
value5 = null;
if (value5 != value4) {
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = moduleValue.makeSource;
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(theme);
icon = value4.icon;
r12 = (
<Image
source={Reflect.apply(makeSource, moduleValue, [isThemeDark2 ? icon.darkPNG : icon.lightPNG])}
style={styles.platformIcon}
/>
);
} else {
r12 = value5;
}
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object2 = {};
user = integration.user;
object2.label = value5 == user ? value2 : user.toString();
object2.subLabel = r13;
syncing = integration.syncing;
object2.trailing = (
<View style={styles.trailingWrapper}>
{syncing && <ActivityIndicator animating size="small" />}
</View>
);
enabled = integration.enabled;
r13 = enabled && !integration.syncing;
object2.arrow = r13;
object2.icon = r12;
enabled = integration.enabled;
r12 = enabled ? integration.syncing : !enabled;
object2.disabled = r12;
object2.onPress = onPress_122875;
items2 = [
<TableRow {...object2} />,
];
TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
object4 = {};
Boolean = global.Boolean;
enabled = this.state.enabled;
object4.value = Boolean(enabled);
syncing = integration.syncing;
object4.disabled = syncing === true;
object4.onValueChange = this.handleToggleEnabled;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vQC6vR);
items2[1] = <TableSwitchRow {...object4} />;
return (
<TableRowGroup hasIcons>
{items2}
</TableRowGroup>
);
}
return null;
function value_122874OnPress() { // fn#122875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:2451, owner: value_122874.onPress, offset: 0x02578f3c, size: 32 bytes, params: 1, frame: 12
return integration.enabled && onPress(integration);
}
}
}
function GuildSettingsModalIntegrationPlatform({contentContainerStyle, platformType, closeGuildSettings}) { // fn#122877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:2941, offset: 0x02578f9b, size: 946 bytes, params: 2, frame: 27
var object4;
var r16;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
var ro1jEN;
var defaultImport2;
var property;
var defaultImport3;
const useToken = UseTokenModule.useToken;
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
const value3 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_PADDING]);
const styles = useStyles();
const value4 = (UseNavigationNativeModule).useNavigation();
const useStateFromStoresObject = FluxModule.useStateFromStoresObject;
let guildSettingsStoreBinding = GuildSettingsStore;
const value5 = Reflect.apply(useStateFromStoresObject, FluxModule, [[guildSettingsStoreBinding], function() {
var object = {};
var guildSettingsStoreBinding = GuildSettingsStore;
object.guild = guildSettingsStoreBinding.getGuild();
object.submitting = guildSettingsStoreBinding.isSubmitting();
object.hasChanges = guildSettingsStoreBinding.hasChanges();
return object;
}]);
const submitting = value5.submitting;
const env0_5 = value5.hasChanges;
const guild = value5.guild;
const env0_7 = (UseTheme)();
const r14 = FluxModule.useStateFromStores([guildSettingsStoreBinding], function() {
return GuildSettingsStore.getProps().integrations;
})?.filter(function({type}) {
return type === platformType;
});
if (guild == null) {
return null;
}
const setOptions = value4.setOptions;
object4 = {headerLeft: submitting ? function() {
return null;
} : undefined};
object4.title = (importDefault(4915) /* metro dependency 4915: Platforms */).get(platformType)?.name;
object4.headerRight = headerRight_122883;
Reflect.apply(setOptions, value4, [object4]);
const closure = function() {
closeGuildSettings();
require(dependencyMap[30]).openUserSettings({screen: UserSettingsSections.CONNECTIONS, isRootScreen: true});
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_122866_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun122869(a0) { // fn#122869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:724, offset: 0x025788b1, size: 102 bytes, params: 2, frame: 17
const closure = IntegrationItem;
env0_7(closure, a0);
return env0_4(closure, [{key: 'render', value: value_122874}], [{key: 'getDerivedStateFromProps',
value: function({integration}, {enabled}) {
var value = null;
return enabled ? integration.syncing !== false || integration.enabled === enabled ? value : {enabled: integration.enabled} : value;
}}]);
}
function GuildSettingsModalIntegrationPlatform({contentContainerStyle, platformType, closeGuildSettings}) { // fn#122877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:2941, offset: 0x02578f9b, size: 946 bytes, params: 2, frame: 27
var object3;
var r16;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
var ro1jEN;
var defaultImport2;
var property;
var defaultImport3;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const value3 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
const styles = useStyles();
const value4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsStore],
function() {
var object = {};
object.guild = GuildSettingsStore.getGuild();
object.submitting = GuildSettingsStore.isSubmitting();
object.hasChanges = GuildSettingsStore.hasChanges();
return object;
});
const submitting = value5.submitting;
const env0_5 = value5.hasChanges;
const guild = value5.guild;
const env0_7 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const r14 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore], function() {
return GuildSettingsStore.getProps().integrations;
})?.filter(function({type}) {
return type === platformType;
});
if (guild == null) {
return null;
}
const setOptions = value4.setOptions;
object3 = {headerLeft: submitting ? function() {
return null;
} : undefined};
object3.title = (importDefault(4915) /* metro dependency 4915: Platforms */).get(platformType)?.name;
object3.headerRight = headerRight_122883;
Reflect.apply(setOptions, value4, [object3]);
const closure = function() {
closeGuildSettings();
require(dependencyMap[30]).openUserSettings({screen: UserSettingsSections.CONNECTIONS, isRootScreen: true});
};
const YOUTUBE = PlatformTypes.YOUTUBE;
if (YOUTUBE === platformType) {
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['4OSAQ9'];
object3 = {connectAction: closure};
defaultImport3 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
object3.helpdeskArticle = defaultImport3.getArticleURL(HelpdeskArticles.YOUTUBE_INTEGRATION);
r16 = Reflect.apply(format, intl, [property, object3]);
} else if (PlatformTypes.TWITCH !== platformType) {
r16 = undefined;
} else {
format = intl.format;
ro1jEN = (require(1244) /* metro dependency 1244: indexNative */).t.ro1jEN;
object3 = {connectAction: closure};
defaultImport2 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
object3.helpdeskArticle = defaultImport2.getArticleURL(HelpdeskArticles.TWITCH_INTEGRATION);
r16 = Reflect.apply(format, intl, [ro1jEN, object3]);
}
const jsxRuntimeEnv0_18Binding = jsxRuntimeEnv0_18;
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const object2 = {paddingHorizontal: value3};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const r7 = r14?.map(_fun122885);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const form = <Form style={styles.form} contentContainerStyle={contentContainerStyle}><Stack style={object2} spacing={PX_24}>{r7}<Text variant="text-sm/medium" color="text-muted">{r16}</Text></Stack></Form>;
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<>
{form}
<NavScrim />
</>
);
}
function IntegrationItem(a0) { // fn#122870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:736, offset: 0x02578917, size: 173 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, IntegrationItem);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(IntegrationItem);
binding = env1_5;
if (_isNativeReflectConstruct_122866()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.state = {enabled: value.props.integration.enabled};
value.handleToggleEnabled = handleToggleEnabled;
return value;
}
function value_122874() { // fn#122874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:1676, offset: 0x02578c34, size: 776 bytes, params: 1, frame: 29
var r13;
var r12;
var defaultImport;
var get;
var value4;
var value5;
var moduleValue;
var makeSource;
var isThemeDark2;
var icon;
var TableRowGroup;
var TableRow;
var object;
var user;
var syncing;
var enabled;
var items2;
var TableSwitchRow;
var object3;
var Boolean;
var intl;
const props = this.props;
const integration = props.integration;
const env0_1 = props.onPress;
const theme = props.theme;
const styles = props.styles;
const value2 = undefined;
const SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS = (require(15902) /* metro dependency 15902: GuildSettingsModalIntegrations */).SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS;
const includes = SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS.includes;
let type = integration.type;
if (Reflect.apply(includes, SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS, [type])) {
type = integration.type;
r13 = (require(15932) /* metro dependency 15932: IntegrationTypes */).IntegrationTypes.YOUTUBE === type ? integration.account == null ? value2 : integration.account.name : (require(15932) /* metro dependency 15932: IntegrationTypes */).IntegrationTypes.TWITCH !== type ? value2 : 'twitch.tv/' + integration.name;
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
get = defaultImport.get;
type = integration.type;
value4 = Reflect.apply(get, defaultImport, [type]);
value5 = null;
if (value5 != value4) {
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = moduleValue.makeSource;
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(theme);
icon = value4.icon;
r12 = <Image source={Reflect.apply(makeSource, moduleValue,
[isThemeDark2 ? icon.darkPNG : icon.lightPNG])} style={styles.platformIcon} />;
const YOUTUBE = PlatformTypes.YOUTUBE;
if (YOUTUBE === platformType) {
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['4OSAQ9'];
object4 = {connectAction: closure};
defaultImport3 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
object4.helpdeskArticle = defaultImport3.getArticleURL(HelpdeskArticles.YOUTUBE_INTEGRATION);
r16 = Reflect.apply(format, intl, [property, object4]);
} else if (PlatformTypes.TWITCH !== platformType) {
r16 = undefined;
} else {
r12 = value5;
format = intl.format;
ro1jEN = (require(1244) /* metro dependency 1244: indexNative */).t.ro1jEN;
object4 = {connectAction: closure};
defaultImport2 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
object4.helpdeskArticle = defaultImport2.getArticleURL(HelpdeskArticles.TWITCH_INTEGRATION);
r16 = Reflect.apply(format, intl, [ro1jEN, object4]);
}
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object = {};
user = integration.user;
object.label = value5 == user ? value2 : user.toString();
object.subLabel = r13;
syncing = integration.syncing;
object.trailing = <View style={styles.trailingWrapper}>{syncing && <ActivityIndicator animating size="small" />}</View>;
enabled = integration.enabled;
r13 = enabled && !integration.syncing;
object.arrow = r13;
object.icon = r12;
enabled = integration.enabled;
r12 = enabled ? integration.syncing : !enabled;
object.disabled = r12;
object.onPress = onPress_122875;
items2 = [<TableRow {...object} />];
TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
object3 = {};
Boolean = global.Boolean;
enabled = this.state.enabled;
object3.value = Boolean(enabled);
syncing = integration.syncing;
object3.disabled = syncing === true;
object3.onValueChange = this.handleToggleEnabled;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vQC6vR);
items2[1] = <TableSwitchRow {...object3} />;
return (
<TableRowGroup hasIcons>
{items2}
</TableRowGroup>
const jsxRuntimeEnv0_18Binding = jsxRuntimeEnv0_18;
const Form = (NativeModule).Form;
const Stack = (StackNativeModule).Stack;
let object = {paddingHorizontal: value3};
const PX_24 = (Native).space.PX_24;
const r7 = r14?.map(_fun122885);
const Text = (TextModule).Text;
const form = (
<Form style={styles.form} contentContainerStyle={contentContainerStyle}>
<Stack style={object} spacing={PX_24}>
{r7}
<Text variant="text-sm/medium" color="text-muted">
{r16}
</Text>
</Stack>
</Form>
);
}
return null;
}
function GuildSettingsModalIntegrationPlatformOnSave() { // fn#122881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:3476, owner: GuildSettingsModalIntegrationPlatform.onSave, offset: 0x0257939d, size: 64 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
const saveGuild = value.saveGuild;
const guildBinding = guild;
Reflect.apply(saveGuild, value, [guildBinding.id, {features: guildBinding.features}]);
}
function GuildSettingsModalIntegrationPlatformHeaderRight() { // fn#122883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:3632, owner: GuildSettingsModalIntegrationPlatform.headerRight, offset: 0x025793dd, size: 168 bytes, params: 1, frame: 20
var r0;
var value3;
var HeaderActionButton;
var intl;
var value;
if (submitting) {
value = environment.__proto__;
const HeaderSubmittingIndicator = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).HeaderSubmittingIndicator;
value = <HeaderSubmittingIndicator />;
r0 = value;
} else if (hasChanges) {
value3 = environment.__proto__;
HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <HeaderActionButton text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+'])} onPress={GuildSettingsModalIntegrationPlatformOnSave} />;
} else {
r0 = null;
}
return r0;
}
function _fun122885(a0, a1) { // fn#122885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:4399, offset: 0x025794ce, size: 86 bytes, params: 3, frame: 17
const env0_0 = a1;
return ((Component) => <Component guild={guild} theme={env0_7} integration={a0} styles={styles} onPress={onPress_122886} key={a0.id} />)(env1_20);
}
function handleToggleEnabled() { // fn#122871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:1035, owner: IntegrationItem.handleToggleEnabled, offset: 0x025789c4, size: 536 bytes, params: 1, frame: 22
var environment;
var enabled;
var binding;
var setState;
var object2;
var defaultImport;
var show;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value;
const props = env0_0.props;
const guild = props.guild;
var env0_0 = guild;
const integration = props.integration;
if (!integration.syncing) {
enabled = integration.enabled;
binding = env0_0;
setState = binding.setState;
object2 = {};
if (enabled) {
object2.enabled = false;
Reflect.apply(setState, binding, [object2]);
value = environment.__proto__.__proto__;
defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.emx3lN);
object2.body = integration.type === 'youtube' ? intl.string(t.anKQWU) : intl.string(t['BW/xtn']);
object2.confirmText = intl.string(t.R9GHya);
object2.cancelText = intl.string(t['ETE/oC']);
object2.onConfirm = onConfirm_122872;
object2.onCancel = onCancel_122873;
object2.confirmColor = (importDefault(4596) /* metro dependency 4596: Alert */).Colors.RED;
Reflect.apply(show, defaultImport, [object2]);
} else {
object2.enabled = true;
Reflect.apply(setState, binding, [object2]);
value = environment.__proto__.__proto__;
const NavScrim = (NavScrimAndroidModule).NavScrim;
return (
<>
{form}
<NavScrim />
</>
);
function GuildSettingsModalIntegrationPlatformOnSave() { // fn#122881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:3476, owner: GuildSettingsModalIntegrationPlatform.onSave, offset: 0x0257939d, size: 64 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.enableIntegration(guild.id, integration.type, integration.id);
const saveGuild = value.saveGuild;
const guildBinding = guild;
Reflect.apply(saveGuild, value, [guildBinding.id, {features: guildBinding.features}]);
}
function GuildSettingsModalIntegrationPlatformHeaderRight() { // fn#122883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:3632, owner: GuildSettingsModalIntegrationPlatform.headerRight, offset: 0x025793dd, size: 168 bytes, params: 1, frame: 20
var r0;
var value3;
var HeaderActionButton;
var intl;
var value;
if (submitting) {
value = environment.__proto__;
const HeaderSubmittingIndicator = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).HeaderSubmittingIndicator;
value = <HeaderSubmittingIndicator />;
r0 = value;
} else if (hasChanges) {
value3 = environment.__proto__;
HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
<HeaderActionButton
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+'])}
onPress={GuildSettingsModalIntegrationPlatformOnSave}
/>
);
} else {
r0 = null;
}
return r0;
}
function _fun122885(a0, a1) { // fn#122885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:4399, offset: 0x025794ce, size: 86 bytes, params: 3, frame: 17
const env0_0 = a1;
return ((Component) => <Component guild={guild} theme={env0_7} integration={a0} styles={styles} onPress={onPress_122886} key={a0.id} />)(env1_20);
function onPress_122886() { // fn#122886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:4458, offset: 0x02579524, size: 49 bytes, params: 1, frame: 14
const binding = env1_3;
const push = binding.push;
const INTEGRATION_SETTINGS = GuildSettingsSections.INTEGRATION_SETTINGS;
Reflect.apply(push, binding, [INTEGRATION_SETTINGS, {integrationId: require}]);
}
}
}
}
function value_122874OnPress() { // fn#122875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:2451, owner: value_122874.onPress, offset: 0x02578f3c, size: 32 bytes, params: 1, frame: 12
return integration.enabled && onPress(integration);
}
function onPress_122886() { // fn#122886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:4458, offset: 0x02579524, size: 49 bytes, params: 1, frame: 14
const binding = env1_3;
const push = binding.push;
const INTEGRATION_SETTINGS = GuildSettingsSections.INTEGRATION_SETTINGS;
Reflect.apply(push, binding, [INTEGRATION_SETTINGS, {integrationId: require}]);
}
function handleToggleEnabledOnConfirm() { // fn#122872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:1413, owner: IntegrationItem.handleToggleEnabled.onConfirm, offset: 0x02578bdc, size: 60 bytes, params: 1, frame: 13
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
return value.disableIntegration(guild.id, integration.id);
}
function handleToggleEnabledOnCancel() { // fn#122873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16139:1466, owner: IntegrationItem.handleToggleEnabled.onCancel, offset: 0x02578c18, size: 28 bytes, params: 1, frame: 12
return env1_0.setState({enabled: true});
}
global.__d(_fun122865, 15931, [6, 7, 15, 17, 18, 31, 27, 9113, 661, 33, 4501, 697, 9112, 4496, 1244, 4596, 15902,
15932, 4915, 1423, 4002, 6231, 6238, 6808, 3860, 1484, 566, 4048, 5282, 5277, 7007, 1948, 7972, 4572, 4573,
5462,
2]) /* metro module 15931, dependencies: [6, 7, 15, 17, 18, 31, 27, 9113, 661, 33, 4501, 697, 9112, 4496, 1244, 4596, 15902, 15932, 4915, 1423, 4002, 6231, 6238, 6808, 3860, 1484, 566, 4048, 5282, 5277, 7007, 1948, 7972, 4572, 4573, 5462, 2] */;
@@ -1,330 +1,412 @@
/* Metro module 15927; source: modules/guild_settings/integrations/native/GuildSettingsModalIntegrationSettings.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 1938, 9113, 33, 15928, 1244, 4501, 697, 7987, 5278, 6238, 15929, 6231, 6808, 9112, 4573, 4915, 1423, 4002, 7972, 4572, 3738, 7988, 15930, 5462, 3868, 566, 4048, 15902, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildRoleStore from '../../../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import Platforms from '../../../../lib/Platforms.tsx'; /* Metro dependency 4915 */
import GuildSettingsStore from '../../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as NavScrimAndroidModule from '../../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TableSwitchRowNativeModule from '../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
import * as NativeModule2 from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as TableRadioRowNativeModule from '../../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
import * as IntegrationExpireGracePeriodTypesModule from '../../../../external/discord_common/js/shared/shared-constants/IntegrationExpireGracePeriodTypes.tsx'; /* Metro dependency 15928 */
import * as IntegrationExpireBehaviorTypesModule from '../../../../external/discord_common/js/shared/shared-constants/IntegrationExpireBehaviorTypes.tsx'; /* Metro dependency 15930 */
function _fun122839(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:6, offset: 0x02577492, size: 528 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_8 = value2.Image;
const env0_9 = value2.ActivityIndicator;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
const value3 = require(33) /* metro dependency 33 */;
const env0_12 = value3.jsx;
const env0_13 = value3.jsxs;
const env0_14 = value3.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule,
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule,
[{integrationLabel: {fontSize: 24}, integrationIcon: {'width': 48, 'height': 48, 'marginRight': 16},
forceSyncIcon: {marginLeft: 10}, value: {textAlign: 'right'},
stackPadding: {paddingHorizontal: TABLE_ROW_PADDING}}]);
const PureComponent = value.PureComponent;
value = _fun122847(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/integrations/native/GuildSettingsModalIntegrationSettings.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/integrations/native/GuildSettingsModalIntegrationSettings.tsx');
exports.default = ConnectedGuildSettingsModalIntegrationSettings;
}
function _isNativeReflectConstruct_122840() { // fn#122840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:268, offset: 0x025776a2, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_122840() { // fn#122840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:268, offset: 0x025776a2, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_122840_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_122840_isNativeReflectConstruct = function() {
return !!result;
})();
}
function GraceOption({integration, option, onPress}) { // fn#122843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:727, offset: 0x02577704, size: 125 bytes, params: 2, frame: 17
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
value={option.value}
label={option.label}
legacyCompat_onPress={function() {
return onPress(option.value);
}}
legacyCompat_selected={integration.expire_grace_period === option.value}
/>
);
}
function ForceSyncIcon({isSyncing, onPress}) { // fn#122845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:937, offset: 0x0257779a, size: 217 bytes, params: 2, frame: 20
var r0;
var PressableOpacity;
var intl;
if (isSyncing) {
r0 = <ActivityIndicator animating size="small" />;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+Josox'])} onPress={onPress}>{((Icon) => <Icon source={importDefault(15929) /* metro dependency 15929 */} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)}</PressableOpacity>;
function GraceOption({integration, option, onPress}) { // fn#122843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:727, offset: 0x02577704, size: 125 bytes, params: 2, frame: 17
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
value={option.value}
label={option.label}
legacyCompat_onPress={function() {
return onPress(option.value);
}}
legacyCompat_selected={integration.expire_grace_period === option.value}
/>
);
}
return r0;
}
function TwitchEmoticonsRow({integration, onPress}) { // fn#122846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:1211, offset: 0x02577873, size: 242 bytes, params: 2, frame: 23
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.helperText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7r4OKg']);
object2.hasIcons = false;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const tableSwitchRowProps = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bZBLBs)};
const Boolean = global.Boolean;
tableSwitchRowProps.value = Boolean(integration.enable_emoticons);
tableSwitchRowProps.onValueChange = onPress;
tableSwitchRowProps.disabled = integration.syncing;
return (
<TableRowGroup {...object2}>
<TableSwitchRow {...tableSwitchRowProps} />
</TableRowGroup>
);
}
function _fun122847(a0) { // fn#122847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:1526, offset: 0x02577965, size: 72 bytes, params: 2, frame: 15
const closure = GuildSettingsModalIntegrationSettings;
env0_7(closure, a0);
return env0_4(closure, [{key: 'render', value: value_122853}]);
}
function ConnectedGuildSettingsModalIntegrationSettings({integrationId, contentContainerStyle}) { // fn#122858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:5041, offset: 0x02578398, size: 261 bytes, params: 2, frame: 21
const {guild,
integrations} = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore],
function() {
return GuildSettingsStore.getProps();
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore], _fun122860);
const value4 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const r7 = integrations?.filter(function(a0) {
var SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS = require(dependencyMap[34]).SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS;
return SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS.includes(a0.type);
})?.[integrationId];
return guild == null || r7 == null || value3 == null ? null : ((Component) => <Component guildId={guild.id} guildRoles={value3} integration={r7} theme={value4} contentContainerStyle={contentContainerStyle} />)(env0_16);
}
function GuildSettingsModalIntegrationSettings(a0) { // fn#122848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:1538, offset: 0x025779ad, size: 184 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, GuildSettingsModalIntegrationSettings);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(GuildSettingsModalIntegrationSettings);
binding = env1_5;
if (_isNativeReflectConstruct_122840()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
function ForceSyncIcon({isSyncing, onPress}) { // fn#122845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:937, offset: 0x0257779a, size: 217 bytes, params: 2, frame: 20
var r0;
var PressableOpacity;
var intl;
if (isSyncing) {
r0 = <ActivityIndicator animating size="small" />;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+Josox'])}
onPress={onPress}
>
{((Icon) => <Icon source={importDefault(15929) /* metro dependency 15929 */} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)}
</PressableOpacity>
);
}
return r0;
}
value = binding(this, r0);
value.handleExpireBehaviorChange = handleExpireBehaviorChange;
value.handleExpireGracePeriodChange = handleExpireGracePeriodChange;
value.handleToggleEmotes = handleToggleEmotes;
value.handleSync = handleSync;
return value;
}
function value_122853() { // fn#122853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:2498, offset: 0x02577baa, size: 1773 bytes, params: 1, frame: 44
var r21;
var name;
var r13;
var r24;
var r26;
var r31;
var r25;
var property;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value7;
var value8;
var RdUTrl;
var account;
var value10;
var moduleValue;
var makeSource;
var isThemeDark2;
var icon;
const binding = env1_15;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const {guildRoles, integration, theme} = this.props;
const role_id = integration.role_id;
const value4 = null;
const r9 = value4 != role_id ? guildRoles[role_id] : value4;
if (value4 != r9) {
r21 = <TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eBtNBa)} trailing={((Text) => <Text style={value3.value} variant="text-md/medium" color="text-muted">{r9.name}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)} />;
} else {
r21 = value2;
function TwitchEmoticonsRow({integration, onPress}) { // fn#122846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:1211, offset: 0x02577873, size: 242 bytes, params: 2, frame: 23
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.helperText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7r4OKg']);
object.hasIcons = false;
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
const tableSwitchRowProps = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bZBLBs)};
const Boolean = global.Boolean;
tableSwitchRowProps.value = Boolean(integration.enable_emoticons);
tableSwitchRowProps.onValueChange = onPress;
tableSwitchRowProps.disabled = integration.syncing;
return (
<TableRowGroup {...object}>
<TableSwitchRow {...tableSwitchRowProps} />
</TableRowGroup>
);
}
if (integration.type === 'youtube') {
account = integration.account;
name = value4 == account ? value2 : account.name;
value10 = intl.string(t.A5MiqO);
property = t['7lNtce'];
r13 = value2;
r24 = value10;
r26 = name;
r31 = property;
} else {
value7 = 'twitch.tv/' + integration.name;
value8 = intl.string(t['S/WCrG']);
RdUTrl = t.RdUTrl;
r13 = <TwitchEmoticonsRow integration={integration} onPress={this.handleToggleEmotes} />;
r24 = value8;
r26 = value7;
r31 = RdUTrl;
function _fun122847(a0) { // fn#122847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:1526, offset: 0x02577965, size: 72 bytes, params: 2, frame: 15
const GuildSettingsModalIntegrationSettings2 = GuildSettingsModalIntegrationSettings;
Inherits(GuildSettingsModalIntegrationSettings2, a0);
return CreateClass(GuildSettingsModalIntegrationSettings2, [{key: 'render', value: value_122853}]);
function GuildSettingsModalIntegrationSettings(a0) { // fn#122848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:1538, offset: 0x025779ad, size: 184 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, GuildSettingsModalIntegrationSettings);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(GuildSettingsModalIntegrationSettings);
binding = env1_5;
if (_isNativeReflectConstruct_122840()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handleExpireBehaviorChange = handleExpireBehaviorChange;
value.handleExpireGracePeriodChange = handleExpireGracePeriodChange;
value.handleToggleEmotes = handleToggleEmotes;
value.handleSync = handleSync;
return value;
function handleExpireBehaviorChange(a0) { // fn#122849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:1864, owner: GuildSettingsModalIntegrationSettings.handleExpireBehaviorChange, offset: 0x02577a65, size: 86 bytes, params: 2, frame: 20
const {guildId, integration} = env0_0.props;
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.updateIntegration(guildId, integration.id, a0, integration.expire_grace_period, integration.enable_emoticons);
}
function handleExpireGracePeriodChange(a0) { // fn#122850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:2022, owner: GuildSettingsModalIntegrationSettings.handleExpireGracePeriodChange, offset: 0x02577abb, size: 86 bytes, params: 2, frame: 20
const {guildId, integration} = env0_0.props;
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.updateIntegration(guildId, integration.id, integration.expire_behavior, a0, integration.enable_emoticons);
}
function handleToggleEmotes(a0) { // fn#122851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:2165, owner: GuildSettingsModalIntegrationSettings.handleToggleEmotes, offset: 0x02577b11, size: 86 bytes, params: 2, frame: 20
const {guildId, integration} = env0_0.props;
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.updateIntegration(guildId, integration.id, integration.expire_behavior, integration.expire_grace_period, a0);
}
function handleSync() { // fn#122852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:2303, owner: GuildSettingsModalIntegrationSettings.handleSync, offset: 0x02577b67, size: 67 bytes, params: 1, frame: 14
const {guildId, integration} = env0_0.props;
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.syncIntegration(guildId, integration.id);
}
}
function value_122853() { // fn#122853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:2498, offset: 0x02577baa, size: 1773 bytes, params: 1, frame: 44
var r21;
var name;
var r13;
var r24;
var r26;
var r31;
var r25;
var property;
const TableRow = (TableRowNativeModule).TableRow;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value7;
var value8;
var RdUTrl;
var account;
var value10;
var moduleValue;
var makeSource;
var isThemeDark2;
var icon;
const binding = env1_15;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const {guildRoles, integration, theme} = this.props;
const role_id = integration.role_id;
const value4 = null;
const r9 = value4 != role_id ? guildRoles[role_id] : value4;
if (value4 != r9) {
r21 = (
<TableRow
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eBtNBa)}
trailing={((Text) => <Text style={value3.value} variant="text-md/medium" color="text-muted">{r9.name}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
/>
);
} else {
r21 = value2;
}
if (integration.type === 'youtube') {
account = integration.account;
name = value4 == account ? value2 : account.name;
value10 = intl.string(t.A5MiqO);
property = t['7lNtce'];
r13 = value2;
r24 = value10;
r26 = name;
r31 = property;
} else {
value7 = 'twitch.tv/' + integration.name;
value8 = intl.string(t['S/WCrG']);
RdUTrl = t.RdUTrl;
r13 = <TwitchEmoticonsRow integration={integration} onPress={this.handleToggleEmotes} />;
r24 = value8;
r26 = value7;
r31 = RdUTrl;
}
const value11 = (Platforms).get(integration.type);
if (value4 != value11) {
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = moduleValue.makeSource;
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(theme);
icon = value11.icon;
r25 = (
<Image
source={Reflect.apply(makeSource, moduleValue, [isThemeDark2 ? icon.darkPNG : icon.lightPNG])}
style={value3.integrationIcon}
/>
);
} else {
r25 = value4;
}
const subGracePeriodOptions = getSubGracePeriodOptions();
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const Form = (NativeModule2).Form;
const items3 = [{paddingTop: 16}];
items3[1] = this.props.contentContainerStyle;
const Stack = (StackNativeModule).Stack;
const stackPadding = value3.stackPadding;
const PX_24 = (Native).space.PX_24;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const user = integration.user;
const items2 = [
<TableRowGroup hasIcons>
<TableRow
label={value4 == user ? value2 : user.toString()}
subLabel={r26}
icon={r25}
/>
</TableRowGroup>,
];
const tableRowGroupProps = {title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i17qFc),
hasIcons: false};
const format = intl.format;
const subscriber_count = integration.subscriber_count;
const formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['+42M+u'];
const object = {};
object.datetime = (importDefault(3738) /* metro dependency 3738 */)(integration.synced_at).calendar();
const syncing = integration.syncing;
items2[1] = (
<TableRowGroup {...tableRowGroupProps}>
<TableRow
label={Reflect.apply(format, intl, [r31,
{subscribers: value4 != subscriber_count ? subscriber_count : ''}])}
subLabel={Reflect.apply(formatToPlainString, intl, [property, object])}
trailing={<ForceSyncIcon isSyncing={value4 != syncing && syncing} onPress={this.handleSync} />}
/>
{r21}
</TableRowGroup>
);
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
const expire_behavior = integration.expire_behavior;
const handleExpireBehaviorChange = this.handleExpireBehaviorChange;
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
const IntegrationExpireBehaviorTypes = (IntegrationExpireBehaviorTypesModule).IntegrationExpireBehaviorTypes;
const REMOVE_ROLE = IntegrationExpireBehaviorTypes.REMOVE_ROLE;
const tableRadioRow = (
<TableRadioRow
value={REMOVE_ROLE}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6kpw4i'])}
/>
);
const KICK = IntegrationExpireBehaviorTypes.KICK;
items2[2] = (
<TableRadioGroup
title={r24}
value={expire_behavior}
onChange={handleExpireBehaviorChange}
hasIcons={false}
>
{tableRadioRow}
<TableRadioRow
value={KICK}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fQUQIJ)}
/>
</TableRadioGroup>
);
items2[3] = (
<TableRowGroup
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uiXMow)}
hasIcons={false}
>
{subGracePeriodOptions.map(_fun122857)}
</TableRowGroup>
);
items2[4] = r13;
const form = (
<Form style={{flex: 1}} contentContainerStyle={items3}>
<Stack style={stackPadding} spacing={PX_24}>
{items2}
</Stack>
</Form>
);
const NavScrim = (NavScrimAndroidModule).NavScrim;
return (
<>
{form}
<NavScrim />
</>
);
function getSubGracePeriodOptions() { // fn#122854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:3267, owner: value_122853.getSubGracePeriodOptions, offset: 0x02578297, size: 87 bytes, params: 1, frame: 14
var environment;
const Object = global.Object;
const values = Object.values;
let value = environment.__proto__.__proto__;
const IntegrationExpireGracePeriodTypes = (IntegrationExpireGracePeriodTypesModule).IntegrationExpireGracePeriodTypes;
value = Reflect.apply(values, Object, [IntegrationExpireGracePeriodTypes]);
value = value.filter(function(a0) {
var Number = global.Number;
return Number.isInteger(a0);
});
return value.map(function(a0) {
var object = {value: a0};
object.label = require(dependencyMap[11]).intl.formatToPlainString(require(dependencyMap[11]).t.eGjmy5,
{days: a0});
return object;
});
}
function _fun122857(a0, a1) { // fn#122857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:4723, offset: 0x0257835b, size: 61 bytes, params: 3, frame: 15
return (
<GraceOption
integration={integration}
option={a0}
onPress={env0_0.handleExpireGracePeriodChange}
key={a1}
/>
);
}
}
}
const value11 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(integration.type);
if (value4 != value11) {
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = moduleValue.makeSource;
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(theme);
icon = value11.icon;
r25 = <Image source={Reflect.apply(makeSource, moduleValue,
[isThemeDark2 ? icon.darkPNG : icon.lightPNG])} style={value3.integrationIcon} />;
} else {
r25 = value4;
function ConnectedGuildSettingsModalIntegrationSettings({integrationId, contentContainerStyle}) { // fn#122858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:5041, offset: 0x02578398, size: 261 bytes, params: 2, frame: 21
const {guild,
integrations} = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore],
function() {
return GuildSettingsStore.getProps();
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore], _fun122860);
const value4 = (UseTheme)();
const r7 = integrations?.filter(function(a0) {
var SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS = require(dependencyMap[34]).SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS;
return SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS.includes(a0.type);
})?.[integrationId];
return (
guild == null || r7 == null || value3 == null
? null
: ((Component) => <Component guildId={guild.id} guildRoles={value3} integration={r7} theme={value4} contentContainerStyle={contentContainerStyle} />)(env0_16)
);
function _fun122860() { // fn#122860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:5260, offset: 0x025784b0, size: 47 bytes, params: 1, frame: 12
return guild != null ? GuildRoleStore.getRolesSnapshot(guild.id) : undefined;
}
}
const subGracePeriodOptions = getSubGracePeriodOptions();
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const items3 = [{paddingTop: 16}];
items3[1] = this.props.contentContainerStyle;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const stackPadding = value3.stackPadding;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const user = integration.user;
const items2 = [<TableRowGroup hasIcons><TableRow label={value4 == user ? value2 : user.toString()} subLabel={r26} icon={r25} /></TableRowGroup>];
const tableRowGroupProps = {title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i17qFc),
hasIcons: false};
const format = intl.format;
const subscriber_count = integration.subscriber_count;
const formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['+42M+u'];
const object2 = {};
object2.datetime = (importDefault(3738) /* metro dependency 3738 */)(integration.synced_at).calendar();
const syncing = integration.syncing;
items2[1] = <TableRowGroup {...tableRowGroupProps}><TableRow label={Reflect.apply(format, intl, [r31,
{subscribers: value4 != subscriber_count ? subscriber_count : ''}])} subLabel={Reflect.apply(formatToPlainString,
intl, [property,
object2])} trailing={<ForceSyncIcon isSyncing={value4 != syncing && syncing} onPress={this.handleSync} />} />{r21}</TableRowGroup>;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const expire_behavior = integration.expire_behavior;
const handleExpireBehaviorChange = this.handleExpireBehaviorChange;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
const IntegrationExpireBehaviorTypes = (require(15930) /* metro dependency 15930: IntegrationExpireBehaviorTypes */).IntegrationExpireBehaviorTypes;
const REMOVE_ROLE = IntegrationExpireBehaviorTypes.REMOVE_ROLE;
const tableRadioRow = <TableRadioRow value={REMOVE_ROLE} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6kpw4i'])} />;
const KICK = IntegrationExpireBehaviorTypes.KICK;
items2[2] = <TableRadioGroup title={r24} value={expire_behavior} onChange={handleExpireBehaviorChange} hasIcons={false}>{tableRadioRow}<TableRadioRow value={KICK} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fQUQIJ)} /></TableRadioGroup>;
items2[3] = <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uiXMow)} hasIcons={false}>{subGracePeriodOptions.map(_fun122857)}</TableRowGroup>;
items2[4] = r13;
const form = <Form style={{flex: 1}} contentContainerStyle={items3}><Stack style={stackPadding} spacing={PX_24}>{items2}</Stack></Form>;
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<>
{form}
<NavScrim />
</>
);
}
function _fun122860() { // fn#122860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:5260, offset: 0x025784b0, size: 47 bytes, params: 1, frame: 12
return guild != null ? GuildRoleStore.getRolesSnapshot(guild.id) : undefined;
}
function handleExpireBehaviorChange(a0) { // fn#122849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:1864, owner: GuildSettingsModalIntegrationSettings.handleExpireBehaviorChange, offset: 0x02577a65, size: 86 bytes, params: 2, frame: 20
const {guildId, integration} = env0_0.props;
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.updateIntegration(guildId, integration.id, a0, integration.expire_grace_period, integration.enable_emoticons);
}
function handleExpireGracePeriodChange(a0) { // fn#122850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:2022, owner: GuildSettingsModalIntegrationSettings.handleExpireGracePeriodChange, offset: 0x02577abb, size: 86 bytes, params: 2, frame: 20
const {guildId, integration} = env0_0.props;
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.updateIntegration(guildId, integration.id, integration.expire_behavior, a0, integration.enable_emoticons);
}
function handleToggleEmotes(a0) { // fn#122851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:2165, owner: GuildSettingsModalIntegrationSettings.handleToggleEmotes, offset: 0x02577b11, size: 86 bytes, params: 2, frame: 20
const {guildId, integration} = env0_0.props;
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.updateIntegration(guildId, integration.id, integration.expire_behavior, integration.expire_grace_period, a0);
}
function handleSync() { // fn#122852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:2303, owner: GuildSettingsModalIntegrationSettings.handleSync, offset: 0x02577b67, size: 67 bytes, params: 1, frame: 14
const {guildId, integration} = env0_0.props;
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.syncIntegration(guildId, integration.id);
}
function getSubGracePeriodOptions() { // fn#122854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:3267, owner: value_122853.getSubGracePeriodOptions, offset: 0x02578297, size: 87 bytes, params: 1, frame: 14
var environment;
const Object = global.Object;
const values = Object.values;
let value = environment.__proto__.__proto__;
const IntegrationExpireGracePeriodTypes = (require(15928) /* metro dependency 15928: IntegrationExpireGracePeriodTypes */).IntegrationExpireGracePeriodTypes;
value = Reflect.apply(values, Object, [IntegrationExpireGracePeriodTypes]);
value = value.filter(function(a0) {
var Number = global.Number;
return Number.isInteger(a0);
});
return value.map(function(a0) {
var object = {value: a0};
object.label = require(dependencyMap[11]).intl.formatToPlainString(require(dependencyMap[11]).t.eGjmy5,
{days: a0});
return object;
});
}
function _fun122857(a0, a1) { // fn#122857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16135:4723, offset: 0x0257835b, size: 61 bytes, params: 3, frame: 15
return (
<GraceOption
integration={integration}
option={a0}
onPress={env0_0.handleExpireGracePeriodChange}
key={a1}
/>
);
}
global.__d(_fun122839, 15927, [6, 7, 15, 17, 18, 31, 27, 1938, 9113, 33, 15928, 1244, 4501, 697, 7987, 5278, 6238,
15929, 6231, 6808, 9112, 4573, 4915, 1423, 4002, 7972, 4572, 3738, 7988, 15930, 5462, 3868, 566, 4048, 15902,
2]) /* metro module 15927, dependencies: [6, 7, 15, 17, 18, 31, 27, 1938, 9113, 33, 15928, 1244, 4501, 697, 7987, 5278, 6238, 15929, 6231, 6808, 9112, 4573, 4915, 1423, 4002, 7972, 4572, 3738, 7988, 15930, 5462, 3868, 566, 4048, 15902, 2] */;
@@ -1,13 +1,28 @@
/* Metro module 15902; source: modules/guild_settings/integrations/native/GuildSettingsModalIntegrations.tsx; dependencies: [31, 27, 3784, 9113, 661, 33, 4501, 697, 3860, 1484, 566, 4048, 15866, 7972, 4572, 6231, 6238, 1244, 15117, 15201, 13127, 4915, 1423, 4002, 5462, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import GuildSettingsStore from '../../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as UseChannelsAllowedToUnlinkModule from '../../../lobbies/hooks/useChannelsAllowedToUnlink.tsx'; /* Metro dependency 15866 */
function _fun122677(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:6, offset: 0x02570a2f, size: 389 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).Image;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
let value = require(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_6 = value.GuildSettingsSections;
const PlatformTypes = value.PlatformTypes;
value = require(33) /* metro dependency 33 */;
@@ -15,236 +30,350 @@ function _fun122677(global, require, importDefault, importAll, module, exports,
const env0_8 = value.jsxs;
const env0_9 = value.Fragment;
const TWITCH = PlatformTypes.TWITCH;
items = [TWITCH];
items2 = [TWITCH];
const YOUTUBE = PlatformTypes.YOUTUBE;
items[1] = YOUTUBE;
items2[1] = YOUTUBE;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object3 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object3.screenContainer = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.screenContent = {paddingTop: PX_16};
object3.platformIcon = {'width': 24, 'height': 24};
const env0_11 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/integrations/native/GuildSettingsModalIntegrations.tsx');
const object = {};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object.screenContainer = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER};
const PX_16 = (Native).space.PX_16;
object.screenContent = {paddingTop: PX_16};
object.platformIcon = {'width': 24, 'height': 24};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/integrations/native/GuildSettingsModalIntegrations.tsx');
exports.default = GuildSettingsModalIntegrations;
exports.SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS = items;
}
function GuildSettingsModalIntegrations({contentContainerStyle}) { // fn#122678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:564, offset: 0x02570bb4, size: 1303 bytes, params: 2, frame: 39
var r19;
var r18;
var r17;
var r1;
var r0;
var jsxRuntimeEnv0_9Binding;
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
var object7;
var object8;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const value3 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
const styles = useStyles();
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore], function() {
return GuildSettingsStore.getGuild();
}, []);
const {canManageWebhooks,
canManageGuild} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PermissionStore],
_fun122680);
const env0_3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const r2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore], function() {
return GuildSettingsStore.getProps().integrations;
})?.filter(_fun122682);
const useChannelsAllowedToUnlinkModule = require(15866) /* metro dependency 15866: useChannelsAllowedToUnlink */;
const useChannelsAllowedToUnlink = useChannelsAllowedToUnlinkModule.useChannelsAllowedToUnlink;
const value9 = Reflect.apply(useChannelsAllowedToUnlink, useChannelsAllowedToUnlinkModule, [value4?.id]).length > 0;
let r15 = canManageGuild && (r2?.length ?? 0) > 0;
if (value4 == null) {
r0 = null;
} else {
if (canManageWebhooks) {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
var formProps = {style: styles.screenContainer, contentContainerStyle: [styles.screenContent,
contentContainerStyle]};
var stackProps = {style: {paddingHorizontal: value3},
spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_24};
if (canManageWebhooks) {
r19 = <TableRow label={intl.string(t.jp25Id)} subLabel={intl.string(t.mKIOkI)} icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)} arrow onPress={onPress_122683} />;
} else {
r19 = canManageWebhooks;
}
items2 = [r19];
if (canManageWebhooks) {
r18 = <TableRow label={intl.string(t.OrV60r)} subLabel={intl.string(t.rQREJl)} icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)} arrow onPress={onPress_122684} />;
} else {
r18 = canManageWebhooks;
}
items2[1] = r18;
if (value9) {
r17 = <TableRow label={intl.string(t.tqtDXC)} subLabel={intl.string(t.v8819e)} icon={((RefreshIcon) => <RefreshIcon />)((require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon)} arrow onPress={onPress_122685} />;
} else {
r17 = value9;
}
items2[2] = r17;
r15 = r15 && env0_10.map(_fun122686);
items2[3] = r15;
r1 = <><Form {...formProps}><Stack {...stackProps}><TableRowGroup hasIcons>{items2}</TableRowGroup></Stack></Form>{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}</>;
} else if (value9) {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
var formProps = {style: styles.screenContainer, contentContainerStyle: [styles.screenContent,
contentContainerStyle]};
var stackProps = {style: {paddingHorizontal: value3},
spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_24};
if (canManageWebhooks) {
r19 = <TableRow label={intl.string(t.jp25Id)} subLabel={intl.string(t.mKIOkI)} icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)} arrow onPress={onPress_122683} />;
} else {
r19 = canManageWebhooks;
}
items2 = [r19];
if (canManageWebhooks) {
r18 = <TableRow label={intl.string(t.OrV60r)} subLabel={intl.string(t.rQREJl)} icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)} arrow onPress={onPress_122684} />;
} else {
r18 = canManageWebhooks;
}
items2[1] = r18;
if (value9) {
r17 = <TableRow label={intl.string(t.tqtDXC)} subLabel={intl.string(t.v8819e)} icon={((RefreshIcon) => <RefreshIcon />)((require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon)} arrow onPress={onPress_122685} />;
} else {
r17 = value9;
}
items2[2] = r17;
r15 = r15 && env0_10.map(_fun122686);
items2[3] = r15;
r1 = <><Form {...formProps}><Stack {...stackProps}><TableRowGroup hasIcons>{items2}</TableRowGroup></Stack></Form>{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}</>;
} else if (r15) {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
var formProps = {style: styles.screenContainer, contentContainerStyle: [styles.screenContent,
contentContainerStyle]};
var stackProps = {style: {paddingHorizontal: value3},
spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_24};
if (canManageWebhooks) {
r19 = <TableRow label={intl.string(t.jp25Id)} subLabel={intl.string(t.mKIOkI)} icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)} arrow onPress={onPress_122683} />;
} else {
r19 = canManageWebhooks;
}
items2 = [r19];
if (canManageWebhooks) {
r18 = <TableRow label={intl.string(t.OrV60r)} subLabel={intl.string(t.rQREJl)} icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)} arrow onPress={onPress_122684} />;
} else {
r18 = canManageWebhooks;
}
items2[1] = r18;
if (value9) {
r17 = <TableRow label={intl.string(t.tqtDXC)} subLabel={intl.string(t.v8819e)} icon={((RefreshIcon) => <RefreshIcon />)((require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon)} arrow onPress={onPress_122685} />;
} else {
r17 = value9;
}
items2[2] = r17;
r15 = r15 && env0_10.map(_fun122686);
items2[3] = r15;
r1 = <><Form {...formProps}><Stack {...stackProps}><TableRowGroup hasIcons>{items2}</TableRowGroup></Stack></Form>{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}</>;
exports.SUPPORTED_SETTINGS_INTEGRATION_PLATFORMS = items2;
function GuildSettingsModalIntegrations({contentContainerStyle}) { // fn#122678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:564, offset: 0x02570bb4, size: 1303 bytes, params: 2, frame: 39
var r19;
var r18;
var r17;
var r1;
var r0;
var jsxRuntimeEnv0_9Binding;
const Form = (NativeModule).Form;
const Stack = (StackNativeModule).Stack;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items2;
var object2;
var object3;
const useToken = UseTokenModule.useToken;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const value3 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_PADDING]);
const styles = useStyles();
const env0_1 = (UseNavigationNativeModule).useNavigation();
const useStateFromStores = FluxModule.useStateFromStores;
const guildSettingsStoreBinding = GuildSettingsStore;
const value4 = Reflect.apply(useStateFromStores, FluxModule, [[guildSettingsStoreBinding], function() {
return GuildSettingsStore.getGuild();
}, []]);
const {canManageWebhooks, canManageGuild} = FluxModule.useStateFromStoresObject([PermissionStore], _fun122680);
const env0_3 = (UseTheme)();
const r2 = FluxModule.useStateFromStores([guildSettingsStoreBinding], function() {
return GuildSettingsStore.getProps().integrations;
})?.filter(_fun122682);
const useChannelsAllowedToUnlink = UseChannelsAllowedToUnlinkModule.useChannelsAllowedToUnlink;
const value9 = Reflect.apply(useChannelsAllowedToUnlink, UseChannelsAllowedToUnlinkModule, [value4?.id]).length > 0;
let r15 = canManageGuild && (r2?.length ?? 0) > 0;
if (value4 == null) {
r0 = null;
} else {
r1 = null;
}
r0 = r1;
}
return r0;
}
function _fun122680() { // fn#122680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:828, offset: 0x025710de, size: 49 bytes, params: 1, frame: 11
return env0_2 == null ? {'canManageWebhooks': false,
'canManageGuild': false} : PermissionStore.getGuildPermissionProps(env0_2);
}
function _fun122682({type}) { // fn#122682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:1060, offset: 0x02571128, size: 27 bytes, params: 2, frame: 11
return env1_10.includes(type);
}
function GuildSettingsModalIntegrationsOnPress() { // fn#122683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:1633, owner: GuildSettingsModalIntegrations.onPress, offset: 0x02571143, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const WEBHOOKS = GuildSettingsSections.WEBHOOKS;
return Reflect.apply(push, binding, [WEBHOOKS]);
}
function GuildSettingsModalIntegrationsOnPress_122684() { // fn#122684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:1835, owner: GuildSettingsModalIntegrations.onPress, offset: 0x02571163, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const CHANNELS_FOLLOWED = GuildSettingsSections.CHANNELS_FOLLOWED;
return Reflect.apply(push, binding, [CHANNELS_FOLLOWED]);
}
function GuildSettingsModalIntegrationsOnPress_122685() { // fn#122685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:2037, owner: GuildSettingsModalIntegrations.onPress, offset: 0x02571183, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const LOBBIES_LINKED = GuildSettingsSections.LOBBIES_LINKED;
return Reflect.apply(push, binding, [LOBBIES_LINKED]);
}
function _fun122686(a0) { // fn#122686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:2078, offset: 0x025711a3, size: 343 bytes, params: 2, frame: 28
var environment;
var r1;
var value3;
var value4;
var TableRow;
var object2;
var name;
var intl;
var formatToPlainString;
var VXU4EU;
var moduleValue;
var makeSource;
var isThemeDark2;
var icon;
const env0_0 = a0;
const value2 = null;
if (value2 != env0_4) {
var binding = env0_4;
if (binding.some(_fun122687)) {
value3 = environment.__proto__;
value4 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(a0);
if (value2 == value4) {
r1 = value2;
if (canManageWebhooks) {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
var formProps = {style: styles.screenContainer, contentContainerStyle: [styles.screenContent,
contentContainerStyle]};
var stackProps = {style: {paddingHorizontal: value3},
spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_24};
if (canManageWebhooks) {
r19 = (
<TableRow
label={intl.string(t.jp25Id)}
subLabel={intl.string(t.mKIOkI)}
icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)}
arrow
onPress={onPress_122683}
/>
);
} else {
r19 = canManageWebhooks;
}
items2 = [r19];
if (canManageWebhooks) {
r18 = (
<TableRow
label={intl.string(t.OrV60r)}
subLabel={intl.string(t.rQREJl)}
icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)}
arrow
onPress={onPress_122684}
/>
);
} else {
r18 = canManageWebhooks;
}
items2[1] = r18;
if (value9) {
r17 = (
<TableRow
label={intl.string(t.tqtDXC)}
subLabel={intl.string(t.v8819e)}
icon={((RefreshIcon) => <RefreshIcon />)((require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon)}
arrow
onPress={onPress_122685}
/>
);
} else {
r17 = value9;
}
items2[2] = r17;
r15 = r15 && env0_10.map(_fun122686);
items2[3] = r15;
r1 = (
<>
<Form {...formProps}>
<Stack {...stackProps}>
<TableRowGroup hasIcons>
{items2}
</TableRowGroup>
</Stack>
</Form>
{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}
</>
);
} else if (value9) {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
var formProps = {style: styles.screenContainer, contentContainerStyle: [styles.screenContent,
contentContainerStyle]};
var stackProps = {style: {paddingHorizontal: value3},
spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_24};
if (canManageWebhooks) {
r19 = (
<TableRow
label={intl.string(t.jp25Id)}
subLabel={intl.string(t.mKIOkI)}
icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)}
arrow
onPress={onPress_122683}
/>
);
} else {
r19 = canManageWebhooks;
}
items2 = [r19];
if (canManageWebhooks) {
r18 = (
<TableRow
label={intl.string(t.OrV60r)}
subLabel={intl.string(t.rQREJl)}
icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)}
arrow
onPress={onPress_122684}
/>
);
} else {
r18 = canManageWebhooks;
}
items2[1] = r18;
if (value9) {
r17 = (
<TableRow
label={intl.string(t.tqtDXC)}
subLabel={intl.string(t.v8819e)}
icon={((RefreshIcon) => <RefreshIcon />)((require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon)}
arrow
onPress={onPress_122685}
/>
);
} else {
r17 = value9;
}
items2[2] = r17;
r15 = r15 && env0_10.map(_fun122686);
items2[3] = r15;
r1 = (
<>
<Form {...formProps}>
<Stack {...stackProps}>
<TableRowGroup hasIcons>
{items2}
</TableRowGroup>
</Stack>
</Form>
{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}
</>
);
} else if (r15) {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
var formProps = {style: styles.screenContainer, contentContainerStyle: [styles.screenContent,
contentContainerStyle]};
var stackProps = {style: {paddingHorizontal: value3},
spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_24};
if (canManageWebhooks) {
r19 = (
<TableRow
label={intl.string(t.jp25Id)}
subLabel={intl.string(t.mKIOkI)}
icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)}
arrow
onPress={onPress_122683}
/>
);
} else {
r19 = canManageWebhooks;
}
items2 = [r19];
if (canManageWebhooks) {
r18 = (
<TableRow
label={intl.string(t.OrV60r)}
subLabel={intl.string(t.rQREJl)}
icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)}
arrow
onPress={onPress_122684}
/>
);
} else {
r18 = canManageWebhooks;
}
items2[1] = r18;
if (value9) {
r17 = (
<TableRow
label={intl.string(t.tqtDXC)}
subLabel={intl.string(t.v8819e)}
icon={((RefreshIcon) => <RefreshIcon />)((require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon)}
arrow
onPress={onPress_122685}
/>
);
} else {
r17 = value9;
}
items2[2] = r17;
r15 = r15 && env0_10.map(_fun122686);
items2[3] = r15;
r1 = (
<>
<Form {...formProps}>
<Stack {...stackProps}>
<TableRowGroup hasIcons>
{items2}
</TableRowGroup>
</Stack>
</Form>
{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}
</>
);
} else {
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object2 = {};
name = value4.name;
object2.label = name;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
VXU4EU = (require(1244) /* metro dependency 1244: indexNative */).t.VXU4EU;
name = value4.name;
object2.subLabel = Reflect.apply(formatToPlainString, intl, [VXU4EU, {platformName: name}]);
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = moduleValue.makeSource;
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_3);
icon = value4.icon;
object2.icon = <Image source={Reflect.apply(makeSource, moduleValue,
[isThemeDark2 ? icon.darkPNG : icon.lightPNG])} style={styles.platformIcon} />;
object2.arrow = true;
object2.onPress = onPress_122688;
r1 = <TableRow {...object2} key={a0} />;
r1 = null;
}
return r1;
r0 = r1;
}
return r0;
function _fun122680() { // fn#122680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:828, offset: 0x025710de, size: 49 bytes, params: 1, frame: 11
return env0_2 == null ? {'canManageWebhooks': false,
'canManageGuild': false} : PermissionStore.getGuildPermissionProps(env0_2);
}
function _fun122682({type}) { // fn#122682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:1060, offset: 0x02571128, size: 27 bytes, params: 2, frame: 11
return env1_10.includes(type);
}
function GuildSettingsModalIntegrationsOnPress() { // fn#122683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:1633, owner: GuildSettingsModalIntegrations.onPress, offset: 0x02571143, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const WEBHOOKS = GuildSettingsSections.WEBHOOKS;
return Reflect.apply(push, binding, [WEBHOOKS]);
}
function GuildSettingsModalIntegrationsOnPress_122684() { // fn#122684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:1835, owner: GuildSettingsModalIntegrations.onPress, offset: 0x02571163, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const CHANNELS_FOLLOWED = GuildSettingsSections.CHANNELS_FOLLOWED;
return Reflect.apply(push, binding, [CHANNELS_FOLLOWED]);
}
function GuildSettingsModalIntegrationsOnPress_122685() { // fn#122685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:2037, owner: GuildSettingsModalIntegrations.onPress, offset: 0x02571183, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const LOBBIES_LINKED = GuildSettingsSections.LOBBIES_LINKED;
return Reflect.apply(push, binding, [LOBBIES_LINKED]);
}
function _fun122686(a0) { // fn#122686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:2078, offset: 0x025711a3, size: 343 bytes, params: 2, frame: 28
var environment;
var r1;
var value3;
var value4;
var TableRow;
var object;
var name;
var intl;
var formatToPlainString;
var VXU4EU;
var moduleValue;
var makeSource;
var isThemeDark2;
var icon;
const env0_0 = a0;
const value2 = null;
if (value2 != env0_4) {
var binding = env0_4;
if (binding.some(_fun122687)) {
value3 = environment.__proto__;
value4 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(a0);
if (value2 == value4) {
r1 = value2;
} else {
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object = {};
name = value4.name;
object.label = name;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
VXU4EU = (require(1244) /* metro dependency 1244: indexNative */).t.VXU4EU;
name = value4.name;
object.subLabel = Reflect.apply(formatToPlainString, intl, [VXU4EU, {platformName: name}]);
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = moduleValue.makeSource;
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_3);
icon = value4.icon;
object.icon = (
<Image
source={Reflect.apply(makeSource, moduleValue, [isThemeDark2 ? icon.darkPNG : icon.lightPNG])}
style={styles.platformIcon}
/>
);
object.arrow = true;
object.onPress = onPress_122688;
r1 = <TableRow {...object} key={a0} />;
}
return r1;
}
}
return value2;
function _fun122687({type}) { // fn#122687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:2103, offset: 0x0108b18c, size: 21 bytes, params: 2, frame: 2
return type === env0_0;
}
function onPress_122688() { // fn#122688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:2424, offset: 0x025712fa, size: 47 bytes, params: 1, frame: 14
const binding = env1_1;
const push = binding.push;
const INTEGRATION_PLATFORM = GuildSettingsSections.INTEGRATION_PLATFORM;
return Reflect.apply(push, binding, [INTEGRATION_PLATFORM, {platformType: env0_0}]);
}
}
}
return value2;
}
function onPress_122688() { // fn#122688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16110:2424, offset: 0x025712fa, size: 47 bytes, params: 1, frame: 14
const binding = env1_1;
const push = binding.push;
const INTEGRATION_PLATFORM = GuildSettingsSections.INTEGRATION_PLATFORM;
return Reflect.apply(push, binding, [INTEGRATION_PLATFORM, {platformType: env0_0}]);
}
global.__d(_fun122677, 15902, [31, 27, 3784, 9113, 661, 33, 4501, 697, 3860, 1484, 566, 4048, 15866, 7972, 4572,
6231, 6238, 1244, 15117, 15201, 13127, 4915, 1423, 4002, 5462,
2]) /* metro module 15902, dependencies: [31, 27, 3784, 9113, 661, 33, 4501, 697, 3860, 1484, 566, 4048, 15866, 7972, 4572, 6231, 6238, 1244, 15117, 15201, 13127, 4915, 1423, 4002, 5462, 2] */;
@@ -1,4 +1,7 @@
/* Metro module 5067; source: modules/guild_settings/integrations/permission/IntegrationPermissionUtils.tsx; dependencies: [57, 1909, 5068, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun43829(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5245:6, offset: 0x01160477, size: 173 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = function(a0, a1) {
@@ -6,8 +9,7 @@ function _fun43829(global, require, importDefault, importAll, module, exports, d
};
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/integrations/permission/IntegrationPermissionUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/integrations/permission/IntegrationPermissionUtils.tsx');
exports.commandName = function(a0, a1) {
var value = a1;
var CHAT = require(dependencyMap[1]).ApplicationCommandType.CHAT;
@@ -28,52 +30,53 @@ function _fun43829(global, require, importDefault, importAll, module, exports, d
var Object = global.Object;
return Object.fromEntries(a0.map(_fun43836));
};
}
function commandPermissions(a0, a1) { // fn#43831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5245:154, offset: 0x01160524, size: 112 bytes, params: 3, frame: 22
var r2;
var property;
var value4;
var property2;
var includes;
var type;
var value5;
const object2 = {};
const Object = global.Object;
const value = Object.entries(a0);
let length = value.length;
const value2 = 0;
if (value2 < length) {
r2 = value2;
while (true) {
property = value[r2];
value4 = env0_2(property, 2);
property = value4[value2];
property2 = value4[1];
includes = a1.includes;
type = property2.type;
if (Reflect.apply(includes, a1, [type])) {
object2[property] = property2;
function commandPermissions(a0, a1) { // fn#43831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5245:154, offset: 0x01160524, size: 112 bytes, params: 3, frame: 22
var r2;
var property;
var value4;
var property2;
var includes;
var type;
var value5;
const object = {};
const Object = global.Object;
const value = Object.entries(a0);
let length = value.length;
const value2 = 0;
if (value2 < length) {
r2 = value2;
while (true) {
property = value[r2];
value4 = Module00057(property, 2);
property = value4[value2];
property2 = value4[1];
includes = a1.includes;
type = property2.type;
if (Reflect.apply(includes, a1, [type])) {
object[property] = property2;
}
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value.length;
if (value5 < length) {
r2 = value5;
continue;
}
break;
}
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value.length;
if (value5 < length) {
r2 = value5;
continue;
}
break;
}
return object;
}
return object2;
}
function keyPermissions(a0) { // fn#43835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5245:915, offset: 0x01160661, size: 41 bytes, params: 2, frame: 13
const Object = global.Object;
return Object.fromEntries(a0.map(_fun43836));
}
function keyPermissions(a0) { // fn#43835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5245:915, offset: 0x01160661, size: 41 bytes, params: 2, frame: 13
const Object = global.Object;
return Object.fromEntries(a0.map(_fun43836));
function _fun43836(a0) { // fn#43836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5245:975, offset: 0x0116068a, size: 42 bytes, params: 2, frame: 14
const value = environment.__proto__;
return [toPermissionKey(a0.id, a0.type), a0];
}
}
function _fun43836(a0) { // fn#43836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5245:975, offset: 0x0116068a, size: 42 bytes, params: 2, frame: 14
const value = environment.__proto__;
return [toPermissionKey(a0.id, a0.type), a0];
}
global.__d(_fun43829, 5067, [57, 1909, 5068, 2]) /* metro module 5067, dependencies: [57, 1909, 5068, 2] */;
@@ -1,171 +1,191 @@
/* Metro module 15873; source: modules/guild_settings/native/AssetChooser.tsx; dependencies: [153, 5, 6, 7, 15, 17, 18, 31, 27, 661, 33, 4501, 697, 4660, 5278, 1244, 15874, 15875, 1305, 3868, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00153 from '../../../by-id/module-00153.js'; /* Metro dependency 153 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
function _fun122179(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16081:6, offset: 0x0255d052, size: 627 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importDefault(153) /* metro dependency 153 */;
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_9 = value2.View;
const env0_10 = value2.Image;
const env0_11 = value2.ImageBackground;
const env0_12 = value2.TouchableWithoutFeedback;
const env0_13 = (require(661) /* metro dependency 661: Constants */).UPLOAD_MEDIUM_SIZE;
const value3 = require(33) /* metro dependency 33 */;
const env0_14 = value3.jsx;
const env0_15 = value3.Fragment;
const env0_16 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object3 = {assetWrapper: {'width': '100%', 'alignItems': 'center'}};
const object4 = {'width': '100%', 'height': 192, 'borderRadius': null, 'overflow': 'hidden'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
Module00153;
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {assetWrapper: {'width': '100%', 'alignItems': 'center'}};
const object2 = {'width': '100%', 'height': 192, 'borderRadius': null, 'overflow': 'hidden'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object3.asset = object4;
object2.backgroundColor = BACKGROUND_BASE_LOW;
object.asset = object2;
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object3.uploadIconWrapper = {'position': 'absolute', 'bottom': 10, 'right': 10, 'shadowColor': null,
object.uploadIconWrapper = {'position': 'absolute', 'bottom': 10, 'right': 10, 'shadowColor': null,
'shadowRadius': 10, 'shadowOffset': null, 'shadowOpacity': 0.2, shadowColor: BLACK, shadowOffset: {'height': 8,
'width': 0}};
object3.uploadIcon = {'width': 16, 'height': 16};
object.uploadIcon = {'width': 16, 'height': 16};
const BLUE_345 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLUE_345;
object3.remove = {'marginTop': 8, 'fontSize': 14, 'lineHeight': 18, color: BLUE_345};
const env0_17 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]);
object.remove = {'marginTop': 8, 'fontSize': 14, 'lineHeight': 18, color: BLUE_345};
const env0_17 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const PureComponent = value.PureComponent;
value = _fun122183(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/AssetChooser.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/AssetChooser.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_122180() { // fn#122180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16081:324, offset: 0x0255d2c5, 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_122180_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun122183(a0) { // fn#122183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16081:1039, offset: 0x0255d327, size: 97 bytes, params: 2, frame: 16
const closure = AssetChooser;
env0_8(closure, a0);
return env0_5(closure, [{key: 'getSource', value: function() {
var property = this.props;
var rawSource = property.rawSource;
var getSource = property.getSource;
property = property.guild;
var value = null;
return value == rawSource ? value : rawSource.startsWith('data:') ? {uri: rawSource} : getSource(property, 192);
}}, {key: 'render', value: value_122189}]);
}
function AssetChooser(a0) { // fn#122184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16081:1051, offset: 0x0255d388, size: 167 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, AssetChooser);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(AssetChooser);
binding = env1_6;
if (_isNativeReflectConstruct_122180()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handleChooseAsset = env1_3(_fun122186);
value.handleRemoveAsset = handleRemoveAsset;
return value;
}
function value_122189() { // fn#122189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16081:1777, offset: 0x0255d547, size: 487 bytes, params: 1, frame: 35
const value = environment.__proto__;
const value2 = env1_17(this.context);
const disabled = this.props.disabled;
const source = this.getSource();
const jsxRuntimeEnv1_15Binding = jsxRuntimeEnv1_15;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object = {accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['MsUY/S']);
object.style = value2.assetWrapper;
object.onPress = this.handleChooseAsset;
object.disabled = disabled;
const value4 = null;
return (
<>
<PressableOpacity {...object}>
<ImageBackground
source={value4 != source ? source : importDefault(15874) /* metro dependency 15874 */}
style={value2.asset}
>
{disabled ? value4 : <View style={value2.uploadIconWrapper}><Image style={value2.uploadIcon} source={importDefault(15875) /* metro dependency 15875 */} /></View>}
</ImageBackground>
</PressableOpacity>
{value4 == source || disabled ? value4 : <TouchableWithoutFeedback accessibilityRole="button" onPress={this.handleRemoveAsset}>{((LegacyText) => <LegacyText style={value2.remove}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.N86XcP)}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText)}</TouchableWithoutFeedback>}
</>
);
}
function* _fun122186() { // fn#122186, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16081:1296, offset: 0x0255d43a, size: 153 bytes, params: 1, frame: 17
if (true) {
value = environment.__proto__;
var {size, onChooseAsset} = AssetChooser.props;
value = environment.__proto__.__proto__.__proto__;
var value3 = env3_1(env3_2[13]);
yield value3.openImagePicker(typeof size === 'number' ? {size: size} : size ?? ({size: env3_13}));
value = undefined;
if (false) {
return value;
function _isNativeReflectConstruct_122180() { // fn#122180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16081:324, offset: 0x0255d2c5, 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) {
}
var base64 = value.base64;
if (base64 != null) {
if (onChooseAsset != null) {
onChooseAsset(base64);
return (_isNativeReflectConstruct_122180_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun122183(a0) { // fn#122183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16081:1039, offset: 0x0255d327, size: 97 bytes, params: 2, frame: 16
const AssetChooser2 = AssetChooser;
Inherits(AssetChooser2, a0);
return CreateClass(AssetChooser2, [{key: 'getSource', value: function() {
var property = this.props;
var rawSource = property.rawSource;
var getSource = property.getSource;
property = property.guild;
var value = null;
return value == rawSource ? value : rawSource.startsWith('data:') ? {uri: rawSource} : getSource(property, 192);
}}, {key: 'render', value: value_122189}]);
function AssetChooser(a0) { // fn#122184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16081:1051, offset: 0x0255d388, size: 167 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, AssetChooser);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(AssetChooser);
binding = env1_6;
if (_isNativeReflectConstruct_122180()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handleChooseAsset = env1_3(_fun122186);
value.handleRemoveAsset = handleRemoveAsset;
return value;
function* _fun122186() { // fn#122186, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16081:1296, offset: 0x0255d43a, size: 153 bytes, params: 1, frame: 17
if (true) {
value = environment.__proto__;
var {size, onChooseAsset} = AssetChooser.props;
value = environment.__proto__.__proto__.__proto__;
var value3 = env3_1(env3_2[13]);
yield value3.openImagePicker(typeof size === 'number' ? {size: size} : size ?? ({size: env3_13}));
value = undefined;
if (false) {
return value;
}
var base64 = value.base64;
if (base64 != null) {
if (onChooseAsset != null) {
onChooseAsset(base64);
}
}
}
}
function handleRemoveAsset() { // fn#122187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16081:1487, owner: AssetChooser.handleRemoveAsset, offset: 0x0255d4d3, size: 35 bytes, params: 1, frame: 11
const onChooseAsset = env0_0.props.onChooseAsset;
if (onChooseAsset != null) {
onChooseAsset(null);
}
}
}
function value_122189() { // fn#122189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16081:1777, offset: 0x0255d547, size: 487 bytes, params: 1, frame: 35
const value = environment.__proto__;
const value2 = env1_17(this.context);
const disabled = this.props.disabled;
const source = this.getSource();
const jsxRuntimeEnv1_15Binding = jsxRuntimeEnv1_15;
const PressableOpacity = (PressablesModule).PressableOpacity;
const object2 = {accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['MsUY/S']);
object2.style = value2.assetWrapper;
object2.onPress = this.handleChooseAsset;
object2.disabled = disabled;
const value4 = null;
return (
<>
<PressableOpacity {...object2}>
<ImageBackground
source={value4 != source ? source : importDefault(15874) /* metro dependency 15874 */}
style={value2.asset}
>
{
disabled
? value4
: (
<View style={value2.uploadIconWrapper}>
<Image
style={value2.uploadIcon}
source={importDefault(15875) /* metro dependency 15875 */}
/>
</View>
)
}
</ImageBackground>
</PressableOpacity>
{
value4 == source || disabled
? value4
: (
<TouchableWithoutFeedback accessibilityRole="button" onPress={this.handleRemoveAsset}>
{((LegacyText) => <LegacyText style={value2.remove}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.N86XcP)}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText)}
</TouchableWithoutFeedback>
)
}
</>
);
}
}
}
function handleRemoveAsset() { // fn#122187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16081:1487, owner: AssetChooser.handleRemoveAsset, offset: 0x0255d4d3, size: 35 bytes, params: 1, frame: 11
const onChooseAsset = env0_0.props.onChooseAsset;
if (onChooseAsset != null) {
onChooseAsset(null);
}
}
global.__d(_fun122179, 15873, [153, 5, 6, 7, 15, 17, 18, 31, 27, 661, 33, 4501, 697, 4660, 5278, 1244, 15874, 15875,
1305, 3868,
2]) /* metro module 15873, dependencies: [153, 5, 6, 7, 15, 17, 18, 31, 27, 661, 33, 4501, 697, 4660, 5278, 1244, 15874, 15875, 1305, 3868, 2] */;
@@ -1,104 +1,123 @@
/* Metro module 12140; source: modules/guild_settings/native/DetailedGuildIdentityUserRow.tsx; dependencies: [31, 27, 1878, 33, 4501, 697, 4617, 3995, 9210, 1305, 566, 7972, 6238, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun93182(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12326:6, offset: 0x020a9e86, size: 344 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {mainIdentity: {'flexDirection': 'row', 'alignItems': 'center'}};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.primaryAvatar = {marginRight: PX_4};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.mainTag = {color: INTERACTIVE_TEXT_DEFAULT, fontSize: 12};
const env0_7 = Reflect.apply(createStyles, createStylesModule, [object2]);
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {mainIdentity: {'flexDirection': 'row', 'alignItems': 'center'}};
const PX_4 = (Native).space.PX_4;
object.primaryAvatar = {marginRight: PX_4};
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
object.mainTag = {color: INTERACTIVE_TEXT_DEFAULT, fontSize: 12};
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const value4 = value.memo(_fun93183);
value = value.memo(DetailedGuildIdentityUserRow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/DetailedGuildIdentityUserRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/DetailedGuildIdentityUserRow.tsx');
exports.default = value;
exports.DetailedGuildIdentityUser = value4;
}
function _fun93183({contentHeight, guildId, user}) { // fn#93183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12326:364, offset: 0x020a9fde, size: 392 bytes, params: 2, frame: 30
var items2;
var value;
const styles = useStyles();
let r5 = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getNickname(guildId, undefined,
user) ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user);
const hasAvatarForGuild2 = user.hasAvatarForGuild(guildId);
const object = {height: contentHeight};
const value5 = ((Component) => <Component user={user} nick={r5} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
if (hasAvatarForGuild2) {
var viewBinding2Props = {style: styles.mainIdentity};
items2 = [hasAvatarForGuild2 ? ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} style={styles.primaryAvatar} user={user} guildId={undefined} />)((require(1305) /* metro dependency 1305: native */).Avatar) : null];
value = importDefault(9210) /* metro dependency 9210: DiscordTag */;
items2[1] = ((Component) => <Component user={user} usernameStyle={styles.mainTag} hideBotTag />)(value);
value = <View {...viewBinding2Props}>{items2}</View>;
r5 = value;
} else if (r5 != null) {
var viewBinding2Props = {style: styles.mainIdentity};
items2 = [hasAvatarForGuild2 ? ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} style={styles.primaryAvatar} user={user} guildId={undefined} />)((require(1305) /* metro dependency 1305: native */).Avatar) : null];
value = importDefault(9210) /* metro dependency 9210: DiscordTag */;
items2[1] = ((Component) => <Component user={user} usernameStyle={styles.mainTag} hideBotTag />)(value);
value = <View {...viewBinding2Props}>{items2}</View>;
r5 = value;
} else {
r5 = null;
}
return (
<View style={object}>
{value5}
{r5}
</View>
);
}
function DetailedGuildIdentityUserRow({accessibilityLabel, arrow, contentHeight, deprecatedFormRow, disabled, end, guildId, leading, onPress, trailing, userId, subLabel, start, accessibilityRole, accessibilityState}) { // fn#93184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12326:820, offset: 0x020aa166, size: 565 bytes, params: 2, frame: 38
deprecatedFormRow = !(deprecatedFormRow === undefined) && deprecatedFormRow;
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(userId);
});
if (user == null) {
return null;
} else if (deprecatedFormRow) {
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
function _fun93183({contentHeight, guildId, user}) { // fn#93183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12326:364, offset: 0x020a9fde, size: 392 bytes, params: 2, frame: 30
var items2;
var value;
const styles = useStyles();
let r5 = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getNickname(guildId, undefined,
user) ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user);
const hasAvatarForGuild2 = user.hasAvatarForGuild(guildId);
const object2 = {height: contentHeight};
const value5 = ((Component) => <Component user={user} nick={r5} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
if (hasAvatarForGuild2) {
var viewBinding2Props = {style: styles.mainIdentity};
items2 = [
hasAvatarForGuild2
? ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} style={styles.primaryAvatar} user={user} guildId={undefined} />)((require(1305) /* metro dependency 1305: native */).Avatar)
: null,
];
value = importDefault(9210) /* metro dependency 9210: DiscordTag */;
items2[1] = ((Component) => <Component user={user} usernameStyle={styles.mainTag} hideBotTag />)(value);
value = (
<View {...viewBinding2Props}>
{items2}
</View>
);
r5 = value;
} else if (r5 != null) {
var viewBinding2Props = {style: styles.mainIdentity};
items2 = [
hasAvatarForGuild2
? ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} style={styles.primaryAvatar} user={user} guildId={undefined} />)((require(1305) /* metro dependency 1305: native */).Avatar)
: null,
];
value = importDefault(9210) /* metro dependency 9210: DiscordTag */;
items2[1] = ((Component) => <Component user={user} usernameStyle={styles.mainTag} hideBotTag />)(value);
value = (
<View {...viewBinding2Props}>
{items2}
</View>
);
r5 = value;
} else {
r5 = null;
}
return (
<FormRow
accessibilityLabel={accessibilityLabel}
disabled={disabled}
leading={leading ?? ((Avatar) => <Avatar source={user.getAvatarSource(guildId)} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SMALL} />)((require(1305) /* metro dependency 1305: native */).Avatar)}
label={((Component) => <Component contentHeight={contentHeight} user={user} guildId={guildId} />)(env0_8)}
onPress={onPress}
subLabel={subLabel}
trailing={trailing}
accessibilityRole={accessibilityRole}
accessibilityState={accessibilityState}
/>
);
} else {
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
accessibilityLabel={accessibilityLabel}
arrow={arrow}
disabled={disabled}
end={end}
icon={leading ?? ((Avatar) => <Avatar source={user.getAvatarSource(guildId)} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SMALL} />)((require(1305) /* metro dependency 1305: native */).Avatar)}
label={((Component) => <Component contentHeight={contentHeight} user={user} guildId={guildId} />)(env0_8)}
onPress={onPress}
start={start}
subLabel={subLabel}
trailing={trailing}
accessibilityRole={accessibilityRole}
accessibilityState={accessibilityState}
/>
<View style={object2}>
{value5}
{r5}
</View>
);
}
function DetailedGuildIdentityUserRow({accessibilityLabel, arrow, contentHeight, deprecatedFormRow, disabled, end, guildId, leading, onPress, trailing, userId, subLabel, start, accessibilityRole, accessibilityState}) { // fn#93184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12326:820, offset: 0x020aa166, size: 565 bytes, params: 2, frame: 38
deprecatedFormRow = !(deprecatedFormRow === undefined) && deprecatedFormRow;
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(userId);
});
if (user == null) {
return null;
} else if (deprecatedFormRow) {
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
return (
<FormRow
accessibilityLabel={accessibilityLabel}
disabled={disabled}
leading={leading ?? ((Avatar) => <Avatar source={user.getAvatarSource(guildId)} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SMALL} />)((require(1305) /* metro dependency 1305: native */).Avatar)}
label={((Component) => <Component contentHeight={contentHeight} user={user} guildId={guildId} />)(env0_8)}
onPress={onPress}
subLabel={subLabel}
trailing={trailing}
accessibilityRole={accessibilityRole}
accessibilityState={accessibilityState}
/>
);
} else {
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
accessibilityLabel={accessibilityLabel}
arrow={arrow}
disabled={disabled}
end={end}
icon={leading ?? ((Avatar) => <Avatar source={user.getAvatarSource(guildId)} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SMALL} />)((require(1305) /* metro dependency 1305: native */).Avatar)}
label={((Component) => <Component contentHeight={contentHeight} user={user} guildId={guildId} />)(env0_8)}
onPress={onPress}
start={start}
subLabel={subLabel}
trailing={trailing}
accessibilityRole={accessibilityRole}
accessibilityState={accessibilityState}
/>
);
}
}
}
global.__d(_fun93182, 12140, [31, 27, 1878, 33, 4501, 697, 4617, 3995, 9210, 1305, 566, 7972, 6238,
2]) /* metro module 12140, dependencies: [31, 27, 1878, 33, 4501, 697, 4617, 3995, 9210, 1305, 566, 7972, 6238, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,472 +1,519 @@
/* Metro module 15857; source: modules/guild_settings/native/GuildSettingsModal.tsx; dependencies: [57, 31, 1867, 9113, 661, 33, 15858, 9112, 480, 1244, 5282, 15859, 15872, 15876, 15877, 15887, 15902, 15903, 15915, 15203, 15210, 15927, 15931, 15933, 15212, 15934, 15939, 15940, 15960, 15979, 15983, 15986, 10296, 10311, 10313, 15987, 15992, 15993, 16015, 16055, 16056, 16072, 16111, 16115, 16116, 16119, 16127, 1585, 6518, 566, 5280, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildSettingsActionCreators from '../GuildSettingsActionCreators.tsx'; /* Metro dependency 9112 */
import GuildSettingsStore from '../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import KickConfirm from '../../guild_moderation/native/KickConfirm.tsx'; /* Metro dependency 10311 */
import BanConfirm from '../../guild_moderation/native/BanConfirm.tsx'; /* Metro dependency 10313 */
import IntegrationsSettingsWebhooksOverview from '../../integration_settings/native/IntegrationsSettingsWebhooksOverview.tsx'; /* Metro dependency 15203 */
import IntegrationsSettingsEditWebhook from '../../integration_settings/native/IntegrationsSettingsEditWebhook.tsx'; /* Metro dependency 15210 */
import IntegrationsSettingsEditLinkedLobby from '../../integration_settings/native/IntegrationsSettingsEditLinkedLobby.tsx'; /* Metro dependency 15212 */
import GuildSettingsModalChannelsActionCreators from '../GuildSettingsModalChannelsActionCreators.tsx'; /* Metro dependency 15858 */
import GuildSettingsModalLanding from './GuildSettingsModalLanding.tsx'; /* Metro dependency 15859 */
import GuildSettingsModalOverview from './GuildSettingsModalOverview.tsx'; /* Metro dependency 15872 */
import GuildSettingsModalModeration from '../safety/native/GuildSettingsModalModeration.tsx'; /* Metro dependency 15876 */
import GuildSettingsModalAuditLog from '../audit_log/native/GuildSettingsModalAuditLog.tsx'; /* Metro dependency 15877 */
import GuildSettingsModalAuditLogFilter from '../audit_log/native/GuildSettingsModalAuditLogFilter.tsx'; /* Metro dependency 15887 */
import GuildSettingsModalIntegrations from '../integrations/native/GuildSettingsModalIntegrations.tsx'; /* Metro dependency 15902 */
import GuildSettingsModalEmoji from './GuildSettingsModalEmoji.tsx'; /* Metro dependency 15903 */
import GuildSettingsModalStickers from '../server_monetization/stickers/native/GuildSettingsModalStickers.tsx'; /* Metro dependency 15915 */
import GuildSettingsModalIntegrationSettings from '../integrations/native/GuildSettingsModalIntegrationSettings.tsx'; /* Metro dependency 15927 */
import GuildSettingsModalIntegrationPlatform from '../integrations/native/GuildSettingsModalIntegrationPlatform.tsx'; /* Metro dependency 15931 */
import GuildSettingsModalLobbiesLinked from '../apps/native/GuildSettingsModalLobbiesLinked.tsx'; /* Metro dependency 15933 */
import GuildSettingsModalChannels from './GuildSettingsModalChannels.tsx'; /* Metro dependency 15934 */
import GuildSettingsModalSecurity from '../safety/native/GuildSettingsModalSecurity.tsx'; /* Metro dependency 15939 */
import GuildSettingsRoles from '../roles/native/GuildSettingsRoles.tsx'; /* Metro dependency 15940 */
import GuildSettingsRoleEdit from '../roles/native/GuildSettingsRoleEdit.tsx'; /* Metro dependency 15960 */
import GuildSettingsModalVanityURL from '../server_monetization/boost_perks/native/GuildSettingsModalVanityURL.tsx'; /* Metro dependency 15979 */
import GuildSettingsModalInstantInvites from './GuildSettingsModalInstantInvites.tsx'; /* Metro dependency 15983 */
import GuildSettingsModalMembersWrapper from './GuildSettingsModalMembersWrapper.tsx'; /* Metro dependency 15986 */
import GuildSettingsModalBans from '../safety/native/GuildSettingsModalBans.tsx'; /* Metro dependency 15987 */
import GuildSettingsModalCommunity from '../community/native/GuildSettingsModalCommunity.tsx'; /* Metro dependency 15992 */
import GuildSettingsModalCommunityIntro from '../community/native/GuildSettingsModalCommunityIntro.tsx'; /* Metro dependency 15993 */
import GuildSettingsRoleSubscriptionsEmpty from '../../guild_role_subscriptions/native/guild_settings/GuildSettingsRoleSubscriptionsEmpty.tsx'; /* Metro dependency 16015 */
import GuildSettingsRoleSubscriptionsEnableMonetization from '../../guild_role_subscriptions/native/guild_settings/GuildSettingsRoleSubscriptionsEnableMonetization.tsx'; /* Metro dependency 16055 */
import GuildSettingsRoleSubscriptionsGroupEdit from '../../guild_role_subscriptions/native/guild_settings/GuildSettingsRoleSubscriptionsGroupEdit.tsx'; /* Metro dependency 16056 */
import GuildSettingsRoleSubscriptionTiers from '../../guild_role_subscriptions/native/guild_settings/GuildSettingsRoleSubscriptionTiers.tsx'; /* Metro dependency 16072 */
import GuildSettingsRoleSubscriptionTierEdit from '../../guild_role_subscriptions/native/guild_settings/GuildSettingsRoleSubscriptionTierEdit.tsx'; /* Metro dependency 16111 */
import GuildSettingsRoleSubscriptionsPayments from '../../guild_role_subscriptions/native/guild_settings/GuildSettingsRoleSubscriptionsPayments.tsx'; /* Metro dependency 16115 */
import GuildSettingsRoleSubscriptionEmojis from '../../guild_role_subscriptions/native/guild_settings/emojis/GuildSettingsRoleSubscriptionEmojis.tsx'; /* Metro dependency 16116 */
import GuildSettingsRoleSubscriptionTierTemplateSelection from '../../guild_role_subscriptions/native/guild_settings/tier_templates/GuildSettingsRoleSubscriptionTierTemplateSelection.tsx'; /* Metro dependency 16119 */
import GuildSettingsModalOfficialMessages from './GuildSettingsModalOfficialMessages.tsx'; /* Metro dependency 16127 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AnalyticsUtilsModule from '../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GuildSettingsModalMemberEditModule from './GuildSettingsModalMemberEdit.tsx'; /* Metro dependency 10296 */
function _fun121966(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:6, offset: 0x02555d70, size: 233 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 guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.GuildSettingsSections;
const env0_8 = constantsModule.WebhookTypes;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModal.tsx');
exports.default = GuildSettingsModal;
}
function close_121967() { // fn#121967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:203, offset: 0x02555e59, size: 59 bytes, params: 1, frame: 13
(importDefault(15858) /* metro dependency 15858: GuildSettingsModalChannelsActionCreators */).terminate();
(importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).close();
}
function GuildSettingsModal() { // fn#121968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:353, offset: 0x02555e94, size: 342 bytes, params: 1, frame: 20
const value2 = undefined;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value3 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(function() {
return GuildSettingsStore.getGuildId();
});
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun121970);
const binding = env0_4;
const value4 = binding.useMemo(_fun121971, [bottom, value3]);
binding.useEffect(_fun122012, [guild, value3]);
const property = env0_3(binding.useState(function() {
return GuildSettingsStore.getSavedRouteState();
}), 1)[0];
const value7 = binding.useCallback(_fun122014, []);
const value8 = null;
if (value8 != value4) {
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return (
<Navigator
onWillFocus={value7}
initialRouteName={value8 == property ? GuildSettingsSections.LANDING : value2}
initialRouteState={value8 != property ? property : value2}
screens={value4}
/>
);
} else {
return value8;
function close_121967() { // fn#121967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:203, offset: 0x02555e59, size: 59 bytes, params: 1, frame: 13
(GuildSettingsModalChannelsActionCreators).terminate();
(GuildSettingsActionCreators).close();
}
}
function _fun121971() { // fn#121971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:508, offset: 0x02555fea, size: 45 bytes, params: 1, frame: 14
return env0_1 != null ? getScreens_121972(env0_1, bottom) : undefined;
}
function GuildSettingsModal() { // fn#121968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:353, offset: 0x02555e94, size: 342 bytes, params: 1, frame: 20
const value2 = undefined;
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value3 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(function() {
return GuildSettingsStore.getGuildId();
});
const guild = (FluxModule).useStateFromStores([GuildStore], _fun121970);
const value4 = ReactModule.useMemo(_fun121971, [bottom, value3]);
ReactModule.useEffect(_fun122012, [guild, value3]);
const property = Module00057(ReactModule.useState(function() {
return GuildSettingsStore.getSavedRouteState();
}), 1)[0];
const value7 = ReactModule.useCallback(_fun122014, []);
const value8 = null;
if (value8 != value4) {
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return (
<Navigator
onWillFocus={value7}
initialRouteName={value8 == property ? GuildSettingsSections.LANDING : value2}
initialRouteState={value8 != property ? property : value2}
screens={value4}
/>
);
} else {
return value8;
}
function _fun121970() { // fn#121970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:475, offset: 0x023e6a58, size: 27 bytes, params: 1, frame: 11
return GuildStore.getGuild(env0_1);
}
function _fun121971() { // fn#121971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:508, offset: 0x02555fea, size: 45 bytes, params: 1, frame: 14
return env0_1 != null ? getScreens_121972(env0_1, bottom) : undefined;
function getScreens_121972(a0, a1) { // fn#121972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:520, offset: 0x02556017, size: 3191 bytes, params: 3, frame: 22
const env0_0 = a0;
let object = {};
object.contentContainerStyle = {paddingBottom: 16 + a1};
object = {};
const LANDING = GuildSettingsSections.LANDING;
const object3 = {};
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const GUILD_SETTINGS_LANDING = ImpressionNames.GUILD_SETTINGS_LANDING;
object3.impressionName = GUILD_SETTINGS_LANDING;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object3.title = Reflect.apply(string, intl, [t['154/bL']]);
object3.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(close_121967);
object3.render = render_121973;
object[LANDING] = object3;
const OVERVIEW = GuildSettingsSections.OVERVIEW;
const object4 = {};
const GUILD_SETTINGS_OVERVIEW = ImpressionNames.GUILD_SETTINGS_OVERVIEW;
object4.impressionName = GUILD_SETTINGS_OVERVIEW;
object4.title = intl.string(t['/dp6yY']);
object4.render = render_121974;
object[OVERVIEW] = object4;
const MODERATION = GuildSettingsSections.MODERATION;
const object5 = {};
const GUILD_SETTINGS_MODERATION = ImpressionNames.GUILD_SETTINGS_MODERATION;
object5.impressionName = GUILD_SETTINGS_MODERATION;
object5.title = intl.string(t['5tbTdV']);
object5.render = render_121975;
object[MODERATION] = object5;
const AUDIT_LOG = GuildSettingsSections.AUDIT_LOG;
const GUILD_SETTINGS_AUDIT_LOG = ImpressionNames.GUILD_SETTINGS_AUDIT_LOG;
string = intl.string;
const SPWLyT = t.SPWLyT;
object[AUDIT_LOG] = {impressionName: GUILD_SETTINGS_AUDIT_LOG, title: Reflect.apply(string, intl, [SPWLyT]),
postponeRender: true, render: render_121976};
const AUDIT_LOG_FILTER = GuildSettingsSections.AUDIT_LOG_FILTER;
object[AUDIT_LOG_FILTER] = {title: intl.string(t.pEasFX), render: render_121977};
const INTEGRATIONS = GuildSettingsSections.INTEGRATIONS;
let GUILD_SETTINGS_INTEGRATION = ImpressionNames.GUILD_SETTINGS_INTEGRATION;
string = intl.string;
let CIsNZw = t.CIsNZw;
object[INTEGRATIONS] = {impressionName: GUILD_SETTINGS_INTEGRATION, title: Reflect.apply(string, intl, [CIsNZw]),
render: render_121978};
const EMOJI = GuildSettingsSections.EMOJI;
const GUILD_SETTINGS_EMOJI = ImpressionNames.GUILD_SETTINGS_EMOJI;
object[EMOJI] = {impressionName: GUILD_SETTINGS_EMOJI, title: intl.string(t.sMOuuS), postponeRender: true,
render: render_121979};
const STICKERS = GuildSettingsSections.STICKERS;
const GUILD_SETTINGS_STICKERS = ImpressionNames.GUILD_SETTINGS_STICKERS;
string = intl.string;
const R5nQkS = t.R5nQkS;
object[STICKERS] = {impressionName: GUILD_SETTINGS_STICKERS, title: Reflect.apply(string, intl, [R5nQkS]),
postponeRender: true, render: render_121980};
const WEBHOOKS = GuildSettingsSections.WEBHOOKS;
let GUILD_SETTINGS_WEBHOOKS = ImpressionNames.GUILD_SETTINGS_WEBHOOKS;
object[WEBHOOKS] = {impressionName: GUILD_SETTINGS_WEBHOOKS, title: intl.string(t.jp25Id), render: render_121981};
const EDIT_WEBHOOK = GuildSettingsSections.EDIT_WEBHOOK;
const object12 = {};
object12.title = intl.string(t['6SE3L3']);
object12.render = render_121982;
object[EDIT_WEBHOOK] = object12;
const CHANNELS_FOLLOWED = GuildSettingsSections.CHANNELS_FOLLOWED;
GUILD_SETTINGS_WEBHOOKS = ImpressionNames.GUILD_SETTINGS_WEBHOOKS;
string = intl.string;
const OrV60r = t.OrV60r;
object[CHANNELS_FOLLOWED] = {impressionName: GUILD_SETTINGS_WEBHOOKS, title: Reflect.apply(string, intl, [OrV60r]),
render: render_121983};
const INTEGRATION_SETTINGS = GuildSettingsSections.INTEGRATION_SETTINGS;
GUILD_SETTINGS_INTEGRATION = ImpressionNames.GUILD_SETTINGS_INTEGRATION;
object[INTEGRATION_SETTINGS] = {impressionName: GUILD_SETTINGS_INTEGRATION, title: intl.string(t.sE5hSZ),
render: render_121984};
const INTEGRATION_PLATFORM = GuildSettingsSections.INTEGRATION_PLATFORM;
string = intl.string;
CIsNZw = t.CIsNZw;
object[INTEGRATION_PLATFORM] = {title: Reflect.apply(string, intl, [CIsNZw]), render: render_121985};
const LOBBIES_LINKED = GuildSettingsSections.LOBBIES_LINKED;
object[LOBBIES_LINKED] = {title: intl.string(t.tqtDXC), render: render_121986};
const EDIT_LINKED_LOBBY = GuildSettingsSections.EDIT_LINKED_LOBBY;
string = intl.string;
const OJknhi = t.OJknhi;
object[EDIT_LINKED_LOBBY] = {title: Reflect.apply(string, intl, [OJknhi]), render: render_121987};
const CHANNELS = GuildSettingsSections.CHANNELS;
const GUILD_SETTINGS_CHANNELS = ImpressionNames.GUILD_SETTINGS_CHANNELS;
string = intl.string;
const OGiMXJ = t.OGiMXJ;
object[CHANNELS] = {impressionName: GUILD_SETTINGS_CHANNELS, title: Reflect.apply(string, intl, [OGiMXJ]),
postponeRender: true, render: render_121988};
const SECURITY = GuildSettingsSections.SECURITY;
const GUILD_SETTINGS_SECURITY = ImpressionNames.GUILD_SETTINGS_SECURITY;
string = intl.string;
const Am9YHi = t.Am9YHi;
object[SECURITY] = {impressionName: GUILD_SETTINGS_SECURITY, title: Reflect.apply(string, intl, [Am9YHi]),
render: render_121989};
const ROLES = GuildSettingsSections.ROLES;
const object20 = {};
const GUILD_SETTINGS_ROLES = ImpressionNames.GUILD_SETTINGS_ROLES;
object20.impressionName = GUILD_SETTINGS_ROLES;
object20.title = intl.string(t['LPJmL/']);
object20.render = render_121990;
object[ROLES] = object20;
const ROLE_EDIT_REFRESH = GuildSettingsSections.ROLE_EDIT_REFRESH;
const object21 = {};
object21.title = intl.string(t['LPJmL/']);
object21.render = render_121991;
object[ROLE_EDIT_REFRESH] = object21;
const VANITY_URL = GuildSettingsSections.VANITY_URL;
const object22 = {};
object22.title = intl.string(t['5XZKy/']);
object22.render = render_121992;
object[VANITY_URL] = object22;
const INSTANT_INVITES = GuildSettingsSections.INSTANT_INVITES;
const GUILD_SETTINGS_INVITES = ImpressionNames.GUILD_SETTINGS_INVITES;
object[INSTANT_INVITES] = {impressionName: GUILD_SETTINGS_INVITES, title: intl.string(t.ngRFjZ),
postponeRender: true, render: render_121993};
const MEMBERS = GuildSettingsSections.MEMBERS;
const object23 = {};
const GUILD_SETTINGS_MEMBERS = ImpressionNames.GUILD_SETTINGS_MEMBERS;
object23.impressionName = GUILD_SETTINGS_MEMBERS;
object23.title = intl.string(t['9Oq93m']);
object23.postponeRender = true;
object23.render = render_121994;
object[MEMBERS] = object23;
const MEMBER_EDIT = GuildSettingsSections.MEMBER_EDIT;
object[MEMBER_EDIT] = {render: render_121995};
const MEMBER_KICK = GuildSettingsSections.MEMBER_KICK;
object[MEMBER_KICK] = {headerTitle: function() {
return null;
}, render: render_121997};
const MEMBER_BAN = GuildSettingsSections.MEMBER_BAN;
object[MEMBER_BAN] = {headerTitle: function() {
return null;
}, render: render_121999};
const BANS = GuildSettingsSections.BANS;
const GUILD_SETTINGS_BANS = ImpressionNames.GUILD_SETTINGS_BANS;
string = intl.string;
const ZbeITS = t.ZbeITS;
object[BANS] = {impressionName: GUILD_SETTINGS_BANS, title: Reflect.apply(string, intl, [ZbeITS]),
postponeRender: true, render: render_122000};
const COMMUNITY = GuildSettingsSections.COMMUNITY;
const GUILD_SETTINGS_COMMUNITY_OVERVIEW = ImpressionNames.GUILD_SETTINGS_COMMUNITY_OVERVIEW;
object[COMMUNITY] = {impressionName: GUILD_SETTINGS_COMMUNITY_OVERVIEW, title: intl.string(t.nRtNqn),
postponeRender: true, render: render_122001};
const COMMUNITY_INTRO = GuildSettingsSections.COMMUNITY_INTRO;
const GUILD_SETTINGS_COMMUNITY_WELCOME = ImpressionNames.GUILD_SETTINGS_COMMUNITY_WELCOME;
string = intl.string;
const ElKTeb = t.ElKTeb;
object[COMMUNITY_INTRO] = {impressionName: GUILD_SETTINGS_COMMUNITY_WELCOME, title: Reflect.apply(string, intl,
[ElKTeb]), render: render_122002};
const ROLE_SUBSCRIPTIONS = GuildSettingsSections.ROLE_SUBSCRIPTIONS;
const object24 = {};
object24.title = intl.string(t['KzCF/6']);
object24.render = render_122003;
object[ROLE_SUBSCRIPTIONS] = object24;
const ROLE_SUBSCRIPTIONS_ENABLE_MONETIZATION = GuildSettingsSections.ROLE_SUBSCRIPTIONS_ENABLE_MONETIZATION;
const object25 = {};
object25.title = intl.string(t['KzCF/6']);
object25.render = render_122004;
object[ROLE_SUBSCRIPTIONS_ENABLE_MONETIZATION] = object25;
const ROLE_SUBSCRIPTIONS_BASIC = GuildSettingsSections.ROLE_SUBSCRIPTIONS_BASIC;
const object26 = {};
object26.title = intl.string(t['/CfKoD']);
object26.render = render_122005;
object[ROLE_SUBSCRIPTIONS_BASIC] = object26;
const ROLE_SUBSCRIPTIONS_TIERS = GuildSettingsSections.ROLE_SUBSCRIPTIONS_TIERS;
object[ROLE_SUBSCRIPTIONS_TIERS] = {title: intl.string(t.pXbGYc), render: render_122006};
const ROLE_SUBSCRIPTIONS_TIER_EDIT = GuildSettingsSections.ROLE_SUBSCRIPTIONS_TIER_EDIT;
const object27 = {};
object27.title = intl.string(t['KzCF/6']);
object27.render = render_122007;
object[ROLE_SUBSCRIPTIONS_TIER_EDIT] = object27;
const ROLE_SUBSCRIPTIONS_PAYMENTS = GuildSettingsSections.ROLE_SUBSCRIPTIONS_PAYMENTS;
object[ROLE_SUBSCRIPTIONS_PAYMENTS] = {title: intl.string(t.p2Rsdl), render: render_122008};
const ROLE_SUBSCRIPTIONS_EMOJIS = GuildSettingsSections.ROLE_SUBSCRIPTIONS_EMOJIS;
string = intl.string;
const C5Dbwn = t.C5Dbwn;
object[ROLE_SUBSCRIPTIONS_EMOJIS] = {title: Reflect.apply(string, intl, [C5Dbwn]), render: render_122009};
const ROLE_SUBSCRIPTIONS_TIER_TEMPLATE_SELECTION = GuildSettingsSections.ROLE_SUBSCRIPTIONS_TIER_TEMPLATE_SELECTION;
const object28 = {};
object28.title = intl.string(t['KzCF/6']);
object28.render = render_122010;
object[ROLE_SUBSCRIPTIONS_TIER_TEMPLATE_SELECTION] = object28;
const OFFICIAL_MESSAGES = GuildSettingsSections.OFFICIAL_MESSAGES;
object[OFFICIAL_MESSAGES] = {title: intl.string(t.xHEzFh), render: render_122011};
return object;
function getScreens_121972Render() { // fn#121973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:780, owner: getScreens_121972.render, offset: 0x02556c8e, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(GuildSettingsModalLanding);
}
function getScreens_121972Render_121974() { // fn#121974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:945, owner: getScreens_121972.render, offset: 0x02556ccb, size: 53 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...env0_1} />)(GuildSettingsModalOverview);
}
function getScreens_121972Render_121975() { // fn#121975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:1104, owner: getScreens_121972.render, offset: 0x02556d00, size: 53 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...env0_1} />)(GuildSettingsModalModeration);
}
function getScreens_121972Render_121976() { // fn#121976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:1276, owner: getScreens_121972.render, offset: 0x02556d35, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(GuildSettingsModalAuditLog);
}
function getScreens_121972Render_121977(a0) { // fn#121977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:1383, owner: getScreens_121972.render, offset: 0x02556d72, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...a0} {...env0_1} />)(GuildSettingsModalAuditLogFilter);
}
function getScreens_121972Render_121978() { // fn#121978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:1556, owner: getScreens_121972.render, offset: 0x02556db9, size: 53 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...env0_1} />)(GuildSettingsModalIntegrations);
}
function getScreens_121972Render_121979() { // fn#121979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:1720, owner: getScreens_121972.render, offset: 0x02556dee, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(GuildSettingsModalEmoji);
}
function getScreens_121972Render_121980() { // fn#121980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:1900, owner: getScreens_121972.render, offset: 0x02556e2b, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(GuildSettingsModalStickers);
}
function getScreens_121972Render_121981() { // fn#121981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2062, owner: getScreens_121972.render, offset: 0x02556e68, size: 76 bytes, params: 1, frame: 16
const binding = env0_0;
const INCOMING = WebhookTypes.INCOMING;
return (
<IntegrationsSettingsWebhooksOverview
guildId={binding}
webhookType={INCOMING}
{...env0_1}
/>
);
}
function getScreens_121972Render_121982(a0) { // fn#121982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2191, owner: getScreens_121972.render, offset: 0x02556eb4, size: 63 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...env0_1} />)(IntegrationsSettingsEditWebhook);
}
function getScreens_121972Render_121983() { // fn#121983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2356, owner: getScreens_121972.render, offset: 0x02556ef3, size: 76 bytes, params: 1, frame: 16
const binding = env0_0;
const CHANNEL_FOLLOWER = WebhookTypes.CHANNEL_FOLLOWER;
return (
<IntegrationsSettingsWebhooksOverview
guildId={binding}
webhookType={CHANNEL_FOLLOWER}
{...env0_1}
/>
);
}
function getScreens_121972Render_121984(a0) { // fn#121984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2564, owner: getScreens_121972.render, offset: 0x02556f3f, size: 63 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...env0_1} />)(GuildSettingsModalIntegrationSettings);
}
function getScreens_121972Render_121985(a0) { // fn#121985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2669, owner: getScreens_121972.render, offset: 0x02556f7e, size: 78 bytes, params: 2, frame: 15
const defaultImportProps = {...a0};
const close_121967Binding = close_121967;
defaultImportProps['closeGuildSettings'] = close_121967Binding;
copyDataProperties(defaultImportProps, env0_1, close_121967Binding);
return <GuildSettingsModalIntegrationPlatform {...defaultImportProps} />;
}
function getScreens_121972Render_121986() { // fn#121986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2793, owner: getScreens_121972.render, offset: 0x02556fcc, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(GuildSettingsModalLobbiesLinked);
}
function getScreens_121972Render_121987(a0) { // fn#121987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2901, owner: getScreens_121972.render, offset: 0x02557009, size: 63 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...env0_1} />)(IntegrationsSettingsEditLinkedLobby);
}
function getScreens_121972Render_121988() { // fn#121988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3075, owner: getScreens_121972.render, offset: 0x02557048, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(GuildSettingsModalChannels);
}
function getScreens_121972Render_121989() { // fn#121989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3237, owner: getScreens_121972.render, offset: 0x02557085, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(GuildSettingsModalSecurity);
}
function getScreens_121972Render_121990() { // fn#121990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3396, owner: getScreens_121972.render, offset: 0x025570c2, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(GuildSettingsRoles);
}
function getScreens_121972Render_121991(a0) { // fn#121991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3507, owner: getScreens_121972.render, offset: 0x025570ff, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...a0} {...env0_1} />)(GuildSettingsRoleEdit);
}
function getScreens_121972Render_121992() { // fn#121992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3615, owner: getScreens_121972.render, offset: 0x02557146, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(GuildSettingsModalVanityURL);
}
function getScreens_121972Render_121993() { // fn#121993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3801, owner: getScreens_121972.render, offset: 0x02557183, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(GuildSettingsModalInstantInvites);
}
function getScreens_121972Render_121994() { // fn#121994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3982, owner: getScreens_121972.render, offset: 0x025571c0, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(GuildSettingsModalMembersWrapper);
}
function getScreens_121972Render_121995(a0) { // fn#121995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4040, owner: getScreens_121972.render, offset: 0x025571fd, size: 77 bytes, params: 2, frame: 15
const GuildSettingsModalMemberEditScene = (GuildSettingsModalMemberEditModule).GuildSettingsModalMemberEditScene;
return (
<GuildSettingsModalMemberEditScene
guildId={env0_0}
{...a0}
{...env0_1}
/>
);
}
function getScreens_121972Render_121997(a0) { // fn#121997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4157, owner: getScreens_121972.render, offset: 0x0255724a, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...a0} {...env0_1} />)(KickConfirm);
}
function getScreens_121972Render_121999(a0) { // fn#121999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4239, owner: getScreens_121972.render, offset: 0x02557291, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...a0} {...env0_1} />)(BanConfirm);
}
function getScreens_121972Render_122000() { // fn#122000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4415, owner: getScreens_121972.render, offset: 0x025572d8, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(GuildSettingsModalBans);
}
function getScreens_121972Render_122001(a0) { // fn#122001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4606, owner: getScreens_121972.render, offset: 0x02557315, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['guildId']: env0_0}} />)(GuildSettingsModalCommunity);
}
function getScreens_121972Render_122002(a0) { // fn#122002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4783, owner: getScreens_121972.render, offset: 0x02557356, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...a0} {...env0_1} />)(GuildSettingsModalCommunityIntro);
}
function getScreens_121972Render_122003() { // fn#122003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4899, owner: getScreens_121972.render, offset: 0x0255739d, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(GuildSettingsRoleSubscriptionsEmpty);
}
function getScreens_121972Render_122004() { // fn#122004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5026, owner: getScreens_121972.render, offset: 0x025573cf, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(GuildSettingsRoleSubscriptionsEnableMonetization);
}
function getScreens_121972Render_122005() { // fn#122005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5139, owner: getScreens_121972.render, offset: 0x02557401, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(GuildSettingsRoleSubscriptionsGroupEdit);
}
function getScreens_121972Render_122006() { // fn#122006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5249, owner: getScreens_121972.render, offset: 0x02557433, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(GuildSettingsRoleSubscriptionTiers);
}
function getScreens_121972Render_122007(a0) { // fn#122007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5366, owner: getScreens_121972.render, offset: 0x02557465, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['guildId']: env0_0}} />)(GuildSettingsRoleSubscriptionTierEdit);
}
function getScreens_121972Render_122008() { // fn#122008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5483, owner: getScreens_121972.render, offset: 0x025574a6, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(GuildSettingsRoleSubscriptionsPayments);
}
function getScreens_121972Render_122009() { // fn#122009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5594, owner: getScreens_121972.render, offset: 0x025574d8, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(GuildSettingsRoleSubscriptionEmojis);
}
function getScreens_121972Render_122010(a0) { // fn#122010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5725, owner: getScreens_121972.render, offset: 0x0255750a, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['guildId']: env0_0}} />)(GuildSettingsRoleSubscriptionTierTemplateSelection);
}
function getScreens_121972Render_122011() { // fn#122011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5832, owner: getScreens_121972.render, offset: 0x0255754b, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(GuildSettingsModalOfficialMessages);
}
}
}
function _fun122012() { // fn#122012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5896, offset: 0x0255757d, size: 66 bytes, params: 1, frame: 12
var value;
if (!(env0_1 != null && guild != null)) {
value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.close();
}
}
function _fun122014({navigation}) { // fn#122014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:6020, offset: 0x025575d4, size: 57 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
const saveRouteStack = value.saveRouteStack;
const getState = navigation.getState;
Reflect.apply(saveRouteStack, value, [Reflect.apply(getState, navigation, [])]);
}
function _fun122012() { // fn#122012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5896, offset: 0x0255757d, size: 66 bytes, params: 1, frame: 12
var value;
if (!(env0_1 != null && guild != null)) {
value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.close();
}
}
function _fun122014({navigation}) { // fn#122014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:6020, offset: 0x025575d4, size: 57 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
const saveRouteStack = value.saveRouteStack;
const getState = navigation.getState;
Reflect.apply(saveRouteStack, value, [Reflect.apply(getState, navigation, [])]);
}
function getScreens_121972(a0, a1) { // fn#121972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:520, offset: 0x02556017, size: 3191 bytes, params: 3, frame: 22
const env0_0 = a0;
let object2 = {};
object2.contentContainerStyle = {paddingBottom: 16 + a1};
object2 = {};
const LANDING = GuildSettingsSections.LANDING;
const object6 = {};
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const GUILD_SETTINGS_LANDING = ImpressionNames.GUILD_SETTINGS_LANDING;
object6.impressionName = GUILD_SETTINGS_LANDING;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object6.title = Reflect.apply(string, intl, [t['154/bL']]);
object6.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(close_121967);
object6.render = render_121973;
object2[LANDING] = object6;
const OVERVIEW = GuildSettingsSections.OVERVIEW;
const object7 = {};
const GUILD_SETTINGS_OVERVIEW = ImpressionNames.GUILD_SETTINGS_OVERVIEW;
object7.impressionName = GUILD_SETTINGS_OVERVIEW;
object7.title = intl.string(t['/dp6yY']);
object7.render = render_121974;
object2[OVERVIEW] = object7;
const MODERATION = GuildSettingsSections.MODERATION;
const object8 = {};
const GUILD_SETTINGS_MODERATION = ImpressionNames.GUILD_SETTINGS_MODERATION;
object8.impressionName = GUILD_SETTINGS_MODERATION;
object8.title = intl.string(t['5tbTdV']);
object8.render = render_121975;
object2[MODERATION] = object8;
const AUDIT_LOG = GuildSettingsSections.AUDIT_LOG;
const GUILD_SETTINGS_AUDIT_LOG = ImpressionNames.GUILD_SETTINGS_AUDIT_LOG;
string = intl.string;
const SPWLyT = t.SPWLyT;
object2[AUDIT_LOG] = {impressionName: GUILD_SETTINGS_AUDIT_LOG, title: Reflect.apply(string, intl, [SPWLyT]),
postponeRender: true, render: render_121976};
const AUDIT_LOG_FILTER = GuildSettingsSections.AUDIT_LOG_FILTER;
object2[AUDIT_LOG_FILTER] = {title: intl.string(t.pEasFX), render: render_121977};
const INTEGRATIONS = GuildSettingsSections.INTEGRATIONS;
let GUILD_SETTINGS_INTEGRATION = ImpressionNames.GUILD_SETTINGS_INTEGRATION;
string = intl.string;
let CIsNZw = t.CIsNZw;
object2[INTEGRATIONS] = {impressionName: GUILD_SETTINGS_INTEGRATION, title: Reflect.apply(string, intl, [CIsNZw]),
render: render_121978};
const EMOJI = GuildSettingsSections.EMOJI;
const GUILD_SETTINGS_EMOJI = ImpressionNames.GUILD_SETTINGS_EMOJI;
object2[EMOJI] = {impressionName: GUILD_SETTINGS_EMOJI, title: intl.string(t.sMOuuS), postponeRender: true,
render: render_121979};
const STICKERS = GuildSettingsSections.STICKERS;
const GUILD_SETTINGS_STICKERS = ImpressionNames.GUILD_SETTINGS_STICKERS;
string = intl.string;
const R5nQkS = t.R5nQkS;
object2[STICKERS] = {impressionName: GUILD_SETTINGS_STICKERS, title: Reflect.apply(string, intl, [R5nQkS]),
postponeRender: true, render: render_121980};
const WEBHOOKS = GuildSettingsSections.WEBHOOKS;
let GUILD_SETTINGS_WEBHOOKS = ImpressionNames.GUILD_SETTINGS_WEBHOOKS;
object2[WEBHOOKS] = {impressionName: GUILD_SETTINGS_WEBHOOKS, title: intl.string(t.jp25Id), render: render_121981};
const EDIT_WEBHOOK = GuildSettingsSections.EDIT_WEBHOOK;
const object9 = {};
object9.title = intl.string(t['6SE3L3']);
object9.render = render_121982;
object2[EDIT_WEBHOOK] = object9;
const CHANNELS_FOLLOWED = GuildSettingsSections.CHANNELS_FOLLOWED;
GUILD_SETTINGS_WEBHOOKS = ImpressionNames.GUILD_SETTINGS_WEBHOOKS;
string = intl.string;
const OrV60r = t.OrV60r;
object2[CHANNELS_FOLLOWED] = {impressionName: GUILD_SETTINGS_WEBHOOKS, title: Reflect.apply(string, intl, [OrV60r]),
render: render_121983};
const INTEGRATION_SETTINGS = GuildSettingsSections.INTEGRATION_SETTINGS;
GUILD_SETTINGS_INTEGRATION = ImpressionNames.GUILD_SETTINGS_INTEGRATION;
object2[INTEGRATION_SETTINGS] = {impressionName: GUILD_SETTINGS_INTEGRATION, title: intl.string(t.sE5hSZ),
render: render_121984};
const INTEGRATION_PLATFORM = GuildSettingsSections.INTEGRATION_PLATFORM;
string = intl.string;
CIsNZw = t.CIsNZw;
object2[INTEGRATION_PLATFORM] = {title: Reflect.apply(string, intl, [CIsNZw]), render: render_121985};
const LOBBIES_LINKED = GuildSettingsSections.LOBBIES_LINKED;
object2[LOBBIES_LINKED] = {title: intl.string(t.tqtDXC), render: render_121986};
const EDIT_LINKED_LOBBY = GuildSettingsSections.EDIT_LINKED_LOBBY;
string = intl.string;
const OJknhi = t.OJknhi;
object2[EDIT_LINKED_LOBBY] = {title: Reflect.apply(string, intl, [OJknhi]), render: render_121987};
const CHANNELS = GuildSettingsSections.CHANNELS;
const GUILD_SETTINGS_CHANNELS = ImpressionNames.GUILD_SETTINGS_CHANNELS;
string = intl.string;
const OGiMXJ = t.OGiMXJ;
object2[CHANNELS] = {impressionName: GUILD_SETTINGS_CHANNELS, title: Reflect.apply(string, intl, [OGiMXJ]),
postponeRender: true, render: render_121988};
const SECURITY = GuildSettingsSections.SECURITY;
const GUILD_SETTINGS_SECURITY = ImpressionNames.GUILD_SETTINGS_SECURITY;
string = intl.string;
const Am9YHi = t.Am9YHi;
object2[SECURITY] = {impressionName: GUILD_SETTINGS_SECURITY, title: Reflect.apply(string, intl, [Am9YHi]),
render: render_121989};
const ROLES = GuildSettingsSections.ROLES;
const object10 = {};
const GUILD_SETTINGS_ROLES = ImpressionNames.GUILD_SETTINGS_ROLES;
object10.impressionName = GUILD_SETTINGS_ROLES;
object10.title = intl.string(t['LPJmL/']);
object10.render = render_121990;
object2[ROLES] = object10;
const ROLE_EDIT_REFRESH = GuildSettingsSections.ROLE_EDIT_REFRESH;
const object11 = {};
object11.title = intl.string(t['LPJmL/']);
object11.render = render_121991;
object2[ROLE_EDIT_REFRESH] = object11;
const VANITY_URL = GuildSettingsSections.VANITY_URL;
const object13 = {};
object13.title = intl.string(t['5XZKy/']);
object13.render = render_121992;
object2[VANITY_URL] = object13;
const INSTANT_INVITES = GuildSettingsSections.INSTANT_INVITES;
const GUILD_SETTINGS_INVITES = ImpressionNames.GUILD_SETTINGS_INVITES;
object2[INSTANT_INVITES] = {impressionName: GUILD_SETTINGS_INVITES, title: intl.string(t.ngRFjZ),
postponeRender: true, render: render_121993};
const MEMBERS = GuildSettingsSections.MEMBERS;
const object14 = {};
const GUILD_SETTINGS_MEMBERS = ImpressionNames.GUILD_SETTINGS_MEMBERS;
object14.impressionName = GUILD_SETTINGS_MEMBERS;
object14.title = intl.string(t['9Oq93m']);
object14.postponeRender = true;
object14.render = render_121994;
object2[MEMBERS] = object14;
const MEMBER_EDIT = GuildSettingsSections.MEMBER_EDIT;
object2[MEMBER_EDIT] = {render: render_121995};
const MEMBER_KICK = GuildSettingsSections.MEMBER_KICK;
object2[MEMBER_KICK] = {headerTitle: function() {
return null;
}, render: render_121997};
const MEMBER_BAN = GuildSettingsSections.MEMBER_BAN;
object2[MEMBER_BAN] = {headerTitle: function() {
return null;
}, render: render_121999};
const BANS = GuildSettingsSections.BANS;
const GUILD_SETTINGS_BANS = ImpressionNames.GUILD_SETTINGS_BANS;
string = intl.string;
const ZbeITS = t.ZbeITS;
object2[BANS] = {impressionName: GUILD_SETTINGS_BANS, title: Reflect.apply(string, intl, [ZbeITS]),
postponeRender: true, render: render_122000};
const COMMUNITY = GuildSettingsSections.COMMUNITY;
const GUILD_SETTINGS_COMMUNITY_OVERVIEW = ImpressionNames.GUILD_SETTINGS_COMMUNITY_OVERVIEW;
object2[COMMUNITY] = {impressionName: GUILD_SETTINGS_COMMUNITY_OVERVIEW, title: intl.string(t.nRtNqn),
postponeRender: true, render: render_122001};
const COMMUNITY_INTRO = GuildSettingsSections.COMMUNITY_INTRO;
const GUILD_SETTINGS_COMMUNITY_WELCOME = ImpressionNames.GUILD_SETTINGS_COMMUNITY_WELCOME;
string = intl.string;
const ElKTeb = t.ElKTeb;
object2[COMMUNITY_INTRO] = {impressionName: GUILD_SETTINGS_COMMUNITY_WELCOME, title: Reflect.apply(string, intl,
[ElKTeb]), render: render_122002};
const ROLE_SUBSCRIPTIONS = GuildSettingsSections.ROLE_SUBSCRIPTIONS;
const object15 = {};
object15.title = intl.string(t['KzCF/6']);
object15.render = render_122003;
object2[ROLE_SUBSCRIPTIONS] = object15;
const ROLE_SUBSCRIPTIONS_ENABLE_MONETIZATION = GuildSettingsSections.ROLE_SUBSCRIPTIONS_ENABLE_MONETIZATION;
const object16 = {};
object16.title = intl.string(t['KzCF/6']);
object16.render = render_122004;
object2[ROLE_SUBSCRIPTIONS_ENABLE_MONETIZATION] = object16;
const ROLE_SUBSCRIPTIONS_BASIC = GuildSettingsSections.ROLE_SUBSCRIPTIONS_BASIC;
const object17 = {};
object17.title = intl.string(t['/CfKoD']);
object17.render = render_122005;
object2[ROLE_SUBSCRIPTIONS_BASIC] = object17;
const ROLE_SUBSCRIPTIONS_TIERS = GuildSettingsSections.ROLE_SUBSCRIPTIONS_TIERS;
object2[ROLE_SUBSCRIPTIONS_TIERS] = {title: intl.string(t.pXbGYc), render: render_122006};
const ROLE_SUBSCRIPTIONS_TIER_EDIT = GuildSettingsSections.ROLE_SUBSCRIPTIONS_TIER_EDIT;
const object18 = {};
object18.title = intl.string(t['KzCF/6']);
object18.render = render_122007;
object2[ROLE_SUBSCRIPTIONS_TIER_EDIT] = object18;
const ROLE_SUBSCRIPTIONS_PAYMENTS = GuildSettingsSections.ROLE_SUBSCRIPTIONS_PAYMENTS;
object2[ROLE_SUBSCRIPTIONS_PAYMENTS] = {title: intl.string(t.p2Rsdl), render: render_122008};
const ROLE_SUBSCRIPTIONS_EMOJIS = GuildSettingsSections.ROLE_SUBSCRIPTIONS_EMOJIS;
string = intl.string;
const C5Dbwn = t.C5Dbwn;
object2[ROLE_SUBSCRIPTIONS_EMOJIS] = {title: Reflect.apply(string, intl, [C5Dbwn]), render: render_122009};
const ROLE_SUBSCRIPTIONS_TIER_TEMPLATE_SELECTION = GuildSettingsSections.ROLE_SUBSCRIPTIONS_TIER_TEMPLATE_SELECTION;
const object19 = {};
object19.title = intl.string(t['KzCF/6']);
object19.render = render_122010;
object2[ROLE_SUBSCRIPTIONS_TIER_TEMPLATE_SELECTION] = object19;
const OFFICIAL_MESSAGES = GuildSettingsSections.OFFICIAL_MESSAGES;
object2[OFFICIAL_MESSAGES] = {title: intl.string(t.xHEzFh), render: render_122011};
return object2;
}
function getScreens_121972Render() { // fn#121973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:780, owner: getScreens_121972.render, offset: 0x02556c8e, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(importDefault(15859) /* metro dependency 15859: GuildSettingsModalLanding */);
}
function getScreens_121972Render_121974() { // fn#121974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:945, owner: getScreens_121972.render, offset: 0x02556ccb, size: 53 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...env0_1} />)(importDefault(15872) /* metro dependency 15872: GuildSettingsModalOverview */);
}
function getScreens_121972Render_121975() { // fn#121975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:1104, owner: getScreens_121972.render, offset: 0x02556d00, size: 53 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...env0_1} />)(importDefault(15876) /* metro dependency 15876: GuildSettingsModalModeration */);
}
function getScreens_121972Render_121976() { // fn#121976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:1276, owner: getScreens_121972.render, offset: 0x02556d35, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(importDefault(15877) /* metro dependency 15877: GuildSettingsModalAuditLog */);
}
function getScreens_121972Render_121977(a0) { // fn#121977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:1383, owner: getScreens_121972.render, offset: 0x02556d72, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...a0} {...env0_1} />)(importDefault(15887) /* metro dependency 15887: GuildSettingsModalAuditLogFilter */);
}
function getScreens_121972Render_121978() { // fn#121978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:1556, owner: getScreens_121972.render, offset: 0x02556db9, size: 53 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...env0_1} />)(importDefault(15902) /* metro dependency 15902: GuildSettingsModalIntegrations */);
}
function getScreens_121972Render_121979() { // fn#121979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:1720, owner: getScreens_121972.render, offset: 0x02556dee, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(importDefault(15903) /* metro dependency 15903: GuildSettingsModalEmoji */);
}
function getScreens_121972Render_121980() { // fn#121980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:1900, owner: getScreens_121972.render, offset: 0x02556e2b, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(importDefault(15915) /* metro dependency 15915: GuildSettingsModalStickers */);
}
function getScreens_121972Render_121981() { // fn#121981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2062, owner: getScreens_121972.render, offset: 0x02556e68, size: 76 bytes, params: 1, frame: 16
const IntegrationsSettingsWebhooksOverview = importDefault(15203) /* metro dependency 15203: IntegrationsSettingsWebhooksOverview */;
const binding = env0_0;
const INCOMING = WebhookTypes.INCOMING;
return (
<IntegrationsSettingsWebhooksOverview
guildId={binding}
webhookType={INCOMING}
{...env0_1}
/>
);
}
function getScreens_121972Render_121982(a0) { // fn#121982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2191, owner: getScreens_121972.render, offset: 0x02556eb4, size: 63 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...env0_1} />)(importDefault(15210) /* metro dependency 15210: IntegrationsSettingsEditWebhook */);
}
function getScreens_121972Render_121983() { // fn#121983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2356, owner: getScreens_121972.render, offset: 0x02556ef3, size: 76 bytes, params: 1, frame: 16
const IntegrationsSettingsWebhooksOverview = importDefault(15203) /* metro dependency 15203: IntegrationsSettingsWebhooksOverview */;
const binding = env0_0;
const CHANNEL_FOLLOWER = WebhookTypes.CHANNEL_FOLLOWER;
return (
<IntegrationsSettingsWebhooksOverview
guildId={binding}
webhookType={CHANNEL_FOLLOWER}
{...env0_1}
/>
);
}
function getScreens_121972Render_121984(a0) { // fn#121984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2564, owner: getScreens_121972.render, offset: 0x02556f3f, size: 63 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...env0_1} />)(importDefault(15927) /* metro dependency 15927: GuildSettingsModalIntegrationSettings */);
}
function getScreens_121972Render_121985(a0) { // fn#121985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2669, owner: getScreens_121972.render, offset: 0x02556f7e, size: 78 bytes, params: 2, frame: 15
const GuildSettingsModalIntegrationPlatform = importDefault(15931) /* metro dependency 15931: GuildSettingsModalIntegrationPlatform */;
const defaultImportProps = {...a0};
const close_121967Binding = close_121967;
defaultImportProps['closeGuildSettings'] = close_121967Binding;
copyDataProperties(defaultImportProps, env0_1, close_121967Binding);
return <GuildSettingsModalIntegrationPlatform {...defaultImportProps} />;
}
function getScreens_121972Render_121986() { // fn#121986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2793, owner: getScreens_121972.render, offset: 0x02556fcc, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(importDefault(15933) /* metro dependency 15933: GuildSettingsModalLobbiesLinked */);
}
function getScreens_121972Render_121987(a0) { // fn#121987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:2901, owner: getScreens_121972.render, offset: 0x02557009, size: 63 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...env0_1} />)(importDefault(15212) /* metro dependency 15212: IntegrationsSettingsEditLinkedLobby */);
}
function getScreens_121972Render_121988() { // fn#121988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3075, owner: getScreens_121972.render, offset: 0x02557048, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(importDefault(15934) /* metro dependency 15934: GuildSettingsModalChannels */);
}
function getScreens_121972Render_121989() { // fn#121989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3237, owner: getScreens_121972.render, offset: 0x02557085, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(importDefault(15939) /* metro dependency 15939: GuildSettingsModalSecurity */);
}
function getScreens_121972Render_121990() { // fn#121990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3396, owner: getScreens_121972.render, offset: 0x025570c2, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(importDefault(15940) /* metro dependency 15940: GuildSettingsRoles */);
}
function getScreens_121972Render_121991(a0) { // fn#121991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3507, owner: getScreens_121972.render, offset: 0x025570ff, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...a0} {...env0_1} />)(importDefault(15960) /* metro dependency 15960: GuildSettingsRoleEdit */);
}
function getScreens_121972Render_121992() { // fn#121992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3615, owner: getScreens_121972.render, offset: 0x02557146, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(importDefault(15979) /* metro dependency 15979: GuildSettingsModalVanityURL */);
}
function getScreens_121972Render_121993() { // fn#121993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3801, owner: getScreens_121972.render, offset: 0x02557183, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(importDefault(15983) /* metro dependency 15983: GuildSettingsModalInstantInvites */);
}
function getScreens_121972Render_121994() { // fn#121994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:3982, owner: getScreens_121972.render, offset: 0x025571c0, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(importDefault(15986) /* metro dependency 15986: GuildSettingsModalMembersWrapper */);
}
function getScreens_121972Render_121995(a0) { // fn#121995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4040, owner: getScreens_121972.render, offset: 0x025571fd, size: 77 bytes, params: 2, frame: 15
const GuildSettingsModalMemberEditScene = (require(10296) /* metro dependency 10296: GuildSettingsModalMemberEdit */).GuildSettingsModalMemberEditScene;
return (
<GuildSettingsModalMemberEditScene
guildId={env0_0}
{...a0}
{...env0_1}
/>
);
}
function getScreens_121972Render_121997(a0) { // fn#121997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4157, owner: getScreens_121972.render, offset: 0x0255724a, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...a0} {...env0_1} />)(importDefault(10311) /* metro dependency 10311: KickConfirm */);
}
function getScreens_121972Render_121999(a0) { // fn#121999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4239, owner: getScreens_121972.render, offset: 0x02557291, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...a0} {...env0_1} />)(importDefault(10313) /* metro dependency 10313: BanConfirm */);
}
function getScreens_121972Render_122000() { // fn#122000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4415, owner: getScreens_121972.render, offset: 0x025572d8, size: 61 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...env0_1} />)(importDefault(15987) /* metro dependency 15987: GuildSettingsModalBans */);
}
function getScreens_121972Render_122001(a0) { // fn#122001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4606, owner: getScreens_121972.render, offset: 0x02557315, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['guildId']: env0_0}} />)(importDefault(15992) /* metro dependency 15992: GuildSettingsModalCommunity */);
}
function getScreens_121972Render_122002(a0) { // fn#122002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4783, owner: getScreens_121972.render, offset: 0x02557356, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} {...a0} {...env0_1} />)(importDefault(15993) /* metro dependency 15993: GuildSettingsModalCommunityIntro */);
}
function getScreens_121972Render_122003() { // fn#122003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:4899, owner: getScreens_121972.render, offset: 0x0255739d, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(importDefault(16015) /* metro dependency 16015: GuildSettingsRoleSubscriptionsEmpty */);
}
function getScreens_121972Render_122004() { // fn#122004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5026, owner: getScreens_121972.render, offset: 0x025573cf, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(importDefault(16055) /* metro dependency 16055: GuildSettingsRoleSubscriptionsEnableMonetization */);
}
function getScreens_121972Render_122005() { // fn#122005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5139, owner: getScreens_121972.render, offset: 0x02557401, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(importDefault(16056) /* metro dependency 16056: GuildSettingsRoleSubscriptionsGroupEdit */);
}
function getScreens_121972Render_122006() { // fn#122006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5249, owner: getScreens_121972.render, offset: 0x02557433, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(importDefault(16072) /* metro dependency 16072: GuildSettingsRoleSubscriptionTiers */);
}
function getScreens_121972Render_122007(a0) { // fn#122007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5366, owner: getScreens_121972.render, offset: 0x02557465, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['guildId']: env0_0}} />)(importDefault(16111) /* metro dependency 16111: GuildSettingsRoleSubscriptionTierEdit */);
}
function getScreens_121972Render_122008() { // fn#122008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5483, owner: getScreens_121972.render, offset: 0x025574a6, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(importDefault(16115) /* metro dependency 16115: GuildSettingsRoleSubscriptionsPayments */);
}
function getScreens_121972Render_122009() { // fn#122009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5594, owner: getScreens_121972.render, offset: 0x025574d8, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(importDefault(16116) /* metro dependency 16116: GuildSettingsRoleSubscriptionEmojis */);
}
function getScreens_121972Render_122010(a0) { // fn#122010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5725, owner: getScreens_121972.render, offset: 0x0255750a, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['guildId']: env0_0}} />)(importDefault(16119) /* metro dependency 16119: GuildSettingsRoleSubscriptionTierTemplateSelection */);
}
function getScreens_121972Render_122011() { // fn#122011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16065:5832, owner: getScreens_121972.render, offset: 0x0255754b, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guildId={env0_0} />)(importDefault(16127) /* metro dependency 16127: GuildSettingsModalOfficialMessages */);
}
global.__d(_fun121966, 15857, [57, 31, 1867, 9113, 661, 33, 15858, 9112, 480, 1244, 5282, 15859, 15872, 15876,
15877, 15887, 15902, 15903, 15915, 15203, 15210, 15927, 15931, 15933, 15212, 15934, 15939, 15940, 15960, 15979,
15983, 15986, 10296, 10311, 10313, 15987, 15992, 15993, 16015, 16055, 16056, 16072, 16111, 16115, 16116, 16119,
16127, 1585, 6518, 566, 5280,
2]) /* metro module 15857, dependencies: [57, 31, 1867, 9113, 661, 33, 15858, 9112, 480, 1244, 5282, 15859, 15872, 15876, 15877, 15887, 15902, 15903, 15915, 15203, 15210, 15927, 15931, 15933, 15212, 15934, 15939, 15940, 15960, 15979, 15983, 15986, 10296, 10311, 10313, 15987, 15992, 15993, 16015, 16055, 16056, 16072, 16111, 16115, 16116, 16119, 16127, 1585, 6518, 566, 5280, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,285 +1,321 @@
/* Metro module 15903; source: modules/guild_settings/native/GuildSettingsModalEmoji.tsx; dependencies: [57, 31, 27, 1867, 15904, 33, 22, 8629, 4501, 697, 1244, 6545, 8249, 566, 9077, 4573, 15906, 15910, 1305, 15911, 5461, 5462, 1484, 5282, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildSettingsEmojiStore from '../GuildSettingsEmojiStore.tsx'; /* Metro dependency 15904 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as NavigatorHeaderNativeModule from '../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
import * as NavScrimAndroidModule from '../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
import * as GuildBoostingUtilsModule from '../../../utils/GuildBoostingUtils.tsx'; /* Metro dependency 8249 */
import * as EmojiActionCreatorsModule from '../../../actions/EmojiActionCreators.tsx'; /* Metro dependency 8629 */
import * as UseManageResourcePermissionsModule from '../../permissions/useManageResourcePermissions.tsx'; /* Metro dependency 9077 */
import * as HeaderRowModule from './GuildSettingsModalEmoji/HeaderRow.tsx'; /* Metro dependency 15910 */
import * as EmptyServerSettingsEmojiModule from '../../../design/components/Illustration/native/redesign/generated/EmptyServerSettingsEmoji.tsx'; /* Metro dependency 15911 */
function _fun122689(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:6, offset: 0x02571329, size: 520 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const closure = ManageEmojisModal;
const ManageEmojisModal2 = ManageEmojisModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.FlatList;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildSettingsEmojiStore = importDefault(15904) /* metro dependency 15904: GuildSettingsEmojiStore */;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const env0_11 = value.Fragment;
value = importDefault(22) /* metro dependency 22 */;
const env0_12 = value.throttle((require(8629) /* metro dependency 8629: EmojiActionCreators */).fetchEmoji, 1000);
const env0_12 = value.throttle((EmojiActionCreatorsModule).fetchEmoji, 1000);
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {loadingContainer: {'flex': 1, 'paddingTop': 40}};
object2.emptyState = {paddingTop: 30};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.list = {paddingHorizontal: PX_12};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.section = {paddingVertical: PX_16};
object2.titleContainer = {'paddingLeft': 16, 'paddingRight': 16};
const env0_13 = Reflect.apply(createStyles, value, [object2]);
const closure2 = computeSectionItem;
object = {loadingContainer: {'flex': 1, 'paddingTop': 40}};
object.emptyState = {paddingTop: 30};
const PX_12 = (Native).space.PX_12;
object.list = {paddingHorizontal: PX_12};
const PX_16 = (Native).space.PX_16;
object.section = {paddingVertical: PX_16};
object.titleContainer = {'paddingLeft': 16, 'paddingRight': 16};
const env0_13 = Reflect.apply(createStyles, value, [object]);
const computeSectionItem2 = computeSectionItem;
const closure3 = function(a0) {
return {type: 'EMOJI', key: a0.id, emoji: a0};
};
const env0_16 = (importDefault(22) /* metro dependency 22 */).memoize(_fun122700);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalEmoji.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalEmoji.tsx');
exports.default = GuildSettingsModalEmoji;
exports.computeSectionItem = closure2;
exports.computeSectionItem = computeSectionItem2;
exports.computeEmojiItem = closure3;
exports.ManageEmojisModal = closure;
}
exports.ManageEmojisModal = ManageEmojisModal2;
function ManageEmojisModal({computeEmojiItems, contentContainerStyle, disabled, guild, headerDescription, onSelectRolesForEmoji}) { // fn#122690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:1150, offset: 0x02571531, size: 689 bytes, params: 2, frame: 27
var r0;
disabled = !(disabled === undefined) && disabled;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsEmojiStore],
function() {
var object = {};
var guildSettingsEmojiStoreBinding = GuildSettingsEmojiStore;
var guildBinding = guild;
object.emojis = guildSettingsEmojiStoreBinding.getEmojis(guildBinding.id);
object.revision = GuildSettingsEmojiStore.getEmojiRevision(guildBinding.id);
return object;
});
const emojis = value4.emojis;
const emojis2 = emojis;
const revision = value4.revision;
const useManageResourcePermissions = UseManageResourcePermissionsModule.useManageResourcePermissions;
const canManageGuildExpression = Reflect.apply(useManageResourcePermissions, UseManageResourcePermissionsModule,
[guild]).canManageGuildExpression;
const emojiItems = computeEmojiItems(emojis ?? [], guild);
const styles = useStyles();
let binding = emojis2;
const env0_9 = binding.useRef(revision);
emojis2.useEffect(_fun122692, [guild.id]);
emojis2.useEffect(_fun122693, [guild.id, revision]);
binding = emojis2;
let useCallback = binding.useCallback;
const value5 = Reflect.apply(useCallback, binding, [_fun122694, [guild.id, disabled, emojiItems, styles,
onSelectRolesForEmoji, canManageGuildExpression]]);
binding = emojis2;
useCallback = binding.useCallback;
items = [guild];
items[1] = emojis?.length;
items[2] = headerDescription;
items[3] = onSelectRolesForEmoji;
items[4] = disabled;
const value6 = Reflect.apply(useCallback, binding, [_fun122695, items]);
binding = emojis2;
useCallback = binding.useCallback;
if (emojis == null) {
r0 = (
<View style={styles.loadingContainer}>
{((ActivityIndicator) => <ActivityIndicator />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}
{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}
</View>
);
} else {
r0 = (
<FlatList
initialNumToRender={12}
ListHeaderComponent={value6}
ListEmptyComponent={Reflect.apply(useCallback, binding, [_fun122696, [styles]])}
windowSize={4}
data={emojiItems}
keyExtractor={emojis2.useCallback(function(a0) {
return a0.key;
}, [])}
renderItem={value5}
contentContainerStyle={[contentContainerStyle, styles.list]}
/>
);
}
return r0;
function _fun122692() { // fn#122692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:1549, offset: 0x02571826, size: 28 bytes, params: 1, frame: 11
env1_12(guild.id);
}
function _fun122693() { // fn#122693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:1585, offset: 0x02571842, size: 61 bytes, params: 1, frame: 12
var value2;
if (env0_9.current < revision) {
value2 = environment.__proto__;
env1_12(guild.id);
}
env0_9.current = revision;
}
function _fun122694({item, index}) { // fn#122694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:1656, offset: 0x0257187f, size: 347 bytes, params: 2, frame: 21
var r5;
var r9;
var value;
var binding;
var property;
var value2;
var value5;
var EmojiRow;
var object;
var Text;
var section;
let type = item.type;
if (type === 'SECTION') {
value = environment.__proto__;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
object = {'style': null, 'variant': 'text-xs/bold', 'color': 'text-default'};
section = styles.section;
object.style = section;
section = item.section;
return (
<Text {...object}>
{section}
</Text>
);
}
if (type === 'EMOJI') {
binding = env0_7;
property = binding[index - 1];
value2 = undefined;
type = property == null ? value2 : property.type;
binding = env0_7;
property = binding[index + 1];
r5 = (property == null ? value2 : property.type) === 'SECTION' || index === env0_7.length - 1;
value5 = environment.__proto__;
EmojiRow = (require(15906) /* metro dependency 15906: EmojiRow */).EmojiRow;
var emojiRowProps = {emoji: item.emoji, guildId: guild.id};
r9 = disabled || !item.emoji.available;
r9 = !r9 ? !canManageGuildExpression(item.emoji) : r9;
emojiRowProps.disabled = r9;
emojiRowProps.onSelectRolesForEmoji = onSelectRolesForEmoji;
emojiRowProps.start = type === 'SECTION';
emojiRowProps.end = r5;
return <EmojiRow {...emojiRowProps} />;
}
return null;
}
function _fun122695() { // fn#122695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:2142, offset: 0x025719da, size: 123 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = undefined;
const ConnectedHeaderRow = (HeaderRowModule).ConnectedHeaderRow;
return (
<ConnectedHeaderRow
guild={guild}
emojisLength={(emojis == null ? value : emojis.length) ?? 0}
description={headerDescription}
onSelectRolesForEmoji={onSelectRolesForEmoji}
uploadDisabled={disabled}
/>
);
}
function _fun122696() { // fn#122696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:2361, offset: 0x02571a55, size: 188 bytes, params: 1, frame: 19
const EmptyState = (NativeModule).EmptyState;
const object = {};
const EmptyServerSettingsEmoji = (EmptyServerSettingsEmojiModule).EmptyServerSettingsEmoji;
object.Illustration = EmptyServerSettingsEmoji;
object.style = styles.emptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.lxsmBd]);
string = intl.string;
const RBbtMy = (require(1244) /* metro dependency 1244: indexNative */).t.RBbtMy;
object.body = Reflect.apply(string, intl, [RBbtMy]);
return <EmptyState {...object} />;
}
function ManageEmojisModal({computeEmojiItems, contentContainerStyle, disabled, guild, headerDescription, onSelectRolesForEmoji}) { // fn#122690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:1150, offset: 0x02571531, size: 689 bytes, params: 2, frame: 27
var r0;
disabled = !(disabled === undefined) && disabled;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsEmojiStore],
function() {
var object = {};
var guildBinding = guild;
object.emojis = GuildSettingsEmojiStore.getEmojis(guildBinding.id);
object.revision = GuildSettingsEmojiStore.getEmojiRevision(guildBinding.id);
return object;
});
const emojis = value4.emojis;
const env0_4 = emojis;
const revision = value4.revision;
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
const canManageGuildExpression = Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[guild]).canManageGuildExpression;
const emojiItems = computeEmojiItems(emojis ?? [], guild);
const styles = useStyles();
let binding = env0_4;
const env0_9 = binding.useRef(revision);
env0_4.useEffect(_fun122692, [guild.id]);
env0_4.useEffect(_fun122693, [guild.id, revision]);
binding = env0_4;
let useCallback = binding.useCallback;
const value5 = Reflect.apply(useCallback, binding, [_fun122694, [guild.id, disabled, emojiItems, styles,
onSelectRolesForEmoji, canManageGuildExpression]]);
binding = env0_4;
useCallback = binding.useCallback;
items = [guild];
items[1] = emojis?.length;
items[2] = headerDescription;
items[3] = onSelectRolesForEmoji;
items[4] = disabled;
const value6 = Reflect.apply(useCallback, binding, [_fun122695, items]);
binding = env0_4;
useCallback = binding.useCallback;
if (emojis == null) {
r0 = <View style={styles.loadingContainer}>{((ActivityIndicator) => <ActivityIndicator />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}</View>;
} else {
r0 = <FlatList initialNumToRender={12} ListHeaderComponent={value6} ListEmptyComponent={Reflect.apply(useCallback,
binding, [_fun122696,
[styles]])} windowSize={4} data={emojiItems} keyExtractor={env0_4.useCallback(function(a0) {
return a0.key;
}, [])} renderItem={value5} contentContainerStyle={[contentContainerStyle, styles.list]} />;
}
return r0;
}
function computeSectionItem(a0, a1, a2) { // fn#122698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:502, offset: 0x02571b11, size: 162 bytes, params: 4, frame: 18
const Math = global.Math;
let value = Math.max(a2 - a1, 0);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.sgL8sI, {count: value});
value = '' + a0 + ' - ' + value;
value = value.toUpperCase();
return {type: 'SECTION', key: value, section: value};
}
function _fun122700(a0, a1) { // fn#122700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:738, offset: 0x02571bd0, size: 380 bytes, params: 3, frame: 23
var r1;
var items2;
var items3;
const env0_0 = a1;
let value = a0.filter(_fun122701);
value = value.map(computeEmojiItem);
value = value.reverse();
const maxEmojiSlots = require(dependencyMap[12]).getMaxEmojiSlots(a1);
value = importDefault(dependencyMap[6]).partition(value, function(a0) {
return !a0.emoji.animated;
});
value = env0_3(value, 2);
const property = value[0];
const property2 = value[1];
const computeSectionItemBinding = computeSectionItem;
const intl = require(dependencyMap[10]).intl;
const string = intl.string;
const t = require(dependencyMap[10]).t;
value = Reflect.apply(string, intl, [t.sMOuuS]);
value = computeSectionItemBinding(value, property.length, maxEmojiSlots);
const sectionItem = computeSectionItemBinding(intl.string(t.wWjQye), property2.length, maxEmojiSlots);
if (property.length > 0) {
items2 = [value];
arraySpread(items2, property, 1, dependencyMap);
r1 = items2;
} else {
r1 = [];
function computeSectionItem(a0, a1, a2) { // fn#122698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:502, offset: 0x02571b11, size: 162 bytes, params: 4, frame: 18
const Math = global.Math;
let value = Math.max(a2 - a1, 0);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.sgL8sI, {count: value});
value = '' + a0 + ' - ' + value;
value = value.toUpperCase();
return {type: 'SECTION', key: value, section: value};
}
items2 = [];
value = arraySpread(items2, r1, 0, dependencyMap);
if (property2.length > 0) {
items3 = [sectionItem];
arraySpread(items3, property2, 1, dependencyMap);
r1 = items3;
} else {
r1 = [];
function _fun122700(a0, a1) { // fn#122700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:738, offset: 0x02571bd0, size: 380 bytes, params: 3, frame: 23
var r1;
var items2;
var items3;
const env0_0 = a1;
let value = a0.filter(_fun122701);
value = value.map(computeEmojiItem);
value = value.reverse();
const maxEmojiSlots = require(dependencyMap[12]).getMaxEmojiSlots(a1);
value = importDefault(dependencyMap[6]).partition(value, function(a0) {
return !a0.emoji.animated;
});
value = Module00057(value, 2);
const property = value[0];
const property2 = value[1];
const computeSectionItemBinding = computeSectionItem;
const intl = require(dependencyMap[10]).intl;
const string = intl.string;
const t = require(dependencyMap[10]).t;
value = Reflect.apply(string, intl, [t.sMOuuS]);
value = computeSectionItemBinding(value, property.length, maxEmojiSlots);
const sectionItem = computeSectionItemBinding(intl.string(t.wWjQye), property2.length, maxEmojiSlots);
if (property.length > 0) {
items2 = [value];
arraySpread(items2, property, 1, dependencyMap);
r1 = items2;
} else {
r1 = [];
}
items2 = [];
value = arraySpread(items2, r1, 0, dependencyMap);
if (property2.length > 0) {
items3 = [sectionItem];
arraySpread(items3, property2, 1, dependencyMap);
r1 = items3;
} else {
r1 = [];
}
arraySpread(items2, r1, value, dependencyMap);
return items2;
function _fun122701(a0) { // fn#122701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:762, offset: 0x02571d4c, size: 57 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
return !value.isRoleSubscriptionEmoji(a0, require.id);
}
}
arraySpread(items2, r1, value, dependencyMap);
return items2;
}
function GuildSettingsModalEmoji({guildId, contentContainerStyle, isLandingScreen}) { // fn#122703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:2954, offset: 0x02571d99, size: 373 bytes, params: 2, frame: 23
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const styles = useStyles();
styles.useLayoutEffect(_fun122705, [value2, guild, isLandingScreen, styles]);
if (guild == null) {
return null;
}
const maxEmojiSlots = (require(8249) /* metro dependency 8249: GuildBoostingUtils */).getMaxEmojiSlots(guild);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const TA1BR0 = (require(1244) /* metro dependency 1244: indexNative */).t.TA1BR0;
const value4 = Reflect.apply(formatToPlainString, intl, [TA1BR0, {count: maxEmojiSlots}]);
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const manageEmojisModal = <ManageEmojisModal guild={guild} headerDescription={value4} computeEmojiItems={env0_16} contentContainerStyle={contentContainerStyle} />;
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<>
{manageEmojisModal}
<NavScrim />
</>
);
}
function _fun122692() { // fn#122692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:1549, offset: 0x02571826, size: 28 bytes, params: 1, frame: 11
env1_12(guild.id);
}
function _fun122693() { // fn#122693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:1585, offset: 0x02571842, size: 61 bytes, params: 1, frame: 12
var value2;
if (env0_9.current < revision) {
value2 = environment.__proto__;
env1_12(guild.id);
}
env0_9.current = revision;
}
function _fun122694({item, index}) { // fn#122694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:1656, offset: 0x0257187f, size: 347 bytes, params: 2, frame: 21
var r5;
var r9;
var value;
var binding;
var property;
var value2;
var value5;
var EmojiRow;
var object2;
var Text;
var section;
let type = item.type;
if (type === 'SECTION') {
value = environment.__proto__;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
object2 = {'style': null, 'variant': 'text-xs/bold', 'color': 'text-default'};
section = styles.section;
object2.style = section;
section = item.section;
return (
<Text {...object2}>
{section}
</Text>
function GuildSettingsModalEmoji({guildId, contentContainerStyle, isLandingScreen}) { // fn#122703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:2954, offset: 0x02571d99, size: 373 bytes, params: 2, frame: 23
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const value2 = (UseNavigationNativeModule).useNavigation();
const styles = useStyles();
styles.useLayoutEffect(_fun122705, [value2, guild, isLandingScreen, styles]);
if (guild == null) {
return null;
}
const maxEmojiSlots = (GuildBoostingUtilsModule).getMaxEmojiSlots(guild);
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const TA1BR0 = (IndexNativeModule).t.TA1BR0;
const value4 = Reflect.apply(formatToPlainString, intl, [TA1BR0, {count: maxEmojiSlots}]);
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const manageEmojisModal = (
<ManageEmojisModal
guild={guild}
headerDescription={value4}
computeEmojiItems={env0_16}
contentContainerStyle={contentContainerStyle}
/>
);
const NavScrim = (NavScrimAndroidModule).NavScrim;
return (
<>
{manageEmojisModal}
<NavScrim />
</>
);
function _fun122705() { // fn#122705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:3156, offset: 0x02571f0e, size: 58 bytes, params: 1, frame: 12
var binding;
if (isLandingScreen && guild !== undefined) {
binding = Module00057;
binding.setOptions({headerTitle: headerTitle_122706});
}
function headerTitle_122706() { // fn#122706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:3202, offset: 0x02571f48, size: 95 bytes, params: 1, frame: 17
const NavigatorHeader = (NavigatorHeaderNativeModule).NavigatorHeader;
return (
<View style={styles.titleContainer}>
<NavigatorHeader title={guild.name} />
</View>
);
}
}
}
if (type === 'EMOJI') {
binding = env0_7;
property = binding[index - 1];
value2 = undefined;
type = property == null ? value2 : property.type;
binding = env0_7;
property = binding[index + 1];
r5 = (property == null ? value2 : property.type) === 'SECTION' || index === env0_7.length - 1;
value5 = environment.__proto__;
EmojiRow = (require(15906) /* metro dependency 15906: EmojiRow */).EmojiRow;
var emojiRowProps = {emoji: item.emoji, guildId: guild.id};
r9 = disabled || !item.emoji.available;
r9 = !r9 ? !canManageGuildExpression(item.emoji) : r9;
emojiRowProps.disabled = r9;
emojiRowProps.onSelectRolesForEmoji = onSelectRolesForEmoji;
emojiRowProps.start = type === 'SECTION';
emojiRowProps.end = r5;
return <EmojiRow {...emojiRowProps} />;
}
return null;
}
function _fun122695() { // fn#122695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:2142, offset: 0x025719da, size: 123 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = undefined;
const ConnectedHeaderRow = (require(15910) /* metro dependency 15910: HeaderRow */).ConnectedHeaderRow;
return (
<ConnectedHeaderRow
guild={guild}
emojisLength={(emojis == null ? value : emojis.length) ?? 0}
description={headerDescription}
onSelectRolesForEmoji={onSelectRolesForEmoji}
uploadDisabled={disabled}
/>
);
}
function _fun122696() { // fn#122696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:2361, offset: 0x02571a55, size: 188 bytes, params: 1, frame: 19
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
const object2 = {};
const EmptyServerSettingsEmoji = (require(15911) /* metro dependency 15911: EmptyServerSettingsEmoji */).EmptyServerSettingsEmoji;
object2.Illustration = EmptyServerSettingsEmoji;
object2.style = styles.emptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.lxsmBd]);
string = intl.string;
const RBbtMy = (require(1244) /* metro dependency 1244: indexNative */).t.RBbtMy;
object2.body = Reflect.apply(string, intl, [RBbtMy]);
return <EmptyState {...object2} />;
}
function _fun122701(a0) { // fn#122701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:762, offset: 0x02571d4c, size: 57 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
return !value.isRoleSubscriptionEmoji(a0, require.id);
}
function _fun122705() { // fn#122705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:3156, offset: 0x02571f0e, size: 58 bytes, params: 1, frame: 12
var binding;
if (isLandingScreen && guild !== undefined) {
binding = env0_3;
binding.setOptions({headerTitle: headerTitle_122706});
}
}
function headerTitle_122706() { // fn#122706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16111:3202, offset: 0x02571f48, size: 95 bytes, params: 1, frame: 17
const NavigatorHeader = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).NavigatorHeader;
return (
<View style={styles.titleContainer}>
<NavigatorHeader title={guild.name} />
</View>
);
}
global.__d(_fun122689, 15903, [57, 31, 27, 1867, 15904, 33, 22, 8629, 4501, 697, 1244, 6545, 8249, 566, 9077, 4573,
15906, 15910, 1305, 15911, 5461, 5462, 1484, 5282,
2]) /* metro module 15903, dependencies: [57, 31, 27, 1867, 15904, 33, 22, 8629, 4501, 697, 1244, 6545, 8249, 566, 9077, 4573, 15906, 15910, 1305, 15911, 5461, 5462, 1484, 5282, 2] */;
@@ -1,192 +1,305 @@
/* Metro module 15906; source: modules/guild_settings/native/GuildSettingsModalEmoji/EmojiRow.tsx; dependencies: [57, 31, 27, 1867, 33, 4501, 697, 477, 566, 9077, 8629, 3801, 15907, 4559, 4573, 1305, 6238, 3857, 1244, 1423, 4617, 3995, 5278, 15909, 2] */
import AvatarUtils from '../../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserUtils from '../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import NicknameUtils from '../../../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */
import ShowEmojiOverflowActionSheet from '../showEmojiOverflowActionSheet.tsx'; /* Metro dependency 15907 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as UseManageResourcePermissionsModule from '../../../permissions/useManageResourcePermissions.tsx'; /* Metro dependency 9077 */
function _fun122733(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16114:6, offset: 0x02572623, size: 611 bytes, params: 8, frame: 28
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
const value2 = undefined;
const env0_3 = importDefault(dependencyMap[value]);
const env0_4 = importAll(31) /* metro dependency 31 */;
const value3 = require(27) /* metro dependency 27 */;
const env0_5 = value3.View;
const env0_6 = value3.Image;
const env0_7 = value3.Pressable;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const value4 = 4;
const value5 = require(dependencyMap[value4]);
const env0_9 = value5.jsx;
const env0_10 = value5.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.flex = {flex: 1};
object2.flexCenterRow = {'flexDirection': 'row', 'alignItems': 'center'};
const object6 = {'paddingVertical': 4, 'borderRadius': null, 'alignItems': 'center', 'flexDirection': 'row'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.nameContainer = object6;
const object7 = {};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object7.padding = platformUtilsModule.isAndroid() ? value : value4;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object7.alignItems = 'center';
object7.flexDirection = 'row';
object2.activeNameContainer = object7;
object2.usernameContainer = {'marginRight': 8, 'maxWidth': 150, 'flexShrink': 1};
const object8 = {fontSize: 16};
const value8 = platformUtilsModule;
object8.padding = value8.isAndroid() ? value : value2;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.flex = {flex: 1};
object.flexCenterRow = {'flexDirection': 'row', 'alignItems': 'center'};
const object3 = {'paddingVertical': 4, 'borderRadius': null, 'alignItems': 'center', 'flexDirection': 'row'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.nameContainer = object3;
const object4 = {};
object4.padding = PlatformUtilsModule.isAndroid() ? value : value4;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.alignItems = 'center';
object4.flexDirection = 'row';
object.activeNameContainer = object4;
object.usernameContainer = {'marginRight': 8, 'maxWidth': 150, 'flexShrink': 1};
const object5 = {fontSize: 16};
object5.padding = PlatformUtilsModule.isAndroid() ? value : value2;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object8.color = MOBILE_TEXT_HEADING_PRIMARY;
object2.emojiText = object8;
object2.colon = {width: value4};
object5.color = MOBILE_TEXT_HEADING_PRIMARY;
object.emojiText = object5;
object.colon = {width: value4};
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.username = {fontSize: 13, color: TEXT_MUTED};
object2.emojiImage = {'width': 30, 'height': 30, 'resizeMode': 'contain'};
object.username = {fontSize: 13, color: TEXT_MUTED};
object.emojiImage = {'width': 30, 'height': 30, 'resizeMode': 'contain'};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.overflowIcon = {'paddingLeft': null, 'alignItems': 'center', 'flexDirection': 'row', 'height': '100%',
object.overflowIcon = {'paddingLeft': null, 'alignItems': 'center', 'flexDirection': 'row', 'height': '100%',
paddingLeft: PX_8};
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalEmoji/EmojiRow.tsx');
const env0_11 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalEmoji/EmojiRow.tsx');
exports.EmojiRow = EmojiRow;
return value2;
}
function EmojiRow({guildId, emoji, disabled, start, end, onSelectRolesForEmoji}) { // fn#122734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16114:1026, offset: 0x02572886, size: 1341 bytes, params: 2, frame: 44
var object2;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
var r9;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var colon;
var items3;
disabled = !(disabled === undefined) && disabled;
let env0_4 = undefined;
var value;
const styles = useStyles();
const binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [emoji.name]);
const binding2 = undefined;
const value3 = binding2(value2, 2);
const property = value3[0];
env0_4 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value4[0];
const env0_5 = value4[1];
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
const canManageGuildExpression2 = Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[guild]).canManageGuildExpression(emoji);
const value5 = binding.useCallback(_fun122737, [guildId, emoji, onSelectRolesForEmoji]);
const value6 = binding.useCallback(_fun122739, [value5]);
const value7 = binding.useCallback(_fun122740, [value5]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object2 = {};
const available = emoji.available;
let defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
const getEmojiURL = defaultImport.getEmojiURL;
object2.icon = <Pressable onPress={function() {
var defaultImport = importDefault(dependencyMap[17]);
var object = {key: 'EMOJI_DISABLED'};
object.content = require(dependencyMap[18]).intl.string(require(dependencyMap[18]).t.KUzI73);
defaultImport.open(object);
}} disabled={available}><Image style={styles.emojiImage} source={{uri: Reflect.apply(getEmojiURL, defaultImport,
[{id: emoji.id, animated: emoji.animated, size: 48}])}} /></Pressable>;
const defaultImport2 = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
const getNickname = defaultImport2.getNickname;
let user = emoji.user;
const value8 = Reflect.apply(getNickname, defaultImport2, [guildId, undefined, user]);
const r17 = value8 != null ? <LegacyText numberOfLines={1} style={styles.username}>{value8}</LegacyText> : null;
const defaultImport3 = importDefault(3995) /* metro dependency 3995: UserUtils */;
const getUserTag = defaultImport3.getUserTag;
user = emoji.user;
const items2 = [<View style={styles.usernameContainer}>{r17}<LegacyText numberOfLines={1} style={styles.username}>{Reflect.apply(getUserTag,
defaultImport3, [user])}</LegacyText></View>];
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
user = emoji.user;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
items2[1] = <Avatar user={user} guildId={guildId} size={XSMALL} />;
items2[2] = disabled ? null : ((PressableOpacity) => <PressableOpacity style={styles.overflowIcon} onPress={value5} hitSlop={8}>{((Icon) => <Icon source={importDefault(15909) /* metro dependency 15909 */} size={(require(1305) /* metro dependency 1305: native */).IconSizes.REFRESH_SMALL_16} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity);
object2.trailing = <View style={styles.flexCenterRow}>{items2}</View>;
if (property2) {
if (canManageGuildExpression2) {
r9 = <View style={styles.activeNameContainer}>{((TextInput) => <TextInput autoCorrect={false} numberOfLines={1} returnKeyType="done" autoCapitalize="none" autoFocus onBlur={onBlur_122736} style={[styles.emojiText,
styles.flex]} onChangeText={onChangeText} value={property} />)((require(1305) /* metro dependency 1305: native */).TextInput)}</View>;
function EmojiRow({guildId, emoji, disabled, start, end, onSelectRolesForEmoji}) { // fn#122734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16114:1026, offset: 0x02572886, size: 1341 bytes, params: 2, frame: 44
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
var r9;
const Text = (TextModule).Text;
var colon;
var items3;
disabled = !(disabled === undefined) && disabled;
let env0_4 = undefined;
var value;
const styles = useStyles();
const binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [emoji.name]);
const binding2 = undefined;
const value3 = binding2(value2, 2);
const property = value3[0];
env0_4 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value4[0];
const env0_5 = value4[1];
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const useManageResourcePermissions = UseManageResourcePermissionsModule.useManageResourcePermissions;
const canManageGuildExpression2 = Reflect.apply(useManageResourcePermissions, UseManageResourcePermissionsModule,
[guild]).canManageGuildExpression(emoji);
const value5 = binding.useCallback(_fun122737, [guildId, emoji, onSelectRolesForEmoji]);
const value6 = binding.useCallback(_fun122739, [value5]);
const value7 = binding.useCallback(_fun122740, [value5]);
const TableRow = (TableRowNativeModule).TableRow;
object = {};
const available = emoji.available;
let defaultImport = AvatarUtils;
const getEmojiURL = defaultImport.getEmojiURL;
object.icon = (
<Pressable
onPress={function() {
var defaultImport = importDefault(dependencyMap[17]);
var object = {key: 'EMOJI_DISABLED'};
object.content = require(dependencyMap[18]).intl.string(require(dependencyMap[18]).t.KUzI73);
defaultImport.open(object);
}}
disabled={available}
>
<Image
style={styles.emojiImage}
source={{uri: Reflect.apply(getEmojiURL, defaultImport, [{id: emoji.id, animated: emoji.animated,
size: 48}])}}
/>
</Pressable>
);
const defaultImport2 = NicknameUtils;
const getNickname = defaultImport2.getNickname;
let user = emoji.user;
const value8 = Reflect.apply(getNickname, defaultImport2, [guildId, undefined, user]);
const r17 = (
value8 != null
? (
<LegacyText numberOfLines={1} style={styles.username}>
{value8}
</LegacyText>
)
: null
);
const defaultImport3 = UserUtils;
const getUserTag = defaultImport3.getUserTag;
user = emoji.user;
const items2 = [
<View style={styles.usernameContainer}>
{r17}
<LegacyText numberOfLines={1} style={styles.username}>
{Reflect.apply(getUserTag, defaultImport3, [user])}
</LegacyText>
</View>,
];
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
user = emoji.user;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
items2[1] = (
<Avatar
user={user}
guildId={guildId}
size={XSMALL}
/>
);
items2[2] = (
disabled
? null
: ((PressableOpacity) => <PressableOpacity style={styles.overflowIcon} onPress={value5} hitSlop={8}>{((Icon) => <Icon source={importDefault(15909) /* metro dependency 15909 */} size={(require(1305) /* metro dependency 1305: native */).IconSizes.REFRESH_SMALL_16} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)
);
object.trailing = (
<View style={styles.flexCenterRow}>
{items2}
</View>
);
if (property2) {
if (canManageGuildExpression2) {
r9 = (
<View style={styles.activeNameContainer}>
{((TextInput) => <TextInput autoCorrect={false} numberOfLines={1} returnKeyType="done" autoCapitalize="none" autoFocus onBlur={onBlur_122736} style={[styles.emojiText,
styles.flex]} onChangeText={onChangeText_122741} value={property} />)((require(1305) /* metro dependency 1305: native */).TextInput)}
</View>
);
} else {
var viewBindingProps = {style: styles.nameContainer};
colon = styles.colon;
value = (
<Text
style={colon}
variant="text-md/medium"
color="text-muted"
>
{':'}
</Text>
);
items3 = [value];
items3[1] = (
<Text
lineClamp={1}
style={styles.emojiText}
variant="text-md/medium"
color="mobile-text-heading-primary"
>
{property}
</Text>
);
colon = styles.colon;
items3[2] = (
<Text
style={colon}
variant="text-md/medium"
color="text-muted"
>
{':'}
</Text>
);
value = (
<View {...viewBindingProps}>
{items3}
</View>
);
r9 = value;
}
} else {
var viewBindingProps = {style: styles.nameContainer};
colon = styles.colon;
value = <Text style={colon} variant="text-md/medium" color="text-muted">{':'}</Text>;
value = (
<Text
style={colon}
variant="text-md/medium"
color="text-muted"
>
{':'}
</Text>
);
items3 = [value];
items3[1] = <Text lineClamp={1} style={styles.emojiText} variant="text-md/medium" color="mobile-text-heading-primary">{property}</Text>;
items3[1] = (
<Text
lineClamp={1}
style={styles.emojiText}
variant="text-md/medium"
color="mobile-text-heading-primary"
>
{property}
</Text>
);
colon = styles.colon;
items3[2] = <Text style={colon} variant="text-md/medium" color="text-muted">{':'}</Text>;
value = <View {...viewBindingProps}>{items3}</View>;
items3[2] = (
<Text
style={colon}
variant="text-md/medium"
color="text-muted"
>
{':'}
</Text>
);
value = (
<View {...viewBindingProps}>
{items3}
</View>
);
r9 = value;
}
} else {
var viewBindingProps = {style: styles.nameContainer};
colon = styles.colon;
value = <Text style={colon} variant="text-md/medium" color="text-muted">{':'}</Text>;
items3 = [value];
items3[1] = <Text lineClamp={1} style={styles.emojiText} variant="text-md/medium" color="mobile-text-heading-primary">{property}</Text>;
colon = styles.colon;
items3[2] = <Text style={colon} variant="text-md/medium" color="text-muted">{':'}</Text>;
value = <View {...viewBindingProps}>{items3}</View>;
r9 = value;
object.label = r9;
object.disabled = disabled;
object.onPress = value6;
object.onLongPress = value7;
object.start = start;
object.end = end;
return <TableRow {...object} />;
function EmojiRowOnBlur() { // fn#122736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16114:1356, owner: EmojiRow.onBlur, offset: 0x02572dc3, size: 130 bytes, params: 1, frame: 16
var value2;
var moduleValue;
var updateEmoji;
var object;
if (env0_3 !== emoji.name) {
value2 = environment.__proto__;
moduleValue = require(8629) /* metro dependency 8629: EmojiActionCreators */;
updateEmoji = moduleValue.updateEmoji;
object = {};
object.guildId = guildId;
object.emojiId = emoji.id;
object.name = (importDefault(3801) /* metro dependency 3801: EmojiUtils */).sanitizeEmojiName(env0_3);
Reflect.apply(updateEmoji, moduleValue, [object]);
}
env0_5(false);
}
function _fun122737() { // fn#122737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16114:1479, offset: 0x02572e45, size: 77 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
(ShowEmojiOverflowActionSheet)({guildId: guildId, emoji: emoji,
onEdit: onEdit_122738, onSelectRolesForEmoji: onSelectRolesForEmoji});
function onEdit_122738() { // fn#122738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16114:1519, offset: 0x0202da0c, size: 18 bytes, params: 1, frame: 11
env1_5(true);
}
}
function _fun122739() { // fn#122739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16114:1585, offset: 0x02572e92, size: 64 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */;
value = value.getIsScreenReaderEnabled();
if (value) {
(0, ReactNativeModule.Image)();
} else {
env0_5(true);
}
}
function _fun122740() { // fn#122740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16114:1660, offset: 0x02572ed2, size: 15 bytes, params: 1, frame: 9
(0, ReactNativeModule.Image)();
}
function EmojiRowOnChangeText(a0) { // fn#122741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16114:1687, owner: EmojiRow.onChangeText, offset: 0x01e67c9c, size: 19 bytes, params: 2, frame: 11
env0_4(a0);
}
}
object2.label = r9;
object2.disabled = disabled;
object2.onPress = value6;
object2.onLongPress = value7;
object2.start = start;
object2.end = end;
return <TableRow {...object2} />;
}
function EmojiRowOnBlur() { // fn#122736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16114:1356, owner: EmojiRow.onBlur, offset: 0x02572dc3, size: 130 bytes, params: 1, frame: 16
var value2;
var moduleValue;
var updateEmoji;
var object2;
if (env0_3 !== emoji.name) {
value2 = environment.__proto__;
moduleValue = require(8629) /* metro dependency 8629: EmojiActionCreators */;
updateEmoji = moduleValue.updateEmoji;
object2 = {};
object2.guildId = guildId;
object2.emojiId = emoji.id;
object2.name = (importDefault(3801) /* metro dependency 3801: EmojiUtils */).sanitizeEmojiName(env0_3);
Reflect.apply(updateEmoji, moduleValue, [object2]);
}
env0_5(false);
}
function _fun122737() { // fn#122737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16114:1479, offset: 0x02572e45, size: 77 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
(importDefault(15907) /* metro dependency 15907: showEmojiOverflowActionSheet */)({guildId: guildId, emoji: emoji,
onEdit: onEdit_122738, onSelectRolesForEmoji: onSelectRolesForEmoji});
}
function _fun122739() { // fn#122739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16114:1585, offset: 0x02572e92, size: 64 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */;
value = value.getIsScreenReaderEnabled();
if (value) {
env0_6();
} else {
env0_5(true);
}
}
function _fun122740() { // fn#122740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16114:1660, offset: 0x02572ed2, size: 15 bytes, params: 1, frame: 9
env0_6();
}
global.__d(_fun122733, 15906, [57, 31, 27, 1867, 33, 4501, 697, 477, 566, 9077, 8629, 3801, 15907, 4559, 4573, 1305,
6238, 3857, 1244, 1423, 4617, 3995, 5278, 15909,
2]) /* metro module 15906, dependencies: [57, 31, 27, 1867, 33, 4501, 697, 477, 566, 9077, 8629, 3801, 15907, 4559, 4573, 1305, 6238, 3857, 1244, 1423, 4617, 3995, 5278, 15909, 2] */;
@@ -1,456 +1,493 @@
/* Metro module 15910; source: modules/guild_settings/native/GuildSettingsModalEmoji/HeaderRow.tsx; dependencies: [5, 57, 31, 27, 15904, 661, 1881, 33, 4501, 697, 9077, 8629, 683, 1244, 491, 4660, 4578, 4573, 566, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildSettingsEmojiStore from '../../GuildSettingsEmojiStore.tsx'; /* Metro dependency 15904 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as EmojiConstantsModule from '../../../emojis/EmojiConstants.tsx'; /* Metro dependency 1881 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseManageResourcePermissionsModule from '../../../permissions/useManageResourcePermissions.tsx'; /* Metro dependency 9077 */
function _fun122753(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:6, offset: 0x02573705, size: 513 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 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.View;
const env0_7 = value.FlatList;
const guildSettingsEmojiStore = importDefault(15904) /* metro dependency 15904: GuildSettingsEmojiStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_9 = value.AbortCodes;
const env0_10 = value.AnalyticEvents;
const env0_11 = value.UPLOAD_SMALL_SIZE;
const env0_12 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_MAX_FILESIZE_KB;
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsxs;
const env0_14 = value.jsx;
const env0_15 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.uploadInstructionsContainer = {marginTop: PX_12};
object.uploadInstructionsContainer = {marginTop: PX_12};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.uploadInstructionsHeading = {marginVertical: PX_12};
object2.uploadInstructionsList = {marginLeft: 8};
object.uploadInstructionsHeading = {marginVertical: PX_12};
object.uploadInstructionsList = {marginLeft: 8};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.headerContainer = {paddingTop: PX_16};
object.headerContainer = {paddingTop: PX_16};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.errorText = {marginTop: PX_8};
object.errorText = {marginTop: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.uploadListItem = {paddingRight: PX_8};
const env0_16 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalEmoji/HeaderRow.tsx');
object.uploadListItem = {paddingRight: PX_8};
const env0_16 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalEmoji/HeaderRow.tsx');
exports.ConnectedHeaderRow = ConnectedHeaderRow;
}
function HeaderRow({isUploading, guild, emojisLength, description, onSelectRolesForEmoji, uploadDisabled}) { // fn#122754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:632, offset: 0x02573906, size: 1055 bytes, params: 2, frame: 33
var r9;
var Button;
uploadDisabled = !(uploadDisabled === undefined) && uploadDisabled;
var env0_4Binding = undefined;
const styles = useStyles();
var [property, env0_4] = env0_4Binding(undefined.useState(false), 2);
const value5 = env0_4Binding(undefined.useState(null), 2);
const property2 = value5[0];
const [env0_6, env0_7] = env0_4Binding(value5[1].useState(''), 2);
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
const canCreateExpressions = Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[guild]).canCreateExpressions;
const value8 = _fun122755();
const closure = function(a0, a1) {
return {id: 'GUILD_SETTINGS_EMOJI_UPLOAD_REQUIREMENTS_' + a1, text: a0};
};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const N2qTQ3 = (require(1244) /* metro dependency 1244: indexNative */).t.N2qTQ3;
const items2 = [closure(Reflect.apply(string, intl, [N2qTQ3]), 1)];
items2[1] = closure(intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.gfAXoR,
{maxSize: EMOJI_MAX_FILESIZE_KB}), 2);
items2[2] = closure(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rnwKPH), 3);
items2[3] = closure(intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8Vr5Qd']), 4);
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
if (canCreateExpressions) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r9 = <Button size="sm" loading={property || isUploading} onPress={value8} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['DU0dy/'])} disabled={uploadDisabled} />;
} else {
r9 = canCreateExpressions;
}
const r8 = property2 != null && <Text style={styles.errorText} variant="text-sm/medium" color="text-feedback-critical">{property2}</Text>;
var Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items3 = [<Text variant="text-sm/medium" color="text-muted">{description}</Text>];
items3[1] = <Text variant="text-xs/bold" color="text-muted" style={styles.uploadInstructionsHeading}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jrXfyw).toUpperCase()}</Text>;
items3[2] = <FlatList style={styles.uploadInstructionsList} data={items2} keyExtractor={function(a0) {
return a0.id;
}} renderItem={renderItem_122764} />;
return (
<>
<View style={styles.headerContainer}>
{r9}
{r8}
<View style={styles.uploadInstructionsContainer}>
{items3}
function HeaderRow({isUploading, guild, emojisLength, description, onSelectRolesForEmoji, uploadDisabled}) { // fn#122754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:632, offset: 0x02573906, size: 1055 bytes, params: 2, frame: 33
var r9;
var Button;
uploadDisabled = !(uploadDisabled === undefined) && uploadDisabled;
var env0_4Binding = undefined;
const styles = useStyles();
var [property, env0_4] = env0_4Binding(undefined.useState(false), 2);
const value5 = env0_4Binding(undefined.useState(null), 2);
const property2 = value5[0];
const [env0_6, env0_7] = env0_4Binding(value5[1].useState(''), 2);
const useManageResourcePermissions = UseManageResourcePermissionsModule.useManageResourcePermissions;
const canCreateExpressions = Reflect.apply(useManageResourcePermissions, UseManageResourcePermissionsModule,
[guild]).canCreateExpressions;
const value8 = _fun122755();
const closure = function(a0, a1) {
return {id: 'GUILD_SETTINGS_EMOJI_UPLOAD_REQUIREMENTS_' + a1, text: a0};
};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const N2qTQ3 = (require(1244) /* metro dependency 1244: indexNative */).t.N2qTQ3;
const items2 = [closure(Reflect.apply(string, intl, [N2qTQ3]), 1)];
items2[1] = closure(intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.gfAXoR,
{maxSize: EMOJI_MAX_FILESIZE_KB}), 2);
items2[2] = closure(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rnwKPH), 3);
items2[3] = closure(intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8Vr5Qd']), 4);
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
if (canCreateExpressions) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r9 = (
<Button
size="sm"
loading={property || isUploading}
onPress={value8}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['DU0dy/'])}
disabled={uploadDisabled}
/>
);
} else {
r9 = canCreateExpressions;
}
const r8 = property2 != null && <Text style={styles.errorText} variant="text-sm/medium" color="text-feedback-critical">{property2}</Text>;
var Text = (TextModule).Text;
const items3 = [
<Text variant="text-sm/medium" color="text-muted">
{description}
</Text>,
];
items3[1] = (
<Text
variant="text-xs/bold"
color="text-muted"
style={styles.uploadInstructionsHeading}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jrXfyw).toUpperCase()}
</Text>
);
items3[2] = (
<FlatList
style={styles.uploadInstructionsList}
data={items2}
keyExtractor={function(a0) {
return a0.id;
}}
renderItem={renderItem_122764}
/>
);
return (
<>
<View style={styles.headerContainer}>
{r9}
{r8}
<View style={styles.uploadInstructionsContainer}>
{items3}
</View>
</View>
</View>
</>
);
}
</>
);
function _fun122755() { // fn#122755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:947, offset: 0x02573d25, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun122757);
return _fun122761;
function* _fun122757() { // fn#122757, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:967, offset: 0x02573d54, size: 323 bytes, params: 1, frame: 24
var r3;
var binding2;
var property;
var value6;
var track;
var binding3;
var EMOJI_UPLOAD_STARTED;
var object;
var id;
var value7;
var openImagePicker;
var value8;
var value9;
var value10;
var base64;
var originalMd5;
var value11;
var value12;
var value13;
var value14;
var value15;
var closure;
var error;
let value = undefined;
if (true) {
value = undefined;
env2_4(true);
env2_5(null);
var binding = env3_0;
var value5 = binding(env3_2[14]);
FlatList(value5.v4());
try {
binding = env3_1;
} catch (error) {
env2_4(false);
throw error;
}
try {
binding2 = env3_2;
} catch (error) {
env2_4(false);
throw error;
}
try {
property = binding2[12];
} catch (error) {
env2_4(false);
throw error;
}
try {
value6 = binding(property);
} catch (error) {
env2_4(false);
throw error;
}
try {
track = value6.track;
} catch (error) {
env2_4(false);
throw error;
}
try {
binding3 = env3_10;
} catch (error) {
env2_4(false);
throw error;
}
try {
EMOJI_UPLOAD_STARTED = binding3.EMOJI_UPLOAD_STARTED;
} catch (error) {
env2_4(false);
throw error;
}
try {
object = {};
} catch (error) {
env2_4(false);
throw error;
}
try {
} catch (error) {
env2_4(false);
throw error;
}
try {
id = require.id;
} catch (error) {
env2_4(false);
throw error;
}
try {
object.guild_id = id;
} catch (error) {
env2_4(false);
throw error;
}
try {
} catch (error) {
env2_4(false);
throw error;
}
try {
object.upload_id = View;
} catch (error) {
env2_4(false);
throw error;
}
try {
Reflect.apply(track, value6, [EMOJI_UPLOAD_STARTED, object]);
} catch (error) {
env2_4(false);
throw error;
}
try {
property = binding2[15];
} catch (error) {
env2_4(false);
throw error;
}
try {
value7 = binding(property);
} catch (error) {
env2_4(false);
throw error;
}
try {
openImagePicker = value7.openImagePicker;
} catch (error) {
env2_4(false);
throw error;
}
try {
object = {};
} catch (error) {
env2_4(false);
throw error;
}
try {
binding = env3_11;
} catch (error) {
env2_4(false);
throw error;
}
try {
object.size = binding;
} catch (error) {
env2_4(false);
throw error;
}
try {
value8 = Reflect.apply(openImagePicker, value7, [object]);
} catch (error) {
env2_4(false);
throw error;
}
yield value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
env2_4(false);
throw error;
}
if (value10) {
env2_4(false);
return value9;
}
try {
base64 = value9.base64;
} catch (error) {
env2_4(false);
throw error;
}
try {
originalMd5 = value9.originalMd5;
} catch (error) {
env2_4(false);
throw error;
}
try {
value11 = base64 == null;
} catch (error) {
env2_4(false);
throw error;
}
if (value11) {
env2_4(false);
return value;
}
try {
} catch (error) {
env2_4(false);
throw error;
}
try {
value12 = dependencyMap == null;
} catch (error) {
env2_4(false);
throw error;
}
if (value12) {
r3 = value;
} else {
try {
} catch (error) {
env2_4(false);
throw error;
}
try {
value13 = dependencyMap();
} catch (error) {
env2_4(false);
throw error;
}
r3 = value13;
}
yield r3;
try {
value14 = undefined;
value15 = false;
} catch (error) {
env2_4(false);
throw error;
}
if (value15) {
env2_4(false);
return value14;
}
try {
} catch (error) {
env2_4(false);
throw error;
}
try {
closure = _fun122758;
} catch (error) {
env2_4(false);
throw error;
}
try {
closure(base64, originalMd5, value14);
} catch (error) {
env2_4(false);
throw error;
}
env2_4(false);
}
return value;
function _fun122758(a0, a1, a2) { // fn#122758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:1167, offset: 0x02573e97, size: 160 bytes, params: 4, frame: 16
var environment;
const env0_0 = a0;
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = Reflect.apply(env4_0(env4_2[11]).uploadEmoji, value, [{guildId: require.id, image: a0,
name: 'emoji_' + (importDefault + 1), roles: a2, originalMd5: a1}]);
value = value.then(_fun122759);
value.catch(_fun122760);
function _fun122759() { // fn#122759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:1270, offset: 0x02573f37, size: 75 bytes, params: 1, frame: 15
const value2 = env5_1(env5_2[12]);
const track = value2.track;
const EMOJI_UPLOAD_COMPLETED = env5_10.EMOJI_UPLOAD_COMPLETED;
return Reflect.apply(track, value2, [EMOJI_UPLOAD_COMPLETED, {guild_id: require.id, upload_id: View}]);
}
function ConnectedHeaderRow(a0) { // fn#122765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:3222, offset: 0x025741a7, size: 127 bytes, params: 2, frame: 18
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
throw undefined;
}
return (
<HeaderRow
isUploading={(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsEmojiStore],
function() {
return GuildSettingsEmojiStore.isUploadingEmoji();
})}
{...copyDataProperties({}, a0, undefined, undefined)}
/>
);
}
function _fun122760({body}) { // fn#122760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:1352, offset: 0x02573f82, size: 392 bytes, params: 2, frame: 23
var r3;
var r2;
var code;
var value2;
var binding;
var binding2;
var value3;
var track;
var EMOJI_UPLOAD_FILE_SIZE_LIMIT_EXCEEDED;
var object;
var value4;
var intl;
var binding3;
var binding4;
var value9;
if (body != null) {
code = body.code;
value2 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
if (code === env5_9.TOO_MANY_EMOJI) {
binding = env5_0;
binding4 = env5_2;
intl = binding(binding4[13]).intl;
r3 = intl.string(binding(binding4[13]).t['jP/Rqm']);
} else if (body.code === env5_9.TOO_MANY_ANIMATED_EMOJI) {
binding = env5_0;
binding3 = env5_2;
intl = binding(binding3[13]).intl;
r3 = intl.string(binding(binding3[13]).t['6v5dP/']);
} else if (body.image != null) {
binding = env5_1;
binding2 = env5_2;
value3 = binding(binding2[12]);
track = value3.track;
EMOJI_UPLOAD_FILE_SIZE_LIMIT_EXCEEDED = env5_10.EMOJI_UPLOAD_FILE_SIZE_LIMIT_EXCEEDED;
object = {};
value4 = environment.__proto__.__proto__.__proto__.__proto__;
object.guild_id = require.id;
object.file_size = global.Buffer.byteLength(env0_0);
object.upload_id = View;
Reflect.apply(track, value3, [EMOJI_UPLOAD_FILE_SIZE_LIMIT_EXCEEDED, object]);
binding = env5_0;
intl = binding(binding2[13]).intl;
r3 = intl.formatToPlainString(binding(binding2[13]).t.kIO9jy, {maxSize: env5_12});
} else {
r3 = undefined;
}
r2 = r3;
} else {
r2 = undefined;
}
if (r2 != null) {
value9 = environment.__proto__.__proto__.__proto__.__proto__;
env4_5(r2);
}
}
function _fun122755() { // fn#122755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:947, offset: 0x02573d25, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun122757);
return _fun122761;
}
}
function HeaderRowRenderItem({item}) { // fn#122764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:2937, owner: HeaderRow.renderItem, offset: 0x02574134, size: 115 bytes, params: 2, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
style={styles.uploadListItem}
variant="text-xs/medium"
color="text-muted"
accessibilityLabel={item.text}
>
{'•'}
{' '}
{item.text}
</Text>
);
}
function* _fun122757() { // fn#122757, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:967, offset: 0x02573d54, size: 323 bytes, params: 1, frame: 24
var r3;
var binding2;
var property;
var value6;
var track;
var binding3;
var EMOJI_UPLOAD_STARTED;
var object2;
var id;
var value7;
var openImagePicker;
var value8;
var value9;
var value10;
var base64;
var originalMd5;
var value11;
var value12;
var value13;
var value14;
var value15;
var closure;
var error;
let value = undefined;
if (true) {
value = undefined;
env2_4(true);
env2_5(null);
var binding = env3_0;
var value5 = binding(env3_2[14]);
FlatList(value5.v4());
try {
binding = env3_1;
} catch (error) {
env2_4(false);
throw error;
}
try {
binding2 = env3_2;
} catch (error) {
env2_4(false);
throw error;
}
try {
property = binding2[12];
} catch (error) {
env2_4(false);
throw error;
}
try {
value6 = binding(property);
} catch (error) {
env2_4(false);
throw error;
}
try {
track = value6.track;
} catch (error) {
env2_4(false);
throw error;
}
try {
binding3 = env3_10;
} catch (error) {
env2_4(false);
throw error;
}
try {
EMOJI_UPLOAD_STARTED = binding3.EMOJI_UPLOAD_STARTED;
} catch (error) {
env2_4(false);
throw error;
}
try {
object2 = {};
} catch (error) {
env2_4(false);
throw error;
}
try {
} catch (error) {
env2_4(false);
throw error;
}
try {
id = require.id;
} catch (error) {
env2_4(false);
throw error;
}
try {
object2.guild_id = id;
} catch (error) {
env2_4(false);
throw error;
}
try {
} catch (error) {
env2_4(false);
throw error;
}
try {
object2.upload_id = View;
} catch (error) {
env2_4(false);
throw error;
}
try {
Reflect.apply(track, value6, [EMOJI_UPLOAD_STARTED, object2]);
} catch (error) {
env2_4(false);
throw error;
}
try {
property = binding2[15];
} catch (error) {
env2_4(false);
throw error;
}
try {
value7 = binding(property);
} catch (error) {
env2_4(false);
throw error;
}
try {
openImagePicker = value7.openImagePicker;
} catch (error) {
env2_4(false);
throw error;
}
try {
object2 = {};
} catch (error) {
env2_4(false);
throw error;
}
try {
binding = env3_11;
} catch (error) {
env2_4(false);
throw error;
}
try {
object2.size = binding;
} catch (error) {
env2_4(false);
throw error;
}
try {
value8 = Reflect.apply(openImagePicker, value7, [object2]);
} catch (error) {
env2_4(false);
throw error;
}
yield value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
env2_4(false);
throw error;
}
if (value10) {
env2_4(false);
return value9;
}
try {
base64 = value9.base64;
} catch (error) {
env2_4(false);
throw error;
}
try {
originalMd5 = value9.originalMd5;
} catch (error) {
env2_4(false);
throw error;
}
try {
value11 = base64 == null;
} catch (error) {
env2_4(false);
throw error;
}
if (value11) {
env2_4(false);
return value;
}
try {
} catch (error) {
env2_4(false);
throw error;
}
try {
value12 = dependencyMap == null;
} catch (error) {
env2_4(false);
throw error;
}
if (value12) {
r3 = value;
} else {
try {
} catch (error) {
env2_4(false);
throw error;
}
try {
value13 = dependencyMap();
} catch (error) {
env2_4(false);
throw error;
function _fun122761() { // fn#122761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:1806, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
r3 = value13;
}
yield r3;
try {
value14 = undefined;
value15 = false;
} catch (error) {
env2_4(false);
throw error;
function HeaderRowRenderItem({item}) { // fn#122764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:2937, owner: HeaderRow.renderItem, offset: 0x02574134, size: 115 bytes, params: 2, frame: 15
const Text = (TextModule).Text;
return (
<Text
style={styles.uploadListItem}
variant="text-xs/medium"
color="text-muted"
accessibilityLabel={item.text}
>
{'•'}
{' '}
{item.text}
</Text>
);
}
if (value15) {
env2_4(false);
return value14;
}
try {
} catch (error) {
env2_4(false);
throw error;
}
try {
closure = _fun122758;
} catch (error) {
env2_4(false);
throw error;
}
try {
closure(base64, originalMd5, value14);
} catch (error) {
env2_4(false);
throw error;
}
env2_4(false);
}
return value;
}
function _fun122758(a0, a1, a2) { // fn#122758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:1167, offset: 0x02573e97, size: 160 bytes, params: 4, frame: 16
var environment;
const env0_0 = a0;
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = Reflect.apply(env4_0(env4_2[11]).uploadEmoji, value, [{guildId: require.id, image: a0,
name: 'emoji_' + (importDefault + 1), roles: a2, originalMd5: a1}]);
value = value.then(_fun122759);
value.catch(_fun122760);
}
function _fun122759() { // fn#122759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:1270, offset: 0x02573f37, size: 75 bytes, params: 1, frame: 15
const value2 = env5_1(env5_2[12]);
const track = value2.track;
const EMOJI_UPLOAD_COMPLETED = env5_10.EMOJI_UPLOAD_COMPLETED;
return Reflect.apply(track, value2, [EMOJI_UPLOAD_COMPLETED, {guild_id: require.id, upload_id: View}]);
}
function _fun122760({body}) { // fn#122760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:1352, offset: 0x02573f82, size: 392 bytes, params: 2, frame: 23
var r3;
var r2;
var code;
var value2;
var binding;
var binding2;
var value3;
var track;
var EMOJI_UPLOAD_FILE_SIZE_LIMIT_EXCEEDED;
var object2;
var value4;
var intl;
var binding3;
var binding4;
var value9;
if (body != null) {
code = body.code;
value2 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
if (code === env5_9.TOO_MANY_EMOJI) {
binding = env5_0;
binding4 = env5_2;
intl = binding(binding4[13]).intl;
r3 = intl.string(binding(binding4[13]).t['jP/Rqm']);
} else if (body.code === env5_9.TOO_MANY_ANIMATED_EMOJI) {
binding = env5_0;
binding3 = env5_2;
intl = binding(binding3[13]).intl;
r3 = intl.string(binding(binding3[13]).t['6v5dP/']);
} else if (body.image != null) {
binding = env5_1;
binding2 = env5_2;
value3 = binding(binding2[12]);
track = value3.track;
EMOJI_UPLOAD_FILE_SIZE_LIMIT_EXCEEDED = env5_10.EMOJI_UPLOAD_FILE_SIZE_LIMIT_EXCEEDED;
object2 = {};
value4 = environment.__proto__.__proto__.__proto__.__proto__;
object2.guild_id = require.id;
object2.file_size = global.Buffer.byteLength(env0_0);
object2.upload_id = View;
Reflect.apply(track, value3, [EMOJI_UPLOAD_FILE_SIZE_LIMIT_EXCEEDED, object2]);
binding = env5_0;
intl = binding(binding2[13]).intl;
r3 = intl.formatToPlainString(binding(binding2[13]).t.kIO9jy, {maxSize: env5_12});
} else {
r3 = undefined;
function ConnectedHeaderRow(a0) { // fn#122765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16118:3222, offset: 0x025741a7, size: 127 bytes, params: 2, frame: 18
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
throw undefined;
}
r2 = r3;
} else {
r2 = undefined;
}
if (r2 != null) {
value9 = environment.__proto__.__proto__.__proto__.__proto__;
env4_5(r2);
return (
<HeaderRow
isUploading={(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsEmojiStore],
function() {
return GuildSettingsEmojiStore.isUploadingEmoji();
})}
{...copyDataProperties({}, a0, undefined, undefined)}
/>
);
}
}
global.__d(_fun122753, 15910, [5, 57, 31, 27, 15904, 661, 1881, 33, 4501, 697, 9077, 8629, 683, 1244, 491, 4660,
4578, 4573, 566,
2]) /* metro module 15910, dependencies: [5, 57, 31, 27, 15904, 661, 1881, 33, 4501, 697, 9077, 8629, 683, 1244, 491, 4660, 4578, 4573, 566, 2] */;
@@ -1,300 +1,355 @@
/* Metro module 15983; source: modules/guild_settings/native/GuildSettingsModalInstantInvites.tsx; dependencies: [57, 31, 27, 10906, 8150, 1379, 1867, 9113, 661, 33, 4501, 1244, 1948, 8950, 6766, 6242, 8947, 11838, 566, 22, 8277, 8275, 4080, 11445, 1962, 3857, 12132, 5460, 1305, 15984, 5462, 2] */
import Module00022 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildSettingsStore from '../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import GuildIncidentsStore from '../../guild_antiraid/GuildIncidentsStore.tsx'; /* Metro dependency 10906 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextWithIOSLinkWorkaroundModule from '../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
import * as TableCheckboxRowNativeModule from '../../../design/components/TableRow/native/TableCheckboxRow.native.tsx'; /* Metro dependency 8950 */
import * as GuildInvitesDisabledUtilsModule from '../safety/GuildInvitesDisabledUtils.tsx'; /* Metro dependency 11838 */
function _fun123633(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:6, offset: 0x02595bda, size: 462 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = InvitesDisabledRow;
const InvitesDisabledRow2 = InvitesDisabledRow;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
value.Platform;
const env0_5 = value.FlatList;
const guildIncidentsStore = importDefault(10906) /* metro dependency 10906: GuildIncidentsStore */;
value = importDefault(8150) /* metro dependency 8150: InviteRecord */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_10 = constantsModule.GuildFeatures;
const env0_11 = constantsModule.HelpdeskArticles;
const value3 = require(33) /* metro dependency 33 */;
const env0_12 = value3.jsx;
const env0_13 = value3.Fragment;
const env0_14 = value3.jsxs;
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({list: {paddingTop: 8},
const env0_15 = (CreateStylesModule).createStyles({list: {paddingTop: 8},
content: {'padding': 16, 'gap': 24}, listWithPause: {paddingTop: 0}});
value = new value({code: 'pause_invites'});
const env0_18 = {};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalInstantInvites.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalInstantInvites.tsx');
exports.default = ConnectedGuildSettingsModalInstantInvites;
exports.InvitesDisabledRow = closure;
}
function InvitesDisabledRow({onPauseInvites, invitesDisabled}) { // fn#123634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:438, offset: 0x02595da8, size: 390 bytes, params: 2, frame: 24
var r9;
var format;
var IFBHag;
var defaultImport;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Uwsjn6 = (require(1244) /* metro dependency 1244: indexNative */).t.Uwsjn6;
const value2 = Reflect.apply(string, intl, [Uwsjn6]);
if (invitesDisabled) {
r9 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2LLbj9']);
} else {
format = intl.format;
IFBHag = (require(1244) /* metro dependency 1244: indexNative */).t.IFBHag;
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r9 = Reflect.apply(format, intl, [IFBHag,
{helpArticleUrl: defaultImport.getArticleURL(HelpdeskArticles.INVITE_DISABLED)}]);
}
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
return (
<TableCheckboxRow
label={value2}
subLabel={<TextWithIOSLinkWorkaround variant="text-xs/medium">{r9}</TextWithIOSLinkWorkaround>}
icon={invitesDisabled ? ((TableRowIcon) => <TableRowIcon source={importDefault(8947) /* metro dependency 8947 */} />)((require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon) : null}
checked={invitesDisabled}
onPress={onPauseInvites}
start
end
/>
);
}
function GuildSettingsModalInstantInvites({invites, guild, showChannel, contentContainerStyle}) { // fn#123635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:918, offset: 0x02595f2e, size: 1031 bytes, params: 2, frame: 28
var invitesDisabledUntil;
var r2;
var r10;
var r0;
var value6;
var Date;
var prototype;
var value7;
var date;
var value8;
var value9;
var jsxRuntimeEnv0_13Binding;
var items3;
var EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
showChannel = !(showChannel === undefined) && showChannel;
const styles = useStyles();
const value4 = (require(11838) /* metro dependency 11838: GuildInvitesDisabledUtils */).useInvitesDisabledPermission(guild);
const env0_3 = value4;
const guildIncident = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildIncidentsStore],
function() {
return GuildIncidentsStore.getGuildIncident(guild.id);
});
const env0_4 = guildIncident;
const features = guild.features;
const has = features.has;
const INVITES_DISABLED = GuildFeatures.INVITES_DISABLED;
const value5 = Reflect.apply(has, features, [INVITES_DISABLED]);
if (value5) {
r10 = value5;
} else {
invitesDisabledUntil = guildIncident?.invitesDisabledUntil;
value6 = invitesDisabledUntil != null;
if (value6) {
Date = global.Date;
invitesDisabledUntil = guildIncident.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();
r2 = value8 > (date instanceof Object ? date : value9);
exports.InvitesDisabledRow = InvitesDisabledRow2;
function InvitesDisabledRow({onPauseInvites, invitesDisabled}) { // fn#123634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:438, offset: 0x02595da8, size: 390 bytes, params: 2, frame: 24
var r9;
var format;
var IFBHag;
var defaultImport;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Uwsjn6 = (require(1244) /* metro dependency 1244: indexNative */).t.Uwsjn6;
const value2 = Reflect.apply(string, intl, [Uwsjn6]);
if (invitesDisabled) {
r9 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2LLbj9']);
} else {
r2 = value6;
format = intl.format;
IFBHag = (require(1244) /* metro dependency 1244: indexNative */).t.IFBHag;
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r9 = Reflect.apply(format, intl, [IFBHag,
{helpArticleUrl: defaultImport.getArticleURL(HelpdeskArticles.INVITE_DISABLED)}]);
}
r10 = r2;
const TableCheckboxRow = (TableCheckboxRowNativeModule).TableCheckboxRow;
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
return (
<TableCheckboxRow
label={value2}
subLabel={<TextWithIOSLinkWorkaround variant="text-xs/medium">
{r9}
</TextWithIOSLinkWorkaround>}
icon={invitesDisabled
? ((TableRowIcon) => <TableRowIcon source={importDefault(8947) /* metro dependency 8947 */} />)((require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon)
: null}
checked={invitesDisabled}
onPress={onPauseInvites}
start
end
/>
);
}
let binding = env0_4;
const [property, env0_7] = env0_3(binding.useState(false), 2);
const [property2, env0_8] = env0_3(env0_4.useState(21), 2);
const value18 = env0_4.useMemo(_fun123640, [env0_4.useMemo(_fun123637, [invites, value4, showChannel]),
(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ChannelStore], function() {
return ChannelStore.getSortedLinkedChannelsForGuild(guild.id);
})]);
env0_4.useEffect(_fun123643, []);
binding = env0_4;
let useCallback = binding.useCallback;
const value19 = Reflect.apply(useCallback, binding, [function(a0) {
return a0.type === 'invite' ? a0.data.code : a0.data.id;
}, []]);
const value20 = env0_4.useCallback(_fun123645, [property, guildIncident, guild]);
binding = env0_4;
useCallback = binding.useCallback;
if (invites == null) {
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
r0 = <SceneLoadingIndicator />;
} else if (value18.length === 0) {
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
items3 = [<InvitesDisabledRow onPauseInvites={value20} invitesDisabled={r10} invitesDisabledLoading={property} />];
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
items3[1] = <EmptyState Illustration={(require(15984) /* metro dependency 15984: InviteEmpty */).InviteEmpty} title={intl.string(t['+nLJkZ'])} body={intl.string(t.F53CAc)} />;
r0 = <>{items3}</>;
} else {
r0 = <FlatList style={[value4 ? styles.listWithPause : styles.list]} data={value18} keyExtractor={value19} renderItem={Reflect.apply(useCallback,
binding, [_fun123646, [r10, value20,
property]])} initialNumToRender={10} windowSize={property2} contentContainerStyle={[contentContainerStyle,
styles.content]} />;
}
return r0;
}
function ConnectedGuildSettingsModalInstantInvites({guildId, contentContainerStyle}) { // fn#123647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:3055, offset: 0x0259668e, size: 232 bytes, params: 2, frame: 21
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
return guild != null ? <><GuildSettingsModalInstantInvites guild={guild} invites={(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore],
_fun123649)} contentContainerStyle={contentContainerStyle} showChannel />{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}</> : null;
}
function _fun123637() { // fn#123637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1361, offset: 0x02596355, size: 77 bytes, params: 1, frame: 15
const defaultImport = importDefault(22) /* metro dependency 22 */;
const value3 = defaultImport.sortBy(invites, _fun123638);
if (env0_3) {
value3.unshift(env1_17);
}
return value3;
}
function _fun123640() { // fn#123640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1680, offset: 0x0259642d, size: 69 bytes, params: 1, frame: 15
let binding = env0_9;
const value2 = binding.map(function(a0) {
return {type: 'invite', data: a0};
});
const items2 = [];
const value3 = arraySpread(items2, value2, 0, binding);
binding = env0_10;
arraySpread(items2, binding.map(function(a0) {
return {type: 'channel', data: a0};
}), value3, binding);
return items2;
}
function _fun123643() { // fn#123643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1788, offset: 0x02596472, size: 19 bytes, params: 1, frame: 11
env0_8(21);
}
function _fun123645() { // fn#123645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1891, offset: 0x025964ad, size: 286 bytes, params: 1, frame: 19
var object2;
var value2;
var property;
var moduleValue;
var GuildIncidentActionSources;
var MESSAGE;
var moduleValue2;
var incidentAlertType;
var defaultImport;
var openLazy;
var moduleValue3;
var paths;
var value4;
var error;
var value5;
var defaultImport2;
var open;
var defaultImport3;
var message;
if (!env0_6) {
env0_7(true);
try {
try {
object2 = {};
value2 = environment.__proto__;
property = dependencyMap[20];
moduleValue = require(property);
GuildIncidentActionSources = moduleValue.GuildIncidentActionSources;
MESSAGE = GuildIncidentActionSources.MESSAGE;
object2.source = MESSAGE;
property = dependencyMap[21];
moduleValue2 = require(property);
incidentAlertType = moduleValue2.getIncidentAlertType(guildIncident);
object2.alertType = incidentAlertType;
property = dependencyMap[22];
defaultImport = importDefault(property);
openLazy = defaultImport.openLazy;
property = dependencyMap[24];
moduleValue3 = require(property);
property = dependencyMap[23];
paths = dependencyMap.paths;
value4 = moduleValue3(property, paths);
Reflect.apply(openLazy, defaultImport, [value4, 'GuildIncidentActionsActionSheet', {guild: guild,
analyticsData: object2}]);
} catch (error) {
value5 = environment.__proto__;
property = dependencyMap[25];
defaultImport2 = importDefault(property);
open = defaultImport2.open;
property = dependencyMap[16];
defaultImport3 = importDefault(property);
message = error.message;
Reflect.apply(open, defaultImport2, [{key: 'GUILD_SETTINGS_MODAL_INVITE_ERROR', icon: defaultImport3,
content: message}]);
function GuildSettingsModalInstantInvites({invites, guild, showChannel, contentContainerStyle}) { // fn#123635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:918, offset: 0x02595f2e, size: 1031 bytes, params: 2, frame: 28
var invitesDisabledUntil;
var r2;
var r10;
var r0;
var value6;
var Date;
var prototype;
var value7;
var date;
var value8;
var value9;
var jsxRuntimeEnv0_13Binding;
var items3;
var EmptyState;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
showChannel = !(showChannel === undefined) && showChannel;
const styles = useStyles();
const value4 = (GuildInvitesDisabledUtilsModule).useInvitesDisabledPermission(guild);
const env0_3 = value4;
const guildIncident = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildIncidentsStore],
function() {
return GuildIncidentsStore.getGuildIncident(guild.id);
});
const guildIncident2 = guildIncident;
const features = guild.features;
const has = features.has;
const INVITES_DISABLED = GuildFeatures.INVITES_DISABLED;
const value5 = Reflect.apply(has, features, [INVITES_DISABLED]);
if (value5) {
r10 = value5;
} else {
invitesDisabledUntil = guildIncident?.invitesDisabledUntil;
value6 = invitesDisabledUntil != null;
if (value6) {
Date = global.Date;
invitesDisabledUntil = guildIncident.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();
r2 = value8 > (date instanceof Object ? date : value9);
} else {
r2 = value6;
}
} catch (error) {
env0_7(false);
throw error;
r10 = r2;
}
env0_7(false);
}
}
function _fun123646({item}) { // fn#123646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:2260, offset: 0x025965cb, size: 195 bytes, params: 2, frame: 16
var r1;
var r0;
var value;
var code;
if (item.type === 'invite') {
code = item.data.code;
value = environment.__proto__;
if (code === env1_16) {
r1 = <InvitesDisabledRow invitesDisabled={env0_5} invitesDisabledLoading={env0_6} onPauseInvites={env0_11} />;
let binding = guildIncident2;
const [property, env0_7] = env0_3(binding.useState(false), 2);
const [property2, env0_8] = env0_3(guildIncident2.useState(21), 2);
const value18 = guildIncident2.useMemo(_fun123640, [guildIncident2.useMemo(_fun123637, [invites, value4,
showChannel]), (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ChannelStore],
function() {
return ChannelStore.getSortedLinkedChannelsForGuild(guild.id);
})]);
guildIncident2.useEffect(_fun123643, []);
binding = guildIncident2;
let useCallback = binding.useCallback;
const value19 = Reflect.apply(useCallback, binding, [function(a0) {
return a0.type === 'invite' ? a0.data.code : a0.data.id;
}, []]);
const value20 = guildIncident2.useCallback(_fun123645, [property, guildIncident, guild]);
binding = guildIncident2;
useCallback = binding.useCallback;
if (invites == null) {
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
r0 = <SceneLoadingIndicator />;
} else if (value18.length === 0) {
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
items3 = [
<InvitesDisabledRow
onPauseInvites={value20}
invitesDisabled={r10}
invitesDisabledLoading={property}
/>,
];
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
items3[1] = (
<EmptyState
Illustration={(require(15984) /* metro dependency 15984: InviteEmpty */).InviteEmpty}
title={intl.string(t['+nLJkZ'])}
body={intl.string(t.F53CAc)}
/>
);
r0 = (
<>
{items3}
</>
);
} else {
value = importDefault(12132) /* metro dependency 12132: InstantInvite */;
value = ((Component) => <Component invite={item.data} />)(value);
r1 = value;
r0 = (
<FlatList
style={[value4 ? styles.listWithPause : styles.list]}
data={value18}
keyExtractor={value19}
renderItem={Reflect.apply(useCallback, binding, [_fun123646, [r10, value20, property]])}
initialNumToRender={10}
windowSize={property2}
contentContainerStyle={[contentContainerStyle, styles.content]}
/>
);
}
r0 = r1;
} else {
value = environment.__proto__;
const LinkedChannelInvite = (require(12132) /* metro dependency 12132: InstantInvite */).LinkedChannelInvite;
value = <LinkedChannelInvite channel={item.data} />;
r0 = value;
return r0;
function _fun123637() { // fn#123637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1361, offset: 0x02596355, size: 77 bytes, params: 1, frame: 15
const defaultImport = Module00022;
const value3 = defaultImport.sortBy(invites, _fun123638);
if (env0_3) {
value3.unshift(env1_17);
}
return value3;
function _fun123638(a0) { // fn#123638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1391, offset: 0x025963a2, size: 107 bytes, params: 2, frame: 13
var r2;
var r0;
var inviter;
var channel;
let value = environment.__proto__;
if (showChannel) {
channel = a0.channel;
r0 = channel == null ? undefined : channel.name.toLowerCase();
} else {
inviter = a0.inviter;
value = undefined;
r2 = inviter == null || inviter.username == null ? value : inviter.username.toLowerCase();
value = '';
r0 = r2 ?? value;
}
return r0;
}
}
function _fun123640() { // fn#123640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1680, offset: 0x0259642d, size: 69 bytes, params: 1, frame: 15
let binding = env0_9;
const value2 = binding.map(function(a0) {
return {type: 'invite', data: a0};
});
const items2 = [];
const value3 = arraySpread(items2, value2, 0, binding);
binding = ConstantsModule.GuildFeatures;
arraySpread(items2, binding.map(function(a0) {
return {type: 'channel', data: a0};
}), value3, binding);
return items2;
}
function _fun123643() { // fn#123643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1788, offset: 0x02596472, size: 19 bytes, params: 1, frame: 11
env0_8(21);
}
function _fun123645() { // fn#123645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1891, offset: 0x025964ad, size: 286 bytes, params: 1, frame: 19
var object;
var value2;
var property;
var moduleValue;
var GuildIncidentActionSources;
var MESSAGE;
var moduleValue2;
var incidentAlertType;
var defaultImport;
var openLazy;
var moduleValue3;
var paths;
var value4;
var error;
var value5;
var defaultImport2;
var open;
var defaultImport3;
var message;
if (!env0_6) {
env0_7(true);
try {
try {
object = {};
value2 = environment.__proto__;
property = dependencyMap[20];
moduleValue = require(property);
GuildIncidentActionSources = moduleValue.GuildIncidentActionSources;
MESSAGE = GuildIncidentActionSources.MESSAGE;
object.source = MESSAGE;
property = dependencyMap[21];
moduleValue2 = require(property);
incidentAlertType = moduleValue2.getIncidentAlertType(guildIncident);
object.alertType = incidentAlertType;
property = dependencyMap[22];
defaultImport = importDefault(property);
openLazy = defaultImport.openLazy;
property = dependencyMap[24];
moduleValue3 = require(property);
property = dependencyMap[23];
paths = dependencyMap.paths;
value4 = moduleValue3(property, paths);
Reflect.apply(openLazy, defaultImport, [value4, 'GuildIncidentActionsActionSheet', {guild: guild,
analyticsData: object}]);
} catch (error) {
value5 = environment.__proto__;
property = dependencyMap[25];
defaultImport2 = importDefault(property);
open = defaultImport2.open;
property = dependencyMap[16];
defaultImport3 = importDefault(property);
message = error.message;
Reflect.apply(open, defaultImport2, [{key: 'GUILD_SETTINGS_MODAL_INVITE_ERROR', icon: defaultImport3,
content: message}]);
}
} catch (error) {
env0_7(false);
throw error;
}
env0_7(false);
}
}
function _fun123646({item}) { // fn#123646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:2260, offset: 0x025965cb, size: 195 bytes, params: 2, frame: 16
var r1;
var r0;
var value;
var code;
if (item.type === 'invite') {
code = item.data.code;
value = environment.__proto__;
if (code === env1_16) {
r1 = (
<InvitesDisabledRow
invitesDisabled={env0_5}
invitesDisabledLoading={env0_6}
onPauseInvites={ConstantsModule.HelpdeskArticles}
/>
);
} else {
value = importDefault(12132) /* metro dependency 12132: InstantInvite */;
value = ((Component) => <Component invite={item.data} />)(value);
r1 = value;
}
r0 = r1;
} else {
value = environment.__proto__;
const LinkedChannelInvite = (require(12132) /* metro dependency 12132: InstantInvite */).LinkedChannelInvite;
value = <LinkedChannelInvite channel={item.data} />;
r0 = value;
}
return r0;
}
}
return r0;
}
function _fun123649() { // fn#123649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:3237, offset: 0x02596776, size: 35 bytes, params: 1, frame: 10
const getProps = GuildSettingsStore.getProps;
return Reflect.apply(getProps, GuildSettingsStore, []).invites ?? env1_18;
}
function ConnectedGuildSettingsModalInstantInvites({guildId, contentContainerStyle}) { // fn#123647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:3055, offset: 0x0259668e, size: 232 bytes, params: 2, frame: 21
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
return (
guild != null
? (
<>
<GuildSettingsModalInstantInvites
guild={guild}
invites={(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore],
_fun123649)}
contentContainerStyle={contentContainerStyle}
showChannel
/>
{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}
</>
)
: null
);
function _fun123649() { // fn#123649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:3237, offset: 0x02596776, size: 35 bytes, params: 1, frame: 10
const guildSettingsStoreBinding = GuildSettingsStore;
const getProps = guildSettingsStoreBinding.getProps;
return Reflect.apply(getProps, guildSettingsStoreBinding, []).invites ?? env1_18;
}
function _fun123638(a0) { // fn#123638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1391, offset: 0x025963a2, size: 107 bytes, params: 2, frame: 13
var r2;
var r0;
var inviter;
var channel;
let value = environment.__proto__;
if (showChannel) {
channel = a0.channel;
r0 = channel == null ? undefined : channel.name.toLowerCase();
} else {
inviter = a0.inviter;
value = undefined;
r2 = inviter == null || inviter.username == null ? value : inviter.username.toLowerCase();
value = '';
r0 = r2 ?? value;
}
return r0;
}
global.__d(_fun123633, 15983, [57, 31, 27, 10906, 8150, 1379, 1867, 9113, 661, 33, 4501, 1244, 1948, 8950, 6766,
6242, 8947, 11838, 566, 22, 8277, 8275, 4080, 11445, 1962, 3857, 12132, 5460, 1305, 15984, 5462,
2]) /* metro module 15983, dependencies: [57, 31, 27, 10906, 8150, 1379, 1867, 9113, 661, 33, 4501, 1244, 1948, 8950, 6766, 6242, 8947, 11838, 566, 22, 8277, 8275, 4080, 11445, 1962, 3857, 12132, 5460, 1305, 15984, 5462, 2] */;
@@ -1,4 +1,29 @@
/* Metro module 15859; source: modules/guild_settings/native/GuildSettingsModalLanding.tsx; dependencies: [31, 1935, 1867, 3784, 1878, 15860, 9113, 661, 33, 4863, 4501, 6238, 1244, 4068, 15861, 8931, 3789, 15863, 13467, 7950, 10976, 10315, 9097, 15865, 4056, 6231, 13142, 6699, 9409, 3860, 697, 1484, 566, 9112, 15866, 6850, 6858, 3856, 7972, 4572, 15211, 1423, 15867, 5462, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildChannelStore from '../../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import GuildSettingsActionCreators from '../GuildSettingsActionCreators.tsx'; /* Metro dependency 9112 */
import GuildSettingsStore from '../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import IconLabelBlock from '../../../components_native/common/IconLabelBlock.tsx'; /* Metro dependency 15211 */
import GuildSettingsModalChannelsStore from '../GuildSettingsModalChannelsStore.tsx'; /* Metro dependency 15860 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as CircleInformationIconModule from '../../../design/components/Icon/native/redesign/generated/CircleInformationIcon.tsx'; /* Metro dependency 4068 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as NavScrimAndroidModule from '../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
import * as TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as GroupIconModule from '../../../design/components/Icon/native/redesign/generated/GroupIcon.tsx'; /* Metro dependency 6699 */
import * as GuildRoleSubscriptionSettingUtilsModule from '../../guild_role_subscriptions/feature_gating/GuildRoleSubscriptionSettingUtils.tsx'; /* Metro dependency 6850 */
import * as NativeModule from '../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as UseChannelsAllowedToUnlinkModule from '../../lobbies/hooks/useChannelsAllowedToUnlink.tsx'; /* Metro dependency 15866 */
function _fun122020(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:6, offset: 0x0255776e, size: 432 bytes, params: 8, frame: 20
const env0_0 = require;
const trackPaneViewed = function(a0, a1) {
@@ -9,14 +34,7 @@ function _fun122020(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
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 guildSettingsModalChannelsStore = importDefault(15860) /* metro dependency 15860: GuildSettingsModalChannelsStore */;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_11 = value.GuildFeatures;
const env0_12 = value.GuildSettingsSections;
const env0_13 = value.ChannelTypes;
@@ -28,309 +46,356 @@ function _fun122020(global, require, importDefault, importAll, module, exports,
const pushRow = function(a0, a1) {
a1.push(a0);
};
const env0_19 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1},
const env0_19 = (CreateStylesModule).createStyles({container: {flex: 1},
containerContent: {paddingTop: 16}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalLanding.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalLanding.tsx');
exports.default = GuildSettingsModalLanding;
}
function SettingsSection({guild, isGuildAdmin, canManageGuild, canManageGuildExpressions, canManageChannels, canViewAuditLog, canManageWebhooks, canUnlinkChannelLobbies, canConfigureOfficialMessages, categories, pushScreen}) { // fn#122022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:543, offset: 0x0255796a, size: 2077 bytes, params: 2, frame: 38
var pushRowBinding;
var object11;
var object13;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
let object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object.label = Reflect.apply(string, intl, [t['/dp6yY']]);
object.arrow = true;
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
let Icon = TableRow2.Icon;
const CircleInformationIcon = (require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon;
object.icon = <Icon IconComponent={CircleInformationIcon} />;
object.onPress = function() {
return pushScreen(GuildSettingsSections.OVERVIEW);
};
object = [<TableRow {...object} key="overview" />];
const currentUser = UserStore.getCurrentUser();
if (canManageGuild) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5tbTdV'])} arrow icon={((Icon) => <Icon IconComponent={(require(15861) /* metro dependency 15861: ModerationIcon */).ModerationIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.MODERATION);
}} key="moderation" />, object);
}
if (canViewAuditLog) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SPWLyT)} arrow icon={((Icon) => <Icon IconComponent={(require(8931) /* metro dependency 8931: ClipboardListIcon */).ClipboardListIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.AUDIT_LOG);
}} key="auditlogs" />, object);
}
if (canManageChannels || currentUser != null && (importAll(3789) /* metro dependency 3789: PermissionUtils */).canManageACategory(currentUser,
guild, categories)) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OGiMXJ)} arrow icon={((Icon) => <Icon IconComponent={(require(15863) /* metro dependency 15863: ChannelListIcon */).ChannelListIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
GuildSettingsModalChannelsStore.initGuild(guild.id);
pushScreen(GuildSettingsSections.CHANNELS);
}} key="channels" />, object);
}
let r12 = canManageGuild || canManageWebhooks;
r12 = !r12 ? canUnlinkChannelLobbies : r12;
if (r12) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CIsNZw)} arrow icon={((Icon) => <Icon IconComponent={(require(13467) /* metro dependency 13467: PuzzlePieceIcon */).PuzzlePieceIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.INTEGRATIONS);
}} key="integrations" />, object);
}
if (canManageGuildExpressions) {
pushRowBinding = pushRow;
var tableRowProps = {label: intl.string(t.sMOuuS), arrow: true};
Icon = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon;
tableRowProps.icon = <Icon IconComponent={(require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon} />;
tableRowProps.onPress = function() {
return pushScreen(GuildSettingsSections.EMOJI);
function SettingsSection({guild, isGuildAdmin, canManageGuild, canManageGuildExpressions, canManageChannels, canViewAuditLog, canManageWebhooks, canUnlinkChannelLobbies, canConfigureOfficialMessages, categories, pushScreen}) { // fn#122022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:543, offset: 0x0255796a, size: 2077 bytes, params: 2, frame: 38
var pushRowBinding;
var object2;
var object3;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
let object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object.label = Reflect.apply(string, intl, [t['/dp6yY']]);
object.arrow = true;
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
let Icon = TableRow2.Icon;
const CircleInformationIcon = (CircleInformationIconModule).CircleInformationIcon;
object.icon = <Icon IconComponent={CircleInformationIcon} />;
object.onPress = function() {
return pushScreen(GuildSettingsSections.OVERVIEW);
};
pushRowBinding(<TableRow {...tableRowProps} key="emoji" />, object);
pushRowBinding = pushRow;
var tableRowProps2 = {label: intl.string(t.R5nQkS), arrow: true};
Icon = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon;
tableRowProps2.icon = <Icon IconComponent={(require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon} />;
tableRowProps2.onPress = onPress_122029;
pushRowBinding(<TableRow {...tableRowProps2} key="stickers" />, object);
object = [
<TableRow {...object} key="overview" />,
];
const currentUser = UserStore.getCurrentUser();
if (canManageGuild) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5tbTdV'])} arrow icon={((Icon) => <Icon IconComponent={(require(15861) /* metro dependency 15861: ModerationIcon */).ModerationIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.MODERATION);
}} key="moderation" />, object);
}
if (canViewAuditLog) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SPWLyT)} arrow icon={((Icon) => <Icon IconComponent={(require(8931) /* metro dependency 8931: ClipboardListIcon */).ClipboardListIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.AUDIT_LOG);
}} key="auditlogs" />, object);
}
if (canManageChannels || currentUser != null && (importAll(3789) /* metro dependency 3789: PermissionUtils */).canManageACategory(currentUser,
guild, categories)) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OGiMXJ)} arrow icon={((Icon) => <Icon IconComponent={(require(15863) /* metro dependency 15863: ChannelListIcon */).ChannelListIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
GuildSettingsModalChannelsStore.initGuild(guild.id);
pushScreen(GuildSettingsSections.CHANNELS);
}} key="channels" />, object);
}
let r12 = canManageGuild || canManageWebhooks;
r12 = !r12 ? canUnlinkChannelLobbies : r12;
if (r12) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CIsNZw)} arrow icon={((Icon) => <Icon IconComponent={(require(13467) /* metro dependency 13467: PuzzlePieceIcon */).PuzzlePieceIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.INTEGRATIONS);
}} key="integrations" />, object);
}
if (canManageGuildExpressions) {
pushRowBinding = pushRow;
var tableRowProps = {label: intl.string(t.sMOuuS), arrow: true};
Icon = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon;
tableRowProps.icon = <Icon IconComponent={(require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon} />;
tableRowProps.onPress = function() {
return pushScreen(GuildSettingsSections.EMOJI);
};
pushRowBinding(<TableRow {...tableRowProps} key="emoji" />, object);
pushRowBinding = pushRow;
var tableRowProps2 = {label: intl.string(t.R5nQkS), arrow: true};
Icon = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon;
tableRowProps2.icon = <Icon IconComponent={(require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon} />;
tableRowProps2.onPress = onPress_122029;
pushRowBinding(<TableRow {...tableRowProps2} key="stickers" />, object);
}
if (canConfigureOfficialMessages) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xHEzFh)} arrow icon={((Icon) => <Icon IconComponent={(require(10315) /* metro dependency 10315: StampIcon */).StampIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.OFFICIAL_MESSAGES);
}} key="official-messages" />, object);
}
if (canManageGuild) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Am9YHi)} arrow icon={((Icon) => <Icon IconComponent={(require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.SECURITY);
}} key="security" />, object);
}
if (isGuildAdmin && (require(15865) /* metro dependency 15865: GuildSettingsVanityURLUtils */).canSeeVanityUrlSettings(guild)) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5XZKy/'])} arrow icon={((Icon) => <Icon IconComponent={(require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.VANITY_URL);
}} key="vanity" />, object);
}
if (object.length === 0) {
return null;
} else {
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/'])} hasIcons>
{object}
</TableRowGroup>
);
}
function SettingsSectionOnPress_122029() { // fn#122029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:2262, owner: SettingsSection.onPress, offset: 0x0255824f, size: 29 bytes, params: 1, frame: 11
const pushScreenBinding = pushScreen;
const STICKERS = GuildSettingsSections.STICKERS;
return pushScreenBinding(STICKERS);
}
}
if (canConfigureOfficialMessages) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xHEzFh)} arrow icon={((Icon) => <Icon IconComponent={(require(10315) /* metro dependency 10315: StampIcon */).StampIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.OFFICIAL_MESSAGES);
}} key="official-messages" />, object);
}
if (canManageGuild) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Am9YHi)} arrow icon={((Icon) => <Icon IconComponent={(require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.SECURITY);
}} key="security" />, object);
}
if (isGuildAdmin && (require(15865) /* metro dependency 15865: GuildSettingsVanityURLUtils */).canSeeVanityUrlSettings(guild)) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5XZKy/'])} arrow icon={((Icon) => <Icon IconComponent={(require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.VANITY_URL);
}} key="vanity" />, object);
}
if (object.length === 0) {
return null;
} else {
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
function CommunitySection({guild, pushScreen}) { // fn#122033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:3062, offset: 0x025582c3, size: 427 bytes, params: 2, frame: 30
var tableRow;
const features = guild.features;
const has = features.has;
let COMMUNITY = GuildFeatures.COMMUNITY;
const value2 = Reflect.apply(has, features, [COMMUNITY]);
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object.title = Reflect.apply(string, intl, [t['1g9A/f']]);
object.hasIcons = true;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {};
string = intl.string;
if (value2) {
object2.label = Reflect.apply(string, intl, [t.nRtNqn]);
object2.arrow = true;
object2.icon = ((Icon) => <Icon IconComponent={(require(13142) /* metro dependency 13142: TreehouseIcon */).TreehouseIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon);
object2.onPress = function() {
var pushScreenBinding = pushScreen;
var COMMUNITY = GuildSettingsSections.COMMUNITY;
return pushScreenBinding(COMMUNITY, {});
};
tableRow = <TableRow {...object2} key="community-overview" />;
} else {
object2.label = Reflect.apply(string, intl, [t.ElKTeb]);
object2.arrow = true;
object2.icon = ((Icon) => <Icon IconComponent={(require(13142) /* metro dependency 13142: TreehouseIcon */).TreehouseIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon);
object2.onPress = onPress_122035;
tableRow = <TableRow {...object2} key="community-intro" />;
}
return (
<TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/'])} hasIcons>
{object}
<TableRowGroup {...object}>
{tableRow}
</TableRowGroup>
);
}
}
function CommunitySectionOnPress_122035() { // fn#122035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:3604, owner: CommunitySection.onPress, offset: 0x0255848e, size: 32 bytes, params: 1, frame: 13
const pushScreenBinding = pushScreen;
const COMMUNITY_INTRO = GuildSettingsSections.COMMUNITY_INTRO;
return pushScreenBinding(COMMUNITY_INTRO, {});
}
function CommunitySection({guild, pushScreen}) { // fn#122033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:3062, offset: 0x025582c3, size: 427 bytes, params: 2, frame: 30
var tableRow;
const features = guild.features;
const has = features.has;
let COMMUNITY = GuildFeatures.COMMUNITY;
const value2 = Reflect.apply(has, features, [COMMUNITY]);
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const object3 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object3.title = Reflect.apply(string, intl, [t['1g9A/f']]);
object3.hasIcons = true;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object4 = {};
string = intl.string;
if (value2) {
object4.label = Reflect.apply(string, intl, [t.nRtNqn]);
object4.arrow = true;
object4.icon = ((Icon) => <Icon IconComponent={(require(13142) /* metro dependency 13142: TreehouseIcon */).TreehouseIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon);
object4.onPress = function() {
var pushScreenBinding = pushScreen;
var COMMUNITY = GuildSettingsSections.COMMUNITY;
return pushScreenBinding(COMMUNITY, {});
}
function UserManagementSection({canManageGuild, canManageRoles, canManageBans, pushScreen}) { // fn#122036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:3654, offset: 0x025584ae, size: 862 bytes, params: 2, frame: 29
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
let object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m']);
object.arrow = true;
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = TableRow2.Icon;
const GroupIcon = (GroupIconModule).GroupIcon;
object.icon = <Icon IconComponent={GroupIcon} />;
object.onPress = function() {
return pushScreen(GuildSettingsSections.MEMBERS);
};
tableRow = <TableRow {...object4} key="community-overview" />;
} else {
object4.label = Reflect.apply(string, intl, [t.ElKTeb]);
object4.arrow = true;
object4.icon = ((Icon) => <Icon IconComponent={(require(13142) /* metro dependency 13142: TreehouseIcon */).TreehouseIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon);
object4.onPress = onPress_122035;
tableRow = <TableRow {...object4} key="community-intro" />;
object = [
<TableRow {...object} key="members" />,
];
if (canManageRoles) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/'])} arrow icon={((Icon) => <Icon IconComponent={(require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.ROLES);
}} key="roles" />, object);
}
if (canManageGuild) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ngRFjZ)} arrow icon={((Icon) => <Icon IconComponent={(require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.INSTANT_INVITES);
}} key="invites" />, object);
}
if (canManageBans) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZbeITS)} arrow icon={((Icon) => <Icon IconComponent={(require(9409) /* metro dependency 9409: HammerIcon */).HammerIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.BANS);
}} key="bans" />, object);
}
if (object.length === 0) {
return null;
} else {
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+OecxG'])} hasIcons>
{object}
</TableRowGroup>
);
}
}
return (
<TableRowGroup {...object3}>
{tableRow}
</TableRowGroup>
);
}
function UserManagementSection({canManageGuild, canManageRoles, canManageBans, pushScreen}) { // fn#122036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:3654, offset: 0x025584ae, size: 862 bytes, params: 2, frame: 29
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
let object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m']);
object.arrow = true;
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = TableRow2.Icon;
const GroupIcon = (require(6699) /* metro dependency 6699: GroupIcon */).GroupIcon;
object.icon = <Icon IconComponent={GroupIcon} />;
object.onPress = function() {
return pushScreen(GuildSettingsSections.MEMBERS);
};
object = [<TableRow {...object} key="members" />];
if (canManageRoles) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/'])} arrow icon={((Icon) => <Icon IconComponent={(require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.ROLES);
}} key="roles" />, object);
}
if (canManageGuild) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ngRFjZ)} arrow icon={((Icon) => <Icon IconComponent={(require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.INSTANT_INVITES);
}} key="invites" />, object);
}
if (canManageBans) {
pushRow(<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZbeITS)} arrow icon={((Icon) => <Icon IconComponent={(require(9409) /* metro dependency 9409: HammerIcon */).HammerIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={function() {
return pushScreen(GuildSettingsSections.BANS);
}} key="bans" />, object);
}
if (object.length === 0) {
return null;
} else {
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
function GuildSettingsModalLandingInner({guild, contentContainerStyle, updateErrors}) { // fn#122041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:4651, offset: 0x02558880, size: 998 bytes, params: 2, frame: 41
const useToken = UseTokenModule.useToken;
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
const value2 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_PADDING]);
const styles = useStyles();
let value3 = (UseNavigationNativeModule).useNavigation();
let value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildChannelStore], function() {
var guildChannelStoreBinding = GuildChannelStore;
var property = guildChannelStoreBinding.getChannels;
var guildBinding = guild;
var value3 = undefined;
var value4 = Reflect.apply(property, guildChannelStoreBinding, [guildBinding == null ? value3 : guild.id]);
return value4 == null ? value3 : value4[ChannelTypes.GUILD_CATEGORY];
});
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PermissionStore],
function() {
return PermissionStore.getGuildPermissionProps(guild);
});
ReactModule.useEffect(function() {
trackPaneViewed(GuildSettingsSections.LANDING);
}, []);
const value6 = ReactModule.useCallback(_fun122045, [value3]);
const isGuildAdmin = value5.isGuildAdmin;
const canManageGuild = value5.canManageGuild;
const canManageRoles = value5.canManageRoles;
const canManageBans = value5.canManageBans;
const canManageGuildExpressions = value5.canManageGuildExpressions;
const canManageChannels = value5.canManageChannels;
const canViewAuditLog = value5.canViewAuditLog;
const canManageWebhooks = value5.canManageWebhooks;
const useChannelsAllowedToUnlink = UseChannelsAllowedToUnlinkModule.useChannelsAllowedToUnlink;
const value7 = Reflect.apply(useChannelsAllowedToUnlink, UseChannelsAllowedToUnlinkModule, [guild.id]).length > 0;
const value8 = (GuildRoleSubscriptionSettingUtilsModule).useCanManageGuildRoleSubscriptions(guild);
const r21 = canManageGuild && (require(6858) /* metro dependency 6858: GuildOfficialMessageUtils */).isGuildOfficialMessagesEnabled(guild,
'GuildSettingsModalLanding');
ReactModule.useLayoutEffect(_fun122046, [updateErrors.message]);
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
const Form = (NativeModule).Form;
const items3 = [styles.containerContent, contentContainerStyle];
const Stack = (StackNativeModule).Stack;
const object2 = {paddingHorizontal: value2};
const PX_24 = (Native).space.PX_24;
const items2 = [
((Component) => <Component iconProps={{onUpload: onUpload, type: 'guild', icon: guild.icon, name: guild.name,
makeURL: makeURL_122048,
disabled: !value5.canManageGuild}} text={guild.name} textAccessibilityRole="header" />)(IconLabelBlock),
];
items2[1] = (
<SettingsSection
guild={guild}
categories={value4}
isGuildAdmin={isGuildAdmin}
canManageGuild={canManageGuild}
canManageGuildExpressions={canManageGuildExpressions}
canManageChannels={canManageChannels}
canUnlinkChannelLobbies={value7}
canViewAuditLog={canViewAuditLog}
canManageWebhooks={canManageWebhooks}
canConfigureOfficialMessages={r21}
pushScreen={value6}
/>
);
items2[2] = canManageGuild && <CommunitySection guild={guild} pushScreen={value6} />;
items2[3] = value8 && ((Component) => <Component guild={guild} pushScreen={value6} />)(importDefault(15867) /* metro dependency 15867: GuildSettingsRoleSubscriptionsSection */);
items2[4] = (
<UserManagementSection
canManageGuild={canManageGuild}
canManageRoles={canManageRoles}
canManageBans={canManageBans}
pushScreen={value6}
/>
);
const form = (
<Form style={styles.container} contentContainerStyle={items3}>
<Stack style={object2} spacing={PX_24}>
{items2}
</Stack>
</Form>
);
const NavScrim = (NavScrimAndroidModule).NavScrim;
return (
<TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+OecxG'])} hasIcons>
{object}
</TableRowGroup>
<>
{form}
<NavScrim />
</>
);
function _fun122045(a0) { // fn#122045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:5117, offset: 0x02558ce1, size: 111 bytes, params: 2, frame: 18
const value = copyRestArgs(0, undefined);
const property = value[0];
(GuildSettingsActionCreators).setSection(property);
const binding = env0_2;
const push = binding.push;
const items2 = [];
arraySpread(items2, value, 0, 0);
apply(push, items2, binding, 0);
const trackPaneViewedBinding = trackPaneViewed;
const LANDING = GuildSettingsSections.LANDING;
trackPaneViewedBinding(property, LANDING);
}
function _fun122046() { // fn#122046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:5580, offset: 0x02558d50, size: 67 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (updateErrors.message != null) {
value2 = environment.__proto__;
moduleValue = require(3856) /* metro dependency 3856: ToastUtils */;
moduleValue.presentError(updateErrors.message);
}
}
function onUpload(a0) { // fn#122047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:5871, owner: GuildSettingsModalLandingInner.onUpload, offset: 0x02558d93, size: 54 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.updateIcon(guild.id, a0);
}
function GuildSettingsModalLandingInnerMakeURL(a0) { // fn#122048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:5949, owner: GuildSettingsModalLandingInner.makeURL, offset: 0x02558dc9, size: 83 bytes, params: 2, frame: 14
var r0;
var value2;
let value = a0;
if (value) {
value2 = environment.__proto__;
value = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: guild.id,
icon: value,
canAnimate: true, size: 64});
r0 = value;
} else {
r0 = value;
}
return r0;
}
}
function GuildSettingsModalLanding({guildId, contentContainerStyle}) { // fn#122050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:6633, offset: 0x02558e30, size: 167 bytes, params: 2, frame: 21
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
return (
guild == null
? null
: (
<GuildSettingsModalLandingInner
guild={guild}
contentContainerStyle={contentContainerStyle}
updateErrors={Reflect.apply(useStateFromStoresObject, fluxModule, [[GuildSettingsStore],
function() {
var object = {};
object.errors = GuildSettingsStore.getErrors();
return object;
}, []]).errors}
/>
)
);
}
}
function GuildSettingsModalLandingInner({guild, contentContainerStyle, updateErrors}) { // fn#122041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:4651, offset: 0x02558880, size: 998 bytes, params: 2, frame: 41
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const value2 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
const styles = useStyles();
let value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
let value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildChannelStore], function() {
var property = GuildChannelStore.getChannels;
var guildBinding = guild;
var value3 = undefined;
var value4 = Reflect.apply(property, GuildChannelStore, [guildBinding == null ? value3 : guild.id]);
return value4 == null ? value3 : value4[ChannelTypes.GUILD_CATEGORY];
});
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PermissionStore],
function() {
return PermissionStore.getGuildPermissionProps(guild);
});
env0_4.useEffect(function() {
trackPaneViewed(GuildSettingsSections.LANDING);
}, []);
const value6 = env0_4.useCallback(_fun122045, [value3]);
const isGuildAdmin = value5.isGuildAdmin;
const canManageGuild = value5.canManageGuild;
const canManageRoles = value5.canManageRoles;
const canManageBans = value5.canManageBans;
const canManageGuildExpressions = value5.canManageGuildExpressions;
const canManageChannels = value5.canManageChannels;
const canViewAuditLog = value5.canViewAuditLog;
const canManageWebhooks = value5.canManageWebhooks;
const useChannelsAllowedToUnlinkModule = require(15866) /* metro dependency 15866: useChannelsAllowedToUnlink */;
const useChannelsAllowedToUnlink = useChannelsAllowedToUnlinkModule.useChannelsAllowedToUnlink;
const value7 = Reflect.apply(useChannelsAllowedToUnlink, useChannelsAllowedToUnlinkModule, [guild.id]).length > 0;
const value8 = (require(6850) /* metro dependency 6850: GuildRoleSubscriptionSettingUtils */).useCanManageGuildRoleSubscriptions(guild);
const r21 = canManageGuild && (require(6858) /* metro dependency 6858: GuildOfficialMessageUtils */).isGuildOfficialMessagesEnabled(guild,
'GuildSettingsModalLanding');
env0_4.useLayoutEffect(_fun122046, [updateErrors.message]);
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const items3 = [styles.containerContent, contentContainerStyle];
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const object = {paddingHorizontal: value2};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const items2 = [((Component) => <Component iconProps={{onUpload: onUpload, type: 'guild', icon: guild.icon,
name: guild.name, makeURL: makeURL_122048,
disabled: !value5.canManageGuild}} text={guild.name} textAccessibilityRole="header" />)(importDefault(15211) /* metro dependency 15211: IconLabelBlock */)];
items2[1] = <SettingsSection guild={guild} categories={value4} isGuildAdmin={isGuildAdmin} canManageGuild={canManageGuild} canManageGuildExpressions={canManageGuildExpressions} canManageChannels={canManageChannels} canUnlinkChannelLobbies={value7} canViewAuditLog={canViewAuditLog} canManageWebhooks={canManageWebhooks} canConfigureOfficialMessages={r21} pushScreen={value6} />;
items2[2] = canManageGuild && <CommunitySection guild={guild} pushScreen={value6} />;
items2[3] = value8 && ((Component) => <Component guild={guild} pushScreen={value6} />)(importDefault(15867) /* metro dependency 15867: GuildSettingsRoleSubscriptionsSection */);
items2[4] = <UserManagementSection canManageGuild={canManageGuild} canManageRoles={canManageRoles} canManageBans={canManageBans} pushScreen={value6} />;
const form = <Form style={styles.container} contentContainerStyle={items3}><Stack style={object} spacing={PX_24}>{items2}</Stack></Form>;
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<>
{form}
<NavScrim />
</>
);
}
function GuildSettingsModalLanding({guildId, contentContainerStyle}) { // fn#122050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:6633, offset: 0x02558e30, size: 167 bytes, params: 2, frame: 21
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
return guild == null ? null : <GuildSettingsModalLandingInner guild={guild} contentContainerStyle={contentContainerStyle} updateErrors={Reflect.apply(useStateFromStoresObject,
fluxModule, [[GuildSettingsStore], function() {
var object = {};
object.errors = GuildSettingsStore.getErrors();
return object;
}, []]).errors} />;
}
function SettingsSectionOnPress_122029() { // fn#122029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:2262, owner: SettingsSection.onPress, offset: 0x0255824f, size: 29 bytes, params: 1, frame: 11
const pushScreenBinding = pushScreen;
const STICKERS = GuildSettingsSections.STICKERS;
return pushScreenBinding(STICKERS);
}
function CommunitySectionOnPress_122035() { // fn#122035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:3604, owner: CommunitySection.onPress, offset: 0x0255848e, size: 32 bytes, params: 1, frame: 13
const pushScreenBinding = pushScreen;
const COMMUNITY_INTRO = GuildSettingsSections.COMMUNITY_INTRO;
return pushScreenBinding(COMMUNITY_INTRO, {});
}
function _fun122045(a0) { // fn#122045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:5117, offset: 0x02558ce1, size: 111 bytes, params: 2, frame: 18
const value = copyRestArgs(0, undefined);
const property = value[0];
(importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).setSection(property);
const binding = env0_2;
const push = binding.push;
const items2 = [];
arraySpread(items2, value, 0, 0);
apply(push, items2, binding, 0);
const trackPaneViewedBinding = trackPaneViewed;
const LANDING = GuildSettingsSections.LANDING;
trackPaneViewedBinding(property, LANDING);
}
function _fun122046() { // fn#122046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:5580, offset: 0x02558d50, size: 67 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (updateErrors.message != null) {
value2 = environment.__proto__;
moduleValue = require(3856) /* metro dependency 3856: ToastUtils */;
moduleValue.presentError(updateErrors.message);
}
}
function onUpload(a0) { // fn#122047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:5871, owner: GuildSettingsModalLandingInner.onUpload, offset: 0x02558d93, size: 54 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.updateIcon(guild.id, a0);
}
function GuildSettingsModalLandingInnerMakeURL(a0) { // fn#122048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16067:5949, owner: GuildSettingsModalLandingInner.makeURL, offset: 0x02558dc9, size: 83 bytes, params: 2, frame: 14
var r0;
var value2;
let value = a0;
if (value) {
value2 = environment.__proto__;
value = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: guild.id,
icon: value,
canAnimate: true, size: 64});
r0 = value;
} else {
r0 = value;
}
return r0;
}
global.__d(_fun122020, 15859, [31, 1935, 1867, 3784, 1878, 15860, 9113, 661, 33, 4863, 4501, 6238, 1244, 4068,
15861, 8931, 3789, 15863, 13467, 7950, 10976, 10315, 9097, 15865, 4056, 6231, 13142, 6699, 9409, 3860, 697,
1484, 566, 9112, 15866, 6850, 6858, 3856, 7972, 4572, 15211, 1423, 15867, 5462,
2]) /* metro module 15859, dependencies: [31, 1935, 1867, 3784, 1878, 15860, 9113, 661, 33, 4863, 4501, 6238, 1244, 4068, 15861, 8931, 3789, 15863, 13467, 7950, 10976, 10315, 9097, 15865, 4056, 6231, 13142, 6699, 9409, 3860, 697, 1484, 566, 9112, 15866, 6850, 6858, 3856, 7972, 4572, 15211, 1423, 15867, 5462, 2] */;
@@ -1,196 +1,213 @@
/* Metro module 15003; source: modules/guild_settings/native/GuildSettingsModalMemberApplications.tsx; dependencies: [31, 27, 7068, 33, 4501, 697, 3995, 4573, 15004, 1423, 6238, 1305, 1585, 3860, 15009, 3972, 15010, 566, 1244, 8416, 8754, 5462, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserUtils from '../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import GuildJoinRequestStore from '../../guild_member_verification/GuildJoinRequestStore.tsx'; /* Metro dependency 7068 */
import OpenJoinRequestActionSheet from '../../guild_member_verification/native/openJoinRequestActionSheet.tsx'; /* Metro dependency 15004 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as NavScrimAndroidModule from '../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as FlashListModule from '../../../external/discord_common/js/packages/flash-list/index.jsx'; /* Metro dependency 8416 */
import * as UseSortedMemberApplicationsModule from '../../guild_member_verification/hooks/useSortedMemberApplications.tsx'; /* Metro dependency 15009 */
import * as UsePaginatedMemberApplicationsModule from '../../guild_member_verification/hooks/usePaginatedMemberApplications.tsx'; /* Metro dependency 15010 */
function _fun113411(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:6, offset: 0x023f778b, size: 404 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.ActivityIndicator;
const env0_5 = value2.View;
const guildJoinRequestStore = importDefault(7068) /* metro dependency 7068: GuildJoinRequestStore */;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
const env0_9 = value3.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.containerInner = {'paddingHorizontal': null, 'flex': 1, 'marginTop': 16, paddingHorizontal: PX_12};
object2.spinnerContainer = {padding: 32};
object2.footerSpinner = {paddingVertical: 16};
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
object2.spinner = {color: TEXT_BRAND};
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object2]);
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const PX_12 = (Native).space.PX_12;
object.containerInner = {'paddingHorizontal': null, 'flex': 1, 'marginTop': 16, paddingHorizontal: PX_12};
object.spinnerContainer = {padding: 32};
object.footerSpinner = {paddingVertical: 16};
const TEXT_BRAND = (Native).colors.TEXT_BRAND;
object.spinner = {color: TEXT_BRAND};
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const value5 = value.memo(_fun113412);
const env0_12 = value.memo(_fun113413);
value = value.memo(GuildSettingsModalMemberApplications);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalMemberApplications.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalMemberApplications.tsx');
exports.default = value;
exports.MemberApplicationUser = value5;
}
function _fun113412({user}) { // fn#113412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:415, offset: 0x023f791f, size: 199 bytes, params: 2, frame: 23
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const globalName = (importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user);
return (
<View>
<Text variant="text-md/semibold">
{globalName ?? user.username}
</Text>
{globalName != null && <Text variant="text-xs/medium">{user.username}</Text>}
</View>
);
}
function _fun113413({joinRequest, start, end}) { // fn#113413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:650, offset: 0x023f79e6, size: 265 bytes, params: 2, frame: 25
const value2 = env0_3.useCallback(_fun113414, [joinRequest]);
if (joinRequest == null) {
return null;
function _fun113412({user}) { // fn#113412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:415, offset: 0x023f791f, size: 199 bytes, params: 2, frame: 23
const Text = (TextModule).Text;
const globalName = (UserUtils).getGlobalName(user);
return (
<View>
<Text variant="text-md/semibold">
{globalName ?? user.username}
</Text>
{globalName != null && <Text variant="text-xs/medium">{user.username}</Text>}
</View>
);
}
const user = joinRequest.user;
if (user == null) {
return null;
}
const r15 = user != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getUserAvatarSource(user) : null;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const SMALL = AvatarSizes.SMALL;
return (
<TableRow
arrow
icon={<Avatar source={r15} size={SMALL} />}
label={((Component) => <Component user={user} />)(env0_11)}
onPress={value2}
start={start}
end={end}
/>
);
}
function GuildSettingsModalMemberApplications({guildId, applicationStatus}) { // fn#113415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:1010, offset: 0x023f7b16, size: 1071 bytes, params: 2, frame: 33
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
var r12;
var r9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var jsxRuntimeEnv0_9Binding;
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
var object2;
var object3;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_HEIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_HEIGHT;
const value3 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_HEIGHT]);
const useSortedMemberApplicationsModule = require(15009) /* metro dependency 15009: useSortedMemberApplications */;
const useSortedMemberApplications = useSortedMemberApplicationsModule.useSortedMemberApplications;
const object6 = {guildId: guildId, applicationStatus: applicationStatus};
const GuildJoinRequestSortOrders = (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestSortOrders;
let TIMESTAMP_DESC = GuildJoinRequestSortOrders.TIMESTAMP_DESC;
object6.sortOrder = TIMESTAMP_DESC;
const guildJoinRequests = Reflect.apply(useSortedMemberApplications, useSortedMemberApplicationsModule,
[object6]).guildJoinRequests;
const usePaginatedMemberApplicationsModule = require(15010) /* metro dependency 15010: usePaginatedMemberApplications */;
const usePaginatedMemberApplications = usePaginatedMemberApplicationsModule.usePaginatedMemberApplications;
const fetchNextPage = Reflect.apply(usePaginatedMemberApplications, usePaginatedMemberApplicationsModule,
[{guildId: guildId, guildJoinRequests: guildJoinRequests}]).fetchNextPage;
const env0_3 = fetchNextPage;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildJoinRequestStore],
function() {
return GuildJoinRequestStore.isFetching();
});
const binding = env0_3;
const value5 = binding.useCallback(function() {
var fetchNextPageBinding = fetchNextPage;
var TIMESTAMP_DESC = require(dependencyMap[15]).GuildJoinRequestSortOrders.TIMESTAMP_DESC;
fetchNextPageBinding(TIMESTAMP_DESC, applicationStatus);
}, [applicationStatus, fetchNextPage]);
const useEffect = binding.useEffect;
let length = guildJoinRequests.length;
Reflect.apply(useEffect, binding, [_fun113418, [value5, length]]);
const value6 = binding.useCallback(_fun113419, [guildJoinRequests.length]);
const value7 = binding.useCallback(function(a0) {
return a0.joinRequestId;
}, []);
if (value4) {
length = guildJoinRequests.length;
if (length === 0) {
function _fun113413({joinRequest, start, end}) { // fn#113413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:650, offset: 0x023f79e6, size: 265 bytes, params: 2, frame: 25
const value2 = env0_3.useCallback(_fun113414, [joinRequest]);
if (joinRequest == null) {
return null;
}
const user = joinRequest.user;
if (user == null) {
return null;
}
const r15 = user != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getUserAvatarSource(user) : null;
const TableRow = (TableRowNativeModule).TableRow;
const Avatar = (NativeModule).Avatar;
const AvatarSizes = (NativeModule).AvatarSizes;
const SMALL = AvatarSizes.SMALL;
return (
<TableRow
arrow
icon={<Avatar source={r15} size={SMALL} />}
label={((Component) => <Component user={user} />)(env0_11)}
onPress={value2}
start={start}
end={end}
/>
);
function _fun113414() { // fn#113414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:711, offset: 0x023f7aef, size: 39 bytes, params: 1, frame: 11
const value = environment.__proto__;
(OpenJoinRequestActionSheet)(joinRequest);
}
}
function GuildSettingsModalMemberApplications({guildId, applicationStatus}) { // fn#113415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:1010, offset: 0x023f7b16, size: 1071 bytes, params: 2, frame: 33
const NavScrim = (NavScrimAndroidModule).NavScrim;
var r12;
var r9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var jsxRuntimeEnv0_9Binding;
const FlashList = (FlashListModule).FlashList;
var object;
var object4;
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const useToken = UseTokenModule.useToken;
const TABLE_ROW_HEIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_HEIGHT;
const value3 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_HEIGHT]);
const useSortedMemberApplications = UseSortedMemberApplicationsModule.useSortedMemberApplications;
const object5 = {guildId: guildId, applicationStatus: applicationStatus};
const GuildJoinRequestSortOrders = (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestSortOrders;
let TIMESTAMP_DESC = GuildJoinRequestSortOrders.TIMESTAMP_DESC;
object5.sortOrder = TIMESTAMP_DESC;
const guildJoinRequests = Reflect.apply(useSortedMemberApplications, UseSortedMemberApplicationsModule,
[object5]).guildJoinRequests;
const usePaginatedMemberApplications = UsePaginatedMemberApplicationsModule.usePaginatedMemberApplications;
const fetchNextPage = Reflect.apply(usePaginatedMemberApplications, UsePaginatedMemberApplicationsModule,
[{guildId: guildId, guildJoinRequests: guildJoinRequests}]).fetchNextPage;
const fetchNextPage2 = fetchNextPage;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildJoinRequestStore],
function() {
return GuildJoinRequestStore.isFetching();
});
const binding = fetchNextPage2;
const value5 = binding.useCallback(function() {
var fetchNextPageBinding = fetchNextPage;
var TIMESTAMP_DESC = require(dependencyMap[15]).GuildJoinRequestSortOrders.TIMESTAMP_DESC;
fetchNextPageBinding(TIMESTAMP_DESC, applicationStatus);
}, [applicationStatus, fetchNextPage]);
const useEffect = binding.useEffect;
let length = guildJoinRequests.length;
Reflect.apply(useEffect, binding, [_fun113418, [value5, length]]);
const value6 = binding.useCallback(_fun113419, [guildJoinRequests.length]);
const value7 = binding.useCallback(function(a0) {
return a0.joinRequestId;
}, []);
if (value4) {
length = guildJoinRequests.length;
if (length === 0) {
return (
<View style={styles.spinnerContainer}>
<ActivityIndicator size="large" color={styles.spinner.color} />
</View>
);
}
r12 = (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.SUBMITTED === applicationStatus ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/wqiSv']) : (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.APPROVED === applicationStatus ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bv82GS) : (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.REJECTED !== applicationStatus ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7YSJ6f']);
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
var viewBindingProps = {style: styles.containerInner};
length = guildJoinRequests.length;
if (length !== 0) {
object = {keyExtractor: value7, data: guildJoinRequests, renderItem: value6, estimatedItemSize: value3};
object4 = {};
object4.paddingBottom = bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.contentContainerStyle = object4;
object.onEndReached = value5;
object.ListFooterComponent = ListFooterComponent_113421;
r9 = <FlashList {...object} />;
} else {
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r9 = <EmptyState Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={r12} />;
}
return (
<View style={styles.spinnerContainer}>
<ActivityIndicator size="large" color={styles.spinner.color} />
</View>
<>
<View {...viewBindingProps}>
{r9}
</View>
<NavScrim />
</>
);
}
r12 = (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.SUBMITTED === applicationStatus ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/wqiSv']) : (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.APPROVED === applicationStatus ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bv82GS) : (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.REJECTED !== applicationStatus ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7YSJ6f']);
const GuildJoinRequestApplicationStatuses = (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses;
const SUBMITTED = GuildJoinRequestApplicationStatuses.SUBMITTED;
r12 = SUBMITTED === applicationStatus ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/wqiSv']) : (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.APPROVED === applicationStatus ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bv82GS) : (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.REJECTED !== applicationStatus ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7YSJ6f']);
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
var viewBindingProps = {style: styles.containerInner};
length = guildJoinRequests.length;
if (length !== 0) {
object2 = {keyExtractor: value7, data: guildJoinRequests, renderItem: value6, estimatedItemSize: value3};
object3 = {};
object3.paddingBottom = bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentContainerStyle = object3;
object2.onEndReached = value5;
object2.ListFooterComponent = ListFooterComponent;
r9 = <FlashList {...object2} />;
if (guildJoinRequests.length !== 0) {
object = {keyExtractor: value7, data: guildJoinRequests, renderItem: value6, estimatedItemSize: value3};
object4 = {};
object4.paddingBottom = bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.contentContainerStyle = object4;
object.onEndReached = value5;
object.ListFooterComponent = ListFooterComponent_113421;
r9 = <FlashList {...object} />;
} else {
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r9 = <EmptyState Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={r12} />;
const EmptyState2 = (require(1305) /* metro dependency 1305: native */).EmptyState;
r9 = <EmptyState2 Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={r12} />;
}
return (
<>
<View {...viewBindingProps}>
<View style={styles.containerInner}>
{r9}
</View>
<NavScrim />
</>
);
function _fun113418() { // fn#113418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:1576, offset: 0x023f7f90, size: 32 bytes, params: 1, frame: 10
if (guildJoinRequests.length === 0) {
(0, ReactNativeModule.View)();
}
}
function _fun113419({item, index}) { // fn#113419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:1638, offset: 0x023f7fb0, size: 78 bytes, params: 2, frame: 15
return ((Component) => <Component joinRequest={item} start={index === 0} end={index === guildJoinRequests.length - 1} />)(env1_12);
}
function GuildSettingsModalMemberApplicationsListFooterComponent() { // fn#113421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:2449, owner: GuildSettingsModalMemberApplications.ListFooterComponent, offset: 0x023f7ffe, size: 88 bytes, params: 1, frame: 17
return (
ReactNativeModule.ActivityIndicator
? (
<View style={styles.footerSpinner}>
<ActivityIndicator size="small" color={styles.spinner.color} />
</View>
)
: null
);
}
}
const GuildJoinRequestApplicationStatuses = (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses;
const SUBMITTED = GuildJoinRequestApplicationStatuses.SUBMITTED;
r12 = SUBMITTED === applicationStatus ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/wqiSv']) : (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.APPROVED === applicationStatus ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bv82GS) : (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.REJECTED !== applicationStatus ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7YSJ6f']);
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
if (guildJoinRequests.length !== 0) {
object2 = {keyExtractor: value7, data: guildJoinRequests, renderItem: value6, estimatedItemSize: value3};
object3 = {};
object3.paddingBottom = bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentContainerStyle = object3;
object2.onEndReached = value5;
object2.ListFooterComponent = ListFooterComponent;
r9 = <FlashList {...object2} />;
} else {
const EmptyState2 = (require(1305) /* metro dependency 1305: native */).EmptyState;
r9 = <EmptyState2 Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={r12} />;
}
return (
<>
<View style={styles.containerInner}>
{r9}
</View>
<NavScrim />
</>
);
}
function _fun113414() { // fn#113414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:711, offset: 0x023f7aef, size: 39 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(15004) /* metro dependency 15004: openJoinRequestActionSheet */)(joinRequest);
}
function _fun113418() { // fn#113418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:1576, offset: 0x023f7f90, size: 32 bytes, params: 1, frame: 10
if (guildJoinRequests.length === 0) {
env0_5();
}
}
function _fun113419({item, index}) { // fn#113419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:1638, offset: 0x023f7fb0, size: 78 bytes, params: 2, frame: 15
return ((Component) => <Component joinRequest={item} start={index === 0} end={index === guildJoinRequests.length - 1} />)(env1_12);
}
function GuildSettingsModalMemberApplicationsListFooterComponent() { // fn#113421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15200:2449, owner: GuildSettingsModalMemberApplications.ListFooterComponent, offset: 0x023f7ffe, size: 88 bytes, params: 1, frame: 17
return env0_4 ? <View style={styles.footerSpinner}><ActivityIndicator size="small" color={styles.spinner.color} /></View> : null;
}
global.__d(_fun113411, 15003, [31, 27, 7068, 33, 4501, 697, 3995, 4573, 15004, 1423, 6238, 1305, 1585, 3860, 15009,
3972, 15010, 566, 1244, 8416, 8754, 5462,
2]) /* metro module 15003, dependencies: [31, 27, 7068, 33, 4501, 697, 3995, 4573, 15004, 1423, 6238, 1305, 1585, 3860, 15009, 3972, 15010, 566, 1244, 8416, 8754, 5462, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,145 +1,169 @@
/* Metro module 14995; source: modules/guild_settings/native/GuildSettingsModalMembersWithTabs.tsx; dependencies: [31, 27, 1867, 33, 4501, 697, 1478, 14596, 1244, 14996, 14997, 15003, 3972, 1484, 8853, 8811, 14998, 5277, 9139, 8859, 8859, 8861, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import Module09139 from '../../../by-id/module-09139.js'; /* Metro dependency 9139 */
import GuildSettingsModalMemberApplications from './GuildSettingsModalMemberApplications.tsx'; /* Metro dependency 15003 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as MemberVerificationTypesModule from '../../guild_member_verification/MemberVerificationTypes.tsx'; /* Metro dependency 3972 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as HeaderActionButtonNativeModule from '../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as ContextMenuNativeModule from '../../../design/components/ContextMenu/native/ContextMenu.native.tsx'; /* Metro dependency 8811 */
import * as TabsNativeModule from '../../../design/components/Tabs/native/Tabs.native.tsx'; /* Metro dependency 8859 */
import * as SegmentedControlPagesNativeModule from '../../../design/components/SegmentedControl/native/SegmentedControlPages.native.tsx'; /* Metro dependency 8861 */
import * as UseSubmittedGuildJoinRequestTotalModule from '../../guild_member_verification/hooks/useSubmittedGuildJoinRequestTotal.tsx'; /* Metro dependency 14596 */
import * as MemberSafetyPageTypesModule from '../../guild_mod_dash_member_safety/MemberSafetyPageTypes.tsx'; /* Metro dependency 14996 */
function _fun113329(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:6, offset: 0x023f46f7, size: 292 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
const env0_8 = Reflect.apply(createStyles, createStylesModule, [{container: {flex: 1,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [{container: {flex: 1,
backgroundColor: BACKGROUND_BASE_LOWER}, content: {flex: 1}, tabContainer: {'marginTop': 12, 'minHeight': 32}}]);
value = value.memo(_fun113330);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalMembersWithTabs.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalMembersWithTabs.tsx');
exports.default = value;
}
function _fun113330({guildId}) { // fn#113330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:324, offset: 0x023f481b, size: 445 bytes, params: 2, frame: 23
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const useSubmittedGuildJoinRequestTotalModule = require(14596) /* metro dependency 14596: useSubmittedGuildJoinRequestTotal */;
const useSubmittedGuildJoinRequestTotal = useSubmittedGuildJoinRequestTotalModule.useSubmittedGuildJoinRequestTotal;
const r8 = Reflect.apply(useSubmittedGuildJoinRequestTotal, useSubmittedGuildJoinRequestTotalModule,
[{guildId: guildId}]) ?? 0;
const styles = useStyles();
const value4 = env0_3.useMemo(_fun113331, [guildId, r8]);
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value6 = (require(8853) /* metro dependency 8853: SegmentedControlStateNative */).useSegmentedControlState({pageWidth: width,
items: value4, defaultIndex: r8 > 0 ? 1 : 0, onSetActiveIndex: onSetActiveIndex_113332});
const value7 = env0_3.useCallback(_fun113336, []);
const Tabs = (require(8859) /* metro dependency 8859: TabsNative */).Tabs;
const view = <View style={styles.tabContainer}><Tabs state={value6} grow formatCount={value7} /></View>;
const SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
return (
<View style={styles.container}>
{view}
<View style={styles.content}>
<SegmentedControlPages state={value6} />
function _fun113330({guildId}) { // fn#113330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:324, offset: 0x023f481b, size: 445 bytes, params: 2, frame: 23
const width = (UseWindowDimensionsNative)().width;
const useSubmittedGuildJoinRequestTotal = UseSubmittedGuildJoinRequestTotalModule.useSubmittedGuildJoinRequestTotal;
const r8 = Reflect.apply(useSubmittedGuildJoinRequestTotal, UseSubmittedGuildJoinRequestTotalModule,
[{guildId: guildId}]) ?? 0;
const styles = useStyles();
const value4 = env0_3.useMemo(_fun113331, [guildId, r8]);
const env0_2 = (UseNavigationNativeModule).useNavigation();
const value6 = (require(8853) /* metro dependency 8853: SegmentedControlStateNative */).useSegmentedControlState({pageWidth: width,
items: value4, defaultIndex: r8 > 0 ? 1 : 0, onSetActiveIndex: onSetActiveIndex_113332});
const value7 = env0_3.useCallback(_fun113336, []);
const Tabs = (TabsNativeModule).Tabs;
const view = (
<View style={styles.tabContainer}>
<Tabs
state={value6}
grow
formatCount={value7}
/>
</View>
</View>
);
}
);
const SegmentedControlPages = (SegmentedControlPagesNativeModule).SegmentedControlPages;
return (
<View style={styles.container}>
{view}
<View style={styles.content}>
<SegmentedControlPages state={value6} />
</View>
</View>
);
function _fun113331() { // fn#113331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:460, offset: 0x023f49d8, size: 594 bytes, params: 1, frame: 24
let object = {};
let value = environment.__proto__;
const value2 = undefined;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const NOOm1Z = (require(1244) /* metro dependency 1244: indexNative */).t.NOOm1Z;
object.label = Reflect.apply(string, intl, [NOOm1Z]);
const MemberSafetyPageTab = (MemberSafetyPageTypesModule).MemberSafetyPageTab;
const ALL_MEMBERS = MemberSafetyPageTab.ALL_MEMBERS;
object.id = ALL_MEMBERS;
object.page = ((Component) => <Component guildId={guildId} />)(importDefault(14997) /* metro dependency 14997: GuildSettingsModalMembers */);
const items2 = [object];
object = {};
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4eQVBO']);
const PENDING = MemberSafetyPageTab.PENDING;
object.id = PENDING;
object.count = env0_1 > 0 ? env0_1 : value2;
guildIdBinding = guildId;
const GuildJoinRequestApplicationStatuses = (MemberVerificationTypesModule).GuildJoinRequestApplicationStatuses;
const SUBMITTED = GuildJoinRequestApplicationStatuses.SUBMITTED;
object.page = <GuildSettingsModalMemberApplications guildId={guildIdBinding} applicationStatus={SUBMITTED} />;
items2[1] = object;
object = {};
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bSZkla);
let REJECTED = MemberSafetyPageTab.REJECTED;
object.id = REJECTED;
value = GuildSettingsModalMemberApplications;
REJECTED = GuildJoinRequestApplicationStatuses.REJECTED;
object.page = ((Component) => <Component guildId={guildIdBinding} applicationStatus={REJECTED} />)(value);
items2[2] = object;
object = {};
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aURgY2);
let APPROVED = MemberSafetyPageTab.APPROVED;
object.id = APPROVED;
value = GuildSettingsModalMemberApplications;
APPROVED = GuildJoinRequestApplicationStatuses.APPROVED;
object.page = ((Component) => <Component guildId={guildIdBinding} applicationStatus={APPROVED} />)(value);
items2[3] = object;
return items2;
}
function _fun113331() { // fn#113331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:460, offset: 0x023f49d8, size: 594 bytes, params: 1, frame: 24
let object2 = {};
let value = environment.__proto__;
const value2 = undefined;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const NOOm1Z = (require(1244) /* metro dependency 1244: indexNative */).t.NOOm1Z;
object2.label = Reflect.apply(string, intl, [NOOm1Z]);
const MemberSafetyPageTab = (require(14996) /* metro dependency 14996: MemberSafetyPageTypes */).MemberSafetyPageTab;
const ALL_MEMBERS = MemberSafetyPageTab.ALL_MEMBERS;
object2.id = ALL_MEMBERS;
object2.page = ((Component) => <Component guildId={guildId} />)(importDefault(14997) /* metro dependency 14997: GuildSettingsModalMembers */);
const items2 = [object2];
object2 = {};
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4eQVBO']);
const PENDING = MemberSafetyPageTab.PENDING;
object2.id = PENDING;
object2.count = env0_1 > 0 ? env0_1 : value2;
const GuildSettingsModalMemberApplications = importDefault(15003) /* metro dependency 15003: GuildSettingsModalMemberApplications */;
guildIdBinding = guildId;
const GuildJoinRequestApplicationStatuses = (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses;
const SUBMITTED = GuildJoinRequestApplicationStatuses.SUBMITTED;
object2.page = <GuildSettingsModalMemberApplications guildId={guildIdBinding} applicationStatus={SUBMITTED} />;
items2[1] = object2;
object2 = {};
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bSZkla);
let REJECTED = MemberSafetyPageTab.REJECTED;
object2.id = REJECTED;
value = GuildSettingsModalMemberApplications;
REJECTED = GuildJoinRequestApplicationStatuses.REJECTED;
object2.page = ((Component) => <Component guildId={guildIdBinding} applicationStatus={REJECTED} />)(value);
items2[2] = object2;
object2 = {};
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aURgY2);
let APPROVED = MemberSafetyPageTab.APPROVED;
object2.id = APPROVED;
value = GuildSettingsModalMemberApplications;
APPROVED = GuildJoinRequestApplicationStatuses.APPROVED;
object2.page = ((Component) => <Component guildId={guildIdBinding} applicationStatus={APPROVED} />)(value);
items2[3] = object2;
return items2;
}
function onSetActiveIndex_113332(a0) { // fn#113332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:1297, offset: 0x023f4c2a, size: 107 bytes, params: 2, frame: 13
var environment;
var value;
var binding;
var guildStoreBinding;
if (a0 === 0) {
value = environment.__proto__;
guildStoreBinding = GuildStore;
var env0_0 = guildStoreBinding.getGuild(guildId);
binding = env0_2;
binding.setOptions({headerRight: headerRight_113333});
} else {
env0_2.setOptions({headerRight: function() {
return null;
}});
}
function onSetActiveIndex_113332HeaderRight() { // fn#113333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:1357, owner: onSetActiveIndex_113332.headerRight, offset: 0x023f4c95, size: 123 bytes, params: 1, frame: 18
var environment;
var r4;
let value = environment.__proto__.__proto__;
const ContextMenu = (ContextMenuNativeModule).ContextMenu;
if (env0_0 != null) {
value = require(14998) /* metro dependency 14998: showMembersManagementActionSheet */;
value = value.getMembersManagementActions({guild: env0_0});
r4 = value;
} else {
r4 = [];
}
return (
<ContextMenu items={r4}>
{children_113334}
</ContextMenu>
);
function headerRightChildren(a0) { // fn#113334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:1459, owner: onSetActiveIndex_113332.headerRight.children, offset: 0x023f4d10, size: 158 bytes, params: 2, frame: 21
const ref = a0.ref;
const value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const headerActionButtonProps = {source: Module09139};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ogxXGq);
headerActionButtonProps.ref = ref;
copyDataProperties(headerActionButtonProps, value2, value);
return <HeaderActionButton {...headerActionButtonProps} />;
}
}
}
function _fun113336(a0) { // fn#113336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:1658, offset: 0x023f4dae, size: 70 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(a0);
return '(' + value + ')';
}
function onSetActiveIndex_113332(a0) { // fn#113332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:1297, offset: 0x023f4c2a, size: 107 bytes, params: 2, frame: 13
var environment;
var value;
var binding;
if (a0 === 0) {
value = environment.__proto__;
var env0_0 = GuildStore.getGuild(guildId);
binding = env0_2;
binding.setOptions({headerRight: headerRight_113333});
} else {
env0_2.setOptions({headerRight: function() {
return null;
}});
}
}
function _fun113336(a0) { // fn#113336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:1658, offset: 0x023f4dae, size: 70 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(a0);
return '(' + value + ')';
}
function onSetActiveIndex_113332HeaderRight() { // fn#113333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:1357, owner: onSetActiveIndex_113332.headerRight, offset: 0x023f4c95, size: 123 bytes, params: 1, frame: 18
var environment;
var r4;
let value = environment.__proto__.__proto__;
const ContextMenu = (require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu;
if (env0_0 != null) {
value = require(14998) /* metro dependency 14998: showMembersManagementActionSheet */;
value = value.getMembersManagementActions({guild: env0_0});
r4 = value;
} else {
r4 = [];
}
return (
<ContextMenu items={r4}>
{children_113334}
</ContextMenu>
);
}
function headerRightChildren(a0) { // fn#113334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:1459, owner: onSetActiveIndex_113332.headerRight.children, offset: 0x023f4d10, size: 158 bytes, params: 2, frame: 21
const ref = a0.ref;
const value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const headerActionButtonProps = {source: importDefault(9139) /* metro dependency 9139 */};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ogxXGq);
headerActionButtonProps.ref = ref;
copyDataProperties(headerActionButtonProps, value2, value);
return <HeaderActionButton {...headerActionButtonProps} />;
}
global.__d(_fun113329, 14995, [31, 27, 1867, 33, 4501, 697, 1478, 14596, 1244, 14996, 14997, 15003, 3972, 1484,
8853, 8811, 14998, 5277, 9139, 8859, 8859, 8861,
2]) /* metro module 14995, dependencies: [31, 27, 1867, 33, 4501, 697, 1478, 14596, 1244, 14996, 14997, 15003, 3972, 1484, 8853, 8811, 14998, 5277, 9139, 8859, 8859, 8861, 2] */;
@@ -1,16 +1,21 @@
/* Metro module 15986; source: modules/guild_settings/native/GuildSettingsModalMembersWrapper.tsx; dependencies: [31, 33, 6855, 14995, 14997, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun123658(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16194:6, offset: 0x025968f0, size: 148 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(_fun123659);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalMembersWrapper.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalMembersWrapper.tsx');
exports.default = value;
function _fun123659({guildId}) { // fn#123659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16194:130, offset: 0x02596984, size: 94 bytes, params: 2, frame: 16
return ((Component) => <Component guildId={guildId} />)(importDefault(require(dependencyMap[2]).useCanReviewGuildMemberApplications(guildId) ? dependencyMap[3] : dependencyMap[4]));
}
}
function _fun123659({guildId}) { // fn#123659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16194:130, offset: 0x02596984, size: 94 bytes, params: 2, frame: 16
return ((Component) => <Component guildId={guildId} />)(importDefault(require(dependencyMap[2]).useCanReviewGuildMemberApplications(guildId) ? dependencyMap[3] : dependencyMap[4]));
}
global.__d(_fun123658, 15986, [31, 33, 6855, 14995, 14997,
2]) /* metro module 15986, dependencies: [31, 33, 6855, 14995, 14997, 2] */;
@@ -1,62 +1,85 @@
/* Metro module 16127; source: modules/guild_settings/native/GuildSettingsModalOfficialMessages.tsx; dependencies: [57, 31, 27, 4502, 1867, 9113, 6233, 4503, 482, 33, 4501, 697, 1244, 13730, 11256, 13732, 4501, 1484, 566, 9112, 5282, 5277, 4080, 14392, 1962, 8853, 4017, 6238, 13187, 673, 4573, 9221, 3826, 6858, 674, 1305, 13745, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Module00674 from '../../../by-id/module-00674.js'; /* Metro dependency 674 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import GuildSettingsActionCreators from '../GuildSettingsActionCreators.tsx'; /* Metro dependency 9112 */
import GuildSettingsStore from '../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import ColorBlock from '../../../components_native/common/color_picker/ColorBlock.tsx'; /* Metro dependency 13187 */
import Module13745 from '../../../by-id/module-13745.js'; /* Metro dependency 13745 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as ColorUtilsModule from '../../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as HeaderActionButtonNativeModule from '../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as NavigatorHeaderNativeModule from '../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
import * as TableRowConstantsModule from '../../../design/components/TableRow/native/TableRowConstants.tsx'; /* Metro dependency 6233 */
import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as SegmentedControlStateNativeModule from '../../../design/components/SegmentedControl/native/SegmentedControlState.native.tsx'; /* Metro dependency 8853 */
import * as SegmentedControlNativeModule from '../../../design/components/SegmentedControl/native/SegmentedControl.native.tsx'; /* Metro dependency 9221 */
import * as ThemeDarkIconModule from '../../../design/components/Icon/native/redesign/generated/ThemeDarkIcon.tsx'; /* Metro dependency 11256 */
import * as ThemeLightIconModule from '../../../design/components/Icon/native/redesign/generated/ThemeLightIcon.tsx'; /* Metro dependency 13730 */
import * as ThemeMidnightIconModule from '../../../design/components/Icon/native/redesign/generated/ThemeMidnightIcon.tsx'; /* Metro dependency 13732 */
function _fun124477(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:6, offset: 0x025b9561, size: 963 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const StyleSheet = value.StyleSheet;
const env0_5 = value.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
const TABLE_ROW_PADDING = (require(6233) /* metro dependency 6233: TableRowConstants */).TABLE_ROW_PADDING;
const TABLE_ROW_PADDING = (TableRowConstantsModule).TABLE_ROW_PADDING;
value = require(4503) /* metro dependency 4503: MessageConstants */;
const env0_9 = value.DEFAULT_GUILD_OFFICIAL_COLOR;
const env0_10 = value.GUILD_OFFICIAL_HIGHLIGHT_ALPHA;
const env0_11 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.container = {gap: PX_8, height: '100%'};
const object7 = {};
object.container = {gap: PX_8, height: '100%'};
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.gap = PX_16;
object7.alignItems = 'center';
object3.gap = PX_16;
object3.alignItems = 'center';
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.paddingHorizontal = PX_16;
object3.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.marginBottom = PX_16;
object2.segmentedControlContainer = object7;
object2.trailingColorContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'};
object2.colorBlock = {'marginHorizontal': 0, 'marginVertical': 0, 'marginRight': 8, 'minWidth': 24, 'height': 24,
object3.marginBottom = PX_16;
object.segmentedControlContainer = object3;
object.trailingColorContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'};
object.colorBlock = {'marginHorizontal': 0, 'marginVertical': 0, 'marginRight': 8, 'minWidth': 24, 'height': 24,
'borderRadius': 3};
const object8 = {paddingHorizontal: TABLE_ROW_PADDING};
const object4 = {paddingHorizontal: TABLE_ROW_PADDING};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.gap = PX_8;
object2.chatSection = object8;
const object9 = {};
object4.gap = PX_8;
object.chatSection = object4;
const object5 = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object9.paddingVertical = PX_24;
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object9.borderWidth = StyleSheet.hairlineWidth;
object2.chatContainer = object9;
const object10 = {flexDirection: 'row'};
object5.paddingVertical = PX_24;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object5.borderWidth = StyleSheet.hairlineWidth;
object.chatContainer = object5;
const object6 = {flexDirection: 'row'};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object10.backgroundColor = BACKGROUND_BASE_LOW;
object6.backgroundColor = BACKGROUND_BASE_LOW;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.gap = PX_8;
object2.chatContainerInner = object10;
object2.chatContent = {flex: 1};
object2.chatHeader = {'flexDirection': 'row', 'alignItems': 'baseline', 'gap': 6};
object2.chatTimestamp = {marginTop: -8};
const env0_14 = Reflect.apply(createStyles, value, [object2]);
object6.gap = PX_8;
object.chatContainerInner = object6;
object.chatContent = {flex: 1};
object.chatHeader = {'flexDirection': 'row', 'alignItems': 'baseline', 'gap': 6};
object.chatTimestamp = {marginTop: -8};
const env0_14 = Reflect.apply(createStyles, value, [object]);
value = require(4501) /* metro dependency 4501: createStyles */;
let createAnimatedThemedStyles = value.createAnimatedThemedStyles;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
@@ -73,261 +96,303 @@ function _fun124477(global, require, importDefault, importAll, module, exports,
createAnimatedThemedStyles = value.createAnimatedThemedStyles;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
const env0_18 = Reflect.apply(createAnimatedThemedStyles, value, [{color: TEXT_MUTED}]);
object2 = {code: 'function GuildSettingsModalOfficialMessagesTsx1(){const{activeIndex}=this.__closure;return activeIndex.get();}'};
object2 = {code: 'function GuildSettingsModalOfficialMessagesTsx2(activeIndex){const{runOnJS,setCurrentThemeIndex}=this.__closure;runOnJS(setCurrentThemeIndex)(Math.round(activeIndex));}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalOfficialMessages.tsx');
object = {code: 'function GuildSettingsModalOfficialMessagesTsx1(){const{activeIndex}=this.__closure;return activeIndex.get();}'};
object = {code: 'function GuildSettingsModalOfficialMessagesTsx2(activeIndex){const{runOnJS,setCurrentThemeIndex}=this.__closure;runOnJS(setCurrentThemeIndex)(Math.round(activeIndex));}'};
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalOfficialMessages.tsx');
exports.default = GuildSettingsModalOfficialMessages;
}
function MessagePreview_124478({animatedStyles, selectedColor, theme}) { // fn#124478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:1772, offset: 0x025b9924, size: 777 bytes, params: 2, frame: 39
const styles = useStyles();
const value2 = ReactModule.useMemo(_fun124479, []);
const internal = (Native).internal;
const resolveSemanticColor = internal.resolveSemanticColor;
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
const value5 = (require(6858) /* metro dependency 6858: GuildOfficialMessageUtils */).getAccessibleGuildOfficialTextColor(selectedColor,
Reflect.apply(resolveSemanticColor, internal, [theme, BACKGROUND_BASE_LOWER]),
AccessibilityStore.desaturateUserColors ? AccessibilityStore.saturation : 1).hex();
const value6 = (Module00674)(selectedColor);
const value8 = value6.alpha(GUILD_OFFICIAL_HIGHLIGHT_ALPHA).hex();
const View2 = (ReanimatedRexport).View;
const items3 = [styles.chatContainer];
items3[1] = animatedStyles.borderStrong;
items3[2] = animatedStyles.bgBaseLow;
const items2 = [styles.chatContainerInner];
items2[1] = {backgroundColor: value8};
const Avatar = (NativeModule).Avatar;
const avatar = <Avatar source={Module13745} />;
const Text = (TextModule).Text;
const textStrong = animatedStyles.textStrong;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const view = (
<View style={styles.chatHeader}>
<Text
animated
style={textStrong}
variant="text-md/semibold"
lineClamp={1}
>
{Reflect.apply(string, intl, [(IndexNativeModule).t.cqpybK])}
</Text>
<Text
animated
variant="text-xs/medium"
style={[styles.chatTimestamp, animatedStyles.textMuted]}
>
{value2}
</Text>
</View>
);
const object2 = {color: value5};
string = intl.string;
const Mi9Kbe = (IndexNativeModule).t.Mi9Kbe;
return (
<View2 style={items3} pointerEvents="none">
<View style={items2}>
{avatar}
<View style={styles.chatContent}>
{view}
<Text
animated
variant="text-md/normal"
style={object2}
>
{Reflect.apply(string, intl, [Mi9Kbe])}
</Text>
</View>
</View>
</View2>
);
function _fun124479() { // fn#124479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:1863, offset: 0x025b9c2d, size: 69 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(3826) /* metro dependency 3826: DateUtils */;
const calendarFormat = value.calendarFormat;
const Date = global.Date;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date();
return Reflect.apply(calendarFormat, value, [date instanceof Object ? date : value2, true]);
}
function MessagePreview_124478({animatedStyles, selectedColor, theme}) { // fn#124478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:1772, offset: 0x025b9924, size: 777 bytes, params: 2, frame: 39
const styles = useStyles();
const value2 = env0_4.useMemo(_fun124479, []);
const internal = (importDefault(697) /* metro dependency 697: native */).internal;
const resolveSemanticColor = internal.resolveSemanticColor;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
const value5 = (require(6858) /* metro dependency 6858: GuildOfficialMessageUtils */).getAccessibleGuildOfficialTextColor(selectedColor,
Reflect.apply(resolveSemanticColor, internal, [theme, BACKGROUND_BASE_LOWER]),
AccessibilityStore.desaturateUserColors ? AccessibilityStore.saturation : 1).hex();
const value6 = (importDefault(674) /* metro dependency 674 */)(selectedColor);
const value8 = value6.alpha(GUILD_OFFICIAL_HIGHLIGHT_ALPHA).hex();
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [styles.chatContainer];
items3[1] = animatedStyles.borderStrong;
items3[2] = animatedStyles.bgBaseLow;
const items2 = [styles.chatContainerInner];
items2[1] = {backgroundColor: value8};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatar = <Avatar source={importDefault(13745) /* metro dependency 13745 */} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const textStrong = animatedStyles.textStrong;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const view = <View style={styles.chatHeader}><Text animated style={textStrong} variant="text-md/semibold" lineClamp={1}>{Reflect.apply(string,
intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.cqpybK])}</Text><Text animated variant="text-xs/medium" style={[styles.chatTimestamp,
animatedStyles.textMuted]}>{value2}</Text></View>;
const object = {color: value5};
string = intl.string;
const Mi9Kbe = (require(1244) /* metro dependency 1244: indexNative */).t.Mi9Kbe;
return (
<View2 style={items3} pointerEvents="none">
<View style={items2}>
{avatar}
<View style={styles.chatContent}>
{view}
<Text
animated
variant="text-md/normal"
style={object}
>
{Reflect.apply(string, intl, [Mi9Kbe])}
</Text>
}
function GuildSettingsModalOfficialMessages({guildId}) { // fn#124480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:2881, offset: 0x025b9c72, size: 1216 bytes, params: 2, frame: 35
const styles = useStyles();
const value3 = (UseNavigationNativeModule).useNavigation();
const {guild, submitting,
hasChanges} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsStore],
function() {
var object = {};
var guildSettingsStoreBinding = GuildSettingsStore;
object.guild = guildSettingsStoreBinding.getGuild();
object.submitting = guildSettingsStoreBinding.isSubmitting();
object.hasChanges = guildSettingsStoreBinding.hasChanges();
return object;
});
const hasChanges2 = hasChanges;
const r20 = guild?.officialMessageColor ?? DEFAULT_GUILD_OFFICIAL_COLOR;
const env0_4 = r20;
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
var r0;
r0 = GuildStore.getGuild(guildId)?.officialMessageColor;
r0 = r0 ?? DEFAULT_GUILD_OFFICIAL_COLOR;
return r0;
}, [guildId]);
let binding = env0_4;
let useState = binding.useState;
const value6 = Reflect.apply(useState, binding, [0]);
binding = hasChanges2;
const value7 = binding(value6, 2);
const property = value7[0];
const property2 = value7[1];
env0_4.useEffect(function() {
return _fun124484;
}, [guildId]);
env0_4.useEffect(_fun124485, [guildId, r20, value3, submitting, hasChanges]);
const value8 = env0_4.useCallback(_fun124490, [r20, value5]);
const binding5 = env0_4;
useState = binding5.useState;
const value9 = binding(Reflect.apply(useState, binding5, [0]), 2);
const property3 = value9[0];
const env0_7 = value9[1];
binding = env0_4;
let closure = _fun124492;
const value10 = binding.useCallback(closure, []);
const value11 = env0_4.useMemo(_fun124493, []);
const value12 = (SegmentedControlStateNativeModule).useSegmentedControlState({items: value11,
pageWidth: property3, defaultIndex: property});
const activeIndex = value12.activeIndex;
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = function() {
return activeIndex.get();
};
closure.__closure = {activeIndex: activeIndex};
closure.__workletHash = 4687220686460;
closure.__initData = env0_19;
const GuildSettingsModalOfficialMessagesB2 = GuildSettingsModalOfficialMessagesB;
GuildSettingsModalOfficialMessagesB2.__closure = {runOnJS: ReanimatedRexportModule.runOnJS,
setCurrentThemeIndex: property2};
GuildSettingsModalOfficialMessagesB2.__workletHash = 5332792853021;
GuildSettingsModalOfficialMessagesB2.__initData = env0_20;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, GuildSettingsModalOfficialMessagesB2]);
object = {bgBaseLow: env0_15(activeIndex), borderStrong: env0_16(activeIndex), textStrong: env0_17(activeIndex),
textMuted: env0_18(activeIndex)};
const TableRow = (TableRowNativeModule).TableRow;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const tableRow = (
<TableRow
label={Reflect.apply(string, intl, [(IndexNativeModule).t['2uQ6wZ']])}
onPress={value8}
arrow
trailing={<View style={styles.trailingColorContainer}>
{((Component) => <Component color={r20} style={styles.colorBlock} />)(ColorBlock)}
</View>}
subLabel={(ColorUtilsModule).int2hex(r20)}
/>
);
const Text = (TextModule).Text;
string = intl.string;
const VI0jGW = (IndexNativeModule).t.VI0jGW;
const items3 = [
<Text variant="heading-md/semibold">
{Reflect.apply(string, intl, [VI0jGW])}
</Text>,
];
items3[1] = (
<MessagePreview_124478
animatedStyles={object}
selectedColor={r20}
theme={value11[property].id}
/>
);
const SegmentedControl = (SegmentedControlNativeModule).SegmentedControl;
items3[2] = (
<View style={styles.segmentedControlContainer} onLayout={value10}>
<SegmentedControl variant="experimental_Large" state={value12} />
</View>
);
return (
<View style={styles.container}>
{tableRow}
<View style={styles.chatSection}>
{items3}
</View>
</View>
</View2>
);
}
);
function _fun124483() { // fn#124483, offset: 0x025ba19d, size: 11 bytes, params: 1, frame: 1
return _fun124484;
function _fun124484() { // fn#124484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3381, offset: 0x025ba1a8, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.cancelChanges(guildId);
}
function GuildSettingsModalOfficialMessages({guildId}) { // fn#124480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:2881, offset: 0x025b9c72, size: 1216 bytes, params: 2, frame: 35
var object2;
const styles = useStyles();
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const {guild, submitting,
hasChanges} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsStore],
function() {
var object = {};
object.guild = GuildSettingsStore.getGuild();
object.submitting = GuildSettingsStore.isSubmitting();
object.hasChanges = GuildSettingsStore.hasChanges();
return object;
});
const env0_3 = hasChanges;
const r20 = guild?.officialMessageColor ?? DEFAULT_GUILD_OFFICIAL_COLOR;
const env0_4 = r20;
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
var r0;
r0 = GuildStore.getGuild(guildId)?.officialMessageColor;
r0 = r0 ?? DEFAULT_GUILD_OFFICIAL_COLOR;
return r0;
}, [guildId]);
let binding = env0_4;
let useState = binding.useState;
const value6 = Reflect.apply(useState, binding, [0]);
binding = env0_3;
const value7 = binding(value6, 2);
const property = value7[0];
const property2 = value7[1];
env0_4.useEffect(function() {
return _fun124484;
}, [guildId]);
env0_4.useEffect(_fun124485, [guildId, r20, value3, submitting, hasChanges]);
const value8 = env0_4.useCallback(_fun124490, [r20, value5]);
const binding5 = env0_4;
useState = binding5.useState;
const value9 = binding(Reflect.apply(useState, binding5, [0]), 2);
const property3 = value9[0];
const env0_7 = value9[1];
binding = env0_4;
let closure = _fun124492;
const value10 = binding.useCallback(closure, []);
const value11 = env0_4.useMemo(_fun124493, []);
const value12 = (require(8853) /* metro dependency 8853: SegmentedControlStateNative */).useSegmentedControlState({items: value11,
pageWidth: property3, defaultIndex: property});
const activeIndex = value12.activeIndex;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
closure = function() {
return activeIndex.get();
};
closure.__closure = {activeIndex: activeIndex};
closure.__workletHash = 4687220686460;
closure.__initData = env0_19;
const closure2 = GuildSettingsModalOfficialMessagesB;
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setCurrentThemeIndex: property2};
closure2.__workletHash = 5332792853021;
closure2.__initData = env0_20;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
object2 = {bgBaseLow: env0_15(activeIndex), borderStrong: env0_16(activeIndex), textStrong: env0_17(activeIndex),
textMuted: env0_18(activeIndex)};
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const tableRow = <TableRow label={Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['2uQ6wZ']])} onPress={value8} arrow trailing={<View style={styles.trailingColorContainer}>{((Component) => <Component color={r20} style={styles.colorBlock} />)(importDefault(13187) /* metro dependency 13187: ColorBlock */)}</View>} subLabel={(require(673) /* metro dependency 673: ColorUtils */).int2hex(r20)} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const VI0jGW = (require(1244) /* metro dependency 1244: indexNative */).t.VI0jGW;
const items3 = [<Text variant="heading-md/semibold">{Reflect.apply(string, intl, [VI0jGW])}</Text>];
items3[1] = <MessagePreview_124478 animatedStyles={object2} selectedColor={r20} theme={value11[property].id} />;
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
items3[2] = <View style={styles.segmentedControlContainer} onLayout={value10}><SegmentedControl variant="experimental_Large" state={value12} /></View>;
return (
<View style={styles.container}>
{tableRow}
<View style={styles.chatSection}>
{items3}
</View>
</View>
);
}
}
function _fun124479() { // fn#124479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:1863, offset: 0x025b9c2d, size: 69 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(3826) /* metro dependency 3826: DateUtils */;
const calendarFormat = value.calendarFormat;
const Date = global.Date;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date();
return Reflect.apply(calendarFormat, value, [date instanceof Object ? date : value2, true]);
}
function _fun124485() { // fn#124485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3432, offset: 0x025ba1d5, size: 95 bytes, params: 1, frame: 16
const binding = env0_1;
const setOptions = binding.setOptions;
const submittingBinding = submitting;
const value2 = undefined;
Reflect.apply(setOptions, binding, [{headerLeft: submittingBinding ? function() {
return null;
} : value2, headerRight: submitting ? _fun124488 : hasChanges ? _fun124489 : value2}]);
return value2;
function handleSaveChanges_124486() { // fn#124486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3459, offset: 0x025ba234, size: 57 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.saveGuild(guildId, {officialMessageColor: env1_4});
}
function _fun124483() { // fn#124483, offset: 0x025ba19d, size: 11 bytes, params: 1, frame: 1
return _fun124484;
}
function _fun124488() { // fn#124488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3569, offset: 0x025ba26d, size: 45 bytes, params: 1, frame: 13
const HeaderSubmittingIndicator = (NavigatorHeaderNativeModule).HeaderSubmittingIndicator;
return <HeaderSubmittingIndicator />;
}
function _fun124485() { // fn#124485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3432, offset: 0x025ba1d5, size: 95 bytes, params: 1, frame: 16
const binding = env0_1;
const setOptions = binding.setOptions;
const submittingBinding = submitting;
const value2 = undefined;
Reflect.apply(setOptions, binding, [{headerLeft: submittingBinding ? function() {
return null;
} : value2, headerRight: submitting ? _fun124488 : hasChanges ? _fun124489 : value2}]);
return value2;
}
function _fun124489() { // fn#124489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3616, offset: 0x025ba29a, size: 107 bytes, params: 1, frame: 18
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const handleSaveChanges_124486Binding = handleSaveChanges_124486;
const intl = (IndexNativeModule).intl;
return (
<HeaderActionButton
onPress={handleSaveChanges_124486Binding}
text={intl.string((IndexNativeModule).t['R3BPH+'])}
/>
);
}
function _fun124490() { // fn#124490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3776, offset: 0x025ba305, size: 168 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[22]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[24]);
value = value(dependencyMap[23], dependencyMap.paths);
const object2 = {};
object2.color = env0_4;
object2.defaultColor = env0_5;
const intl = require(dependencyMap[12]).intl;
const string = intl.string;
const XqMe3N = require(dependencyMap[12]).t.XqMe3N;
object2.confirmLabel = Reflect.apply(string, intl, [XqMe3N]);
object2.onSelect = onSelect_124491;
Reflect.apply(openLazy, defaultImport, [value, 'RoleColorPicker', object2]);
}
}
function _fun124492({nativeEvent}) { // fn#124492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:4046, offset: 0x025ba3dd, size: 36 bytes, params: 2, frame: 11
env0_7(nativeEvent.layout.width);
}
function _fun124490() { // fn#124490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3776, offset: 0x025ba305, size: 168 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[22]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[24]);
value = value(dependencyMap[23], dependencyMap.paths);
const object = {};
object.color = env0_4;
object.defaultColor = env0_5;
const intl = require(dependencyMap[12]).intl;
const string = intl.string;
const XqMe3N = require(dependencyMap[12]).t.XqMe3N;
object.confirmLabel = Reflect.apply(string, intl, [XqMe3N]);
object.onSelect = onSelect_124491;
Reflect.apply(openLazy, defaultImport, [value, 'RoleColorPicker', object]);
function onSelect_124491(a0) { // fn#124491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3927, offset: 0x025ba3ad, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
(GuildSettingsActionCreators).updateGuild({officialMessageColor: a0});
}
function _fun124493() { // fn#124493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:4107, offset: 0x025ba401, size: 336 bytes, params: 1, frame: 21
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const K2sFfo = (require(1244) /* metro dependency 1244: indexNative */).t.K2sFfo;
object2.label = Reflect.apply(string, intl, [K2sFfo]);
const LIGHT = ThemeTypes.LIGHT;
object2.id = LIGHT;
const ThemeLightIcon = (require(13730) /* metro dependency 13730: ThemeLightIcon */).ThemeLightIcon;
object2.icon = <ThemeLightIcon />;
object2.page = null;
const items2 = [object2];
object2 = {};
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.b8Cei3);
const DARKER = ThemeTypes.DARKER;
object2.id = DARKER;
const ThemeDarkIcon = (require(11256) /* metro dependency 11256: ThemeDarkIcon */).ThemeDarkIcon;
object2.icon = <ThemeDarkIcon />;
object2.page = null;
items2[1] = object2;
object2 = {};
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pQwSpQ);
const MIDNIGHT = ThemeTypes.MIDNIGHT;
object2.id = MIDNIGHT;
const ThemeMidnightIcon = (require(13732) /* metro dependency 13732: ThemeMidnightIcon */).ThemeMidnightIcon;
object2.icon = <ThemeMidnightIcon />;
object2.page = null;
items2[2] = object2;
return items2;
}
}
function GuildSettingsModalOfficialMessagesB(a0) { // fn#124495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:4650, owner: GuildSettingsModalOfficialMessages.B, offset: 0x025ba563, size: 70 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_6);
const Math = global.Math;
value(Math.round(a0));
}
function _fun124492({nativeEvent}) { // fn#124492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:4046, offset: 0x025ba3dd, size: 36 bytes, params: 2, frame: 11
env0_7(nativeEvent.layout.width);
}
function _fun124484() { // fn#124484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3381, offset: 0x025ba1a8, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.cancelChanges(guildId);
}
function _fun124493() { // fn#124493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:4107, offset: 0x025ba401, size: 336 bytes, params: 1, frame: 21
let object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const K2sFfo = (require(1244) /* metro dependency 1244: indexNative */).t.K2sFfo;
object.label = Reflect.apply(string, intl, [K2sFfo]);
const LIGHT = ThemeTypes.LIGHT;
object.id = LIGHT;
const ThemeLightIcon = (ThemeLightIconModule).ThemeLightIcon;
object.icon = <ThemeLightIcon />;
object.page = null;
const items2 = [object];
object = {};
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.b8Cei3);
const DARKER = ThemeTypes.DARKER;
object.id = DARKER;
const ThemeDarkIcon = (ThemeDarkIconModule).ThemeDarkIcon;
object.icon = <ThemeDarkIcon />;
object.page = null;
items2[1] = object;
object = {};
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pQwSpQ);
const MIDNIGHT = ThemeTypes.MIDNIGHT;
object.id = MIDNIGHT;
const ThemeMidnightIcon = (ThemeMidnightIconModule).ThemeMidnightIcon;
object.icon = <ThemeMidnightIcon />;
object.page = null;
items2[2] = object;
return items2;
}
function handleSaveChanges() { // fn#124486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3459, offset: 0x025ba234, size: 57 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.saveGuild(guildId, {officialMessageColor: env1_4});
}
function GuildSettingsModalOfficialMessagesB(a0) { // fn#124495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:4650, owner: GuildSettingsModalOfficialMessages.B, offset: 0x025ba563, size: 70 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_6);
const Math = global.Math;
value(Math.round(a0));
}
function _fun124488() { // fn#124488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3569, offset: 0x025ba26d, size: 45 bytes, params: 1, frame: 13
const HeaderSubmittingIndicator = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).HeaderSubmittingIndicator;
return <HeaderSubmittingIndicator />;
}
}
function _fun124489() { // fn#124489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3616, offset: 0x025ba29a, size: 107 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const handleSaveChangesBinding = handleSaveChanges;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HeaderActionButton
onPress={handleSaveChangesBinding}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+'])}
/>
);
}
function onSelect_124491(a0) { // fn#124491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16335:3927, offset: 0x025ba3ad, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
(importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).updateGuild({officialMessageColor: a0});
}
global.__d(_fun124477, 16127, [57, 31, 27, 4502, 1867, 9113, 6233, 4503, 482, 33, 4501, 697, 1244, 13730, 11256,
13732, 4501, 1484, 566, 9112, 5282, 5277, 4080, 14392, 1962, 8853, 4017, 6238, 13187, 673, 4573, 9221, 3826,
6858, 674, 1305, 13745,
2]) /* metro module 16127, dependencies: [57, 31, 27, 4502, 1867, 9113, 6233, 4503, 482, 33, 4501, 697, 1244, 13730, 11256, 13732, 4501, 1484, 566, 9112, 5282, 5277, 4080, 14392, 1962, 8853, 4017, 6238, 13187, 673, 4573, 9221, 3826, 6858, 674, 1305, 13745, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,105 +1,130 @@
/* Metro module 14999; source: modules/guild_settings/native/MembersFilterActionSheet.tsx; dependencies: [31, 27, 4502, 1938, 9113, 33, 4501, 697, 566, 9112, 4080, 7987, 1305, 4573, 6805, 6758, 1244, 6277, 2] */
import GuildRoleStore from '../../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import GuildSettingsStore from '../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as TableRadioRowNativeModule from '../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
function _fun113374(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15196:6, offset: 0x023f651e, size: 353 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'marginVertical': 8, 'borderRadius': null, 'overflow': 'hidden'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.listView = object4;
object3.roleDot = {marginEnd: 4};
object3.labelContainer = {flexDirection: 'row'};
object = {};
const object2 = {'marginVertical': 8, 'borderRadius': null, 'overflow': 'hidden'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.listView = object2;
object.roleDot = {marginEnd: 4};
object.labelContainer = {flexDirection: 'row'};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object3.label = {color: INTERACTIVE_TEXT_DEFAULT};
const env0_10 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/MembersFilterActionSheet.tsx');
object.label = {color: INTERACTIVE_TEXT_DEFAULT};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/MembersFilterActionSheet.tsx');
exports.default = MembersFilterActionSheet;
}
function MembersFilterActionSheet({guild, selectedRoleId, onFilterRoleId}) { // fn#113375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15196:496, offset: 0x023f667f, size: 514 bytes, params: 2, frame: 24
var object2;
selectedRoleId = selectedRoleId === undefined ? GuildSettingsStore.getProps().selectedRoleId : selectedRoleId;
const styles = useStyles();
const env0_3 = styles;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, fluxModule, [[GuildRoleStore], function() {
return GuildRoleStore.getSortedRoles(guild.id);
}]).map(function(a0) {
var object = {};
var id = a0.id;
object.value = id;
copyDataProperties(object, a0, id);
return object;
});
value2.unshift(value2.splice(value2.length - 1, 1)[0]);
const binding = env0_3;
const value6 = binding.useCallback(_fun113380, [binding.useCallback(_fun113378, [onFilterRoleId, selectedRoleId]),
fluxModule.useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
}), selectedRoleId, styles]);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
object2 = {scrollable: true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.header = <BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pEasFX)} />;
const BottomSheetFlatList = (require(6277) /* metro dependency 6277 */).BottomSheetFlatList;
return (
<ActionSheet {...object2}>
<BottomSheetFlatList
data={value2}
keyExtractor={function(a0) {
return a0.id;
}}
renderItem={value6}
contentContainerStyle={styles.listView}
initialNumToRender={10}
removeClippedSubviews={false}
/>
</ActionSheet>
);
}
function _fun113378(a0) { // fn#113378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15196:768, offset: 0x023f68bb, size: 119 bytes, params: 2, frame: 13
var value;
if (a0 !== selectedRoleId) {
if (onFilterRoleId != null) {
onFilterRoleId(a0);
} else {
value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.selectRole(a0);
function MembersFilterActionSheet({guild, selectedRoleId, onFilterRoleId}) { // fn#113375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15196:496, offset: 0x023f667f, size: 514 bytes, params: 2, frame: 24
selectedRoleId = selectedRoleId === undefined ? GuildSettingsStore.getProps().selectedRoleId : selectedRoleId;
const styles = useStyles();
const styles2 = styles;
const useStateFromStores = FluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, FluxModule, [[GuildRoleStore], function() {
return GuildRoleStore.getSortedRoles(guild.id);
}]).map(function(a0) {
var object = {};
var id = a0.id;
object.value = id;
copyDataProperties(object, a0, id);
return object;
});
value2.unshift(value2.splice(value2.length - 1, 1)[0]);
const binding = styles2;
const value6 = binding.useCallback(_fun113380, [binding.useCallback(_fun113378, [onFilterRoleId, selectedRoleId]),
FluxModule.useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
}), selectedRoleId, styles]);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
object = {scrollable: true};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.header = (
<BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pEasFX)} />
);
const BottomSheetFlatList = (Module06277Module).BottomSheetFlatList;
return (
<ActionSheet {...object}>
<BottomSheetFlatList
data={value2}
keyExtractor={function(a0) {
return a0.id;
}}
renderItem={value6}
contentContainerStyle={styles.listView}
initialNumToRender={10}
removeClippedSubviews={false}
/>
</ActionSheet>
);
function _fun113378(a0) { // fn#113378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15196:768, offset: 0x023f68bb, size: 119 bytes, params: 2, frame: 13
var value;
if (a0 !== selectedRoleId) {
if (onFilterRoleId != null) {
onFilterRoleId(a0);
} else {
value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.selectRole(a0);
}
value = environment.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet('MembersFilter');
}
}
value = environment.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet('MembersFilter');
function _fun113380({item}) { // fn#113380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15196:936, offset: 0x023f6932, size: 379 bytes, params: 2, frame: 28
var environment;
let value = environment.__proto__;
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
const tableRadioRowProps = {value: item.id};
const r12 = roleStyle === 'dot' && item.colorString != null && ((RoleDot) => <RoleDot containerStyles={styles.roleDot} color={item.colorString} colors={item.colorStrings} />)((require(1305) /* metro dependency 1305: native */).RoleDot);
const Text = (TextModule).Text;
const colorString = item.colorString;
value = null;
tableRadioRowProps.label = (
<View style={styles.labelContainer}>
{r12}
<Text
variant="text-md/medium"
style={[styles.label,
value != colorString ? roleStyle !== 'username' ? value : {color: item.colorString} : value]}
>
{item.name}
</Text>
</View>
);
tableRadioRowProps.legacyCompat_onPress = legacyCompat_onPress;
tableRadioRowProps.legacyCompat_selected = item.id === selectedRoleId;
return <TableRadioRow {...tableRadioRowProps} />;
function legacyCompat_onPress() { // fn#113381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15196:1314, offset: 0x023b4826, size: 28 bytes, params: 1, frame: 11
return env1_4(item.id);
}
}
}
}
function _fun113380({item}) { // fn#113380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15196:936, offset: 0x023f6932, size: 379 bytes, params: 2, frame: 28
var environment;
let value = environment.__proto__;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
const tableRadioRowProps = {value: item.id};
const r12 = roleStyle === 'dot' && item.colorString != null && ((RoleDot) => <RoleDot containerStyles={styles.roleDot} color={item.colorString} colors={item.colorStrings} />)((require(1305) /* metro dependency 1305: native */).RoleDot);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const colorString = item.colorString;
value = null;
tableRadioRowProps.label = <View style={styles.labelContainer}>{r12}<Text variant="text-md/medium" style={[styles.label,
value != colorString ? roleStyle !== 'username' ? value : {color: item.colorString} : value]}>{item.name}</Text></View>;
tableRadioRowProps.legacyCompat_onPress = legacyCompat_onPress_113381;
tableRadioRowProps.legacyCompat_selected = item.id === selectedRoleId;
return <TableRadioRow {...tableRadioRowProps} />;
}
global.__d(_fun113374, 14999, [31, 27, 4502, 1938, 9113, 33, 4501, 697, 566, 9112, 4080, 7987, 1305, 4573, 6805,
6758, 1244, 6277,
2]) /* metro module 14999, dependencies: [31, 27, 4502, 1938, 9113, 33, 4501, 697, 566, 9112, 4080, 7987, 1305, 4573, 6805, 6758, 1244, 6277, 2] */;
@@ -1,132 +1,156 @@
/* Metro module 15000; source: modules/guild_settings/native/MembersPruneActionSheet.tsx; dependencies: [57, 31, 15001, 33, 694, 15002, 6805, 6758, 1244, 7988, 7987, 4573, 4578, 4080, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as TableRadioRowNativeModule from '../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
import * as PrunePreviewStoreModule from '../../guild_mod_dash_member_safety/PrunePreviewStore.tsx'; /* Metro dependency 15001 */
function _fun113383(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:6, offset: 0x023f6aad, size: 209 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 */;
let value = require(15001) /* metro dependency 15001: PrunePreviewStore */;
let value = PrunePreviewStoreModule;
const env0_5 = value.usePrunePreview;
const env0_6 = value.setPrunePreview;
const env0_7 = value.clearAllPrunePreviews;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/MembersPruneActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/MembersPruneActionSheet.tsx');
exports.default = MembersPruneActionSheet;
}
function MembersPruneActionSheet({guild}) { // fn#113384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:321, offset: 0x023f6b7e, size: 863 bytes, params: 2, frame: 33
var object3;
const env0_1 = guild.id;
const [property, env0_3] = env0_3Binding(ReactModule.useState(7), 2);
const {count, isLoading} = usePrunePreview(guild.id, property, []);
ReactModule.useEffect(_fun113385, [guild.id, property]);
ReactModule.useEffect(_fun113388, [guild.id, property, count]);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
object3 = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object3.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [t.zbyz7p])} />;
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
const object = {};
string = intl.string;
const YccTvK = (require(1244) /* metro dependency 1244: indexNative */).t.YccTvK;
object.title = Reflect.apply(string, intl, [YccTvK]);
object.defaultValue = property;
object.onChange = onChange_113389;
object.hasIcons = false;
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
let formatToPlainString = intl.formatToPlainString;
let FM1dHS = (require(1244) /* metro dependency 1244: indexNative */).t.FM1dHS;
const tableRadioRow = <TableRadioRow value={7} label={Reflect.apply(formatToPlainString, intl, [FM1dHS,
{days: 7}])} />;
formatToPlainString = intl.formatToPlainString;
FM1dHS = (require(1244) /* metro dependency 1244: indexNative */).t.FM1dHS;
const items2 = [
<TableRadioGroup {...object}>
{tableRadioRow}
<TableRadioRow value={30} label={Reflect.apply(formatToPlainString, intl, [FM1dHS, {days: 30}])} />
</TableRadioGroup>,
];
const Text = (TextModule).Text;
items2[1] = (
<Text variant="text-sm/medium">
{intl.format(isLoading ? t['98cHOp'] : t.f13az9, {members: count ?? -1, days: property})}
</Text>
);
const Button = (ButtonNativeModule).Button;
items2[2] = (
<Button
variant="destructive"
onPress={onPress_113390}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2mIlKQ'])}
/>
);
return (
<ActionSheet {...object3}>
{items2}
</ActionSheet>
);
function _fun113385() { // fn#113385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:474, offset: 0x023f6edd, size: 65 bytes, params: 1, frame: 14
var environment;
const handlePruneUpdate2 = handlePruneUpdate;
const value = environment.__proto__;
(Dispatcher).subscribe('GUILD_PRUNE_UPDATE', handlePruneUpdate2);
return _fun113387;
function handlePruneUpdate(a0) { // fn#113386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:501, offset: 0x023f6f1e, size: 124 bytes, params: 2, frame: 19
var prune;
var days;
var includeRoles;
var Number;
var value2;
var setPrunePreviewBinding;
let guildId = a0.guildId;
let value = environment.__proto__;
if (guildId === guild.id) {
prune = a0.prune;
if (prune.isPreview) {
prune = a0.prune;
days = prune.days;
prune = a0.prune;
includeRoles = prune.includeRoles;
Number = global.Number;
prune = a0.prune;
value = Number(prune.pruneCount);
value2 = environment.__proto__.__proto__;
setPrunePreviewBinding = setPrunePreview;
guildId = a0.guildId;
prune = a0.prune;
setPrunePreviewBinding(guildId, days, includeRoles, value, prune.isFinished);
}
}
}
function MembersPruneActionSheet({guild}) { // fn#113384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:321, offset: 0x023f6b7e, size: 863 bytes, params: 2, frame: 33
var object4;
const env0_1 = guild.id;
const binding = env0_4;
const [property, env0_3] = env0_3Binding(binding.useState(7), 2);
const {count, isLoading} = usePrunePreview(guild.id, property, []);
binding.useEffect(_fun113385, [guild.id, property]);
binding.useEffect(_fun113388, [guild.id, property, count]);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
object4 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object4.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [t.zbyz7p])} />;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const object2 = {};
string = intl.string;
const YccTvK = (require(1244) /* metro dependency 1244: indexNative */).t.YccTvK;
object2.title = Reflect.apply(string, intl, [YccTvK]);
object2.defaultValue = property;
object2.onChange = onChange_113389;
object2.hasIcons = false;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
let formatToPlainString = intl.formatToPlainString;
let FM1dHS = (require(1244) /* metro dependency 1244: indexNative */).t.FM1dHS;
const tableRadioRow = <TableRadioRow value={7} label={Reflect.apply(formatToPlainString, intl, [FM1dHS,
{days: 7}])} />;
formatToPlainString = intl.formatToPlainString;
FM1dHS = (require(1244) /* metro dependency 1244: indexNative */).t.FM1dHS;
const items2 = [<TableRadioGroup {...object2}>{tableRadioRow}<TableRadioRow value={30} label={Reflect.apply(formatToPlainString,
intl, [FM1dHS, {days: 30}])} /></TableRadioGroup>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text variant="text-sm/medium">{intl.format(isLoading ? t['98cHOp'] : t.f13az9, {members: count ?? -1,
days: property})}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <Button variant="destructive" onPress={onPress_113390} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2mIlKQ'])} />;
return (
<ActionSheet {...object4}>
{items2}
</ActionSheet>
);
}
function _fun113387() { // fn#113387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:721, offset: 0x023f6f9a, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('GUILD_PRUNE_UPDATE', handlePruneUpdate);
}
function _fun113385() { // fn#113385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:474, offset: 0x023f6edd, size: 65 bytes, params: 1, frame: 14
var environment;
const closure = handlePruneUpdate;
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('GUILD_PRUNE_UPDATE', closure);
return _fun113387;
}
function _fun113388() { // fn#113388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:812, offset: 0x023f6fce, size: 67 bytes, params: 1, frame: 13
var value2;
var defaultImport;
if (count == null) {
value2 = environment.__proto__;
defaultImport = importDefault(15002) /* metro dependency 15002: PruneGuildModalActionCreators */;
defaultImport.updateEstimateV2(guild.id, env0_2);
}
}
function MembersPruneActionSheetOnChange(a0) { // fn#113389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:1088, owner: MembersPruneActionSheet.onChange, offset: 0x023f7011, size: 45 bytes, params: 2, frame: 13
if (env0_2 !== a0 && id != null) {
env0_3(a0);
}
}
function MembersPruneActionSheetOnPress() { // fn#113390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:1545, owner: MembersPruneActionSheet.onPress, offset: 0x023f703e, size: 106 bytes, params: 1, frame: 17
var value4;
var defaultImport;
if (id != null && env0_2 != null) {
value4 = environment.__proto__;
defaultImport = importDefault(15002) /* metro dependency 15002: PruneGuildModalActionCreators */;
defaultImport.prune(id, env0_2);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
clearAllPrunePreviews();
}
}
function handlePruneUpdate(a0) { // fn#113386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:501, offset: 0x023f6f1e, size: 124 bytes, params: 2, frame: 19
var prune;
var days;
var includeRoles;
var Number;
var value2;
var setPrunePreviewBinding;
let guildId = a0.guildId;
let value = environment.__proto__;
if (guildId === guild.id) {
prune = a0.prune;
if (prune.isPreview) {
prune = a0.prune;
days = prune.days;
prune = a0.prune;
includeRoles = prune.includeRoles;
Number = global.Number;
prune = a0.prune;
value = Number(prune.pruneCount);
value2 = environment.__proto__.__proto__;
setPrunePreviewBinding = setPrunePreview;
guildId = a0.guildId;
prune = a0.prune;
setPrunePreviewBinding(guildId, days, includeRoles, value, prune.isFinished);
}
function _fun113388() { // fn#113388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:812, offset: 0x023f6fce, size: 67 bytes, params: 1, frame: 13
var value2;
var defaultImport;
if (count == null) {
value2 = environment.__proto__;
defaultImport = importDefault(15002) /* metro dependency 15002: PruneGuildModalActionCreators */;
defaultImport.updateEstimateV2(guild.id, env0_2);
}
}
function MembersPruneActionSheetOnChange(a0) { // fn#113389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:1088, owner: MembersPruneActionSheet.onChange, offset: 0x023f7011, size: 45 bytes, params: 2, frame: 13
if (env0_2 !== a0 && id != null) {
env0_3(a0);
}
}
function MembersPruneActionSheetOnPress() { // fn#113390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:1545, owner: MembersPruneActionSheet.onPress, offset: 0x023f703e, size: 106 bytes, params: 1, frame: 17
var value4;
var defaultImport;
if (id != null && env0_2 != null) {
value4 = environment.__proto__;
defaultImport = importDefault(15002) /* metro dependency 15002: PruneGuildModalActionCreators */;
defaultImport.prune(id, env0_2);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
clearAllPrunePreviews();
}
}
}
}
function _fun113387() { // fn#113387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15197:721, offset: 0x023f6f9a, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('GUILD_PRUNE_UPDATE', handlePruneUpdate);
}
global.__d(_fun113383, 15000, [57, 31, 15001, 33, 694, 15002, 6805, 6758, 1244, 7988, 7987, 4573, 4578, 4080,
2]) /* metro module 15000, dependencies: [57, 31, 15001, 33, 694, 15002, 6805, 6758, 1244, 7988, 7987, 4573, 4578, 4080, 2] */;
@@ -1,87 +1,104 @@
/* Metro module 14994; source: modules/guild_settings/native/StandaloneMembersView.tsx; dependencies: [31, 33, 1484, 1585, 9112, 5282, 1244, 14995, 10296, 10311, 10313, 5280, 2] */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import KickConfirm from '../../guild_moderation/native/KickConfirm.tsx'; /* Metro dependency 10311 */
import BanConfirm from '../../guild_moderation/native/BanConfirm.tsx'; /* Metro dependency 10313 */
import GuildSettingsModalMembersWithTabs from './GuildSettingsModalMembersWithTabs.tsx'; /* Metro dependency 14995 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorHeaderNativeModule from '../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
import * as GuildSettingsModalMemberEditModule from './GuildSettingsModalMemberEdit.tsx'; /* Metro dependency 10296 */
function _fun113318(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:6, offset: 0x023f4307, size: 188 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
object = {MAIN: 'MAIN', MEMBER_EDIT: 'MEMBER_EDIT', MEMBER_KICK: 'MEMBER_KICK', MEMBER_BAN: 'MEMBER_BAN'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/StandaloneMembersView.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/StandaloneMembersView.tsx');
exports.default = StandaloneMembersView;
function StandaloneMembersView({guildId}) { // fn#113319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:347, offset: 0x023f43c3, size: 410 bytes, params: 2, frame: 21
var object3;
const env0_1 = (UseNavigationNativeModule).useNavigation();
const bottom = (UseSafeAreaInsetsNative)().bottom;
let binding = ReactModule;
binding.useEffect(_fun113320, [guildId]);
object3 = {contentContainerStyle: {paddingBottom: 16 + bottom}};
object3 = {};
binding = env0_5;
let MAIN = binding.MAIN;
const object = {};
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun113321);
object.headerTitle = headerTitle_113322;
object.render = render_113323;
object3[MAIN] = object;
const MEMBER_EDIT = binding.MEMBER_EDIT;
object3[MEMBER_EDIT] = {render: render_113324};
const MEMBER_KICK = binding.MEMBER_KICK;
object3[MEMBER_KICK] = {headerTitle: function() {
return null;
}, render: render_113326};
const MEMBER_BAN = binding.MEMBER_BAN;
object3[MEMBER_BAN] = {headerTitle: function() {
return null;
}, render: render_113328};
const Navigator = (NavigatorNativeModule).Navigator;
MAIN = binding.MAIN;
const intl = (IndexNativeModule).intl;
return (
<Navigator
screens={object3}
initialRouteName={MAIN}
headerBackTitle={intl.string((IndexNativeModule).t['13/7kX'])}
/>
);
function _fun113320() { // fn#113320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:453, offset: 0x023f455d, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.init(guildId);
}
function _fun113321() { // fn#113321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:586, offset: 0x022358e7, size: 19 bytes, params: 1, frame: 9
return env0_1.goBack();
}
function StandaloneMembersViewHeaderTitle() { // fn#113322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:615, owner: StandaloneMembersView.headerTitle, offset: 0x023f458a, size: 96 bytes, params: 1, frame: 18
const NavigatorHeader = (NavigatorHeaderNativeModule).NavigatorHeader;
const intl = (IndexNativeModule).intl;
return <NavigatorHeader title={intl.string((IndexNativeModule).t['9Oq93m'])} />;
}
function StandaloneMembersViewRender() { // fn#113323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:702, owner: StandaloneMembersView.render, offset: 0x023f45ea, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component guildId={guildId} />)(GuildSettingsModalMembersWithTabs);
}
function StandaloneMembersViewRender_113324(a0) { // fn#113324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:754, owner: StandaloneMembersView.render, offset: 0x023f461c, size: 77 bytes, params: 2, frame: 15
const GuildSettingsModalMemberEditScene = (GuildSettingsModalMemberEditModule).GuildSettingsModalMemberEditScene;
return (
<GuildSettingsModalMemberEditScene
guildId={guildId}
{...a0}
{...env0_2}
/>
);
}
function StandaloneMembersViewRender_113326(a0) { // fn#113326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:870, owner: StandaloneMembersView.render, offset: 0x023f4669, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__;
return ((Component) => <Component guildId={guildId} {...a0} {...env0_2} />)(KickConfirm);
}
function StandaloneMembersViewRender_113328(a0) { // fn#113328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:951, owner: StandaloneMembersView.render, offset: 0x023f46b0, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__;
return ((Component) => <Component guildId={guildId} {...a0} {...env0_2} />)(BanConfirm);
}
}
}
function StandaloneMembersView({guildId}) { // fn#113319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:347, offset: 0x023f43c3, size: 410 bytes, params: 2, frame: 21
var object4;
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
let binding = env0_3;
binding.useEffect(_fun113320, [guildId]);
object4 = {contentContainerStyle: {paddingBottom: 16 + bottom}};
object4 = {};
binding = env0_5;
let MAIN = binding.MAIN;
const object2 = {};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun113321);
object2.headerTitle = headerTitle_113322;
object2.render = render_113323;
object4[MAIN] = object2;
const MEMBER_EDIT = binding.MEMBER_EDIT;
object4[MEMBER_EDIT] = {render: render_113324};
const MEMBER_KICK = binding.MEMBER_KICK;
object4[MEMBER_KICK] = {headerTitle: function() {
return null;
}, render: render_113326};
const MEMBER_BAN = binding.MEMBER_BAN;
object4[MEMBER_BAN] = {headerTitle: function() {
return null;
}, render: render_113328};
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
MAIN = binding.MAIN;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Navigator
screens={object4}
initialRouteName={MAIN}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function _fun113320() { // fn#113320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:453, offset: 0x023f455d, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.init(guildId);
}
function StandaloneMembersViewHeaderTitle() { // fn#113322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:615, owner: StandaloneMembersView.headerTitle, offset: 0x023f458a, size: 96 bytes, params: 1, frame: 18
const NavigatorHeader = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).NavigatorHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return <NavigatorHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m'])} />;
}
function StandaloneMembersViewRender() { // fn#113323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:702, owner: StandaloneMembersView.render, offset: 0x023f45ea, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component guildId={guildId} />)(importDefault(14995) /* metro dependency 14995: GuildSettingsModalMembersWithTabs */);
}
function StandaloneMembersViewRender_113324(a0) { // fn#113324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:754, owner: StandaloneMembersView.render, offset: 0x023f461c, size: 77 bytes, params: 2, frame: 15
const GuildSettingsModalMemberEditScene = (require(10296) /* metro dependency 10296: GuildSettingsModalMemberEdit */).GuildSettingsModalMemberEditScene;
return (
<GuildSettingsModalMemberEditScene
guildId={guildId}
{...a0}
{...env0_2}
/>
);
}
function StandaloneMembersViewRender_113326(a0) { // fn#113326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:870, owner: StandaloneMembersView.render, offset: 0x023f4669, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__;
return ((Component) => <Component guildId={guildId} {...a0} {...env0_2} />)(importDefault(10311) /* metro dependency 10311: KickConfirm */);
}
function StandaloneMembersViewRender_113328(a0) { // fn#113328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15191:951, owner: StandaloneMembersView.render, offset: 0x023f46b0, size: 71 bytes, params: 2, frame: 15
const value = environment.__proto__;
return ((Component) => <Component guildId={guildId} {...a0} {...env0_2} />)(importDefault(10313) /* metro dependency 10313: BanConfirm */);
}
global.__d(_fun113318, 14994, [31, 33, 1484, 1585, 9112, 5282, 1244, 14995, 10296, 10311, 10313, 5280,
2]) /* metro module 14994, dependencies: [31, 33, 1484, 1585, 9112, 5282, 1244, 14995, 10296, 10311, 10313, 5280, 2] */;
@@ -1,24 +1,28 @@
/* Metro module 15907; source: modules/guild_settings/native/showEmojiOverflowActionSheet.tsx; dependencies: [4080, 15908, 1962, 2] */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun122743(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16115:6, offset: 0x02572f4c, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/showEmojiOverflowActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/showEmojiOverflowActionSheet.tsx');
exports.default = showEmojiOverflowActionSheet;
function showEmojiOverflowActionSheet(a0) { // fn#122744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16115:198, offset: 0x02572fb3, size: 105 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
const object = {onClose: onClose_122745};
copyDataProperties(object, a0, undefined);
Reflect.apply(openLazy, defaultImport, [value, 'EmojiOverflowActionSheet', object]);
function showEmojiOverflowActionSheetOnClose() { // fn#122745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16115:314, owner: showEmojiOverflowActionSheet.onClose, offset: 0x0257301c, size: 43 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (ActionSheetActionCreators).hideActionSheet('EmojiOverflowActionSheet');
}
}
}
function showEmojiOverflowActionSheet(a0) { // fn#122744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16115:198, offset: 0x02572fb3, size: 105 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
const object2 = {onClose: onClose_122745};
copyDataProperties(object2, a0, undefined);
Reflect.apply(openLazy, defaultImport, [value, 'EmojiOverflowActionSheet', object2]);
}
function showEmojiOverflowActionSheetOnClose() { // fn#122745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16115:314, owner: showEmojiOverflowActionSheet.onClose, offset: 0x0257301c, size: 43 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('EmojiOverflowActionSheet');
}
global.__d(_fun122743, 15907, [4080, 15908, 1962, 2]) /* metro module 15907, dependencies: [4080, 15908, 1962, 2] */;
@@ -1,84 +1,110 @@
/* Metro module 14998; source: modules/guild_settings/native/showMembersManagementActionSheet.tsx; dependencies: [3784, 661, 1244, 4080, 14999, 1962, 483, 15000, 6802, 2] */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as BigFlagUtilsModule from '../../../external/discord_common/js/shared/utils/BigFlagUtils.tsx'; /* Metro dependency 483 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ShowSimpleActionSheetModule from '../../action_sheet/native/showSimpleActionSheet.tsx'; /* Metro dependency 6802 */
function _fun113367(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15195:6, offset: 0x023f6160, size: 160 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/showMembersManagementActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/showMembersManagementActionSheet.tsx');
exports.default = showMembersManagementActionSheet;
exports.getMembersManagementActions = getMembersManagementActions;
}
function showMembersManagementActionSheet({guild, selectedRoleId, onFilterRoleId}) { // fn#113368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15195:238, offset: 0x023f6200, size: 321 bytes, params: 2, frame: 21
var push;
let object = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
object.label = Reflect.apply(string, intl, [t.pEasFX]);
object.onPress = onPress_113369;
const items2 = [object];
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const combine = BigFlagUtilsModule.combine;
const MANAGE_GUILD = Permissions.MANAGE_GUILD;
const KICK_MEMBERS = Permissions.KICK_MEMBERS;
if (Reflect.apply(can, permissionStoreBinding, [Reflect.apply(combine, BigFlagUtilsModule, [MANAGE_GUILD,
KICK_MEMBERS]), guild])) {
push = items2.push;
object = {};
object.label = intl.string(t['2mIlKQ']);
object.onPress = onPress_113370;
object.isDestructive = true;
Reflect.apply(push, items2, [object]);
}
(ShowSimpleActionSheetModule).showSimpleActionSheet({'key': 'GuildSettingsMembersMore',
'options': null, 'hasIcons': false, options: items2});
function showMembersManagementActionSheetOnPress() { // fn#113369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15195:377, owner: showMembersManagementActionSheet.onPress, offset: 0x023f6341, size: 111 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[3]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[5]);
value = value(dependencyMap[4], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MembersFilter', {guild: guild, selectedRoleId: selectedRoleId,
onFilterRoleId: onFilterRoleId}]);
}
function showMembersManagementActionSheetOnPress_113370() { // fn#113370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15195:602, owner: showMembersManagementActionSheet.onPress, offset: 0x023f63b0, size: 93 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[3]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[5]);
value = value(dependencyMap[7], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MembersPrune', {guild: guild}]);
}
function showMembersManagementActionSheet({guild, selectedRoleId, onFilterRoleId}) { // fn#113368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15195:238, offset: 0x023f6200, size: 321 bytes, params: 2, frame: 21
var push;
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.label = Reflect.apply(string, intl, [t.pEasFX]);
object2.onPress = onPress_113369;
const items2 = [object2];
const can = PermissionStore.can;
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
const combine = bigFlagUtilsModule.combine;
const MANAGE_GUILD = Permissions.MANAGE_GUILD;
const KICK_MEMBERS = Permissions.KICK_MEMBERS;
if (Reflect.apply(can, PermissionStore, [Reflect.apply(combine, bigFlagUtilsModule, [MANAGE_GUILD, KICK_MEMBERS]),
guild])) {
push = items2.push;
object2 = {};
object2.label = intl.string(t['2mIlKQ']);
object2.onPress = onPress_113370;
object2.isDestructive = true;
Reflect.apply(push, items2, [object2]);
}
(require(6802) /* metro dependency 6802: showSimpleActionSheet */).showSimpleActionSheet({'key': 'GuildSettingsMembersMore',
'options': null, 'hasIcons': false, options: items2});
}
function getMembersManagementActions({guild, selectedRoleId, onFilterRoleId}) { // fn#113371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15195:814, offset: 0x023f640d, size: 273 bytes, params: 2, frame: 21
var push;
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.label = Reflect.apply(string, intl, [t.pEasFX]);
object2.action = action_113372;
const items2 = [object2];
const can = PermissionStore.can;
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
const combine = bigFlagUtilsModule.combine;
const MANAGE_GUILD = Permissions.MANAGE_GUILD;
const KICK_MEMBERS = Permissions.KICK_MEMBERS;
if (Reflect.apply(can, PermissionStore, [Reflect.apply(combine, bigFlagUtilsModule, [MANAGE_GUILD, KICK_MEMBERS]),
guild])) {
push = items2.push;
object2 = {};
object2.label = intl.string(t['2mIlKQ']);
object2.action = action_113373;
object2.variant = 'destructive';
Reflect.apply(push, items2, [object2]);
function getMembersManagementActions({guild, selectedRoleId, onFilterRoleId}) { // fn#113371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15195:814, offset: 0x023f640d, size: 273 bytes, params: 2, frame: 21
var push;
let object = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
object.label = Reflect.apply(string, intl, [t.pEasFX]);
object.action = action_113372;
const items2 = [object];
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const combine = BigFlagUtilsModule.combine;
const MANAGE_GUILD = Permissions.MANAGE_GUILD;
const KICK_MEMBERS = Permissions.KICK_MEMBERS;
if (Reflect.apply(can, permissionStoreBinding, [Reflect.apply(combine, BigFlagUtilsModule, [MANAGE_GUILD,
KICK_MEMBERS]), guild])) {
push = items2.push;
object = {};
object.label = intl.string(t['2mIlKQ']);
object.action = action_113373;
object.variant = 'destructive';
Reflect.apply(push, items2, [object]);
}
return items2;
function getMembersManagementActionsAction() { // fn#113372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15195:948, owner: getMembersManagementActions.action, offset: 0x023f6341, size: 111 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[3]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[5]);
value = value(dependencyMap[4], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MembersFilter', {guild: guild, selectedRoleId: selectedRoleId,
onFilterRoleId: onFilterRoleId}]);
}
function getMembersManagementActionsAction_113373() { // fn#113373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15195:1179, owner: getMembersManagementActions.action, offset: 0x023f63b0, size: 93 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[3]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[5]);
value = value(dependencyMap[7], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MembersPrune', {guild: guild}]);
}
}
return items2;
}
function showMembersManagementActionSheetOnPress() { // fn#113369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15195:377, owner: showMembersManagementActionSheet.onPress, offset: 0x023f6341, size: 111 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[3]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[5]);
value = value(dependencyMap[4], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MembersFilter', {guild: guild, selectedRoleId: selectedRoleId,
onFilterRoleId: onFilterRoleId}]);
}
function showMembersManagementActionSheetOnPress_113370() { // fn#113370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15195:602, owner: showMembersManagementActionSheet.onPress, offset: 0x023f63b0, size: 93 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[3]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[5]);
value = value(dependencyMap[7], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MembersPrune', {guild: guild}]);
}
global.__d(_fun113367, 14998, [3784, 661, 1244, 4080, 14999, 1962, 483, 15000, 6802,
2]) /* metro module 14998, dependencies: [3784, 661, 1244, 4080, 14999, 1962, 483, 15000, 6802, 2] */;
@@ -1,107 +1,110 @@
/* Metro module 15954; source: modules/guild_settings/roles/GuildSettingsModalRolesActionCreators.tsx; dependencies: [5, 661, 507, 6931, 694, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun123312(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:6, offset: 0x02587f3f, size: 291 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const updateGuildRole = function() {
return _updateGuildRole.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
object2 = {startReordering: startReordering_123317, stopReordering: stopReordering_123318,
object = {startReordering: startReordering_123317, stopReordering: stopReordering_123318,
updateRoleOrder: updateRoleOrder, toggleRoleSetting: function(a0, a1, a2, a3) {
return updateGuildRole({guildId: a0, roleId: a1.id, name: a1.name, permissions: a1.permissions, color: a1.color,
hoist: a2, mentionable: a3});
}, startEditingPermissions: startEditingPermissions, stopEditingPermissions: stopEditingPermissions,
allowPermission: allowPermission, denyPermission: denyPermission,
cancelPermissionChanges: cancelPermissionChanges, savePermissionChanges: savePermissionChanges};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsModalRolesActionCreators.tsx');
exports.default = object2;
}
function _updateGuildRole() { // fn#123314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:199, offset: 0x02588062, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun123316).apply(this, arguments);
}
function startReordering_123317(a0) { // fn#123317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:574, offset: 0x02588195, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_START_REORDER',
guildId: a0});
}
function stopReordering_123318() { // fn#123318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:672, offset: 0x025881cd, size: 47 bytes, params: 1, frame: 12
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun123319);
}
function updateRoleOrder(a0, a1) { // fn#123320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:777, offset: 0x0258822d, size: 63 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER',
from: a0, to: a1});
}
function startEditingPermissions(a0, a1) { // fn#123322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1020, offset: 0x025882bf, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_START_EDITING',
guildId: a0, roleId: a1});
}
function stopEditingPermissions() { // fn#123323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1149, offset: 0x025882ff, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_STOP_EDITING'});
}
function allowPermission(a0) { // fn#123324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1254, offset: 0x02588330, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSION_ALLOW',
permission: a0});
}
function denyPermission(a0) { // fn#123325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1358, offset: 0x02588369, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSION_DENY',
permission: a0});
}
function cancelPermissionChanges() { // fn#123326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1460, offset: 0x025883a2, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL'});
}
function savePermissionChanges({guildId, roleId, name, permissions, color, hoist, mentionable}) { // fn#123327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1560, offset: 0x025883d3, size: 161 bytes, params: 2, frame: 23
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING'});
updateGuildRole({guildId: guildId, roleId: roleId, name: name, permissions: permissions, color: color, hoist: hoist,
mentionable: mentionable}).then(_fun123328, _fun123329);
}
async function _fun123316({guildId, roleId, name, permissions, color, hoist, mentionable}) { // fn#123316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:254, offset: 0x025880a8, size: 237 bytes, params: 2, frame: 25
if (true) {
await undefined;
if (false) {
return undefined;
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsModalRolesActionCreators.tsx');
exports.default = object;
function _updateGuildRole() { // fn#123314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:199, offset: 0x02588062, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun123316).apply(this, arguments);
async function _fun123316({guildId, roleId, name, permissions, color, hoist, mentionable}) { // fn#123316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:254, offset: 0x025880a8, size: 237 bytes, params: 2, frame: 25
if (true) {
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[2]).HTTP;
var patch = HTTP.patch;
var object = {};
object.url = env2_4.GUILD_ROLE(guildId, roleId);
object.body = {name: name, permissions: permissions, color: color ?? 0, hoist: hoist, mentionable: mentionable};
object.oldFormErrors = true;
object.rejectWithError = false;
await Reflect.apply(patch, HTTP, [object]);
if (false) {
return undefined;
}
env2_1(env2_2[3]).checkGuildTemplateDirty(guildId);
}
}
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[2]).HTTP;
var patch = HTTP.patch;
var object2 = {};
object2.url = env2_4.GUILD_ROLE(guildId, roleId);
object2.body = {name: name, permissions: permissions, color: color ?? 0, hoist: hoist,
mentionable: mentionable};
object2.oldFormErrors = true;
object2.rejectWithError = false;
await Reflect.apply(patch, HTTP, [object2]);
if (false) {
return undefined;
}
env2_1(env2_2[3]).checkGuildTemplateDirty(guildId);
}
function startReordering_123317(a0) { // fn#123317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:574, offset: 0x02588195, size: 56 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_START_REORDER',
guildId: a0});
}
function stopReordering_123318() { // fn#123318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:672, offset: 0x025881cd, size: 47 bytes, params: 1, frame: 12
(Dispatcher).wait(_fun123319);
function _fun123319() { // fn#123319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:703, offset: 0x025881fc, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_STOP_REORDER'});
}
}
function updateRoleOrder(a0, a1) { // fn#123320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:777, offset: 0x0258822d, size: 63 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER',
from: a0, to: a1});
}
function startEditingPermissions(a0, a1) { // fn#123322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1020, offset: 0x025882bf, size: 64 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_START_EDITING',
guildId: a0, roleId: a1});
}
function stopEditingPermissions() { // fn#123323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1149, offset: 0x025882ff, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_STOP_EDITING'});
}
function allowPermission(a0) { // fn#123324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1254, offset: 0x02588330, size: 57 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSION_ALLOW',
permission: a0});
}
function denyPermission(a0) { // fn#123325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1358, offset: 0x02588369, size: 57 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSION_DENY',
permission: a0});
}
function cancelPermissionChanges() { // fn#123326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1460, offset: 0x025883a2, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL'});
}
function savePermissionChanges({guildId, roleId, name, permissions, color, hoist, mentionable}) { // fn#123327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1560, offset: 0x025883d3, size: 161 bytes, params: 2, frame: 23
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING'});
updateGuildRole({guildId: guildId, roleId: roleId, name: name, permissions: permissions, color: color, hoist: hoist,
mentionable: mentionable}).then(_fun123328, _fun123329);
function _fun123328() { // fn#123328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1827, offset: 0x02588474, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_SUCCESS'});
}
function _fun123329() { // fn#123329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1918, offset: 0x025884a5, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (Dispatcher).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_FAILURE'});
}
}
}
function _fun123319() { // fn#123319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:703, offset: 0x025881fc, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_STOP_REORDER'});
}
function _fun123328() { // fn#123328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1827, offset: 0x02588474, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_SUCCESS'});
}
function _fun123329() { // fn#123329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16162:1918, offset: 0x025884a5, size: 49 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_FAILURE'});
}
global.__d(_fun123312, 15954, [5, 661, 507, 6931, 694,
2]) /* metro module 15954, dependencies: [5, 661, 507, 6931, 694, 2] */;
@@ -1,30 +1,37 @@
/* Metro module 15941; source: modules/guild_settings/roles/GuildSettingsModalRolesStore.tsx; dependencies: [6, 7, 15, 17, 18, 1938, 1867, 661, 11879, 4002, 1244, 483, 566, 694, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildRoleStore from '../../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as SharedModule from '../../../design/shared.tsx'; /* Metro dependency 4002 */
function _fun123078(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:6, offset: 0x02580b8b, size: 609 bytes, params: 8, frame: 21
const env0_0 = require;
const getSortedRoleIds = function(a0) {
return a0.map(_fun123083);
};
const closure = GUILD_ROLE_CREATE_123084;
const closure2 = GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL;
const GUILD_ROLE_CREATE_1230842 = GUILD_ROLE_CREATE_123084;
const GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL2 = GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const FormStates = (require(661) /* metro dependency 661: Constants */).FormStates;
const FormStates = (ConstantsModule).FormStates;
let env0_12 = FormStates.CLOSED;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun123087(Store);
value.displayName = 'GuildSettingsModalRolesStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{GUILD_SETTINGS_MODAL_ROLES_START_REORDER: GUILD_SETTINGS_MODAL_ROLES_START_REORDER,
GUILD_SETTINGS_MODAL_ROLES_STOP_REORDER: GUILD_SETTINGS_MODAL_ROLES_STOP_REORDER,
GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER: GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER, GUILD_ROLE_CREATE: closure,
GUILD_ROLE_UPDATE: closure, GUILD_ROLE_DELETE: GUILD_ROLE_DELETE_123102,
GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER: GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER,
GUILD_ROLE_CREATE: GUILD_ROLE_CREATE_1230842, GUILD_ROLE_UPDATE: GUILD_ROLE_CREATE_1230842,
GUILD_ROLE_DELETE: GUILD_ROLE_DELETE_123102,
GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_START_EDITING: GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_START_EDITING,
GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_STOP_EDITING: function() {
env0_18 = null;
@@ -33,7 +40,7 @@ function _fun123078(global, require, importDefault, importAll, module, exports,
env0_15 = null;
env0_19 = false;
env0_12 = FormStates.CLOSED;
}, GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL: closure2,
}, GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL: GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL2,
GUILD_SETTINGS_MODAL_ROLES_PERMISSION_ALLOW: GUILD_SETTINGS_MODAL_ROLES_PERMISSION_ALLOW,
GUILD_SETTINGS_MODAL_ROLES_PERMISSION_DENY: GUILD_SETTINGS_MODAL_ROLES_PERMISSION_DENY,
GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING: function() {
@@ -46,191 +53,224 @@ function _fun123078(global, require, importDefault, importAll, module, exports,
}, GUILD_SETTINGS_SUBMIT: function() {
env0_21 = true;
}, GUILD_SETTINGS_SUBMIT_SUCCESS: GUILD_SETTINGS_SUBMIT_SUCCESS_123111});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsModalRolesStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsModalRolesStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_123079() { // fn#123079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:191, offset: 0x02580dec, 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) {
function _isNativeReflectConstruct_123079() { // fn#123079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:191, offset: 0x02580dec, 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_123079_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_123079_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getSortedRoleIds(a0) { // fn#123082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:456, offset: 0x02580e4e, size: 24 bytes, params: 2, frame: 11
return a0.map(function(a0) {
return a0.id;
});
}
function GUILD_ROLE_CREATE_123084({guildId}) { // fn#123084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:513, offset: 0x02580e66, size: 52 bytes, params: 2, frame: 13
if (env0_13) {
env0_14 = getSortedRoleIds(GuildRoleStore.getSortedRoles(guildId));
}
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL() { // fn#123085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:610, offset: 0x02580e9a, size: 47 bytes, params: 1, frame: 3
if (env0_18 == null) {
return false;
}
if (env0_18 === env0_17) {
return false;
}
}
function checkForPermissionChanges() { // fn#123086, offset: 0x02580ec9, size: 23 bytes, params: 1, frame: 3
result = env0_17 !== env0_18;
}
function _fun123087(a0) { // fn#123087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:739, offset: 0x02580ee0, size: 251 bytes, params: 2, frame: 16
const closure = GuildSettingsModalRolesStore;
env0_8(closure, a0);
return env0_5(closure, [{key: 'initialize', value: function() {
this.waitFor(GuildStore, GuildRoleStore);
}}, {key: 'submitting', get: function() {
return CLOSED === FormStates.SUBMITTING;
}}, {key: 'getUpdates', value: value_123091}, {key: 'order', get: get_123094}, {key: 'guild', get: get_123095},
{key: 'role', get: get_123096}, {key: 'permissions', get: get_123097}, {key: 'hasPermissionChanges',
get: get_123098}]);
}
function GUILD_SETTINGS_MODAL_ROLES_START_REORDER({guildId}) { // fn#123099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:1777, offset: 0x02581113, size: 85 bytes, params: 2, frame: 13
env0_14 = getSortedRoleIds(GuildRoleStore.getSortedRoles(guildId));
env0_15 = GuildStore.getGuild(guildId);
global.clearTimeout(env0_20);
}
function GUILD_SETTINGS_MODAL_ROLES_STOP_REORDER() { // fn#123100, offset: 0x02581168, size: 30 bytes, params: 1, frame: 3
if (env0_21) {
}
}
function GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER({from, to}) { // fn#123101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:2028, offset: 0x02581186, size: 290 bytes, params: 2, frame: 21
const AccessibilityAnnouncer = (require(4002) /* metro dependency 4002: shared */).AccessibilityAnnouncer;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (env0_14 == null) {
return false;
}
if ((importDefault(11879) /* metro dependency 11879: DragAndDropUtils */).moveItemFromTo(env0_14, from,
to)[from] !== env0_14[from]) {
AccessibilityAnnouncer.announce(intl.formatToPlainString(t['+tmElp'], {from: from + 1, to: to + 1}));
} else {
AccessibilityAnnouncer.announce(intl.string(t.WaxXjc));
}
}
function GUILD_ROLE_DELETE_123102({roleId}) { // fn#123102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:2459, offset: 0x025812a8, size: 78 bytes, params: 2, frame: 13
if (env0_14 == null) {
return false;
}
const value2 = env0_14.indexOf(roleId);
if (value2 === -1) {
return false;
}
env0_14.splice(value2, 1);
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_START_EDITING({guildId, roleId}) { // fn#123103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:2628, offset: 0x025812f6, size: 116 bytes, params: 2, frame: 17
var permissions;
const guild = GuildStore.getGuild(guildId);
const r1 = guild != null ? GuildRoleStore.getRole(guild.id, roleId) : undefined;
if (r1 != null) {
permissions = r1.permissions;
}
env0_12 = FormStates.OPEN;
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSION_ALLOW({permission}) { // fn#123105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3022, offset: 0x02581397, size: 77 bytes, params: 2, frame: 15
if (env0_18 == null) {
return false;
}
env0_18 = (importAll(483) /* metro dependency 483: BigFlagUtils */).add(env0_18, permission);
checkForPermissionChanges();
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSION_DENY({permission}) { // fn#123106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3181, offset: 0x025813e4, size: 78 bytes, params: 2, frame: 15
if (env0_18 == null) {
return false;
}
env0_18 = (importAll(483) /* metro dependency 483: BigFlagUtils */).remove(env0_18, permission);
checkForPermissionChanges();
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_SUCCESS() { // fn#123108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3458, offset: 0x02581447, size: 37 bytes, params: 1, frame: 9
env0_12 = FormStates.OPEN;
checkForPermissionChanges();
}
function GUILD_SETTINGS_SUBMIT_SUCCESS_123111() { // fn#123111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3767, offset: 0x02581489, size: 61 bytes, params: 1, frame: 14
global.clearTimeout(env0_20);
env0_20 = global.setTimeout(function() {
env1_14 = null;
}, 400);
}
function GuildSettingsModalRolesStore() { // fn#123088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:751, offset: 0x02580fdb, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_4(this, GuildSettingsModalRolesStore);
const value3 = env1_7(GuildSettingsModalRolesStore);
return env1_6(this, _isNativeReflectConstruct_123079() ? global.Reflect.construct(value3, arguments,
env1_7(this).constructor) : value3.apply(this, arguments));
}
function value_123091() { // fn#123091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:1223, offset: 0x02581063, size: 166 bytes, params: 1, frame: 17
var environment;
var r0;
var defaultImport;
var calculatePositionDeltas;
var object2;
var getSortedRoles;
var id;
var getManyRoles;
const value = environment.__proto__;
if (env1_14 == null) {
r0 = [];
} else if (env1_15 == null) {
r0 = [];
} else {
defaultImport = importDefault(11879) /* metro dependency 11879: DragAndDropUtils */;
calculatePositionDeltas = defaultImport.calculatePositionDeltas;
object2 = {};
getSortedRoles = GuildRoleStore.getSortedRoles;
id = env1_15.id;
object2.oldOrdering = Reflect.apply(getSortedRoles, GuildRoleStore, [id]);
getManyRoles = GuildRoleStore.getManyRoles;
id = env1_15.id;
object2.newOrdering = Reflect.apply(getManyRoles, GuildRoleStore, [id, env1_14]);
object2.idGetter = function(a0) {
function getSortedRoleIds(a0) { // fn#123082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:456, offset: 0x02580e4e, size: 24 bytes, params: 2, frame: 11
return a0.map(function(a0) {
return a0.id;
};
object2.existingPositionGetter = existingPositionGetter_123093;
object2.ascending = false;
r0 = Reflect.apply(calculatePositionDeltas, defaultImport, [object2]);
});
}
return r0;
function GUILD_ROLE_CREATE_123084({guildId}) { // fn#123084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:513, offset: 0x02580e66, size: 52 bytes, params: 2, frame: 13
if (env0_13) {
env0_14 = getSortedRoleIds(GuildRoleStore.getSortedRoles(guildId));
}
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL() { // fn#123085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:610, offset: 0x02580e9a, size: 47 bytes, params: 1, frame: 3
if (env0_18 == null) {
return false;
}
if (env0_18 === env0_17) {
return false;
}
}
function checkForPermissionChanges() { // fn#123086, offset: 0x02580ec9, size: 23 bytes, params: 1, frame: 3
result = env0_17 !== env0_18;
}
function _fun123087(a0) { // fn#123087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:739, offset: 0x02580ee0, size: 251 bytes, params: 2, frame: 16
const GuildSettingsModalRolesStore2 = GuildSettingsModalRolesStore;
Inherits(GuildSettingsModalRolesStore2, a0);
return CreateClass(GuildSettingsModalRolesStore2, [{key: 'initialize', value: function() {
this.waitFor(GuildStore, GuildRoleStore);
}}, {key: 'submitting', get: function() {
return CLOSED === FormStates.SUBMITTING;
}}, {key: 'getUpdates', value: value_123091}, {key: 'order', get: get_123094}, {key: 'guild', get: get_123095},
{key: 'role', get: get_123096}, {key: 'permissions', get: get_123097}, {key: 'hasPermissionChanges',
get: get_123098}]);
function GuildSettingsModalRolesStore() { // fn#123088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:751, offset: 0x02580fdb, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_4(this, GuildSettingsModalRolesStore);
const value3 = env1_7(GuildSettingsModalRolesStore);
return env1_6(this, _isNativeReflectConstruct_123079() ? global.Reflect.construct(value3, arguments,
env1_7(this).constructor) : value3.apply(this, arguments));
}
function value_123091() { // fn#123091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:1223, offset: 0x02581063, size: 166 bytes, params: 1, frame: 17
var environment;
var r0;
var defaultImport;
var calculatePositionDeltas;
var object;
var guildRoleStoreBinding;
var getSortedRoles;
var id;
var getManyRoles;
const value = environment.__proto__;
if (env1_14 == null) {
r0 = [];
} else if (env1_15 == null) {
r0 = [];
} else {
defaultImport = importDefault(11879) /* metro dependency 11879: DragAndDropUtils */;
calculatePositionDeltas = defaultImport.calculatePositionDeltas;
object = {};
guildRoleStoreBinding = GuildRoleStore;
getSortedRoles = guildRoleStoreBinding.getSortedRoles;
id = env1_15.id;
object.oldOrdering = Reflect.apply(getSortedRoles, guildRoleStoreBinding, [id]);
guildRoleStoreBinding = GuildRoleStore;
getManyRoles = guildRoleStoreBinding.getManyRoles;
id = env1_15.id;
object.newOrdering = Reflect.apply(getManyRoles, guildRoleStoreBinding, [id, env1_14]);
object.idGetter = function(a0) {
return a0.id;
};
object.existingPositionGetter = existingPositionGetter_123093;
object.ascending = false;
r0 = Reflect.apply(calculatePositionDeltas, defaultImport, [object]);
}
return r0;
}
function get_123094() { // fn#123094, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function get_123095() { // fn#123095, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
return env1_15;
}
function get_123096() { // fn#123096, offset: 0x00df0e94, size: 9 bytes, params: 1, frame: 1
return env1_16;
}
function get_123097() { // fn#123097, offset: 0x00df0e82, size: 9 bytes, params: 1, frame: 1
return env1_18;
}
function get_123098() { // fn#123098, offset: 0x00d406a2, size: 9 bytes, params: 1, frame: 1
return env1_19;
}
}
function GUILD_SETTINGS_MODAL_ROLES_START_REORDER({guildId}) { // fn#123099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:1777, offset: 0x02581113, size: 85 bytes, params: 2, frame: 13
env0_14 = getSortedRoleIds(GuildRoleStore.getSortedRoles(guildId));
env0_15 = GuildStore.getGuild(guildId);
global.clearTimeout(env0_20);
}
function GUILD_SETTINGS_MODAL_ROLES_STOP_REORDER() { // fn#123100, offset: 0x02581168, size: 30 bytes, params: 1, frame: 3
if (env0_21) {
}
}
function GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER({from, to}) { // fn#123101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:2028, offset: 0x02581186, size: 290 bytes, params: 2, frame: 21
const AccessibilityAnnouncer = (SharedModule).AccessibilityAnnouncer;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
if (env0_14 == null) {
return false;
}
if ((importDefault(11879) /* metro dependency 11879: DragAndDropUtils */).moveItemFromTo(env0_14, from,
to)[from] !== env0_14[from]) {
AccessibilityAnnouncer.announce(intl.formatToPlainString(t['+tmElp'], {from: from + 1, to: to + 1}));
} else {
AccessibilityAnnouncer.announce(intl.string(t.WaxXjc));
}
}
function GUILD_ROLE_DELETE_123102({roleId}) { // fn#123102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:2459, offset: 0x025812a8, size: 78 bytes, params: 2, frame: 13
if (env0_14 == null) {
return false;
}
const value2 = env0_14.indexOf(roleId);
if (value2 === -1) {
return false;
}
env0_14.splice(value2, 1);
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_START_EDITING({guildId, roleId}) { // fn#123103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:2628, offset: 0x025812f6, size: 116 bytes, params: 2, frame: 17
var permissions;
const guild = GuildStore.getGuild(guildId);
const r1 = guild != null ? GuildRoleStore.getRole(guild.id, roleId) : undefined;
if (r1 != null) {
permissions = r1.permissions;
}
env0_12 = FormStates.OPEN;
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSION_ALLOW({permission}) { // fn#123105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3022, offset: 0x02581397, size: 77 bytes, params: 2, frame: 15
if (env0_18 == null) {
return false;
}
env0_18 = (importAll(483) /* metro dependency 483: BigFlagUtils */).add(env0_18, permission);
checkForPermissionChanges();
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSION_DENY({permission}) { // fn#123106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3181, offset: 0x025813e4, size: 78 bytes, params: 2, frame: 15
if (env0_18 == null) {
return false;
}
env0_18 = (importAll(483) /* metro dependency 483: BigFlagUtils */).remove(env0_18, permission);
checkForPermissionChanges();
}
function GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_SUCCESS() { // fn#123108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3458, offset: 0x02581447, size: 37 bytes, params: 1, frame: 9
env0_12 = FormStates.OPEN;
checkForPermissionChanges();
}
function GUILD_SETTINGS_SUBMIT_SUCCESS_123111() { // fn#123111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:3767, offset: 0x02581489, size: 61 bytes, params: 1, frame: 14
global.clearTimeout(env0_20);
env0_20 = global.setTimeout(function() {
env1_14 = null;
}, 400);
}
}
function _fun123083(a0) { // fn#123083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:499, offset: 0x00e46f8c, size: 10 bytes, params: 2, frame: 1
return a0.id;
}
function value_123091ExistingPositionGetter(a0) { // fn#123093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16149:1404, owner: value_123091.existingPositionGetter, offset: 0x02581109, size: 10 bytes, params: 2, frame: 1
return a0.position;
}
global.__d(_fun123078, 15941, [6, 7, 15, 17, 18, 1938, 1867, 661, 11879, 4002, 1244, 483, 566, 694,
2]) /* metro module 15941, dependencies: [6, 7, 15, 17, 18, 1938, 1867, 661, 11879, 4002, 1244, 483, 566, 694, 2] */;
@@ -1,31 +1,35 @@
/* Metro module 15946; source: modules/guild_settings/roles/GuildSettingsRoleConstants.tsx; dependencies: [15947, 661, 15949, 483, 3789, 696, 1244, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as BigFlagUtilsModule from '../../../external/discord_common/js/shared/utils/BigFlagUtils.tsx'; /* Metro dependency 483 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GuildSettingsRolesStoreModule from './GuildSettingsRolesStore.tsx'; /* Metro dependency 15947 */
function _fun123166(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:6, offset: 0x025836d6, size: 1133 bytes, params: 8, frame: 47
var object8;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const RoleColorsStyle = (require(15947) /* metro dependency 15947: GuildSettingsRolesStore */).RoleColorsStyle;
let value = require(661) /* metro dependency 661: Constants */;
const RoleColorsStyle = (GuildSettingsRolesStoreModule).RoleColorsStyle;
let value = ConstantsModule;
const DEFAULT_ROLE_COLOR = value.DEFAULT_ROLE_COLOR;
const Permissions = value.Permissions;
value = require(15949) /* metro dependency 15949: EnhancedRoleColorConstants */;
const DEFAULT_GRADIENT_ROLE_COLORS = value.DEFAULT_GRADIENT_ROLE_COLORS;
const HOLOGRAPHIC_ROLE_COLORS = value.HOLOGRAPHIC_ROLE_COLORS;
object8 = {COSMETIC: 0};
object8[0] = 'COSMETIC';
object8.MEMBER = 1;
object8[1] = 'MEMBER';
object8.MODERATOR = 2;
object8[2] = 'MODERATOR';
object8.MANAGER = 3;
object8[3] = 'MANAGER';
const COSMETIC = object8.COSMETIC;
const remove = (importAll(483) /* metro dependency 483: BigFlagUtils */).remove;
object = {COSMETIC: 0};
object[0] = 'COSMETIC';
object.MEMBER = 1;
object[1] = 'MEMBER';
object.MODERATOR = 2;
object[2] = 'MODERATOR';
object.MANAGER = 3;
object[3] = 'MANAGER';
const COSMETIC = object.COSMETIC;
const remove = (BigFlagUtilsModule).remove;
let DEFAULT = (importAll(3789) /* metro dependency 3789: PermissionUtils */).DEFAULT;
const MENTION_EVERYONE = Permissions.MENTION_EVERYONE;
value = Reflect.apply(remove, value, [DEFAULT, MENTION_EVERYONE]);
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
let combine = bigFlagUtilsModule.combine;
let combine = BigFlagUtilsModule.combine;
DEFAULT = (importAll(3789) /* metro dependency 3789: PermissionUtils */).DEFAULT;
const VIEW_AUDIT_LOG = Permissions.VIEW_AUDIT_LOG;
const MANAGE_NICKNAMES = Permissions.MANAGE_NICKNAMES;
@@ -37,10 +41,9 @@ function _fun123166(global, require, importDefault, importAll, module, exports,
const MOVE_MEMBERS = Permissions.MOVE_MEMBERS;
const PRIORITY_SPEAKER = Permissions.PRIORITY_SPEAKER;
const MODERATE_MEMBERS = Permissions.MODERATE_MEMBERS;
const value3 = Reflect.apply(combine, bigFlagUtilsModule, [DEFAULT, VIEW_AUDIT_LOG, MANAGE_NICKNAMES, KICK_MEMBERS,
const value3 = Reflect.apply(combine, BigFlagUtilsModule, [DEFAULT, VIEW_AUDIT_LOG, MANAGE_NICKNAMES, KICK_MEMBERS,
BAN_MEMBERS, MANAGE_MESSAGES, MUTE_MEMBERS, DEAFEN_MEMBERS, MOVE_MEMBERS, PRIORITY_SPEAKER, MODERATE_MEMBERS]);
const value4 = bigFlagUtilsModule;
combine = value4.combine;
combine = BigFlagUtilsModule.combine;
const MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS;
const MANAGE_THREADS = Permissions.MANAGE_THREADS;
const MANAGE_ROLES = Permissions.MANAGE_ROLES;
@@ -48,130 +51,131 @@ function _fun123166(global, require, importDefault, importAll, module, exports,
const MANAGE_GUILD = Permissions.MANAGE_GUILD;
const MANAGE_WEBHOOKS = Permissions.MANAGE_WEBHOOKS;
const SEND_TTS_MESSAGES = Permissions.SEND_TTS_MESSAGES;
const value5 = Reflect.apply(combine, value4, [value3, MANAGE_CHANNELS, MANAGE_THREADS, MANAGE_ROLES,
const value5 = Reflect.apply(combine, BigFlagUtilsModule, [value3, MANAGE_CHANNELS, MANAGE_THREADS, MANAGE_ROLES,
MANAGE_GUILD_EXPRESSIONS, MANAGE_GUILD, MANAGE_WEBHOOKS, SEND_TTS_MESSAGES]);
const value6 = bigFlagUtilsModule;
const add = value6.add;
const add = BigFlagUtilsModule.add;
const VIEW_GUILD_ANALYTICS = Permissions.VIEW_GUILD_ANALYTICS;
const value7 = Reflect.apply(add, value6, [value5, VIEW_GUILD_ANALYTICS]);
const object9 = {};
const COSMETIC2 = object8.COSMETIC;
const object10 = {key: 'template_cosmetic'};
object10.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('BRAND_500');
const value7 = Reflect.apply(add, BigFlagUtilsModule, [value5, VIEW_GUILD_ANALYTICS]);
const object2 = {};
const COSMETIC2 = object.COSMETIC;
const object3 = {key: 'template_cosmetic'};
object3.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('BRAND_500');
const NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
object10.permissions = NONE;
object10.title = function() {
object3.permissions = NONE;
object3.title = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.M8jQyg);
};
object10.description = function() {
object3.description = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['7nF/S/']);
};
object10.contents = contents;
object10.contentPreface = function() {
object3.contents = contents;
object3.contentPreface = function() {
return '';
};
object9[COSMETIC2] = object10;
const MEMBER = object8.MEMBER;
const object11 = {key: 'template_member'};
object11.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('GREEN_360');
object2[COSMETIC2] = object3;
const MEMBER = object.MEMBER;
const object4 = {key: 'template_member'};
object4.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('GREEN_360');
DEFAULT = (importAll(3789) /* metro dependency 3789: PermissionUtils */).DEFAULT;
object11.permissions = DEFAULT;
object11.communityPermissions = value;
object11.title = function() {
object4.permissions = DEFAULT;
object4.communityPermissions = value;
object4.title = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['9BsHzh']);
};
object11.description = function() {
object4.description = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.ywKYtw);
};
object11.contents = contents_123173;
object11.contentPreface = function() {
object4.contents = contents_123173;
object4.contentPreface = function() {
return '';
};
object9[MEMBER] = object11;
const MODERATOR = object8.MODERATOR;
const object12 = {key: 'template_moderator'};
object12.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('YELLOW_300');
object12.permissions = value3;
object12.title = function() {
object2[MEMBER] = object4;
const MODERATOR = object.MODERATOR;
const object5 = {key: 'template_moderator'};
object5.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('YELLOW_300');
object5.permissions = value3;
object5.title = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['m/GC8z']);
};
object12.description = function() {
object5.description = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.ERrMJZ);
};
object12.contents = contents_123177;
object12.contentPreface = function() {
object5.contents = contents_123177;
object5.contentPreface = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.amGM7K);
};
object9[MODERATOR] = object12;
const MANAGER = object8.MANAGER;
const object13 = {key: 'template_manager'};
object13.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('RED_400');
object13.permissions = value5;
object13.communityPermissions = value7;
object13.title = function() {
object2[MODERATOR] = object5;
const MANAGER = object.MANAGER;
const object6 = {key: 'template_manager'};
object6.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('RED_400');
object6.permissions = value5;
object6.communityPermissions = value7;
object6.title = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.qKmu3w);
};
object13.description = function() {
object6.description = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.WxWPYV);
};
object13.contents = contents_123181;
object13.contentPreface = function() {
object6.contents = contents_123181;
object6.contentPreface = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['7Dkb62']);
};
object9[MANAGER] = object13;
const object14 = {};
object2[MANAGER] = object6;
const object7 = {};
const SOLID = RoleColorsStyle.SOLID;
object14.id = SOLID;
object14.colors = {'primary_color': null, 'secondary_color': null, 'tertiary_color': null,
object7.id = SOLID;
object7.colors = {'primary_color': null, 'secondary_color': null, 'tertiary_color': null,
primary_color: DEFAULT_ROLE_COLOR};
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object14.labelString = t['8Qyahn'];
const items2 = [object14];
const t = (IndexNativeModule).t;
object7.labelString = t['8Qyahn'];
const items2 = [object7];
const GRADIENT = RoleColorsStyle.GRADIENT;
const XpWmJz = t.XpWmJz;
items2[1] = {id: GRADIENT, colors: DEFAULT_GRADIENT_ROLE_COLORS, labelString: XpWmJz};
const HOLOGRAPHIC = RoleColorsStyle.HOLOGRAPHIC;
const QTKppe = t.QTKppe;
items2[2] = {id: HOLOGRAPHIC, colors: HOLOGRAPHIC_ROLE_COLORS, labelString: QTKppe};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsRoleConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsRoleConstants.tsx');
exports.CREATE_ROLE_DESKTOP_MODAL_WIDTH = 440;
exports.DEFAULT_HEADER_HEIGHT_PX = 371;
exports.MAX_BULK_ROLE_MEMBERS_ADD = 30;
exports.PermissionTemplateTypes = object8;
exports.PermissionTemplateTypes = object;
exports.DEFAULT_TEMPLATE_TYPE = COSMETIC;
exports.PermissionTemplates = object9;
exports.PermissionTemplates = object2;
exports.STYLE_CONFIGS = items2;
function contents() { // fn#123169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:1060, offset: 0x02583bc3, size: 122 bytes, params: 1, frame: 15
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return [Reflect.apply(string, intl, [t.uwLDAb]), intl.string(t.gqngN7)];
}
function contents_123173() { // fn#123173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:1410, offset: 0x02583cbd, size: 172 bytes, params: 1, frame: 16
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return [Reflect.apply(string, intl, [t['9Vhbnl']]), intl.string(t['0xn+w1']), intl.string(t.ieWVpB)];
}
function contents_123177() { // fn#123177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:1774, offset: 0x02583de9, size: 222 bytes, params: 1, frame: 16
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const YOSxcd = t.YOSxcd;
return [Reflect.apply(string, intl, [YOSxcd]), intl.string(t.q9H4Fm), intl.string(t['9nHnCj']),
intl.string(t.iqwXvc)];
}
function contents_123181() { // fn#123181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:2221, offset: 0x02583f87, size: 222 bytes, params: 1, frame: 16
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const Hx1Vox = t.Hx1Vox;
return [Reflect.apply(string, intl, [Hx1Vox]), intl.string(t['aUZ/zD']), intl.string(t['8lQujv']),
intl.string(t.cUP4pl)];
}
}
function contents() { // fn#123169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:1060, offset: 0x02583bc3, size: 122 bytes, params: 1, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return [Reflect.apply(string, intl, [t.uwLDAb]), intl.string(t.gqngN7)];
}
function contents_123173() { // fn#123173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:1410, offset: 0x02583cbd, size: 172 bytes, params: 1, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return [Reflect.apply(string, intl, [t['9Vhbnl']]), intl.string(t['0xn+w1']), intl.string(t.ieWVpB)];
}
function contents_123177() { // fn#123177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:1774, offset: 0x02583de9, size: 222 bytes, params: 1, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const YOSxcd = t.YOSxcd;
return [Reflect.apply(string, intl, [YOSxcd]), intl.string(t.q9H4Fm), intl.string(t['9nHnCj']),
intl.string(t.iqwXvc)];
}
function contents_123181() { // fn#123181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16154:2221, offset: 0x02583f87, size: 222 bytes, params: 1, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Hx1Vox = t.Hx1Vox;
return [Reflect.apply(string, intl, [Hx1Vox]), intl.string(t['aUZ/zD']), intl.string(t['8lQujv']),
intl.string(t.cUP4pl)];
}
global.__d(_fun123166, 15946, [15947, 661, 15949, 483, 3789, 696, 1244,
2]) /* metro module 15946, dependencies: [15947, 661, 15949, 483, 3789, 696, 1244, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,14 @@
/* Metro module 15951; source: modules/guild_settings/roles/GuildSettingsRolesUtils.tsx; dependencies: [31, 1945, 1878, 15942, 661, 566, 3995, 6738, 6592, 683, 6590, 1360, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import GuildUtils from '../../../utils/GuildUtils.tsx'; /* Metro dependency 6592 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as GlobalUtilsModule from '../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as GuildSettingsConstantsModule from '../GuildSettingsConstants.tsx'; /* Metro dependency 15942 */
function _fun123270(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:6, offset: 0x02586758, size: 313 bytes, params: 8, frame: 20
const env0_0 = require;
const _arrayLikeToArray_123273 = function(a0, a1) {
@@ -44,18 +54,13 @@ function _fun123270(global, require, importDefault, importAll, module, exports,
}
return value;
};
const closure = useGuildMembers;
const useGuildMembers2 = useGuildMembers;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(15942) /* metro dependency 15942: GuildSettingsConstants */).GuildSettingsRoleEditSections;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsRolesUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/GuildSettingsRolesUtils.tsx');
exports.ADD_MEMBER_QUERY_LIMIT = 50;
exports.MAX_PREFETCH_MEMBER_COUNT = 1000;
exports.useGuildMembers = closure;
exports.useGuildMembers = useGuildMembers2;
exports.useGuildRoleMembers = useGuildRoleMembers;
exports.useQueryGuildMembers = useQueryGuildMembers;
exports.filterFullMembersByQuery = filterFullMembersByQuery;
@@ -72,248 +77,260 @@ function _fun123270(global, require, importDefault, importAll, module, exports,
}
return r0;
};
}
function _createForOfIteratorHelperLoose_123271(a0, a1) { // fn#123271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:198, offset: 0x02586891, 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)) {
function _createForOfIteratorHelperLoose_123271(a0, a1) { // fn#123271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:198, offset: 0x02586891, 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);
}
return _fun123272;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_123273(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun123272;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_123273(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_123273(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_123273(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun123272;
}
return _fun123272;
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 _fun123272() { // fn#123272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:769, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
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 useGuildMembers(a0, a1) { // fn#123274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1108, offset: 0x02586a05, size: 182 bytes, params: 3, frame: 23
const env0_0 = a0;
const env0_1 = a1;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildMemberStore],
_fun123275, [a0, a1]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserStore], _fun123276,
[value2]);
return value3.useMemo(_fun123278, [value2, value3, a0]);
}
function useGuildMembers(a0, a1) { // fn#123274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1108, offset: 0x02586a05, size: 182 bytes, params: 3, frame: 23
const env0_0 = a0;
const env0_1 = a1;
const value2 = (FluxModule).useStateFromStoresArray([GuildMemberStore],
_fun123275, [a0, a1]);
const value3 = (FluxModule).useStateFromStoresObject([UserStore], _fun123276,
[value2]);
return value3.useMemo(_fun123278, [value2, value3, a0]);
function _fun123275() { // fn#123275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1182, offset: 0x02586abb, size: 54 bytes, params: 1, frame: 13
const value = environment.__proto__;
const members = GuildMemberStore.getMembers(env0_0);
return require == null ? members : members.filter(require);
}
function useGuildRoleMembers(a0, a1, a2) { // fn#123279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1978, offset: 0x02586c5e, size: 143 bytes, params: 4, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3Binding = env0_3.useRef(a2);
env0_3Binding.useEffect(_fun123280);
env0_3Binding.useEffect(_fun123281, [a0, a1]);
return useGuildMembers(a0, env0_3Binding.useCallback(function({roles}) {
return roles.includes(require);
}, [a1]));
}
function _fun123276() { // fn#123276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1288, offset: 0x02586af1, size: 32 bytes, params: 1, frame: 13
return env0_2.reduce(_fun123277, {});
function _fun123277(a0, a1) { // fn#123277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1302, offset: 0x02586b11, size: 46 bytes, params: 3, frame: 13
let value = environment.__proto__.__proto__;
const userStoreBinding = UserStore;
const getUser = userStoreBinding.getUser;
const userId = a1.userId;
value = Reflect.apply(getUser, userStoreBinding, [userId]);
if (value != null) {
a0[a1.userId] = value;
}
return a0;
}
function useQueryGuildMembers(a0, a1) { // fn#123283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2248, offset: 0x02586d4f, size: 77 bytes, params: 3, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = env0_3.useRef(false);
env0_3.useEffect(_fun123284, [a0, a1]);
}
}
function filterFullMembersByQuery(a0, a1) { // fn#123285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2485, offset: 0x02586e2b, size: 136 bytes, params: 3, frame: 16
var r0;
var defaultImport;
var name;
var defaultImport2;
var userTag;
let value = a0.trim();
value = value.toLowerCase();
const value2 = a1.id === value;
if (value2) {
r0 = value2;
} else {
defaultImport = importDefault(6590) /* metro dependency 6590 */;
name = a1.name;
r0 = defaultImport(value, name.toLowerCase());
}
if (!r0) {
defaultImport2 = importDefault(6590) /* metro dependency 6590 */;
userTag = a1.userTag;
value = defaultImport2(value, userTag.toLowerCase());
r0 = value;
}
return r0;
}
function getSectionAnalyticsName(a0) { // fn#123286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2668, offset: 0x02586eb3, size: 125 bytes, params: 2, frame: 12
const MEMBERS = GuildSettingsRoleEditSections.MEMBERS;
if (MEMBERS === a0) {
return 'Members';
}
const PERMISSIONS = GuildSettingsRoleEditSections.PERMISSIONS;
if (PERMISSIONS === a0) {
return 'Permissions';
}
const DISPLAY = GuildSettingsRoleEditSections.DISPLAY;
if (DISPLAY === a0) {
return 'Role Settings';
}
const VERIFICATIONS = GuildSettingsRoleEditSections.VERIFICATIONS;
if (VERIFICATIONS === a0) {
return 'Connections';
}
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(a0);
}
function _fun123275() { // fn#123275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1182, offset: 0x02586abb, size: 54 bytes, params: 1, frame: 13
const value = environment.__proto__;
const members = GuildMemberStore.getMembers(env0_0);
return require == null ? members : members.filter(require);
}
function _fun123276() { // fn#123276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1288, offset: 0x02586af1, size: 32 bytes, params: 1, frame: 13
return env0_2.reduce(_fun123277, {});
}
function _fun123278() { // fn#123278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1400, offset: 0x02586b3f, size: 287 bytes, params: 1, frame: 27
var r3;
var r15;
var value5;
var binding;
var userId;
var property;
var push;
var object2;
var nick;
var defaultImport;
var name;
var defaultImport2;
var getAvatarSource;
var bot;
var roles;
var value7;
const items2 = [];
const value3 = _createForOfIteratorHelperLoose_123271(env0_2);
const value4 = value3();
let done = value4.done;
if (!done) {
r3 = value4;
while (true) {
value5 = r3.value;
binding = env0_3;
userId = value5.userId;
property = binding[userId];
if (property != null) {
push = items2.push;
object2 = {};
nick = value5.nick;
if (nick != null) {
r15 = nick;
function _fun123278() { // fn#123278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1400, offset: 0x02586b3f, size: 287 bytes, params: 1, frame: 27
var r3;
var r15;
var value5;
var binding;
var userId;
var property;
var push;
var object;
var nick;
var defaultImport;
var name;
var defaultImport2;
var getAvatarSource;
var bot;
var roles;
var value7;
const items2 = [];
const value3 = _createForOfIteratorHelperLoose_123271(env0_2);
const value4 = value3();
let done = value4.done;
if (!done) {
r3 = value4;
while (true) {
value5 = r3.value;
binding = ReactModule;
userId = value5.userId;
property = binding[userId];
if (property != null) {
push = items2.push;
object = {};
nick = value5.nick;
if (nick != null) {
r15 = nick;
continue;
}
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
name = defaultImport.getName(property);
r15 = name;
object.name = r15;
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
object.userTag = defaultImport2.getUserTag(property);
userId = value5.userId;
object.id = userId;
getAvatarSource = property.getAvatarSource;
binding = env0_0;
object.avatarSource = Reflect.apply(getAvatarSource, property, [binding]);
object.avatarURL = property.getAvatarURL(binding, 80);
bot = property.bot;
object.bot = bot;
object.verifiedBot = property.isVerifiedBot();
roles = value5.roles;
object.roles = roles;
userId = value5.userId;
object.key = userId;
object.user = property;
Reflect.apply(push, items2, [object]);
}
value7 = value3();
done = value7.done;
if (done) {
break;
}
r3 = value7;
continue;
}
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
name = defaultImport.getName(property);
r15 = name;
object2.name = r15;
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
object2.userTag = defaultImport2.getUserTag(property);
userId = value5.userId;
object2.id = userId;
getAvatarSource = property.getAvatarSource;
binding = env0_0;
object2.avatarSource = Reflect.apply(getAvatarSource, property, [binding]);
object2.avatarURL = property.getAvatarURL(binding, 80);
bot = property.bot;
object2.bot = bot;
object2.verifiedBot = property.isVerifiedBot();
roles = value5.roles;
object2.roles = roles;
userId = value5.userId;
object2.key = userId;
object2.user = property;
Reflect.apply(push, items2, [object2]);
}
value7 = value3();
done = value7.done;
if (done) {
break;
}
r3 = value7;
continue;
return items2;
}
}
return items2;
}
function _fun123281() { // fn#123281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2078, offset: 0x02586ced, size: 70 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = Reflect.apply((require(6738) /* metro dependency 6738: GuildRoleMemberActionCreators */).requestMembersForRole,
value, [env0_0, require]);
value.catch(env0_3.current);
}
function useGuildRoleMembers(a0, a1, a2) { // fn#123279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1978, offset: 0x02586c5e, size: 143 bytes, params: 4, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3Binding = ReactModule.useRef(a2);
env0_3Binding.useEffect(_fun123280);
env0_3Binding.useEffect(_fun123281, [a0, a1]);
return useGuildMembers(a0, env0_3Binding.useCallback(function({roles}) {
return roles.includes(require);
}, [a1]));
function _fun123280() { // fn#123280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2045, offset: 0x01be4ab0, size: 21 bytes, params: 1, frame: 2
ReactModule.current = importDefault;
}
function _fun123281() { // fn#123281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2078, offset: 0x02586ced, size: 70 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = Reflect.apply((require(6738) /* metro dependency 6738: GuildRoleMemberActionCreators */).requestMembersForRole,
value, [env0_0, require]);
value.catch(ReactModule.current);
}
function _fun123284() { // fn#123284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2315, offset: 0x02586d9c, size: 143 bytes, params: 1, frame: 18
var defaultImport2;
const defaultImport = importDefault(6592) /* metro dependency 6592: GuildUtils */;
defaultImport.requestMembers(env0_0, require, 200);
if (!(require === '' || env0_2.current)) {
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.SEARCH_STARTED, {search_type: 'Role Members'});
env0_2.current = true;
}
}
function _fun123277(a0, a1) { // fn#123277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:1302, offset: 0x02586b11, size: 46 bytes, params: 3, frame: 13
let value = environment.__proto__.__proto__;
const getUser = UserStore.getUser;
const userId = a1.userId;
value = Reflect.apply(getUser, UserStore, [userId]);
if (value != null) {
a0[a1.userId] = value;
function useQueryGuildMembers(a0, a1) { // fn#123283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2248, offset: 0x02586d4f, size: 77 bytes, params: 3, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = ReactModule.useRef(false);
ReactModule.useEffect(_fun123284, [a0, a1]);
function _fun123284() { // fn#123284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2315, offset: 0x02586d9c, size: 143 bytes, params: 1, frame: 18
var defaultImport2;
const defaultImport = GuildUtils;
defaultImport.requestMembers(env0_0, require, 200);
if (!(require === '' || env0_2.current)) {
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.SEARCH_STARTED, {search_type: 'Role Members'});
env0_2.current = true;
}
}
}
return a0;
function filterFullMembersByQuery(a0, a1) { // fn#123285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2485, offset: 0x02586e2b, size: 136 bytes, params: 3, frame: 16
var r0;
var defaultImport;
var name;
var defaultImport2;
var userTag;
let value = a0.trim();
value = value.toLowerCase();
const value2 = a1.id === value;
if (value2) {
r0 = value2;
} else {
defaultImport = importDefault(6590) /* metro dependency 6590 */;
name = a1.name;
r0 = defaultImport(value, name.toLowerCase());
}
if (!r0) {
defaultImport2 = importDefault(6590) /* metro dependency 6590 */;
userTag = a1.userTag;
value = defaultImport2(value, userTag.toLowerCase());
r0 = value;
}
return r0;
}
function getSectionAnalyticsName(a0) { // fn#123286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16159:2668, offset: 0x02586eb3, size: 125 bytes, params: 2, frame: 12
const MEMBERS = GuildSettingsRoleEditSections.MEMBERS;
if (MEMBERS === a0) {
return 'Members';
}
const PERMISSIONS = GuildSettingsRoleEditSections.PERMISSIONS;
if (PERMISSIONS === a0) {
return 'Permissions';
}
const DISPLAY = GuildSettingsRoleEditSections.DISPLAY;
if (DISPLAY === a0) {
return 'Role Settings';
}
const VERIFICATIONS = GuildSettingsRoleEditSections.VERIFICATIONS;
if (VERIFICATIONS === a0) {
return 'Connections';
}
(GlobalUtilsModule).assertNever(a0);
}
}
global.__d(_fun123270, 15951, [31, 1945, 1878, 15942, 661, 566, 3995, 6738, 6592, 683, 6590, 1360,
2]) /* metro module 15951, dependencies: [31, 1945, 1878, 15942, 661, 566, 3995, 6738, 6592, 683, 6590, 1360, 2] */;
@@ -1,45 +1,51 @@
/* Metro module 15966; source: modules/guild_settings/roles/hooks/useGuildSettingsRoleExampleMessage.tsx; dependencies: [31, 1885, 661, 4625, 7141, 1244, 8061, 15967, 2] */
import UserRecord from '../../../../records/UserRecord.tsx'; /* Metro dependency 1885 */
import CreateMessage from '../../../messages/createMessage.tsx'; /* Metro dependency 7141 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as MessageRecordUtilsModule from '../../../messages/MessageRecordUtils.tsx'; /* Metro dependency 4625 */
function _fun123448(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16174:6, offset: 0x0258dec8, size: 163 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).MessageStates;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/hooks/useGuildSettingsRoleExampleMessage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/hooks/useGuildSettingsRoleExampleMessage.tsx');
exports.useGuildSettingsRoleExampleMessage = useGuildSettingsRoleExampleMessage;
}
function useGuildSettingsRoleExampleMessage(a0) { // fn#123449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16174:284, offset: 0x0258df6b, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return ReactModule.useMemo(_fun123450, [a0]);
function _fun123450() { // fn#123450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16174:349, offset: 0x0258df97, size: 285 bytes, params: 1, frame: 19
var environment;
let value = environment.__proto__;
const createMessageRecord = MessageRecordUtilsModule.createMessageRecord;
let object = {};
copyDataProperties(object, (CreateMessage)({channelId: '1337',
content: env0_0}), require);
const SENT = MessageStates.SENT;
object['state'] = SENT;
object['id'] = '31337';
const messageRecord = Reflect.apply(createMessageRecord, MessageRecordUtilsModule, [object]);
const userRecordBinding = UserRecord;
object = {'id': '313337', 'username': null, 'discriminator': '0000', 'bot': false};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.username = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cqpybK);
const userRecord2 = new userRecordBinding(object);
messageRecord.author = userRecord2;
value = importAll(8061) /* metro dependency 8061: UserActionCreators */;
value = value.insertStaticUser(userRecord2);
if (value != null) {
messageRecord.author = value;
messageRecord.author.getAvatarURL = function() {
return importDefault(dependencyMap[7]);
};
}
return messageRecord;
}
function useGuildSettingsRoleExampleMessage(a0) { // fn#123449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16174:284, offset: 0x0258df6b, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_4.useMemo(_fun123450, [a0]);
}
function _fun123450() { // fn#123450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16174:349, offset: 0x0258df97, size: 285 bytes, params: 1, frame: 19
var environment;
let value = environment.__proto__;
const messageRecordUtilsModule = require(4625) /* metro dependency 4625: MessageRecordUtils */;
const createMessageRecord = messageRecordUtilsModule.createMessageRecord;
let object2 = {};
copyDataProperties(object2, (importDefault(7141) /* metro dependency 7141: createMessage */)({channelId: '1337',
content: env0_0}), require);
const SENT = MessageStates.SENT;
object2['state'] = SENT;
object2['id'] = '31337';
const messageRecord = Reflect.apply(createMessageRecord, messageRecordUtilsModule, [object2]);
object2 = {'id': '313337', 'username': null, 'discriminator': '0000', 'bot': false};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.username = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cqpybK);
const userRecord = new UserRecord(object2);
messageRecord.author = userRecord;
value = importAll(8061) /* metro dependency 8061: UserActionCreators */;
value = value.insertStaticUser(userRecord);
if (value != null) {
messageRecord.author = value;
messageRecord.author.getAvatarURL = function() {
return importDefault(dependencyMap[7]);
};
}
return messageRecord;
}
global.__d(_fun123448, 15966, [31, 1885, 661, 4625, 7141, 1244, 8061, 15967,
2]) /* metro module 15966, dependencies: [31, 1885, 661, 4625, 7141, 1244, 8061, 15967, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,23 +1,26 @@
/* Metro module 15944; source: modules/guild_settings/roles/native/GuildSettingsRoleCreateModalActionCreators.tsx; dependencies: [5080, 15945, 1962, 2] */
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun123123(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16152:6, offset: 0x02581853, size: 122 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {open: open_123124, close: close_123125};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleCreateModalActionCreators.tsx');
exports.default = object2;
}
object = {open: open_123124, close: close_123125};
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleCreateModalActionCreators.tsx');
exports.default = object;
function open_123124() { // fn#123124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16152:140, offset: 0x025818cd, size: 79 bytes, params: 1, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, undefined, 'GUILD_SETTINGS_ROLE_CREATE_MODAL_KEY']);
}
function open_123124() { // fn#123124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16152:140, offset: 0x025818cd, size: 79 bytes, params: 1, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, undefined, 'GUILD_SETTINGS_ROLE_CREATE_MODAL_KEY']);
}
function close_123125() { // fn#123125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16152:197, offset: 0x0258191c, size: 43 bytes, params: 1, frame: 12
(ModalActionCreators).popWithKey('GUILD_SETTINGS_ROLE_CREATE_MODAL_KEY');
}
function close_123125() { // fn#123125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16152:197, offset: 0x0258191c, size: 43 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('GUILD_SETTINGS_ROLE_CREATE_MODAL_KEY');
}
global.__d(_fun123123, 15944, [5080, 15945, 1962, 2]) /* metro module 15944, dependencies: [5080, 15945, 1962, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,227 +1,304 @@
/* Metro module 15962; source: modules/guild_settings/roles/native/GuildSettingsRoleEditDisplay.tsx; dependencies: [31, 27, 1939, 15947, 15946, 661, 15949, 33, 4501, 697, 6630, 566, 6794, 6793, 1305, 15963, 4080, 14392, 1962, 15961, 15964, 15965, 7981, 1244, 15968, 6231, 6238, 4589, 1360, 673, 13187, 4068, 4573, 2256, 6808, 2] */
import GuildSettingsRolesStore from '../GuildSettingsRolesStore.tsx'; /* Metro dependency 15947 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ColorUtilsModule from '../../../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */
import * as GuildRoleRecordModule from '../../../../records/GuildRoleRecord.tsx'; /* Metro dependency 1939 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as UseHasEnhancedRoleColorsModule from '../../../premium/powerups/hooks/useHasEnhancedRoleColors.tsx'; /* Metro dependency 6630 */
import * as RoleIconUtilsModule from '../../../guild_boosting/RoleIconUtils.tsx'; /* Metro dependency 6794 */
import * as TableSwitchRowNativeModule from '../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
import * as TextInputNativeModule from '../../../../design/components/TextInput/native/TextInput.native.tsx'; /* Metro dependency 7981 */
import * as GuildSettingsRoleConstantsModule from '../GuildSettingsRoleConstants.tsx'; /* Metro dependency 15946 */
import * as GuildSettingsRolesStoreModule from '../GuildSettingsRolesStore.tsx'; /* Metro dependency 15947 */
import * as EnhancedRoleColorConstantsModule from '../../../premium/powerups/constants/EnhancedRoleColorConstants.tsx'; /* Metro dependency 15949 */
function _fun123420(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:6, offset: 0x0258bdb1, size: 646 bytes, params: 8, frame: 26
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(1939) /* metro dependency 1939: GuildRoleRecord */).isEveryoneRole;
const guildSettingsRolesStore = importDefault(15947) /* metro dependency 15947: GuildSettingsRolesStore */;
const env0_7 = (require(15947) /* metro dependency 15947: GuildSettingsRolesStore */).RoleColorsStyle;
const env0_8 = (require(15946) /* metro dependency 15946: GuildSettingsRoleConstants */).STYLE_CONFIGS;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_9 = value.DEFAULT_ROLE_COLOR;
const env0_10 = value.MAX_ROLE_LENGTH;
const env0_11 = (require(15949) /* metro dependency 15949: EnhancedRoleColorConstants */).DEFAULT_GRADIENT_ROLE_COLORS;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
const env0_14 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const object2 = {};
const BACKGROUND_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_INFO;
object.backgroundColor = BACKGROUND_FEEDBACK_INFO;
object2.backgroundColor = BACKGROUND_FEEDBACK_INFO;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.padding = PX_8;
object2.padding = PX_8;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.marginHorizontal = PX_12;
object2.marginHorizontal = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.marginTop = -1 * PX_12;
object2.marginTop = -1 * PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.marginBottom = PX_12;
object.display = 'flex';
object.flexDirection = 'row';
object2.marginBottom = PX_12;
object2.display = 'flex';
object2.flexDirection = 'row';
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.gap = PX_8;
object.justifyContent = 'center';
object.alignItems = 'center';
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.borderWidth = 1;
object2.gap = PX_8;
object2.justifyContent = 'center';
object2.alignItems = 'center';
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.borderWidth = 1;
const ICON_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_INFO;
object.borderColor = ICON_FEEDBACK_INFO;
object2.borderColor = ICON_FEEDBACK_INFO;
const env0_15 = Reflect.apply(createStyles, value, [{roleIcon: {'paddingTop': 2, 'opacity': 0.5},
trailingColorContainer: {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'},
colorBlock: {'marginHorizontal': 0, 'marginVertical': 0, 'marginRight': 8, 'minWidth': 24, 'height': 24,
'borderRadius': 3}, holographicInfo: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleEditDisplay.tsx');
'borderRadius': 3}, holographicInfo: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleEditDisplay.tsx');
exports.default = GuildSettingsRoleEditDisplay;
}
function GuildSettingsRoleEditDisplay({guild, role, name, formErrors, mentionable, hoist, onNameChanged, onMentionableChanged, onHoistChanged, onRoleColorChanged, locked, autoFocusInput}) { // fn#123421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1097, offset: 0x0258c037, size: 2429 bytes, params: 2, frame: 54
var r32;
var r29;
var r23;
var r8;
var r6;
var object6;
var GRADIENT;
var defaultImport3;
var items3;
var int2hex;
var moduleValue6;
var value19;
var value20;
var moduleValue7;
var items4;
var object14;
const styles = useStyles();
const isEveryoneRole2 = isEveryoneRole(role);
let r15 = isEveryoneRole2 || locked;
const id = role.id;
const env0_3 = id;
const value3 = (require(6630) /* metro dependency 6630: useHasEnhancedRoleColors */).useHasEnhancedRoleColorsForRole(guild.id,
role);
const roleStyleData = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsRolesStore],
function() {
return GuildSettingsRolesStore.getRoleStyleData(role.id);
});
const r9 = roleStyleData == null ? RoleColorsStyle.SOLID : value3 ? roleStyleData.currentStyle : RoleColorsStyle.SOLID;
const value5 = STYLE_CONFIGS.find(_fun123423);
let r34 = roleStyleData == null || roleStyleData.styleColors == null ? undefined : roleStyleData.styleColors[r9];
let primary_color = r34?.primary_color;
const r31 = primary_color == null ? DEFAULT_ROLE_COLOR : primary_color !== 0 ? primary_color : DEFAULT_ROLE_COLOR;
r34 = r34 == null || r34?.secondary_color == null ? DEFAULT_GRADIENT_ROLE_COLORS : r34;
const canGuildUseRoleIcons2 = (require(6794) /* metro dependency 6794: RoleIconUtils */).canGuildUseRoleIcons(guild,
role);
const r25 = (require(6793) /* metro dependency 6793: RoleIconUtils */).useRoleIcon({guildId: guild.id,
roleId: role.id,
size: 26}) ?? ((Icon) => <Icon source={importDefault(15963) /* metro dependency 15963 */} size={(require(1305) /* metro dependency 1305: native */).IconSizes.MEDIUM} />)((require(1305) /* metro dependency 1305: native */).Icon);
const binding = env0_3;
const value8 = binding.useCallback(_fun123424, [id, r34, r31, r9, onRoleColorChanged]);
const value9 = binding.useCallback(_fun123427, [guild.id, role, id, r9, onRoleColorChanged]);
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items2 = [<TextInput label={Reflect.apply(string, intl,
[t.dLbkBk])} value={name} isDisabled={r15} onChange={onNameChanged} maxLength={MAX_ROLE_LENGTH} autoFocus={autoFocusInput} errorMessage={formErrors.name?.[0]} />];
items2[1] = ((Component) => <Component role={role} />)(importDefault(15968) /* metro dependency 15968: InRolePromptNotice */);
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRow = <TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9wVJRB'])} onPress={value9} arrow subLabel={value5?.labelString != null ? intl.string(value5.labelString) : ''} disabled={r15} />;
let HOLOGRAPHIC = RoleColorsStyle.HOLOGRAPHIC;
const value14 = r9 !== HOLOGRAPHIC;
if (value14) {
var tableRowProps = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5NC5YW']),
onPress: value8, arrow: true};
var viewBindingProps = {style: styles.trailingColorContainer};
GRADIENT = RoleColorsStyle.GRADIENT;
if (r9 === GRADIENT) {
defaultImport3 = importDefault(4589) /* metro dependency 4589 */;
items3 = [r34?.primary_color];
items3[1] = r34?.secondary_color;
items3[2] = r34?.tertiary_color;
r32 = ((Component) => <Component colors={items3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).map(_fun123429)} start={{'x': 0,
'y': 0}} end={{'x': 1, 'y': 0}} style={styles.colorBlock} />)(defaultImport3);
function GuildSettingsRoleEditDisplay({guild, role, name, formErrors, mentionable, hoist, onNameChanged, onMentionableChanged, onHoistChanged, onRoleColorChanged, locked, autoFocusInput}) { // fn#123421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1097, offset: 0x0258c037, size: 2429 bytes, params: 2, frame: 54
var r32;
var r29;
var r23;
var r8;
var r6;
var object;
var GRADIENT;
var defaultImport3;
var items3;
var int2hex;
var moduleValue6;
var value19;
var value20;
var moduleValue7;
var items4;
var object2;
const styles = useStyles();
const isEveryoneRole2 = isEveryoneRole(role);
let r15 = isEveryoneRole2 || locked;
const id = role.id;
const id2 = id;
const value3 = (UseHasEnhancedRoleColorsModule).useHasEnhancedRoleColorsForRole(guild.id,
role);
const roleStyleData = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsRolesStore],
function() {
return GuildSettingsRolesStore.getRoleStyleData(role.id);
});
const r9 = roleStyleData == null ? RoleColorsStyle.SOLID : value3 ? roleStyleData.currentStyle : RoleColorsStyle.SOLID;
const value5 = STYLE_CONFIGS.find(_fun123423);
let r34 = roleStyleData == null || roleStyleData.styleColors == null ? undefined : roleStyleData.styleColors[r9];
let primary_color = r34?.primary_color;
const r31 = primary_color == null ? DEFAULT_ROLE_COLOR : primary_color !== 0 ? primary_color : DEFAULT_ROLE_COLOR;
r34 = r34 == null || r34?.secondary_color == null ? DEFAULT_GRADIENT_ROLE_COLORS : r34;
const canGuildUseRoleIcons2 = (RoleIconUtilsModule).canGuildUseRoleIcons(guild,
role);
const r25 = (require(6793) /* metro dependency 6793: RoleIconUtils */).useRoleIcon({guildId: guild.id,
roleId: role.id,
size: 26}) ?? ((Icon) => <Icon source={importDefault(15963) /* metro dependency 15963 */} size={(require(1305) /* metro dependency 1305: native */).IconSizes.MEDIUM} />)((require(1305) /* metro dependency 1305: native */).Icon);
const binding = id2;
const value8 = binding.useCallback(_fun123424, [id, r34, r31, r9, onRoleColorChanged]);
const value9 = binding.useCallback(_fun123427, [guild.id, role, id, r9, onRoleColorChanged]);
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const TextInput = (TextInputNativeModule).TextInput;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items2 = [
<TextInput
label={Reflect.apply(string, intl, [t.dLbkBk])}
value={name}
isDisabled={r15}
onChange={onNameChanged}
maxLength={MAX_ROLE_LENGTH}
autoFocus={autoFocusInput}
errorMessage={formErrors.name?.[0]}
/>,
];
items2[1] = ((Component) => <Component role={role} />)(importDefault(15968) /* metro dependency 15968: InRolePromptNotice */);
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const tableRow = (
<TableRow
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9wVJRB'])}
onPress={value9}
arrow
subLabel={value5?.labelString != null ? intl.string(value5.labelString) : ''}
disabled={r15}
/>
);
let HOLOGRAPHIC = RoleColorsStyle.HOLOGRAPHIC;
const value14 = r9 !== HOLOGRAPHIC;
if (value14) {
var tableRowProps = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5NC5YW']),
onPress: value8, arrow: true};
var viewBindingProps = {style: styles.trailingColorContainer};
GRADIENT = RoleColorsStyle.GRADIENT;
if (r9 === GRADIENT) {
defaultImport3 = importDefault(4589) /* metro dependency 4589 */;
items3 = [r34?.primary_color];
items3[1] = r34?.secondary_color;
items3[2] = r34?.tertiary_color;
r32 = ((Component) => <Component colors={items3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).map(_fun123429)} start={{'x': 0,
'y': 0}} end={{'x': 1, 'y': 0}} style={styles.colorBlock} />)(defaultImport3);
} else {
r32 = ((Component) => <Component color={r31} style={styles.colorBlock} />)(importDefault(13187) /* metro dependency 13187: ColorBlock */);
}
tableRowProps.trailing = (
<View {...viewBindingProps}>
{r32}
</View>
);
GRADIENT = RoleColorsStyle.GRADIENT;
if (r9 === GRADIENT) {
moduleValue6 = require(673) /* metro dependency 673: ColorUtils */;
int2hex = moduleValue6.int2hex;
primary_color = r34?.primary_color;
value19 = 0;
value20 = Reflect.apply(int2hex, moduleValue6, [primary_color ?? value19]);
moduleValue7 = require(673) /* metro dependency 673: ColorUtils */;
int2hex = moduleValue7.int2hex;
r29 = '[' + value20 + ', ' + Reflect.apply(int2hex, moduleValue7, [r34?.secondary_color ?? value19]) + ']';
} else {
r29 = (require(673) /* metro dependency 673: ColorUtils */).int2hex(r31);
}
tableRowProps.subLabel = r29;
tableRowProps.disabled = r15;
r23 = <TableRow {...tableRowProps} />;
} else {
r32 = ((Component) => <Component color={r31} style={styles.colorBlock} />)(importDefault(13187) /* metro dependency 13187: ColorBlock */);
r23 = value14;
}
tableRowProps.trailing = <View {...viewBindingProps}>{r32}</View>;
GRADIENT = RoleColorsStyle.GRADIENT;
if (r9 === GRADIENT) {
moduleValue6 = require(673) /* metro dependency 673: ColorUtils */;
int2hex = moduleValue6.int2hex;
primary_color = r34?.primary_color;
value19 = 0;
value20 = Reflect.apply(int2hex, moduleValue6, [primary_color ?? value19]);
moduleValue7 = require(673) /* metro dependency 673: ColorUtils */;
int2hex = moduleValue7.int2hex;
r29 = '[' + value20 + ', ' + Reflect.apply(int2hex, moduleValue7, [r34?.secondary_color ?? value19]) + ']';
items2[2] = (
<TableRowGroup hasIcons={false}>
{tableRow}
{r23}
</TableRowGroup>
);
HOLOGRAPHIC = RoleColorsStyle.HOLOGRAPHIC;
const value24 = r9 === HOLOGRAPHIC;
if (value24) {
var viewBindingProps = {style: styles.holographicInfo};
const CircleInformationIcon = (require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon;
items4 = [
<CircleInformationIcon
size="sm"
color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_INFO}
/>,
];
items4[1] = ((Text) => <Text variant="text-sm/normal">{intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).tBhCyr)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r8 = (
<View {...viewBindingProps}>
{items4}
</View>
);
} else {
r29 = (require(673) /* metro dependency 673: ColorUtils */).int2hex(r31);
r8 = value24;
}
tableRowProps.subLabel = r29;
tableRowProps.disabled = r15;
r23 = <TableRow {...tableRowProps} />;
} else {
r23 = value14;
items2[3] = r8;
if (canGuildUseRoleIcons2) {
r6 = (
<TableRowGroup hasIcons={false}>
<TableRow
disabled={r15}
label={intl.string(t.B9grJw)}
trailing={<View style={styles.roleIcon}>
{r25}
</View>}
subLabel={intl.string(t.ZTpgyG)}
/>
</TableRowGroup>
);
} else {
r6 = null;
}
items2[4] = r6;
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
const tableSwitchRow = (
<TableSwitchRow
disabled={r15 || isEveryoneRole2}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iVW5w4)}
value={hoist}
onValueChange={onHoistChanged}
subLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vceJPk)}
/>
);
r15 = !r15 ? isEveryoneRole2 : r15;
const format = intl.format;
const DTXoJQ = (require(1244) /* metro dependency 1244: indexNative */).t.DTXoJQ;
items2[5] = (
<TableRowGroup hasIcons={false}>
{tableSwitchRow}
<TableSwitchRow
disabled={r15}
label={Reflect.apply(format, intl, [DTXoJQ, {}])}
value={mentionable}
onValueChange={onMentionableChanged}
/>
</TableRowGroup>
);
return (
<>
{items2}
</>
);
function _fun123423({id}) { // fn#123423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1502, offset: 0x0258c9d4, size: 21 bytes, params: 2, frame: 2
return id === ReactNativeModule.View;
}
function _fun123424() { // fn#123424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1864, offset: 0x0258c9e9, size: 247 bytes, params: 1, frame: 19
var defaultImport;
var defaultImport2;
const SOLID = RoleColorsStyle.SOLID;
if (ReactNativeModule.View === SOLID) {
defaultImport2 = importDefault(dependencyMap[16]);
defaultImport2.openLazy(require(dependencyMap[18])(dependencyMap[17], dependencyMap.paths), 'RoleColorPicker',
{color: GuildRoleRecordModule.isEveryoneRole, onSelect: onSelect_123425});
} else if (ReactNativeModule.View === RoleColorsStyle.GRADIENT) {
defaultImport = importDefault(dependencyMap[16]);
defaultImport.openLazy(require(dependencyMap[18])(dependencyMap[20], dependencyMap.paths), 'RoleColorPicker',
{colors: env0_6, onSelect: function(a0) {
require(dependencyMap[19]).updateRoleColors(id, a0, RoleColorsStyle.GRADIENT);
onRoleColorChanged();
}});
}
function onSelect_123425(a0) { // fn#123425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1959, offset: 0x0258cae0, size: 57 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = require(15961) /* metro dependency 15961: GuildSettingsRolesActionCreators */;
value.updateRoleColor(id, a0);
onRoleColorChanged();
}
}
function _fun123427() { // fn#123427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:2180, offset: 0x0258cb5d, size: 130 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[16]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[18]);
value = value(dependencyMap[21], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'EnhancedRoleColorsSelectStyleModal', {guildId: guild.id, role: role,
roleStyle: ReactNativeModule.View, onStyleChanged: onStyleChanged}]);
function onStyleChanged(a0) { // fn#123428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:2312, offset: 0x0258cbdf, size: 57 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = require(15961) /* metro dependency 15961: GuildSettingsRolesActionCreators */;
value.updateRoleStyles(id, a0);
onRoleColorChanged();
}
}
function _fun123429(a0) { // fn#123429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:3147, offset: 0x0258cc18, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (ColorUtilsModule).int2hex(a0);
}
}
items2[2] = <TableRowGroup hasIcons={false}>{tableRow}{r23}</TableRowGroup>;
HOLOGRAPHIC = RoleColorsStyle.HOLOGRAPHIC;
const value24 = r9 === HOLOGRAPHIC;
if (value24) {
var viewBindingProps = {style: styles.holographicInfo};
items4 = [((CircleInformationIcon) => <CircleInformationIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_INFO} />)((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)];
items4[1] = ((Text) => <Text variant="text-sm/normal">{intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).tBhCyr)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r8 = <View {...viewBindingProps}>{items4}</View>;
} else {
r8 = value24;
}
items2[3] = r8;
if (canGuildUseRoleIcons2) {
r6 = <TableRowGroup hasIcons={false}><TableRow disabled={r15} label={intl.string(t.B9grJw)} trailing={<View style={styles.roleIcon}>{r25}</View>} subLabel={intl.string(t.ZTpgyG)} /></TableRowGroup>;
} else {
r6 = null;
}
items2[4] = r6;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const tableSwitchRow = <TableSwitchRow disabled={r15 || isEveryoneRole2} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iVW5w4)} value={hoist} onValueChange={onHoistChanged} subLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vceJPk)} />;
r15 = !r15 ? isEveryoneRole2 : r15;
const format = intl.format;
const DTXoJQ = (require(1244) /* metro dependency 1244: indexNative */).t.DTXoJQ;
items2[5] = <TableRowGroup hasIcons={false}>{tableSwitchRow}<TableSwitchRow disabled={r15} label={Reflect.apply(format,
intl, [DTXoJQ, {}])} value={mentionable} onValueChange={onMentionableChanged} /></TableRowGroup>;
return (
<>
{items2}
</>
);
}
function _fun123423({id}) { // fn#123423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1502, offset: 0x0258c9d4, size: 21 bytes, params: 2, frame: 2
return id === env0_4;
}
function _fun123424() { // fn#123424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1864, offset: 0x0258c9e9, size: 247 bytes, params: 1, frame: 19
var defaultImport;
var defaultImport2;
const binding = env0_4;
const SOLID = RoleColorsStyle.SOLID;
if (binding === SOLID) {
defaultImport2 = importDefault(dependencyMap[16]);
defaultImport2.openLazy(require(dependencyMap[18])(dependencyMap[17], dependencyMap.paths), 'RoleColorPicker',
{color: env0_5, onSelect: onSelect_123425});
} else if (env0_4 === RoleColorsStyle.GRADIENT) {
defaultImport = importDefault(dependencyMap[16]);
defaultImport.openLazy(require(dependencyMap[18])(dependencyMap[20], dependencyMap.paths), 'RoleColorPicker',
{colors: env0_6, onSelect: function(a0) {
require(dependencyMap[19]).updateRoleColors(id, a0, RoleColorsStyle.GRADIENT);
onRoleColorChanged();
}});
}
}
function _fun123427() { // fn#123427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:2180, offset: 0x0258cb5d, size: 130 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[16]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[18]);
value = value(dependencyMap[21], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'EnhancedRoleColorsSelectStyleModal', {guildId: guild.id, role: role,
roleStyle: env0_4, onStyleChanged: onStyleChanged}]);
}
function _fun123429(a0) { // fn#123429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:3147, offset: 0x0258cc18, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (require(673) /* metro dependency 673: ColorUtils */).int2hex(a0);
}
function onSelect_123425(a0) { // fn#123425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:1959, offset: 0x0258cae0, size: 57 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = require(15961) /* metro dependency 15961: GuildSettingsRolesActionCreators */;
value.updateRoleColor(id, a0);
onRoleColorChanged();
}
function onStyleChanged(a0) { // fn#123428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16170:2312, offset: 0x0258cbdf, size: 57 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = require(15961) /* metro dependency 15961: GuildSettingsRolesActionCreators */;
value.updateRoleStyles(id, a0);
onRoleColorChanged();
}
global.__d(_fun123420, 15962, [31, 27, 1939, 15947, 15946, 661, 15949, 33, 4501, 697, 6630, 566, 6794, 6793, 1305,
15963, 4080, 14392, 1962, 15961, 15964, 15965, 7981, 1244, 15968, 6231, 6238, 4589, 1360, 673, 13187, 4068,
4573, 2256, 6808,
2]) /* metro module 15962, dependencies: [31, 27, 1939, 15947, 15946, 661, 15949, 33, 4501, 697, 6630, 566, 6794, 6793, 1305, 15963, 4080, 14392, 1962, 15961, 15964, 15965, 7981, 1244, 15968, 6231, 6238, 4589, 1360, 673, 13187, 4068, 4573, 2256, 6808, 2] */;
@@ -1,18 +1,29 @@
/* Metro module 15970; source: modules/guild_settings/roles/native/GuildSettingsRoleEditPermissions.tsx; dependencies: [57, 31, 27, 1422, 3784, 1878, 661, 33, 4501, 697, 3789, 44, 6766, 1244, 4080, 15971, 1962, 15192, 15968, 6984, 683, 483, 4573, 15196, 6808, 6231, 1305, 9105, 2] */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import InRolePromptNotice from './InRolePromptNotice.tsx'; /* Metro dependency 15968 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as BigFlagUtilsModule from '../../../../external/discord_common/js/shared/utils/BigFlagUtils.tsx'; /* Metro dependency 483 */
import * as GuildRecordModule from '../../../../records/GuildRecord.tsx'; /* Metro dependency 1422 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableSwitchRowNativeModule from '../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
import * as SearchFieldNativeModule from '../../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
import * as PermissionUtilsModule from '../../../permissions/PermissionUtils.tsx'; /* Metro dependency 15196 */
function _fun123461(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:6, offset: 0x0258e76d, size: 432 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.View;
const env0_7 = value.Keyboard;
const env0_8 = value.SectionList;
const env0_9 = (require(1422) /* metro dependency 1422: GuildRecord */).isGuildOwner;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_12 = value.AnalyticEvents;
const env0_13 = value.Permissions;
@@ -22,208 +33,253 @@ function _fun123461(global, require, importDefault, importAll, module, exports,
const env0_16 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {emptyState: {'backgroundColor': 'transparent', 'paddingTop': 40}};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.sectionSeparator = {height: PX_24};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.emptyStateText = {color: TEXT_DEFAULT};
object2.subLabel = {includeFontPadding: true};
const env0_17 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleEditPermissions.tsx');
object = {emptyState: {'backgroundColor': 'transparent', 'paddingTop': 40}};
const PX_24 = (Native).space.PX_24;
object.sectionSeparator = {height: PX_24};
const TEXT_DEFAULT = (Native).colors.TEXT_DEFAULT;
object.emptyStateText = {color: TEXT_DEFAULT};
object.subLabel = {includeFontPadding: true};
const env0_17 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleEditPermissions.tsx');
exports.default = GuildSettingsRoleEditPermission;
}
function GuildSettingsRoleEditPermission({guild, role, permissions, onPermissionsChanged, contentContainerStyle}) { // fn#123462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:622, offset: 0x0258e91d, size: 1056 bytes, params: 2, frame: 33
var r7;
var r5;
var moduleValue;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var EmptyState;
const styles = useStyles();
const styles2 = styles;
const currentUser = UserStore.getCurrentUser();
if (currentUser != null) {
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r7 = moduleValue.getHighestRole(guild, currentUser.id);
} else {
r7 = undefined;
}
const env0_5 = r7;
const permissionUtilsModule = importAll(3789) /* metro dependency 3789: PermissionUtils */;
const isRoleHigher2 = permissionUtilsModule.isRoleHigher(guild, currentUser?.id, r7, role);
const value5 = !isRoleHigher2;
const binding = env0_5;
let useState = binding.useState;
const value6 = Reflect.apply(useState, binding, ['']);
const binding2 = styles2;
const value7 = binding2(value6, 2);
const property = value7[0];
const env0_8 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const env0_9 = value8[0];
const env0_10 = value8[1];
(Module00044)(guild != null, 'Guild cannot be null');
const isGuildOwner2 = isGuildOwner(guild, currentUser);
const moduleValue3 = permissionUtilsModule;
const can = moduleValue3.can;
const ADMINISTRATOR = Permissions.ADMINISTRATOR;
const value9 = Reflect.apply(can, moduleValue3, [{permission: ADMINISTRATOR, user: currentUser, context: guild}]);
const env0_11 = binding.useRef(false);
const view = (
<View>
{(isGuildOwner2 || (isRoleHigher2 ? value9 : !value5)) && ((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround variant="text-sm/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ZhSOBy,
{onTemplateOpen: onTemplateOpen})}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround)}
</View>
);
const value16 = (importDefault(15192) /* metro dependency 15192: PermissionSpecUtils */).generateGuildPermissionSpec(guild).map(function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
object['permissions'] = a0.permissions.filter(_fun123465);
return object;
}).filter(function(a0) {
return a0.permissions.length > 0;
}).map(function(a0) {
return {title: a0.title, data: a0.permissions};
});
const value17 = value16.length > 0;
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
const items2 = [
((Component) => <Component role={role} />)(InRolePromptNotice),
];
const SearchField = (SearchFieldNativeModule).SearchField;
items2[1] = (
<View>
<SearchField size="md" onChange={onChange_123468} />
</View>
);
items2[2] = view;
if (value17) {
r5 = (
<SectionList
sections={value16}
stickySectionHeadersEnabled={false}
renderItem={renderItem_123469}
renderSectionHeader={renderSectionHeader_123471}
SectionSeparatorComponent={SectionSeparatorComponent}
ItemSeparatorComponent={function() {
return null;
}}
keyExtractor={function({flag}) {
return flag.toString();
}}
keyboardDismissMode="on-drag"
contentContainerStyle={contentContainerStyle}
/>
);
} else {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r5 = (
<EmptyState
Illustration={(require(9105) /* metro dependency 9105: NoResultsAlt */).NoResultsAlt}
style={styles.emptyState}
bodyStyle={styles.emptyStateText}
body={intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Psh5OO, {query: property})}
/>
);
}
items2[3] = r5;
return (
<>
{items2}
</>
);
function onTemplateOpen() { // fn#123463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1259, owner: GuildSettingsRoleEditPermission.onTemplateOpen, offset: 0x0258ed3d, size: 168 bytes, params: 1, frame: 21
let value = environment.__proto__;
Keyboard.dismiss();
const defaultImport = importDefault(dependencyMap[14]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[16]);
value = value(dependencyMap[15], dependencyMap.paths);
const guildBinding = guild;
Reflect.apply(openLazy, defaultImport, [value, 'role-permission-templates-' + guildBinding.id + '-' + role.id,
{permissionsEdited: env0_9, onPermissionsChanged: onPermissionsChanged, guildId: guildBinding.id}]);
}
function _fun123464(a0) { // fn#123464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1475, offset: 0x0258ede5, size: 51 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, a0, undefined);
object['permissions'] = a0.permissions.filter(_fun123465);
return object;
function _fun123465({title}) { // fn#123465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1519, offset: 0x0258ee18, size: 57 bytes, params: 2, frame: 12
const value = title.toLowerCase();
const includes = value.includes;
const value3 = env1_7.trimStart();
return Reflect.apply(includes, value, [value3.toLowerCase()]);
}
}
function GuildSettingsRoleEditPermissionOnChange(a0) { // fn#123468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1788, owner: GuildSettingsRoleEditPermission.onChange, offset: 0x0258ee81, size: 119 bytes, params: 2, frame: 16
var value4;
var defaultImport;
env0_8(a0);
if (!(a0.trimStart() === '' || env0_11.current)) {
value4 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.SEARCH_STARTED, {search_type: 'Permissions'});
env0_11.current = true;
}
}
function GuildSettingsRoleEditPermissionRenderItem({item, index, section}) { // fn#123469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1971, owner: GuildSettingsRoleEditPermission.renderItem, offset: 0x0258eef8, size: 429 bytes, params: 2, frame: 28
var environment;
var roleBinding;
var value3;
var permissionStoreBinding;
var can;
var guildBinding;
var value5;
var id;
var object2;
var moduleValue;
const description = item.description;
const title = item.title;
const flag = item.flag;
let r7 = env0_6 && role === env0_5;
r7 = !r7 ? env0_6 : r7;
if (!r7) {
value3 = environment.__proto__;
permissionStoreBinding = PermissionStore;
r7 = !permissionStoreBinding.can(flag, guild);
}
if (!r7) {
value5 = environment.__proto__;
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
guildBinding = guild;
roleBinding = role;
id = roleBinding.id;
object2 = {};
copyDataProperties(object2, roleBinding, undefined);
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
object2['permissions'] = moduleValue.remove(permissions, flag);
r7 = !Reflect.apply(can, permissionStoreBinding, [flag, guildBinding, null, {[id]: object2}]);
}
const Text = (TextModule).Text;
const text = (
<Text
variant="text-xs/medium"
color="text-subtle"
style={styles.subLabel}
>
{(PermissionUtilsModule).renderDescription(description)}
</Text>
);
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
const length = section.data.length;
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
return (
<TableSwitchRow
start={index === 0}
end={index === length - 1}
value={bigFlagUtilsModule.has(permissions, flag)}
disabled={r7}
onValueChange={onValueChange_123470}
label={title}
subLabel={text}
/>
);
function renderItemOnValueChange(a0) { // fn#123470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:2376, owner: GuildSettingsRoleEditPermission.renderItem.onValueChange, offset: 0x0258f0a5, size: 103 bytes, params: 2, frame: 17
const onPermissionsChangedBinding = onPermissionsChanged;
onPermissionsChangedBinding(a0 ? BigFlagUtilsModule.add(permissions, flag) : BigFlagUtilsModule.remove(permissions,
flag));
env1_10(true);
}
}
function GuildSettingsRoleEditPermissionRenderSectionHeader(a0) { // fn#123471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:2473, owner: GuildSettingsRoleEditPermission.renderSectionHeader, offset: 0x0258f10c, size: 95 bytes, params: 2, frame: 16
const title = a0.section.title;
const TableRowGroupTitle = (TableRowGroupNativeModule).TableRowGroupTitle;
return (
<View
accessible
accessibilityRole="header"
accessibilityLabel={title}
>
<TableRowGroupTitle title={title} />
</View>
);
}
function SectionSeparatorComponent({leadingItem}) { // fn#123472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:2641, owner: GuildSettingsRoleEditPermission.SectionSeparatorComponent, offset: 0x0258f16b, size: 58 bytes, params: 2, frame: 14
var r0;
let value = null;
if (value != leadingItem) {
value = environment.__proto__;
value = <View style={styles.sectionSeparator} />;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function GuildSettingsRoleEditPermission({guild, role, permissions, onPermissionsChanged, contentContainerStyle}) { // fn#123462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:622, offset: 0x0258e91d, size: 1056 bytes, params: 2, frame: 33
var r7;
var r5;
var moduleValue;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var EmptyState;
const styles = useStyles();
const env0_4 = styles;
const currentUser = UserStore.getCurrentUser();
if (currentUser != null) {
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r7 = moduleValue.getHighestRole(guild, currentUser.id);
} else {
r7 = undefined;
}
const env0_5 = r7;
const permissionUtilsModule = importAll(3789) /* metro dependency 3789: PermissionUtils */;
const isRoleHigher2 = permissionUtilsModule.isRoleHigher(guild, currentUser?.id, r7, role);
const value5 = !isRoleHigher2;
const binding = env0_5;
let useState = binding.useState;
const value6 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_4;
const value7 = binding2(value6, 2);
const property = value7[0];
const env0_8 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const env0_9 = value8[0];
const env0_10 = value8[1];
(importDefault(44) /* metro dependency 44 */)(guild != null, 'Guild cannot be null');
const isGuildOwner2 = isGuildOwner(guild, currentUser);
const moduleValue3 = permissionUtilsModule;
const can = moduleValue3.can;
const ADMINISTRATOR = Permissions.ADMINISTRATOR;
const value9 = Reflect.apply(can, moduleValue3, [{permission: ADMINISTRATOR, user: currentUser, context: guild}]);
const env0_11 = binding.useRef(false);
const view = <View>{(isGuildOwner2 || (isRoleHigher2 ? value9 : !value5)) && ((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround variant="text-sm/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ZhSOBy,
{onTemplateOpen: onTemplateOpen})}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround)}</View>;
const value16 = (importDefault(15192) /* metro dependency 15192: PermissionSpecUtils */).generateGuildPermissionSpec(guild).map(function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
object['permissions'] = a0.permissions.filter(_fun123465);
return object;
}).filter(function(a0) {
return a0.permissions.length > 0;
}).map(function(a0) {
return {title: a0.title, data: a0.permissions};
});
const value17 = value16.length > 0;
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
const items2 = [((Component) => <Component role={role} />)(importDefault(15968) /* metro dependency 15968: InRolePromptNotice */)];
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
items2[1] = <View><SearchField size="md" onChange={onChange_123468} /></View>;
items2[2] = view;
if (value17) {
r5 = <SectionList sections={value16} stickySectionHeadersEnabled={false} renderItem={renderItem_123469} renderSectionHeader={renderSectionHeader_123471} SectionSeparatorComponent={SectionSeparatorComponent} ItemSeparatorComponent={function() {
return null;
}} keyExtractor={function({flag}) {
return flag.toString();
}} keyboardDismissMode="on-drag" contentContainerStyle={contentContainerStyle} />;
} else {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r5 = <EmptyState Illustration={(require(9105) /* metro dependency 9105: NoResultsAlt */).NoResultsAlt} style={styles.emptyState} bodyStyle={styles.emptyStateText} body={intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Psh5OO,
{query: property})} />;
}
items2[3] = r5;
return (
<>
{items2}
</>
);
}
function onTemplateOpen() { // fn#123463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1259, owner: GuildSettingsRoleEditPermission.onTemplateOpen, offset: 0x0258ed3d, size: 168 bytes, params: 1, frame: 21
let value = environment.__proto__;
Keyboard.dismiss();
const defaultImport = importDefault(dependencyMap[14]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[16]);
value = value(dependencyMap[15], dependencyMap.paths);
const guildBinding = guild;
Reflect.apply(openLazy, defaultImport, [value, 'role-permission-templates-' + guildBinding.id + '-' + role.id,
{permissionsEdited: env0_9, onPermissionsChanged: onPermissionsChanged, guildId: guildBinding.id}]);
}
function _fun123464(a0) { // fn#123464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1475, offset: 0x0258ede5, size: 51 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['permissions'] = a0.permissions.filter(_fun123465);
return object2;
}
function GuildSettingsRoleEditPermissionOnChange(a0) { // fn#123468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1788, owner: GuildSettingsRoleEditPermission.onChange, offset: 0x0258ee81, size: 119 bytes, params: 2, frame: 16
var value4;
var defaultImport;
env0_8(a0);
if (!(a0.trimStart() === '' || env0_11.current)) {
value4 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.SEARCH_STARTED, {search_type: 'Permissions'});
env0_11.current = true;
}
}
function GuildSettingsRoleEditPermissionRenderItem({item, index, section}) { // fn#123469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1971, owner: GuildSettingsRoleEditPermission.renderItem, offset: 0x0258eef8, size: 429 bytes, params: 2, frame: 28
var environment;
var roleBinding;
var can;
var guildBinding;
var value5;
var id;
var object;
var moduleValue;
const description = item.description;
const title = item.title;
const flag = item.flag;
let r7 = env0_6 && role === env0_5;
r7 = !r7 ? env0_6 : r7;
r7 = !r7 ? !PermissionStore.can(flag, guild) : r7;
if (!r7) {
value5 = environment.__proto__;
can = PermissionStore.can;
guildBinding = guild;
roleBinding = role;
id = roleBinding.id;
object = {};
copyDataProperties(object, roleBinding, undefined);
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
object['permissions'] = moduleValue.remove(permissions, flag);
r7 = !Reflect.apply(can, PermissionStore, [flag, guildBinding, null, {[id]: object}]);
}
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-xs/medium" color="text-subtle" style={styles.subLabel}>{(require(15196) /* metro dependency 15196: PermissionUtils */).renderDescription(description)}</Text>;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const length = section.data.length;
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
return (
<TableSwitchRow
start={index === 0}
end={index === length - 1}
value={bigFlagUtilsModule.has(permissions, flag)}
disabled={r7}
onValueChange={onValueChange_123470}
label={title}
subLabel={text}
/>
);
}
function GuildSettingsRoleEditPermissionRenderSectionHeader(a0) { // fn#123471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:2473, owner: GuildSettingsRoleEditPermission.renderSectionHeader, offset: 0x0258f10c, size: 95 bytes, params: 2, frame: 16
const title = a0.section.title;
const TableRowGroupTitle = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroupTitle;
return (
<View
accessible
accessibilityRole="header"
accessibilityLabel={title}
>
<TableRowGroupTitle title={title} />
</View>
);
}
function SectionSeparatorComponent({leadingItem}) { // fn#123472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:2641, owner: GuildSettingsRoleEditPermission.SectionSeparatorComponent, offset: 0x0258f16b, size: 58 bytes, params: 2, frame: 14
var r0;
let value = null;
if (value != leadingItem) {
value = environment.__proto__;
value = <View style={styles.sectionSeparator} />;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun123465({title}) { // fn#123465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:1519, offset: 0x0258ee18, size: 57 bytes, params: 2, frame: 12
const value = title.toLowerCase();
const includes = value.includes;
const value3 = env1_7.trimStart();
return Reflect.apply(includes, value, [value3.toLowerCase()]);
}
function renderItemOnValueChange(a0) { // fn#123470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16178:2376, owner: GuildSettingsRoleEditPermission.renderItem.onValueChange, offset: 0x0258f0a5, size: 103 bytes, params: 2, frame: 17
const onPermissionsChangedBinding = onPermissionsChanged;
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
onPermissionsChangedBinding(a0 ? bigFlagUtilsModule.add(permissions, flag) : bigFlagUtilsModule.remove(permissions,
flag));
env1_10(true);
}
global.__d(_fun123461, 15970, [57, 31, 27, 1422, 3784, 1878, 661, 33, 4501, 697, 3789, 44, 6766, 1244, 4080, 15971,
1962, 15192, 15968, 6984, 683, 483, 4573, 15196, 6808, 6231, 1305, 9105,
2]) /* metro module 15970, dependencies: [57, 31, 27, 1422, 3784, 1878, 661, 33, 4501, 697, 3789, 44, 6766, 1244, 4080, 15971, 1962, 15192, 15968, 6984, 683, 483, 4573, 15196, 6808, 6231, 1305, 9105, 2] */;
@@ -1,117 +1,173 @@
/* Metro module 15959; source: modules/guild_settings/roles/native/GuildSettingsRoleItem.tsx; dependencies: [5, 31, 27, 661, 33, 4501, 697, 4573, 6630, 6793, 4496, 1244, 11374, 6593, 4596, 8341, 4071, 6812, 4589, 1360, 673, 9097, 6238, 6699, 1305, 8592, 6705, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import AlertActionCreators from '../../../../actions/native/AlertActionCreators.tsx'; /* Metro dependency 4496 */
import Alert from '../../../../components_native/common/Alert.tsx'; /* Metro dependency 4596 */
import UseHasEnhancedRoleColors from '../../../premium/powerups/hooks/useHasEnhancedRoleColors.tsx'; /* Metro dependency 6630 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ColorUtilsModule from '../../../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as RoleIconUtilsModule from '../../../guild_boosting/native/RoleIconUtils.tsx'; /* Metro dependency 6793 */
function _fun123334(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:6, offset: 0x025885ee, size: 523 bytes, params: 8, frame: 29
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = importDefault(5) /* metro dependency 5 */;
const value2 = importAll(31) /* metro dependency 31 */;
const value3 = require(27) /* metro dependency 27 */;
const env0_5 = value3.View;
const StyleSheet = value3.StyleSheet;
const env0_6 = (require(661) /* metro dependency 661: Constants */).DEFAULT_ROLE_COLOR_HEX;
const value4 = require(33) /* metro dependency 33 */;
const env0_7 = value4.jsx;
const env0_8 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {row: {'flexDirection': 'row', 'gap': 4, 'alignItems': 'center'}};
const object4 = {};
const StyleSheet = ReactNativeModule.StyleSheet;
const createStyles = CreateStylesModule.createStyles;
object = {row: {'flexDirection': 'row', 'gap': 4, 'alignItems': 'center'}};
const object2 = {};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object4.tintColor = INTERACTIVE_TEXT_DEFAULT;
object2.tintColor = INTERACTIVE_TEXT_DEFAULT;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
const value6 = 20;
object4.borderRadius = value6;
object4.padding = 8;
object3.everyone = object4;
const TextStyleSheet = (require(4573) /* metro dependency 4573: Text */).TextStyleSheet;
object2.borderRadius = value6;
object2.padding = 8;
object.everyone = object2;
const TextStyleSheet = (TextModule).TextStyleSheet;
const property = TextStyleSheet['text-md/semibold'];
object3.label = {lineHeight: ((property == null ? value : property.lineHeight) ?? value6) + 1};
object.label = {lineHeight: ((property == null ? value : property.lineHeight) ?? value6) + 1};
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object3.sparkleIcon = {tintColor: ICON_MUTED};
const object7 = {'width': 32, 'height': 32, 'borderRadius': null, 'overflow': 'hidden', 'display': 'flex',
object.sparkleIcon = {tintColor: ICON_MUTED};
const object5 = {'width': 32, 'height': 32, 'borderRadius': null, 'overflow': 'hidden', 'display': 'flex',
'alignItems': 'center', 'justifyContent': 'center'};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.container = object7;
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object3.gradient = object8;
object3.image = {tintColor: 'white'};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object3]);
const value7 = value2.memo(GuildSettingsRoleItem);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleItem.tsx');
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.container = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object.gradient = object6;
object.image = {tintColor: 'white'};
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const value7 = ReactModule.memo(GuildSettingsRoleItem);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleItem.tsx');
exports.default = value7;
return value;
}
function GuildSettingsRoleItem(a0) { // fn#123335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:818, offset: 0x025887f9, size: 2065 bytes, params: 2, frame: 43
var r24;
var r8;
var r9;
var r10;
var r16;
var r0;
var r11;
var r14;
var push;
var object5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object6;
var object7;
var value9;
var value10;
var IconButton;
var colors;
var iconButton;
var value12;
var defaultImport2;
var items3;
var object8;
var Icon;
const value2 = undefined;
const defaultImport = importDefault(6630) /* metro dependency 6630: useHasEnhancedRoleColors */;
let guildId = a0.guildId;
const value3 = null;
const value4 = defaultImport(guildId, value3);
const styles = useStyles();
const role = a0.role;
const sorting = a0.sorting;
const locked = a0.locked;
const env0_1 = a0.onPress;
const onLongPress = a0.onLongPress;
const onMoveUp = a0.onMoveUp;
const onMoveDown = a0.onMoveDown;
const sortHandlers = a0.sortHandlers;
const isEveryoneRole = a0.isEveryoneRole;
guildId = a0.guildId;
const env0_4 = guildId;
const numMembers = a0.numMembers;
const isLastRole = a0.isLastRole;
const isFirstRole = a0.isFirstRole;
const value5 = (require(6793) /* metro dependency 6793: RoleIconUtils */).useRoleIcon({guildId: guildId,
roleId: role.id, size: 32});
let tags = role.tags;
const value6 = value3 === (value3 == tags ? value2 : tags.guild_connections);
items = [];
if (value3 != onMoveUp) {
push = items.push;
object5 = {name: 'moveup'};
object5.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Yl8E4h);
Reflect.apply(push, items, [object5]);
}
if (value3 != onMoveDown) {
push = items.push;
object6 = {name: 'movedown'};
object6.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5PbXSy']);
Reflect.apply(push, items, [object6]);
}
const binding = env0_4;
const useCallback = binding.useCallback;
if (sorting) {
if (locked) {
function GuildSettingsRoleItem(a0) { // fn#123335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:818, offset: 0x025887f9, size: 2065 bytes, params: 2, frame: 43
var r24;
var r8;
var r9;
var r10;
var r16;
var r0;
var r11;
var r14;
var push;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object2;
var object3;
var value9;
var value10;
var IconButton;
var colors;
var iconButton;
var value12;
var defaultImport2;
var items3;
var object4;
var Icon;
const value2 = undefined;
const defaultImport = UseHasEnhancedRoleColors;
let guildId = a0.guildId;
const value3 = null;
const value4 = defaultImport(guildId, value3);
const styles = useStyles();
const role = a0.role;
const sorting = a0.sorting;
const locked = a0.locked;
const env0_1 = a0.onPress;
const onLongPress = a0.onLongPress;
const onMoveUp = a0.onMoveUp;
const onMoveDown = a0.onMoveDown;
const sortHandlers = a0.sortHandlers;
const isEveryoneRole = a0.isEveryoneRole;
guildId = a0.guildId;
const guildId2 = guildId;
const numMembers = a0.numMembers;
const isLastRole = a0.isLastRole;
const isFirstRole = a0.isFirstRole;
const value5 = (RoleIconUtilsModule).useRoleIcon({guildId: guildId,
roleId: role.id, size: 32});
let tags = role.tags;
const value6 = value3 === (value3 == tags ? value2 : tags.guild_connections);
items2 = [];
if (value3 != onMoveUp) {
push = items2.push;
object = {name: 'moveup'};
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Yl8E4h);
Reflect.apply(push, items2, [object]);
}
if (value3 != onMoveDown) {
push = items2.push;
object2 = {name: 'movedown'};
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5PbXSy']);
Reflect.apply(push, items2, [object2]);
}
const binding = guildId2;
const useCallback = binding.useCallback;
if (sorting) {
if (locked) {
value12 = false;
if (sorting) {
r8 = value12;
r9 = value2;
r10 = value2;
r16 = value12;
} else {
r8 = true;
r9 = value2;
r10 = value2;
r16 = value12;
}
} else {
object3 = {accessibilityRole: 'button'};
object3.accessibilityLabel = intl.string(t['0dOFq+']);
object3.accessibilityHint = intl.string(t.BGMUFB);
object3.accessibilityActions = items2;
object3.onAccessibilityAction = Reflect.apply(useCallback, binding, [_fun123336, [onMoveUp, onMoveDown]]);
object3.delayLongPress = 100;
object3.activeOpacity = 0.8;
object3.hitSlop = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
copyDataProperties(object3, sortHandlers, undefined);
r24 = role.managed && !value6;
value9 = true;
value10 = false;
if (r24) {
r8 = value10;
r9 = value2;
r10 = object3;
r16 = value9;
} else {
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
iconButton = (
<IconButton
icon={((TrashIcon) => <TrashIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT} />)((require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon)}
accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FiMFTZ,
{name: role.name})}
size="sm"
variant="destructive"
onPress={onPress_123337}
/>
);
r8 = value10;
r9 = iconButton;
r10 = object3;
r16 = value9;
}
}
} else {
value12 = false;
if (sorting) {
r8 = value12;
@@ -124,187 +180,193 @@ function GuildSettingsRoleItem(a0) { // fn#123335, source: /ci/build/discord/dis
r10 = value2;
r16 = value12;
}
} else {
object7 = {accessibilityRole: 'button'};
object7.accessibilityLabel = intl.string(t['0dOFq+']);
object7.accessibilityHint = intl.string(t.BGMUFB);
object7.accessibilityActions = items;
object7.onAccessibilityAction = Reflect.apply(useCallback, binding, [_fun123336, [onMoveUp, onMoveDown]]);
object7.delayLongPress = 100;
object7.activeOpacity = 0.8;
object7.hitSlop = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
copyDataProperties(object7, sortHandlers, undefined);
r24 = role.managed && !value6;
value9 = true;
value10 = false;
if (r24) {
r8 = value10;
r9 = value2;
r10 = object7;
r16 = value9;
} else {
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
iconButton = <IconButton icon={((TrashIcon) => <TrashIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT} />)((require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon)} accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FiMFTZ,
{name: role.name})} size="sm" variant="destructive" onPress={onPress_123337} />;
r8 = value10;
r9 = iconButton;
r10 = object7;
r16 = value9;
}
}
} else {
value12 = false;
if (sorting) {
r8 = value12;
r9 = value2;
r10 = value2;
r16 = value12;
if (value3 != value5) {
r11 = value5;
} else {
r8 = true;
r9 = value2;
r10 = value2;
r16 = value12;
}
}
if (value3 != value5) {
r11 = value5;
} else {
tags = role.tags;
if (value3 === (value3 == tags ? value2 : tags.guild_connections)) {
r0 = ((Component) => <Component size={32} guildId={guildId} role={role} />)(importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */);
} else if (value4) {
colors = role.colors;
if (value3 == colors) {
r0 = <View style={[styles.container,
{backgroundColor: value3 != role.colorString ? role.colorString : DEFAULT_ROLE_COLOR_HEX}]}>{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}</View>;
} else {
tags = role.tags;
if (value3 === (value3 == tags ? value2 : tags.guild_connections)) {
r0 = ((Component) => <Component size={32} guildId={guildId} role={role} />)(importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */);
} else if (value4) {
colors = role.colors;
if (value3 != colors.secondary_color) {
var viewBindingProps = {style: styles.container};
defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
colors = role.colors;
items3 = [colors.primary_color];
colors = role.colors;
items3[1] = colors.secondary_color;
colors = role.colors;
items3[2] = colors.tertiary_color;
r0 = <View {...viewBindingProps}>{((Component) => <Component colors={items3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).map(_fun123341)} start={{'x': 0,
'y': 0}} end={{'x': 1,
'y': 0}} style={styles.gradient} />)(defaultImport2)}{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}</View>;
if (value3 == colors) {
r0 = (
<View
style={[styles.container,
{backgroundColor: value3 != role.colorString ? role.colorString : DEFAULT_ROLE_COLOR_HEX}]}
>
{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}
</View>
);
} else {
r0 = <View style={[styles.container,
{backgroundColor: value3 != role.colorString ? role.colorString : DEFAULT_ROLE_COLOR_HEX}]}>{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}</View>;
colors = role.colors;
if (value3 != colors.secondary_color) {
var viewBindingProps = {style: styles.container};
defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
colors = role.colors;
items3 = [colors.primary_color];
colors = role.colors;
items3[1] = colors.secondary_color;
colors = role.colors;
items3[2] = colors.tertiary_color;
r0 = (
<View {...viewBindingProps}>
{((Component) => <Component colors={items3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).map(_fun123341)} start={{'x': 0,
'y': 0}} end={{'x': 1, 'y': 0}} style={styles.gradient} />)(defaultImport2)}
{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}
</View>
);
} else {
r0 = (
<View
style={[styles.container,
{backgroundColor: value3 != role.colorString ? role.colorString : DEFAULT_ROLE_COLOR_HEX}]}
>
{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}
</View>
);
}
}
} else {
r0 = (
<View
style={[styles.container,
{backgroundColor: value3 != role.colorString ? role.colorString : DEFAULT_ROLE_COLOR_HEX}]}
>
{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}
</View>
);
}
r11 = r0;
}
const TableRow = (TableRowNativeModule).TableRow;
const tableRowProps = {onLongPress: onLongPress, onPress: sorting ? value2 : function() {
if (onPress != null) {
onPress(role);
}
}, disabled: sorting && !r16, draggable: r16, dragHandlePressableProps: r10, trailing: r9, arrow: r8};
if (isEveryoneRole) {
object4 = {};
object4.style = styles.everyone;
object4.children = ((GroupIcon) => <GroupIcon />)((require(6699) /* metro dependency 6699: GroupIcon */).GroupIcon);
r8 = object4;
} else {
r8 = {children: r11};
}
tableRowProps.icon = <View {...r8} />;
const Text = (TextModule).Text;
const text = (
<Text
lineClamp={1}
style={styles.label}
variant="text-md/semibold"
color="interactive-text-active"
>
{role.name}
</Text>
);
tags = role.tags;
if (value3 != (value3 == tags ? value2 : tags.subscription_listing_id)) {
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var iconProps = {size: (require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16,
source: importDefault(8592) /* metro dependency 8592 */};
iconProps['aria-label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a2Ak8b);
iconProps.style = styles.sparkleIcon;
r14 = <Icon {...iconProps} />;
} else {
r14 = value3;
}
tableRowProps.label = (
<View style={styles.row}>
{text}
{r14}
{
locked
? ((LockIcon) => <LockIcon size="xxs" color="icon-subtle" />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon)
: value3
}
</View>
);
tableRowProps.subLabel = isEveryoneRole ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['72gF3G']) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.AWmdd9,
{count: '' + numMembers});
tableRowProps.start = isFirstRole;
tableRowProps.end = isLastRole;
return <TableRow {...tableRowProps} />;
function _fun123336({nativeEvent}) { // fn#123336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:1381, offset: 0x0258900a, size: 87 bytes, params: 2, frame: 10
const actionName = nativeEvent.actionName;
if (actionName === 'moveup') {
if (onMoveUp != null) {
onMoveUp();
}
} else if (actionName === 'movedown') {
if (onMoveDown != null) {
onMoveDown();
}
}
} else {
r0 = <View style={[styles.container,
{backgroundColor: value3 != role.colorString ? role.colorString : DEFAULT_ROLE_COLOR_HEX}]}>{((ShieldUserIcon) => <ShieldUserIcon size="md" style={styles.image} />)((require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon)}</View>;
}
r11 = r0;
}
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {onLongPress: onLongPress, onPress: sorting ? value2 : function() {
if (onPress != null) {
onPress(role);
}
}, disabled: sorting && !r16, draggable: r16, dragHandlePressableProps: r10, trailing: r9, arrow: r8};
if (isEveryoneRole) {
object8 = {};
object8.style = styles.everyone;
object8.children = ((GroupIcon) => <GroupIcon />)((require(6699) /* metro dependency 6699: GroupIcon */).GroupIcon);
r8 = object8;
} else {
r8 = {children: r11};
}
tableRowProps.icon = <View {...r8} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text lineClamp={1} style={styles.label} variant="text-md/semibold" color="interactive-text-active">{role.name}</Text>;
tags = role.tags;
if (value3 != (value3 == tags ? value2 : tags.subscription_listing_id)) {
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var iconProps = {size: (require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16,
source: importDefault(8592) /* metro dependency 8592 */};
iconProps['aria-label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a2Ak8b);
iconProps.style = styles.sparkleIcon;
r14 = <Icon {...iconProps} />;
} else {
r14 = value3;
}
tableRowProps.label = <View style={styles.row}>{text}{r14}{locked ? ((LockIcon) => <LockIcon size="xxs" color="icon-subtle" />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon) : value3}</View>;
tableRowProps.subLabel = isEveryoneRole ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['72gF3G']) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.AWmdd9,
{count: '' + numMembers});
tableRowProps.start = isFirstRole;
tableRowProps.end = isLastRole;
return <TableRow {...tableRowProps} />;
}
function _fun123336({nativeEvent}) { // fn#123336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:1381, offset: 0x0258900a, size: 87 bytes, params: 2, frame: 10
const actionName = nativeEvent.actionName;
if (actionName === 'moveup') {
if (onMoveUp != null) {
onMoveUp();
}
} else if (actionName === 'movedown') {
if (onMoveDown != null) {
onMoveDown();
}
}
}
function GuildSettingsRoleItemOnPress() { // fn#123337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2048, owner: GuildSettingsRoleItem.onPress, offset: 0x02589061, size: 323 bytes, params: 1, frame: 24
const defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
const show = defaultImport.show;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const FiMFTZ = t.FiMFTZ;
object2.title = Reflect.apply(formatToPlainString, intl, [FiMFTZ, {name: role.name}]);
object2.body = intl.string(t.qALKny);
object2.cancelText = intl.string(t.gm1Vej);
object2.confirmText = intl.string(t.p89ACt);
const env0_0 = env1_3(_fun123339);
object2.onConfirm = onConfirm_123340;
const Colors = (importDefault(4596) /* metro dependency 4596: Alert */).Colors;
const RED = Colors.RED;
object2.confirmColor = RED;
Reflect.apply(show, defaultImport, [object2]);
}
function _fun123341(a0) { // fn#123341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2827, offset: 0x0258923f, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (require(673) /* metro dependency 673: ColorUtils */).int2hex(a0);
}
function* _fun123339() { // fn#123339, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2311, offset: 0x025891af, size: 144 bytes, params: 1, frame: 17
var value3;
var binding;
var value4;
var putRoleConnectionsConfigurations;
var value7;
if (true) {
value = environment.__proto__.__proto__;
if (View) {
value3 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
value4 = binding(env3_2[12]);
putRoleConnectionsConfigurations = value4.putRoleConnectionsConfigurations;
binding = env2_4;
yield Reflect.apply(putRoleConnectionsConfigurations, value4, [binding, require.id, []]);
if (false) {
return undefined;
function GuildSettingsRoleItemOnPress() { // fn#123337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2048, owner: GuildSettingsRoleItem.onPress, offset: 0x02589061, size: 323 bytes, params: 1, frame: 24
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
const object = {};
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
const FiMFTZ = t.FiMFTZ;
object.title = Reflect.apply(formatToPlainString, intl, [FiMFTZ, {name: role.name}]);
object.body = intl.string(t.qALKny);
object.cancelText = intl.string(t.gm1Vej);
object.confirmText = intl.string(t.p89ACt);
const env0_0 = env1_3(_fun123339);
object.onConfirm = onConfirm_123340;
const Colors = (Alert).Colors;
const RED = Colors.RED;
object.confirmColor = RED;
Reflect.apply(show, defaultImport, [object]);
function* _fun123339() { // fn#123339, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2311, offset: 0x025891af, size: 144 bytes, params: 1, frame: 17
var value3;
var binding;
var value4;
var putRoleConnectionsConfigurations;
var value7;
if (true) {
value = environment.__proto__.__proto__;
if (View) {
value3 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
value4 = binding(env3_2[12]);
putRoleConnectionsConfigurations = value4.putRoleConnectionsConfigurations;
binding = env2_4;
yield Reflect.apply(putRoleConnectionsConfigurations, value4, [binding, require.id, []]);
if (false) {
return undefined;
}
value7 = environment.__proto__.__proto__.__proto__;
}
var value8 = env3_1(env3_2[13]);
value8.deleteRole(env2_4, require.id);
}
}
value7 = environment.__proto__.__proto__.__proto__;
function onPressOnConfirm_123340() { // fn#123340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2418, owner: GuildSettingsRoleItem.onPress.onConfirm, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
var value8 = env3_1(env3_2[13]);
value8.deleteRole(env2_4, require.id);
function _fun123341(a0) { // fn#123341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16167:2827, offset: 0x0258923f, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (ColorUtilsModule).int2hex(a0);
}
}
}
global.__d(_fun123334, 15959, [5, 31, 27, 661, 33, 4501, 697, 4573, 6630, 6793, 4496, 1244, 11374, 6593, 4596, 8341,
4071, 6812, 4589, 1360, 673, 9097, 6238, 6699, 1305, 8592, 6705,
2]) /* metro module 15959, dependencies: [5, 31, 27, 661, 33, 4501, 697, 4573, 6630, 6793, 4496, 1244, 11374, 6593, 4596, 8341, 4071, 6812, 4589, 1360, 673, 9097, 6238, 6699, 1305, 8592, 6705, 2] */;
@@ -1,6 +1,18 @@
/* Metro module 15972; source: modules/guild_settings/roles/native/GuildSettingsRoleMembers.tsx; dependencies: [57, 31, 27, 6737, 661, 33, 4501, 697, 3857, 8947, 1244, 15951, 6902, 566, 4647, 9112, 1305, 683, 4080, 15952, 1962, 12140, 8341, 6988, 6984, 4068, 4573, 6238, 10504, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildRoleMemberCountStore from '../../GuildRoleMemberCountStore.tsx'; /* Metro dependency 6737 */
import DetailedGuildIdentityUserRow from '../../native/DetailedGuildIdentityUserRow.tsx'; /* Metro dependency 12140 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as SearchFieldNativeModule from '../../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
import * as GuildSettingsRolesUtilsModule from '../GuildSettingsRolesUtils.tsx'; /* Metro dependency 15951 */
function _fun123482(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:6, offset: 0x0258f5d8, size: 516 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const onMembersLoadFail = function() {
var defaultImport = importDefault(dependencyMap[8]);
@@ -10,198 +22,210 @@ function _fun123482(global, require, importDefault, importAll, module, exports,
};
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 guildRoleMemberCountStore = importDefault(6737) /* metro dependency 6737: GuildRoleMemberCountStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.container = {paddingHorizontal: PX_12, flex: 1};
object.container = {paddingHorizontal: PX_12, flex: 1};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.containerSearchBar = {paddingBottom: PX_12};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object3.borderWidth = 1;
object.containerSearchBar = {paddingBottom: PX_12};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object4.borderWidth = 1;
const ICON_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_INFO;
object3.borderColor = ICON_FEEDBACK_INFO;
object4.borderColor = ICON_FEEDBACK_INFO;
const BACKGROUND_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_INFO;
object3.backgroundColor = BACKGROUND_FEEDBACK_INFO;
object4.backgroundColor = BACKGROUND_FEEDBACK_INFO;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.marginBottom = PX_16;
object4.marginBottom = PX_16;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.padding = PX_8;
object3.flexDirection = 'row';
object3.alignItems = 'center';
object2.missingMembers = object3;
object4.padding = PX_8;
object4.flexDirection = 'row';
object4.alignItems = 'center';
object.missingMembers = object4;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.missingMembersText = {marginLeft: PX_8, flex: 1};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleMembers.tsx');
object.missingMembersText = {marginLeft: PX_8, flex: 1};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleMembers.tsx');
exports.default = GuildSettingsRoleMembers;
}
function GuildSettingsRoleMembers({guild, role, locked, contentContainerStyle}) { // fn#123484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:906, offset: 0x0258f855, size: 1015 bytes, params: 2, frame: 36
var r12;
var items3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const binding = env0_4;
const [property, property2] = env0_3(binding.useState(''), 2);
(require(15951) /* metro dependency 15951: GuildSettingsRolesUtils */).useQueryGuildMembers(guild.id,
property.trim().toLowerCase());
const value6 = (require(15951) /* metro dependency 15951: GuildSettingsRolesUtils */).useGuildRoleMembers(guild.id,
role.id, onMembersLoadFail);
const value7 = value6.filter(_fun123485);
(require(6902) /* metro dependency 6902: subscribeGuildMembers */).useSubscribeGuildMembers({[guild.id]: value6.map(function(a0) {
return a0.id;
})}, 'GuildSettingsRoleMembers');
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const value9 = Reflect.apply(useStateFromStores, fluxModule, [[GuildRoleMemberCountStore], _fun123487, [guild.id,
role.id]]) > value6.length;
const value10 = binding.useCallback(_fun123488, [guild.id, role.id, role.name]);
const value11 = binding.useCallback(_fun123492, [guild, role]);
const env0_6 = binding.useCallback(_fun123493, [value10, guild.id, locked, value7]);
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
const view = <View style={styles.containerSearchBar}><SearchField onChange={property2} /></View>;
if (value9) {
var viewBinding2Props = {style: styles.missingMembers};
items3 = [((CircleInformationIcon) => <CircleInformationIcon color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_LINK} size="md" />)((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)];
items3[1] = ((Text) => <Text style={styles.missingMembersText} variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RQxHZ8)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r12 = <View {...viewBinding2Props}>{items3}</View>;
} else {
r12 = null;
}
const items4 = [r12];
items4[1] = locked ? null : ((TableRow) => <TableRow arrow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZYOK46)} icon={((CirclePlusIcon) => <CirclePlusIcon size="md" />)((require(10504) /* metro dependency 10504: CirclePlusIcon */).CirclePlusIcon)} onPress={value11} start end={value7.length === 0} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow);
items4[2] = value7.map(_fun123495);
return (
<View style={styles.container}>
{view}
<View style={contentContainerStyle}>
{items4}
function GuildSettingsRoleMembers({guild, role, locked, contentContainerStyle}) { // fn#123484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:906, offset: 0x0258f855, size: 1015 bytes, params: 2, frame: 36
var r12;
var items3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const [property, property2] = Module00057(ReactModule.useState(''), 2);
(GuildSettingsRolesUtilsModule).useQueryGuildMembers(guild.id,
property.trim().toLowerCase());
const value6 = (GuildSettingsRolesUtilsModule).useGuildRoleMembers(guild.id,
role.id, onMembersLoadFail);
const value7 = value6.filter(_fun123485);
(require(6902) /* metro dependency 6902: subscribeGuildMembers */).useSubscribeGuildMembers({[guild.id]: value6.map(function(a0) {
return a0.id;
})}, 'GuildSettingsRoleMembers');
const useStateFromStores = FluxModule.useStateFromStores;
const value9 = Reflect.apply(useStateFromStores, FluxModule, [[GuildRoleMemberCountStore], _fun123487, [guild.id,
role.id]]) > value6.length;
const value10 = ReactModule.useCallback(_fun123488, [guild.id, role.id, role.name]);
const value11 = ReactModule.useCallback(_fun123492, [guild, role]);
const env0_6 = ReactModule.useCallback(_fun123493, [value10, guild.id, locked, value7]);
const SearchField = (SearchFieldNativeModule).SearchField;
const view = (
<View style={styles.containerSearchBar}>
<SearchField onChange={property2} />
</View>
</View>
);
}
);
if (value9) {
var viewBinding2Props = {style: styles.missingMembers};
const CircleInformationIcon = (require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon;
items3 = [
<CircleInformationIcon color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_LINK} size="md" />,
];
items3[1] = ((Text) => <Text style={styles.missingMembersText} variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RQxHZ8)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r12 = (
<View {...viewBinding2Props}>
{items3}
</View>
);
} else {
r12 = null;
}
const items4 = [r12];
items4[1] = (
locked
? null
: ((TableRow) => <TableRow arrow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZYOK46)} icon={((CirclePlusIcon) => <CirclePlusIcon size="md" />)((require(10504) /* metro dependency 10504: CirclePlusIcon */).CirclePlusIcon)} onPress={value11} start end={value7.length === 0} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow)
);
items4[2] = value7.map(_fun123495);
return (
<View style={styles.container}>
{view}
<View style={contentContainerStyle}>
{items4}
</View>
</View>
);
function _fun123485({name}) { // fn#123485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1182, offset: 0x0258fc4c, size: 37 bytes, params: 2, frame: 11
return name.toLowerCase().includes(Module00057);
}
function _fun123485({name}) { // fn#123485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1182, offset: 0x0258fc4c, size: 37 bytes, params: 2, frame: 11
return name.toLowerCase().includes(env0_3);
}
function _fun123487() { // fn#123487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1349, offset: 0x0258fc71, size: 68 bytes, params: 1, frame: 13
const value = environment.__proto__;
return GuildRoleMemberCountStore.getRoleMemberCount(guild.id)?.[role.id] ?? 0;
}
function _fun123487() { // fn#123487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1349, offset: 0x0258fc71, size: 68 bytes, params: 1, frame: 13
const value = environment.__proto__;
return GuildRoleMemberCountStore.getRoleMemberCount(guild.id)?.[role.id] ?? 0;
}
function _fun123488(a0, a1) { // fn#123488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1476, offset: 0x0258fcb5, size: 373 bytes, params: 3, frame: 22
var environment;
var defaultImport;
var show;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var format;
var scORUv;
var object2;
var name;
const env0_0 = a0;
if (a1.filter(function(a0) {
return a0 !== role.id;
}).length !== a1.length) {
value = environment.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object = {};
object.title = intl.string(t['7sFNfW']);
format = intl.format;
scORUv = t.scORUv;
object2 = {};
name = a0.name;
object2.username = name;
name = role.name;
object2.roleName = name;
object.body = Reflect.apply(format, intl, [scORUv, object2]);
object.cancelText = intl.string(t['ETE/oC']);
object.confirmText = intl.string(t.N86XcP);
object.onConfirm = onConfirm_123490;
object.hideActionSheet = false;
object.confirmColor = (require(1305) /* metro dependency 1305: native */).ButtonColors.RED;
Reflect.apply(show, defaultImport, [object]);
}
function onConfirm_123490() { // fn#123490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1802, offset: 0x0258fe3f, size: 112 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__.__proto__;
value = Reflect.apply((importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).updateMemberRoles,
value, [guild.id, env0_0.id, env0_1, [], [role.id]]);
value.catch(function() {
var defaultImport = importDefault(dependencyMap[8]);
var object = {key: 'ERROR_OCCURRED_TRY_AGAIN'};
object.content = require(dependencyMap[10]).intl.string(require(dependencyMap[10]).t.fEptJP);
object.icon = importDefault(dependencyMap[9]);
defaultImport.open(object);
});
}
}
function _fun123492() { // fn#123492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:2083, offset: 0x0258ff28, size: 183 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[17]);
const track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {'type': 'Add Role Members', 'location_page': 'Role Settings',
'location_section': 'Members'}]);
const defaultImport2 = importDefault(dependencyMap[18]);
const openLazy = defaultImport2.openLazy;
value = require(dependencyMap[20]);
value = value(dependencyMap[19], dependencyMap.paths);
const guildBinding = guild;
const id = guildBinding.id;
const roleBinding = role;
Reflect.apply(openLazy, defaultImport2, [value, 'role-add-members-' + id + '-' + roleBinding.id,
{guild: guildBinding, role: roleBinding}]);
}
function _fun123493({item, index}) { // fn#123493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:2323, offset: 0x0258ffdf, size: 300 bytes, params: 2, frame: 25
var environment;
var r5;
var IconButton;
var intl;
const value = environment.__proto__;
const defaultImportProps2 = {end: index === ReactModule.length - 1, start: index === 0 && locked, guildId: guild.id};
const user = item.user;
defaultImportProps2.userId = user.id;
if (locked) {
r5 = null;
} else {
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
var iconButtonProps = {icon: ((CircleXIcon) => <CircleXIcon />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7sFNfW']);
iconButtonProps.accessibilityRole = 'button';
iconButtonProps.onPress = onPress_123494;
iconButtonProps.variant = 'icon-only';
r5 = <IconButton {...iconButtonProps} />;
}
defaultImportProps2.trailing = r5;
return <DetailedGuildIdentityUserRow {...defaultImportProps2} key={item.id} />;
function onPress_123494() { // fn#123494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:2591, offset: 0x0259010b, size: 30 bytes, params: 1, frame: 13
const binding = env1_5;
const itemBinding = item;
return binding(itemBinding, itemBinding.roles);
}
}
function _fun123495(a0, a1) { // fn#123495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:3221, offset: 0x02590129, size: 32 bytes, params: 3, frame: 11
return env0_6({item: a0, index: a1});
}
function _fun123488(a0, a1) { // fn#123488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1476, offset: 0x0258fcb5, size: 373 bytes, params: 3, frame: 22
var environment;
var defaultImport;
var show;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var format;
var scORUv;
var object4;
var name;
const env0_0 = a0;
if (a1.filter(function(a0) {
return a0 !== role.id;
}).length !== a1.length) {
value = environment.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object3 = {};
object3.title = intl.string(t['7sFNfW']);
format = intl.format;
scORUv = t.scORUv;
object4 = {};
name = a0.name;
object4.username = name;
name = role.name;
object4.roleName = name;
object3.body = Reflect.apply(format, intl, [scORUv, object4]);
object3.cancelText = intl.string(t['ETE/oC']);
object3.confirmText = intl.string(t.N86XcP);
object3.onConfirm = onConfirm_123490;
object3.hideActionSheet = false;
object3.confirmColor = (require(1305) /* metro dependency 1305: native */).ButtonColors.RED;
Reflect.apply(show, defaultImport, [object3]);
}
}
function _fun123492() { // fn#123492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:2083, offset: 0x0258ff28, size: 183 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[17]);
const track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {'type': 'Add Role Members', 'location_page': 'Role Settings',
'location_section': 'Members'}]);
const defaultImport2 = importDefault(dependencyMap[18]);
const openLazy = defaultImport2.openLazy;
value = require(dependencyMap[20]);
value = value(dependencyMap[19], dependencyMap.paths);
const guildBinding = guild;
const id = guildBinding.id;
const roleBinding = role;
Reflect.apply(openLazy, defaultImport2, [value, 'role-add-members-' + id + '-' + roleBinding.id,
{guild: guildBinding, role: roleBinding}]);
}
function _fun123493({item, index}) { // fn#123493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:2323, offset: 0x0258ffdf, size: 300 bytes, params: 2, frame: 25
var environment;
var r5;
var IconButton;
var intl;
const value = environment.__proto__;
const DetailedGuildIdentityUserRow = importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */;
const defaultImportProps2 = {end: index === env0_4.length - 1, start: index === 0 && locked, guildId: guild.id};
const user = item.user;
defaultImportProps2.userId = user.id;
if (locked) {
r5 = null;
} else {
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
var iconButtonProps = {icon: ((CircleXIcon) => <CircleXIcon />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7sFNfW']);
iconButtonProps.accessibilityRole = 'button';
iconButtonProps.onPress = onPress_123494;
iconButtonProps.variant = 'icon-only';
r5 = <IconButton {...iconButtonProps} />;
}
defaultImportProps2.trailing = r5;
return <DetailedGuildIdentityUserRow {...defaultImportProps2} key={item.id} />;
}
function _fun123495(a0, a1) { // fn#123495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:3221, offset: 0x02590129, size: 32 bytes, params: 3, frame: 11
return env0_6({item: a0, index: a1});
}
function onConfirm_123490() { // fn#123490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:1802, offset: 0x0258fe3f, size: 112 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__.__proto__;
value = Reflect.apply((importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).updateMemberRoles,
value, [guild.id, env0_0.id, env0_1, [], [role.id]]);
value.catch(function() {
var defaultImport = importDefault(dependencyMap[8]);
var object = {key: 'ERROR_OCCURRED_TRY_AGAIN'};
object.content = require(dependencyMap[10]).intl.string(require(dependencyMap[10]).t.fEptJP);
object.icon = importDefault(dependencyMap[9]);
defaultImport.open(object);
});
}
function onPress_123494() { // fn#123494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16180:2591, offset: 0x0259010b, size: 30 bytes, params: 1, frame: 13
const binding = env1_5;
const itemBinding = item;
return binding(itemBinding, itemBinding.roles);
}
global.__d(_fun123482, 15972, [57, 31, 27, 6737, 661, 33, 4501, 697, 3857, 8947, 1244, 15951, 6902, 566, 4647, 9112,
1305, 683, 4080, 15952, 1962, 12140, 8341, 6988, 6984, 4068, 4573, 6238, 10504,
2]) /* metro module 15972, dependencies: [57, 31, 27, 6737, 661, 33, 4501, 697, 3857, 8947, 1244, 15951, 6902, 566, 4647, 9112, 1305, 683, 4080, 15952, 1962, 12140, 8341, 6988, 6984, 4068, 4573, 6238, 10504, 2] */;
@@ -1,18 +1,31 @@
/* Metro module 15950; source: modules/guild_settings/roles/native/GuildSettingsRoleTemplate.tsx; dependencies: [57, 31, 27, 4502, 1867, 15946, 661, 33, 4501, 697, 7556, 683, 4863, 7992, 5278, 4573, 12812, 1305, 11365, 4578, 1244, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseIsWindowLarge from '../../../screen/native/useIsWindowLarge.tsx'; /* Metro dependency 7556 */
import Module07992 from '../../../../by-id/module-07992.jsx'; /* Metro dependency 7992 */
import Module11365 from '../../../../by-id/module-11365.js'; /* Metro dependency 11365 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as AppAnalyticsUtilsModule from '../../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
function _fun123258(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:6, offset: 0x02585bb9, size: 731 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const Dimensions = value.Dimensions;
const env0_6 = value.AccessibilityInfo;
const env0_7 = value.ScrollView;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
value = require(15946) /* metro dependency 15946: GuildSettingsRoleConstants */;
const env0_10 = value.PermissionTemplateTypes;
const env0_11 = value.PermissionTemplates;
@@ -27,218 +40,276 @@ function _fun123258(global, require, importDefault, importAll, module, exports,
const env0_18 = Reflect.apply(get, Dimensions, ['window']).width - 300;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
object2.carousel = {flex: 1};
object2.cardWrapper = {'paddingHorizontal': 10, 'flex': 1};
const object3 = {'backgroundColor': null, 'borderColor': null, 'borderRadius': null, 'borderStyle': 'solid',
object.container = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
object.carousel = {flex: 1};
object.cardWrapper = {'paddingHorizontal': 10, 'flex': 1};
const object4 = {'backgroundColor': null, 'borderColor': null, 'borderRadius': null, 'borderStyle': 'solid',
'borderWidth': 1, 'flex': 1, 'flexDirection': 'column', 'marginVertical': 16, 'padding': 16, 'paddingTop': 20};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object3.borderColor = BACKGROUND_BASE_LOWEST;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.card = object3;
object2.templateTitle = {'alignItems': 'center', 'textAlign': 'center', 'paddingBottom': 16};
object2.templateSubtitle = {paddingBottom: 16};
object2.templateContentWrapper = {'flex': 1, 'justifyContent': 'flex-start'};
object2.templateContent = {'alignItems': 'center', 'flexDirection': 'row', 'paddingBottom': 8};
object2.templateContentText = {'flex': 1, 'marginLeft': 12};
object2.templateButton = {'justifyContent': 'flex-end', 'flexGrow': 0, 'paddingTop': 16};
object2.sliderContainer = {alignItems: 'center'};
object2.slider = {'marginTop': 8, 'width': 300, 'maxWidth': '72%'};
object2.sliderLabels = {'alignItems': 'center', 'flexDirection': 'row', 'justifyContent': 'space-between',
object4.borderColor = BACKGROUND_BASE_LOWEST;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.card = object4;
object.templateTitle = {'alignItems': 'center', 'textAlign': 'center', 'paddingBottom': 16};
object.templateSubtitle = {paddingBottom: 16};
object.templateContentWrapper = {'flex': 1, 'justifyContent': 'flex-start'};
object.templateContent = {'alignItems': 'center', 'flexDirection': 'row', 'paddingBottom': 8};
object.templateContentText = {'flex': 1, 'marginLeft': 12};
object.templateButton = {'justifyContent': 'flex-end', 'flexGrow': 0, 'paddingTop': 16};
object.sliderContainer = {alignItems: 'center'};
object.slider = {'marginTop': 8, 'width': 300, 'maxWidth': '72%'};
object.sliderLabels = {'alignItems': 'center', 'flexDirection': 'row', 'justifyContent': 'space-between',
'marginBottom': 16, 'textAlign': 'center', 'width': 380, 'maxWidth': '85%'};
object2.sliderLabel = {'marginHorizontal': 0, 'width': '25%', 'textAlign': 'center', 'alignItems': 'center'};
const env0_19 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleTemplate.tsx');
object.sliderLabel = {'marginHorizontal': 0, 'width': '25%', 'textAlign': 'center', 'alignItems': 'center'};
const env0_19 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRoleTemplate.tsx');
exports.default = GuildSettingsRoleTemplate;
}
function GuildSettingsRoleTemplate({onSelect, location, guildId}) { // fn#123259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:1581, offset: 0x02585e94, size: 721 bytes, params: 2, frame: 35
const closure = onSlidingComplete;
const styles = useStyles();
const env0_3 = styles;
const value2 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
const binding = undefined;
const value3 = binding.useRef(null);
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [DEFAULT_TEMPLATE_TYPE]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
const property = value5[0];
const env0_6 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [width]), 2);
const property2 = value6[0];
const env0_8 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [env0_18]), 2);
const property3 = value7[0];
const env0_9 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value8[0];
const env0_10 = value8[1];
binding.useEffect(_fun123261, []);
const Object = global.Object;
const value9 = Object.values(PermissionTemplates);
const viewBindingProps = {style: styles.container, onLayout: onLayout_123263};
const defaultImport = importDefault(7992) /* metro dependency 7992 */;
const COSMETIC = PermissionTemplateTypes.COSMETIC;
let view = <View accessible={false} accessibilityElementsHidden importantForAccessibility="no-hide-descendants">{((Component) => <Component maximumValue={value9.length - 1} minimumTrackTintColor={value9[property].color} minimumValue={COSMETIC} onSlidingComplete={closure} style={styles.slider} thumbTintColor={value9[property].color} value={property} accessible={false} accessibilityElementsHidden importantForAccessibility="no" />)(defaultImport)}</View>;
view = <View style={styles.sliderContainer}>{view}<View style={styles.sliderLabels}>{value9.map(_fun123264)}</View></View>;
return (
<View {...viewBindingProps}>
{view}
{((Component) => <Component data={value9} firstItem={0} inactiveSlideScale={1} inactiveSlideOpacity={value2 ? 0.3 : 0.7} itemWidth={property2 - property3} onBeforeSnapToItem={onBeforeSnapToItem} enableMomentum decelerationRate={0.9} ref={value3} renderItem={renderItem_123267} sliderWidth={property2} style={styles.carousel} scrollEnabled={!property4} />)(importDefault(12812) /* metro dependency 12812 */)}
</View>
);
}
function GuildSettingsRoleTemplateOnSlidingComplete(a0) { // fn#123260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:1848, owner: GuildSettingsRoleTemplate.onSlidingComplete, offset: 0x02586165, size: 105 bytes, params: 2, frame: 15
var current;
var snapToItem;
var value5;
const Math = global.Math;
const value = Math.round(a0);
env0_6(value);
if (env0_4 != null && env0_4.current != null) {
current = env0_4.current;
snapToItem = current.snapToItem;
value5 = environment.__proto__;
Reflect.apply(snapToItem, current, [value, !AccessibilityStore.useReducedMotion]);
}
}
function _fun123261() { // fn#123261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:1980, offset: 0x025861ce, size: 40 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
AccessibilityInfo.isScreenReaderEnabled().then(_fun123262);
}
function GuildSettingsRoleTemplateOnLayout({nativeEvent}) { // fn#123263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2097, owner: GuildSettingsRoleTemplate.onLayout, offset: 0x02586209, size: 65 bytes, params: 2, frame: 12
const width = nativeEvent.layout.width;
if (width !== env0_7) {
env0_8(width);
env0_9(width - 300);
}
}
function _fun123264({title}, a1) { // fn#123264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2616, offset: 0x0258624a, size: 186 bytes, params: 3, frame: 23
const env0_0 = a1;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object = {selected: env0_5 === a1};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.sliderLabel} key={title()}>
<PressableOpacity
accessibilityRole="button"
accessibilityState={object}
onPress={function() {
onSlidingComplete(require);
}}
function GuildSettingsRoleTemplate({onSelect, location, guildId}) { // fn#123259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:1581, offset: 0x02585e94, size: 721 bytes, params: 2, frame: 35
const onSlidingComplete_1232602 = onSlidingComplete_123260;
const styles = useStyles();
const styles2 = styles;
const value2 = (UseIsWindowLarge)();
const binding = undefined;
const value3 = binding.useRef(null);
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [DEFAULT_TEMPLATE_TYPE]);
const binding2 = styles2;
const value5 = binding2(value4, 2);
const property = value5[0];
const env0_6 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [width]), 2);
const property2 = value6[0];
const env0_8 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [env0_18]), 2);
const property3 = value7[0];
const env0_9 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value8[0];
const env0_10 = value8[1];
binding.useEffect(_fun123261, []);
const Object = global.Object;
const value9 = Object.values(PermissionTemplates);
const viewBindingProps = {style: styles.container, onLayout: onLayout_123263};
const defaultImport = Module07992;
const COSMETIC = PermissionTemplateTypes.COSMETIC;
let view = (
<View
accessible={false}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
>
<Text variant="text-sm/medium">
{title()}
</Text>
</PressableOpacity>
</View>
);
}
function GuildSettingsRoleTemplateRenderItem(a0) { // fn#123267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:3054, owner: GuildSettingsRoleTemplate.renderItem, offset: 0x0258631b, size: 619 bytes, params: 2, frame: 31
const item = a0.item;
const value2 = a0.index === env0_5;
const value3 = item.contentPreface();
const value5 = !value2;
const r5 = value2 ? undefined : !value5;
const r0 = value2 ? 'yes' : 'no-hide-descendants';
const stylesBinding = styles;
const cardWrapper = stylesBinding.cardWrapper;
const card = stylesBinding.card;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text style={stylesBinding.templateTitle} variant="heading-lg/extrabold">{item.title()}</Text>];
items2[1] = <Text style={stylesBinding.templateSubtitle} variant="text-sm/medium">{item.description()}</Text>;
const templateContentWrapper = stylesBinding.templateContentWrapper;
const value11 = null;
items2[2] = <View style={templateContentWrapper}>{value11 != value3 ? value3 === '' ? value11 : <Text style={styles.templateSubtitle} variant="text-sm/medium">{item.contentPreface()}</Text> : value11}<View accessibilityRole="list">{item.contents().map(_fun123268)}</View></View>;
const scrollView = <ScrollView>{items2}</ScrollView>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View
accessible={r5}
accessibilityElementsHidden={value5}
importantForAccessibility={r0}
style={cardWrapper}
>
<View style={card}>
{scrollView}
<View style={styles.templateButton}>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mQS8Is)}
onPress={onPress_123269}
/>
{((Component) => <Component maximumValue={value9.length - 1} minimumTrackTintColor={value9[property].color} minimumValue={COSMETIC} onSlidingComplete={onSlidingComplete_1232602} style={styles.slider} thumbTintColor={value9[property].color} value={property} accessible={false} accessibilityElementsHidden importantForAccessibility="no" />)(defaultImport)}
</View>
);
view = (
<View style={styles.sliderContainer}>
{view}
<View style={styles.sliderLabels}>
{value9.map(_fun123264)}
</View>
</View>
</View>
);
}
function _fun123262(a0) { // fn#123262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2017, offset: 0x025861f6, size: 19 bytes, params: 2, frame: 11
env1_10(a0);
}
function _fun123268(a0, a1) { // fn#123268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:3714, offset: 0x02586586, size: 263 bytes, params: 3, frame: 23
const value = environment.__proto__.__proto__;
const stylesBinding = styles;
const templateContent = stylesBinding.templateContent;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(11365) /* metro dependency 11365 */};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const MEDIUM = IconSizes.MEDIUM;
iconProps.size = MEDIUM;
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
iconProps.color = GREEN_360;
const items2 = [<Icon {...iconProps} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text style={stylesBinding.templateContentText} variant="text-sm/medium">{a0}</Text>;
return (
<View style={templateContent} key={'' + item.key + '_content_' + a1}>
{items2}
</View>
);
}
function renderItemOnPress_123269() { // fn#123269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:4096, owner: GuildSettingsRoleTemplate.renderItem.onPress, offset: 0x0258668d, size: 203 bytes, params: 1, frame: 21
var features;
const {permissions, communityPermissions, key} = item;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const ROLE_TEMPLATE_SELECTED = AnalyticEvents.ROLE_TEMPLATE_SELECTED;
const object2 = {};
object2.location_page = location;
object2.template_name = key;
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = appAnalyticsUtilsModule.collectGuildAnalyticsMetadata;
const guildIdBinding = guildId;
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, appAnalyticsUtilsModule, [guildIdBinding]),
appAnalyticsUtilsModule);
Reflect.apply(track, defaultImport, [ROLE_TEMPLATE_SELECTED, object2]);
const guild = GuildStore.getGuild(guildIdBinding);
if (guild != null) {
features = guild.features;
if (features.has(GuildFeatures.COMMUNITY)) {
if (communityPermissions != null) {
onSelect(communityPermissions);
} else {
onSelect(permissions);
);
return (
<View {...viewBindingProps}>
{view}
{((Component) => <Component data={value9} firstItem={0} inactiveSlideScale={1} inactiveSlideOpacity={value2 ? 0.3 : 0.7} itemWidth={property2 - property3} onBeforeSnapToItem={onBeforeSnapToItem} enableMomentum decelerationRate={0.9} ref={value3} renderItem={renderItem_123267} sliderWidth={property2} style={styles.carousel} scrollEnabled={!property4} />)(importDefault(12812) /* metro dependency 12812 */)}
</View>
);
function GuildSettingsRoleTemplateOnSlidingComplete(a0) { // fn#123260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:1848, owner: GuildSettingsRoleTemplate.onSlidingComplete, offset: 0x02586165, size: 105 bytes, params: 2, frame: 15
var current;
var snapToItem;
var value5;
const Math = global.Math;
const value = Math.round(a0);
env0_6(value);
if (ReactModule != null && ReactModule.current != null) {
current = ReactModule.current;
snapToItem = current.snapToItem;
value5 = environment.__proto__;
Reflect.apply(snapToItem, current, [value, !AccessibilityStore.useReducedMotion]);
}
} else {
onSelect(permissions);
}
function _fun123261() { // fn#123261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:1980, offset: 0x025861ce, size: 40 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
AccessibilityInfo.isScreenReaderEnabled().then(_fun123262);
function _fun123262(a0) { // fn#123262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2017, offset: 0x025861f6, size: 19 bytes, params: 2, frame: 11
env1_10(a0);
}
}
function GuildSettingsRoleTemplateOnLayout({nativeEvent}) { // fn#123263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2097, owner: GuildSettingsRoleTemplate.onLayout, offset: 0x02586209, size: 65 bytes, params: 2, frame: 12
const width = nativeEvent.layout.width;
if (width !== env0_7) {
env0_8(width);
env0_9(width - 300);
}
}
function _fun123264({title}, a1) { // fn#123264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2616, offset: 0x0258624a, size: 186 bytes, params: 3, frame: 23
const env0_0 = a1;
const PressableOpacity = (PressablesModule).PressableOpacity;
const object2 = {selected: env0_5 === a1};
const Text = (TextModule).Text;
return (
<View style={styles.sliderLabel} key={title()}>
<PressableOpacity
accessibilityRole="button"
accessibilityState={object2}
onPress={function() {
onSlidingComplete_123260(require);
}}
>
<Text variant="text-sm/medium">
{title()}
</Text>
</PressableOpacity>
</View>
);
}
function onBeforeSnapToItem(a0) { // fn#123266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:2981, owner: GuildSettingsRoleTemplate.onBeforeSnapToItem, offset: 0x01fc7eff, size: 19 bytes, params: 2, frame: 11
env0_6(a0);
}
function GuildSettingsRoleTemplateRenderItem(a0) { // fn#123267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:3054, owner: GuildSettingsRoleTemplate.renderItem, offset: 0x0258631b, size: 619 bytes, params: 2, frame: 31
const item = a0.item;
const value2 = a0.index === env0_5;
const value3 = item.contentPreface();
const value5 = !value2;
const r5 = value2 ? undefined : !value5;
const r0 = value2 ? 'yes' : 'no-hide-descendants';
const stylesBinding = styles;
const cardWrapper = stylesBinding.cardWrapper;
const card = stylesBinding.card;
const Text = (TextModule).Text;
const items2 = [
<Text style={stylesBinding.templateTitle} variant="heading-lg/extrabold">
{item.title()}
</Text>,
];
items2[1] = (
<Text style={stylesBinding.templateSubtitle} variant="text-sm/medium">
{item.description()}
</Text>
);
const templateContentWrapper = stylesBinding.templateContentWrapper;
const value11 = null;
items2[2] = (
<View style={templateContentWrapper}>
{
value11 != value3
? (
value3 === ''
? value11
: (
<Text style={styles.templateSubtitle} variant="text-sm/medium">
{item.contentPreface()}
</Text>
)
)
: value11
}
<View accessibilityRole="list">
{item.contents().map(_fun123268)}
</View>
</View>
);
const scrollView = (
<ScrollView>
{items2}
</ScrollView>
);
const Button = (ButtonNativeModule).Button;
const intl = (IndexNativeModule).intl;
return (
<View
accessible={r5}
accessibilityElementsHidden={value5}
importantForAccessibility={r0}
style={cardWrapper}
>
<View style={card}>
{scrollView}
<View style={styles.templateButton}>
<Button
text={intl.string((IndexNativeModule).t.mQS8Is)}
onPress={onPress_123269}
/>
</View>
</View>
</View>
);
function _fun123268(a0, a1) { // fn#123268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:3714, offset: 0x02586586, size: 263 bytes, params: 3, frame: 23
const value = environment.__proto__.__proto__;
const stylesBinding = styles;
const templateContent = stylesBinding.templateContent;
const Icon = (NativeModule).Icon;
const iconProps = {source: Module11365};
const IconSizes = (NativeModule).IconSizes;
const MEDIUM = IconSizes.MEDIUM;
iconProps.size = MEDIUM;
const GREEN_360 = (Native).unsafe_rawColors.GREEN_360;
iconProps.color = GREEN_360;
const items2 = [
<Icon {...iconProps} />,
];
const Text = (TextModule).Text;
items2[1] = (
<Text style={stylesBinding.templateContentText} variant="text-sm/medium">
{a0}
</Text>
);
return (
<View style={templateContent} key={'' + item.key + '_content_' + a1}>
{items2}
</View>
);
}
function renderItemOnPress_123269() { // fn#123269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16158:4096, owner: GuildSettingsRoleTemplate.renderItem.onPress, offset: 0x0258668d, size: 203 bytes, params: 1, frame: 21
var features;
const {permissions, communityPermissions, key} = item;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const ROLE_TEMPLATE_SELECTED = AnalyticEvents.ROLE_TEMPLATE_SELECTED;
const object = {};
object.location_page = location;
object.template_name = key;
const collectGuildAnalyticsMetadata = AppAnalyticsUtilsModule.collectGuildAnalyticsMetadata;
const guildIdBinding = guildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, AppAnalyticsUtilsModule, [guildIdBinding]),
AppAnalyticsUtilsModule);
Reflect.apply(track, defaultImport, [ROLE_TEMPLATE_SELECTED, object]);
const guild = GuildStore.getGuild(guildIdBinding);
if (guild != null) {
features = guild.features;
if (features.has(GuildFeatures.COMMUNITY)) {
if (communityPermissions != null) {
onSelect(communityPermissions);
} else {
onSelect(permissions);
}
} else {
onSelect(permissions);
}
}
}
}
}
}
global.__d(_fun123258, 15950, [57, 31, 27, 4502, 1867, 15946, 661, 33, 4501, 697, 7556, 683, 4863, 7992, 5278, 4573,
12812, 1305, 11365, 4578, 1244,
2]) /* metro module 15950, dependencies: [57, 31, 27, 4502, 1867, 15946, 661, 33, 4501, 697, 7556, 683, 4863, 7992, 5278, 4573, 12812, 1305, 11365, 4578, 1244, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,23 +1,28 @@
/* Metro module 15943; source: modules/guild_settings/roles/native/GuildSettingsRolesManager.tsx; dependencies: [629, 690, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00629Module from '../../../../by-id/module-00629.js'; /* Metro dependency 629 */
import * as ReactBatchUpdatesNativeModule from '../../../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
function _fun123119(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16151:6, offset: 0x0258176a, size: 134 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(629) /* metro dependency 629 */;
let value = Module00629Module;
value = value.create(function() {
return {roleJustCreated: false};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRolesManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/GuildSettingsRolesManager.tsx');
exports.setRoleJustCreated = setRoleJustCreated;
exports.useGuildSettingsRolesManagerState = value;
function setRoleJustCreated(a0) { // fn#123121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16151:271, offset: 0x025817fb, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun123122);
function _fun123122() { // fn#123122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16151:324, offset: 0x02581831, size: 34 bytes, params: 1, frame: 12
return env1_2.setState({roleJustCreated: env0_0});
}
}
}
function setRoleJustCreated(a0) { // fn#123121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16151:271, offset: 0x025817fb, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun123122);
}
function _fun123122() { // fn#123122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16151:324, offset: 0x02581831, size: 34 bytes, params: 1, frame: 12
return env1_2.setState({roleJustCreated: env0_0});
}
global.__d(_fun123119, 15943, [629, 690, 2]) /* metro module 15943, dependencies: [629, 690, 2] */;
@@ -1,72 +1,100 @@
/* Metro module 15968; source: modules/guild_settings/roles/native/InRolePromptNotice.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1391, 15969, 1305, 9149, 4573, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as FlagUtilsModule from '../../../../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun123453(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16176:6, offset: 0x0258e123, size: 342 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).RoleFlags;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
object = {};
const object2 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object2.paddingHorizontal = PX_16;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.paddingBottom = PX_4;
object4.flexDirection = 'row';
object4.alignItems = 'center';
object3.promptRow = object4;
object2.paddingBottom = PX_4;
object2.flexDirection = 'row';
object2.alignItems = 'center';
object.promptRow = object2;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.promptText = {marginLeft: PX_4};
object3.icon = {'height': 16, 'width': 16};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/InRolePromptNotice.tsx');
object.promptText = {marginLeft: PX_4};
object.icon = {'height': 16, 'width': 16};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/InRolePromptNotice.tsx');
exports.default = _default_123454;
}
function _default_123454({role}) { // fn#123454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16176:393, offset: 0x0258e279, size: 514 bytes, params: 2, frame: 26
var r1;
var r0;
var isRolePowerful2;
var object2;
var Icon;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var value;
const styles = useStyles();
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const flags = role.flags;
const IN_PROMPT = RoleFlags.IN_PROMPT;
if (Reflect.apply(hasFlag, flagUtilsModule, [flags, IN_PROMPT])) {
isRolePowerful2 = (require(15969) /* metro dependency 15969: GuildSettingsUtils */).isRolePowerful(role);
object2 = {};
object2.style = styles.promptRow;
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
if (isRolePowerful2) {
value = <Icon style={styles.icon} source={importDefault(9149) /* metro dependency 9149 */} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300} />;
items2 = [value];
items2[1] = <Text style={styles.promptText} variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.YRbgXz)}</Text>;
value = <View {...object2}>{items2}</View>;
r1 = value;
function _default_123454({role}) { // fn#123454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16176:393, offset: 0x0258e279, size: 514 bytes, params: 2, frame: 26
var r1;
var r0;
var isRolePowerful2;
var object;
var Icon;
var items3;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var value;
const styles = useStyles();
const hasFlag = FlagUtilsModule.hasFlag;
const flags = role.flags;
const IN_PROMPT = RoleFlags.IN_PROMPT;
if (Reflect.apply(hasFlag, FlagUtilsModule, [flags, IN_PROMPT])) {
isRolePowerful2 = (require(15969) /* metro dependency 15969: GuildSettingsUtils */).isRolePowerful(role);
object = {};
object.style = styles.promptRow;
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
if (isRolePowerful2) {
value = (
<Icon
style={styles.icon}
source={importDefault(9149) /* metro dependency 9149 */}
color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300}
/>
);
items2 = [value];
items2[1] = (
<Text style={styles.promptText} variant="text-sm/medium">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.YRbgXz)}
</Text>
);
value = (
<View {...object}>
{items2}
</View>
);
r1 = value;
} else {
value = <Icon style={styles.icon} source={importDefault(9149) /* metro dependency 9149 */} />;
items3 = [value];
items3[1] = (
<Text style={styles.promptText} variant="text-sm/medium">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mqeO2v)}
</Text>
);
value = (
<View {...object}>
{items3}
</View>
);
r1 = value;
}
r0 = r1;
} else {
value = <Icon style={styles.icon} source={importDefault(9149) /* metro dependency 9149 */} />;
items3 = [value];
items3[1] = <Text style={styles.promptText} variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mqeO2v)}</Text>;
value = <View {...object2}>{items3}</View>;
r1 = value;
r0 = null;
}
r0 = r1;
} else {
r0 = null;
return r0;
}
return r0;
}
global.__d(_fun123453, 15968, [31, 27, 661, 33, 4501, 697, 1391, 15969, 1305, 9149, 4573, 1244,
2]) /* metro module 15968, dependencies: [31, 27, 661, 33, 4501, 697, 1391, 15969, 1305, 9149, 4573, 1244, 2] */;
@@ -1,317 +1,380 @@
/* Metro module 15952; source: modules/guild_settings/roles/native/action_sheet/AddMembersActionSheet.tsx; dependencies: [29, 57, 31, 27, 15946, 33, 4501, 697, 3874, 12140, 7974, 5463, 4100, 1305, 3869, 1244, 8416, 9100, 6592, 15951, 21, 9105, 6902, 6275, 6758, 4578, 9112, 4080, 4573, 2] */
import SnowflakeUtils from '../../../../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import ObjectWithoutProperties from '../../../../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import GuildUtils from '../../../../../utils/GuildUtils.tsx'; /* Metro dependency 6592 */
import TagListInputNative from '../../../../../design/components/TagListInput/native/TagListInput.native.tsx'; /* Metro dependency 9100 */
import DetailedGuildIdentityUserRow from '../../../native/DetailedGuildIdentityUserRow.tsx'; /* Metro dependency 12140 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseA11yRolesNativeModule from '../../../../../external/discord_common/js/packages/design/hooks/useA11yRolesNative.tsx'; /* Metro dependency 3874 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BottomSheetNativeModule from '../../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as SubscribeGuildMembersModule from '../../../../../lib/guild/subscribeGuildMembers.tsx'; /* Metro dependency 6902 */
import * as FormCheckboxNativeModule from '../../../../../design/components/Forms/native/FormCheckbox.native.tsx'; /* Metro dependency 7974 */
import * as FlashListModule from '../../../../../external/discord_common/js/packages/flash-list/index.jsx'; /* Metro dependency 8416 */
import * as GuildSettingsRoleConstantsModule from '../../GuildSettingsRoleConstants.tsx'; /* Metro dependency 15946 */
import * as GuildSettingsRolesUtilsModule from '../../GuildSettingsRolesUtils.tsx'; /* Metro dependency 15951 */
function _fun123288(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:6, offset: 0x02586f66, size: 500 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const closure = AddMembersBody_123291;
const AddMembersBody_1232912 = AddMembersBody_123291;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(29) /* metro dependency 29 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const env0_7 = (require(15946) /* metro dependency 15946: GuildSettingsRoleConstants */).MAX_BULK_ROLE_MEMBERS_ADD;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
const object5 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingTop = PX_12;
object2.inputContainer = object5;
const object6 = {'width': 16, 'height': 16};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.tagAvatar = object6;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.emptyStateText = {color: TEXT_DEFAULT};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.addMembersDescription = {marginHorizontal: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/action_sheet/AddMembersActionSheet.tsx');
exports.default = AddMembersActionSheet_123304;
exports.AddMembersBody = closure;
}
function MemberRow_123290({start, end, guildId, userId, onPress, disabled, checked}) { // fn#123290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:943, offset: 0x0258715a, size: 200 bytes, params: 2, frame: 25
const {accessibilityRole,
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: checked,
disabled: disabled});
const DetailedGuildIdentityUserRow = importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */;
const FormCheckbox = (require(7974) /* metro dependency 7974: FormCheckboxNative */).FormCheckbox;
return (
<DetailedGuildIdentityUserRow
start={start}
end={end}
guildId={guildId}
userId={userId}
onPress={onPress}
disabled={disabled}
trailing={<FormCheckbox checked={checked} />}
accessibilityRole={accessibilityRole}
accessibilityState={accessibilityState}
/>
);
}
function AddMembersBody_123291({guild, role, members, pendingAdditions, setPendingAdditions, autoFocusSearch, inActionSheet, maxCount}) { // fn#123291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1298, offset: 0x02587222, size: 898 bytes, params: 2, frame: 36
var r5;
var object;
var space;
var PX_12;
var EmptyState;
const styles = useStyles();
const [property, env0_8] = setPendingAdditions(maxCount.useState(''), 2);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({isKeyboardAwareOnAndroid: !inActionSheet}).insets;
const value5 = maxCount.useMemo(function() {
var env0_0 = _fun123293;
return members.filter(_fun123294);
}, [members, property]);
maxCount.useEffect(_fun123295, [value5.length, property]);
const flashListModule = require(8416) /* metro dependency 8416: flashList */;
const r7 = inActionSheet ? flashListModule.BottomSheetFlashList : flashListModule.FlashList;
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const TagListInputNative = importDefault(9100) /* metro dependency 9100: TagListInputNative */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const vMiCaQ = (require(1244) /* metro dependency 1244: indexNative */).t.vMiCaQ;
const Object = global.Object;
const view = <View style={styles.inputContainer}><TagListInputNative placeholder={Reflect.apply(string, intl,
[vMiCaQ])} tags={Object.values(pendingAdditions).map(function(a0) {
var display = a0.display;
var id = a0.row.id;
var object = {};
copyDataProperties(object, display, id);
object['id'] = id;
return object;
})} onChangeText={onChangeText} onRemove={onRemove} autoFocus={autoFocusSearch} inActionSheet={inActionSheet} /></View>;
if (value5.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r5 = <EmptyState Illustration={(require(9105) /* metro dependency 9105: NoResultsAlt */).NoResultsAlt} bodyStyle={styles.emptyStateText} body={property !== '' ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ErpIY3,
{query: property}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oB9grQ)} />;
} else {
object = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object.paddingHorizontal = space.PX_16;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
object.paddingTop = PX_12;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
object.paddingBottom = PX_12 + (inActionSheet ? insets.bottom : 0);
r5 = ((Component) => <Component contentContainerStyle={object} renderItem={renderItem_123300} data={value5} estimatedItemSize={56} extraData={pendingAdditions} keyboardShouldPersistTaps="always" />)(r7);
}
return (
<>
{view}
{r5}
</>
);
}
function AddMembersActionSheet_123304({guild, role}) { // fn#123304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:3357, offset: 0x025879d4, size: 762 bytes, params: 2, frame: 34
var object4;
const styles = useStyles();
let binding = env0_5;
const [property, property2] = env0_4(binding.useState({}), 2);
binding = env0_5;
const useCallback = binding.useCallback;
let id = role.id;
const value5 = (require(15951) /* metro dependency 15951: GuildSettingsRolesUtils */).useGuildMembers(guild.id,
Reflect.apply(useCallback, binding, [function({roles}) {
return !roles.includes(role.id);
}, [id]]));
const subscribeGuildMembersModule = require(6902) /* metro dependency 6902: subscribeGuildMembers */;
const useSubscribeGuildMembers = subscribeGuildMembersModule.useSubscribeGuildMembers;
id = guild.id;
let Object = global.Object;
Reflect.apply(useSubscribeGuildMembers, subscribeGuildMembersModule, [{[id]: Object.keys(property)},
'AddMembersActionSheet']);
Object = global.Object;
const r12 = Object.keys(property).length === 0 || global.Object.keys(property).length > MAX_BULK_ROLE_MEMBERS_ADD;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object4 = {'scrollable': true, 'header': null, 'startExpanded': true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object.container = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
const object3 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const ZYOK46 = (require(1244) /* metro dependency 1244: indexNative */).t.ZYOK46;
object3.title = Reflect.apply(string, intl, [ZYOK46]);
object3.subtitle = role.name;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const OYkgVk = (require(1244) /* metro dependency 1244: indexNative */).t.OYkgVk;
object3.trailing = <Button size="sm" text={Reflect.apply(string, intl,
[OYkgVk])} onPress={onPress_123306} variant={r12 ? 'secondary' : 'primary'} disabled={r12} />;
object4.header = <BottomSheetTitleHeader {...object3} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<BottomSheet {...object4}>
<View style={styles.container}>
<Text variant="text-sm/normal" style={styles.addMembersDescription}>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['3OxP4q'],
{numMembers: MAX_BULK_ROLE_MEMBERS_ADD})}
</Text>
<AddMembersBody_123291
guild={guild}
role={role}
members={value5}
pendingAdditions={property}
setPendingAdditions={property2}
autoFocusSearch
maxCount={MAX_BULK_ROLE_MEMBERS_ADD}
inActionSheet
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.paddingTop = PX_12;
object.inputContainer = object3;
const object4 = {'width': 16, 'height': 16};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.tagAvatar = object4;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object.emptyStateText = {color: TEXT_DEFAULT};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.addMembersDescription = {marginHorizontal: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/action_sheet/AddMembersActionSheet.tsx');
exports.default = AddMembersActionSheet_123304;
exports.AddMembersBody = AddMembersBody_1232912;
function MemberRow_123290({start, end, guildId, userId, onPress, disabled, checked}) { // fn#123290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:943, offset: 0x0258715a, size: 200 bytes, params: 2, frame: 25
const {accessibilityRole,
accessibilityState} = (UseA11yRolesNativeModule).useCheckboxA11yNative({checked: checked,
disabled: disabled});
const FormCheckbox = (FormCheckboxNativeModule).FormCheckbox;
return (
<DetailedGuildIdentityUserRow
start={start}
end={end}
guildId={guildId}
userId={userId}
onPress={onPress}
disabled={disabled}
trailing={<FormCheckbox checked={checked} />}
accessibilityRole={accessibilityRole}
accessibilityState={accessibilityState}
/>
);
}
function AddMembersBody_123291({guild, role, members, pendingAdditions, setPendingAdditions, autoFocusSearch, inActionSheet, maxCount}) { // fn#123291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1298, offset: 0x02587222, size: 898 bytes, params: 2, frame: 36
var r5;
var object2;
var space;
var PX_12;
var EmptyState;
const styles = useStyles();
const [property, env0_8] = setPendingAdditions(maxCount.useState(''), 2);
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({isKeyboardAwareOnAndroid: !inActionSheet}).insets;
const value5 = maxCount.useMemo(function() {
var env0_0 = _fun123293;
return members.filter(_fun123294);
}, [members, property]);
maxCount.useEffect(_fun123295, [value5.length, property]);
const r7 = inActionSheet ? FlashListModule.BottomSheetFlashList : FlashListModule.FlashList;
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const vMiCaQ = (require(1244) /* metro dependency 1244: indexNative */).t.vMiCaQ;
const Object = global.Object;
const view = (
<View style={styles.inputContainer}>
<TagListInputNative
placeholder={Reflect.apply(string, intl, [vMiCaQ])}
tags={Object.values(pendingAdditions).map(function(a0) {
var display = a0.display;
var id = a0.row.id;
var object = {};
copyDataProperties(object, display, id);
object['id'] = id;
return object;
})}
onChangeText={onChangeText_123297}
onRemove={onRemove_123298}
autoFocus={autoFocusSearch}
inActionSheet={inActionSheet}
/>
</View>
</BottomSheet>
);
}
);
if (value5.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r5 = (
<EmptyState
Illustration={(require(9105) /* metro dependency 9105: NoResultsAlt */).NoResultsAlt}
bodyStyle={styles.emptyStateText}
body={property !== '' ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ErpIY3,
{query: property}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oB9grQ)}
/>
);
} else {
object2 = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object2.paddingHorizontal = space.PX_16;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
object2.paddingTop = PX_12;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
object2.paddingBottom = PX_12 + (inActionSheet ? insets.bottom : 0);
r5 = ((Component) => <Component contentContainerStyle={object2} renderItem={renderItem_123300} data={value5} estimatedItemSize={56} extraData={pendingAdditions} keyboardShouldPersistTaps="always" />)(r7);
}
return (
<>
{view}
{r5}
</>
);
function _fun123292() { // fn#123292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1549, offset: 0x025875a4, size: 39 bytes, params: 1, frame: 11
return members.filter(_fun123294);
function filterByQuery_123293(a0) { // fn#123293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1572, offset: 0x025875cb, size: 90 bytes, params: 2, frame: 13
const RegExp = global.RegExp;
let value = environment.__proto__.__proto__;
value = importDefault(4100) /* metro dependency 4100: RegexUtils */;
value = value.escape(env1_7);
const value3 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
const regExp = new RegExp(value, 'i');
return (regExp instanceof Object ? regExp : value3).test(a0);
}
function _fun123292() { // fn#123292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1549, offset: 0x025875a4, size: 39 bytes, params: 1, frame: 11
return members.filter(_fun123294);
}
function _fun123294(a0) { // fn#123294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1636, offset: 0x02587625, size: 42 bytes, params: 2, frame: 13
return filterByQuery_123293(a0.name) || filterByQuery_123293(a0.userTag);
}
function _fun123295() { // fn#123295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1726, offset: 0x0258764f, size: 126 bytes, params: 1, frame: 18
var value2;
var AccessibilityAnnouncer;
var announce;
var intl;
if (env0_7 !== '') {
value2 = environment.__proto__;
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ZGVL3g,
{count: length}),
'polite']);
}
}
}
function AddMembersBody_123291OnChangeText(a0) { // fn#123297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2132, owner: AddMembersBody_123291.onChangeText, offset: 0x025876f5, size: 106 bytes, params: 2, frame: 19
let value = a0.trim();
value = value.toLowerCase();
const defaultImport = importDefault(6592) /* metro dependency 6592: GuildUtils */;
const requestMembers = defaultImport.requestMembers;
const id = guild.id;
const ADD_MEMBER_QUERY_LIMIT = (require(15951) /* metro dependency 15951: GuildSettingsRolesUtils */).ADD_MEMBER_QUERY_LIMIT;
Reflect.apply(requestMembers, defaultImport, [id, value, ADD_MEMBER_QUERY_LIMIT]);
env0_8(value);
}
function _fun123295() { // fn#123295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1726, offset: 0x0258764f, size: 126 bytes, params: 1, frame: 18
var value2;
var AccessibilityAnnouncer;
var announce;
var intl;
if (GuildSettingsRoleConstantsModule.MAX_BULK_ROLE_MEMBERS_ADD !== '') {
value2 = environment.__proto__;
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ZGVL3g,
{count: length}),
'polite']);
}
}
function AddMembersBody_123291OnRemove(a0) { // fn#123298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2254, owner: AddMembersBody_123291.onRemove, offset: 0x0258775f, size: 73 bytes, params: 2, frame: 14
var environment;
let value = environment.__proto__;
value = Reflect.apply((importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys, value, [pendingAdditions]);
const env0_0 = value[a0];
setPendingAdditions(_fun123299);
}
function AddMembersBody_123291OnChangeText(a0) { // fn#123297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2132, owner: AddMembersBody_123291.onChangeText, offset: 0x025876f5, size: 106 bytes, params: 2, frame: 19
let value = a0.trim();
value = value.toLowerCase();
const defaultImport = GuildUtils;
const requestMembers = defaultImport.requestMembers;
const id = guild.id;
const ADD_MEMBER_QUERY_LIMIT = (GuildSettingsRolesUtilsModule).ADD_MEMBER_QUERY_LIMIT;
Reflect.apply(requestMembers, defaultImport, [id, value, ADD_MEMBER_QUERY_LIMIT]);
env0_8(value);
}
function AddMembersBody_123291RenderItem({item, index}) { // fn#123300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2746, owner: AddMembersBody_123291.renderItem, offset: 0x025877dd, size: 238 bytes, params: 2, frame: 22
const value2 = item.roles.includes(role.id);
return (
<MemberRow_123290
start={index === 0}
end={index === env0_9.length - 1}
guildId={guild.id}
userId={item.id}
onPress={function() {
_fun123302(item);
}}
disabled={value2 || maxCount != null && global.Object.keys(pendingAdditions).length >= maxCount && !(item.id in pendingAdditions)}
checked={value2 || item.id in pendingAdditions}
/>
);
}
function AddMembersBody_123291OnRemove(a0) { // fn#123298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2254, owner: AddMembersBody_123291.onRemove, offset: 0x0258775f, size: 73 bytes, params: 2, frame: 14
var environment;
let value = environment.__proto__;
value = Reflect.apply((importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys, value, [pendingAdditions]);
const env0_0 = value[a0];
setPendingAdditions(_fun123299);
function _fun123299(a0) { // fn#123299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2296, offset: 0x025877a8, size: 53 bytes, params: 2, frame: 14
const binding = env0_0;
a0[binding];
const value = environment.__proto__.__proto__;
const binding2 = env2_3;
const items2 = [binding];
return binding2(a0, items2.map(_toPropertyKey_123289));
}
function AddMembersActionSheet_123304OnPress() { // fn#123306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:3933, owner: AddMembersActionSheet_123304.onPress, offset: 0x02587cce, size: 109 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
const bulkAddMemberRoles = value.bulkAddMemberRoles;
const id = guild.id;
const id2 = role.id;
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
Reflect.apply(bulkAddMemberRoles, value, [id, id2, defaultImport.keys(env0_2)]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
}
function filterByQuery(a0) { // fn#123293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1572, offset: 0x025875cb, size: 90 bytes, params: 2, frame: 13
const RegExp = global.RegExp;
let value = environment.__proto__.__proto__;
value = importDefault(4100) /* metro dependency 4100: RegexUtils */;
value = value.escape(env1_7);
const value3 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
const regExp = new RegExp(value, 'i');
return (regExp instanceof Object ? regExp : value3).test(a0);
}
function AddMembersBody_123291RenderItem({item, index}) { // fn#123300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2746, owner: AddMembersBody_123291.renderItem, offset: 0x025877dd, size: 238 bytes, params: 2, frame: 22
const value2 = item.roles.includes(role.id);
return (
<MemberRow_123290
start={index === 0}
end={index === env0_9.length - 1}
guildId={guild.id}
userId={item.id}
onPress={function() {
_fun123302(item);
}}
disabled={value2 || maxCount != null && global.Object.keys(pendingAdditions).length >= maxCount && !(item.id in pendingAdditions)}
checked={value2 || item.id in pendingAdditions}
/>
);
function renderItemOnPress_123301() { // fn#123301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2960, owner: AddMembersBody_123291.renderItem.onPress, offset: 0x025878cb, size: 25 bytes, params: 1, frame: 11
((a0) => {
var env0_0 = a0;
if (!a0.roles.includes(role.id)) {
setPendingAdditions(_fun123303);
}
})(item);
function onPressUpdatePendingAdditions(a0) { // fn#123302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2964, owner: AddMembersBody_123291.renderItem.onPress.updatePendingAdditions, offset: 0x025878e4, size: 62 bytes, params: 2, frame: 13
const env0_0 = a0;
const roles = a0.roles;
if (!roles.includes(role.id)) {
setPendingAdditions(_fun123303);
}
function _fun123303(a0) { // fn#123303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:3026, offset: 0x02587922, size: 178 bytes, params: 2, frame: 19
var object;
var value3;
var Avatar;
var value4;
var stylesBinding;
var tagAvatar;
const object2 = {};
copyDataProperties(object2, a0, undefined);
const value2 = env0_0.id in object2;
let binding = env0_0;
if (value2) {
delete object2[binding.id];
} else {
object = {};
object.text = binding.name;
value3 = environment.__proto__.__proto__.__proto__.__proto__;
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var avatarProps = {source: binding.avatarSource};
value4 = environment.__proto__.__proto__.__proto__;
stylesBinding = styles;
tagAvatar = stylesBinding.tagAvatar;
avatarProps.avatarStyle = tagAvatar;
tagAvatar = stylesBinding.tagAvatar;
avatarProps.style = tagAvatar;
object.icon = <Avatar {...avatarProps} />;
if (object != null) {
binding = env0_0;
object2[binding.id] = {display: object, row: binding};
}
}
return object2;
}
function _fun123294(a0) { // fn#123294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:1636, offset: 0x02587625, size: 42 bytes, params: 2, frame: 13
return filterByQuery(a0.name) || filterByQuery(a0.userTag);
}
}
function _fun123299(a0) { // fn#123299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2296, offset: 0x025877a8, size: 53 bytes, params: 2, frame: 14
const binding = env0_0;
a0[binding];
const value = environment.__proto__.__proto__;
const binding2 = env2_3;
const items2 = [binding];
return binding2(a0, items2.map(_toPropertyKey_123289));
}
}
function renderItemOnPress_123301() { // fn#123301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2960, owner: AddMembersBody_123291.renderItem.onPress, offset: 0x025878cb, size: 25 bytes, params: 1, frame: 11
((a0) => {
var env0_0 = a0;
if (!a0.roles.includes(role.id)) {
setPendingAdditions(_fun123303);
}
})(item);
}
function onPressUpdatePendingAdditions_123302(a0) { // fn#123302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:2964, owner: AddMembersBody_123291.renderItem.onPress.updatePendingAdditions, offset: 0x025878e4, size: 62 bytes, params: 2, frame: 13
const env0_0 = a0;
const roles = a0.roles;
if (!roles.includes(role.id)) {
setPendingAdditions(_fun123303);
}
function AddMembersActionSheet_123304({guild, role}) { // fn#123304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:3357, offset: 0x025879d4, size: 762 bytes, params: 2, frame: 34
var object2;
const styles = useStyles();
let binding = ReactModule;
const [property, property2] = Module00057(binding.useState({}), 2);
binding = ReactModule;
const useCallback = binding.useCallback;
let id = role.id;
const value5 = (require(15951) /* metro dependency 15951: GuildSettingsRolesUtils */).useGuildMembers(guild.id,
Reflect.apply(useCallback, binding, [function({roles}) {
return !roles.includes(role.id);
}, [id]]));
const useSubscribeGuildMembers = SubscribeGuildMembersModule.useSubscribeGuildMembers;
id = guild.id;
let Object = global.Object;
Reflect.apply(useSubscribeGuildMembers, SubscribeGuildMembersModule, [{[id]: Object.keys(property)},
'AddMembersActionSheet']);
Object = global.Object;
const r12 = Object.keys(property).length === 0 || global.Object.keys(property).length > MAX_BULK_ROLE_MEMBERS_ADD;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
object2 = {'scrollable': true, 'header': null, 'startExpanded': true};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const ZYOK46 = (IndexNativeModule).t.ZYOK46;
object.title = Reflect.apply(string, intl, [ZYOK46]);
object.subtitle = role.name;
const Button = (ButtonNativeModule).Button;
string = intl.string;
const OYkgVk = (IndexNativeModule).t.OYkgVk;
object.trailing = (
<Button
size="sm"
text={Reflect.apply(string, intl, [OYkgVk])}
onPress={onPress_123306}
variant={r12 ? 'secondary' : 'primary'}
disabled={r12}
/>
);
object2.header = <BottomSheetTitleHeader {...object} />;
const Text = (TextModule).Text;
return (
<BottomSheet {...object2}>
<View style={styles.container}>
<Text variant="text-sm/normal" style={styles.addMembersDescription}>
{intl.format((IndexNativeModule).t['3OxP4q'],
{numMembers: MAX_BULK_ROLE_MEMBERS_ADD})}
</Text>
<AddMembersBody_123291
guild={guild}
role={role}
members={value5}
pendingAdditions={property}
setPendingAdditions={property2}
autoFocusSearch
maxCount={MAX_BULK_ROLE_MEMBERS_ADD}
inActionSheet
/>
</View>
</BottomSheet>
);
function AddMembersActionSheet_123304OnPress() { // fn#123306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:3933, owner: AddMembersActionSheet_123304.onPress, offset: 0x02587cce, size: 109 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
const bulkAddMemberRoles = value.bulkAddMemberRoles;
const id = guild.id;
const id2 = role.id;
const defaultImport = SnowflakeUtils;
Reflect.apply(bulkAddMemberRoles, value, [id, id2, defaultImport.keys(env0_2)]);
(ActionSheetActionCreators).hideActionSheet();
}
}
}
function _fun123303(a0) { // fn#123303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:3026, offset: 0x02587922, size: 178 bytes, params: 2, frame: 19
var object3;
var value3;
var Avatar;
var value4;
var stylesBinding;
var tagAvatar;
const object4 = {};
copyDataProperties(object4, a0, undefined);
const value2 = env0_0.id in object4;
let binding = env0_0;
if (value2) {
delete object4[binding.id];
} else {
object3 = {};
object3.text = binding.name;
value3 = environment.__proto__.__proto__.__proto__.__proto__;
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var avatarProps = {source: binding.avatarSource};
value4 = environment.__proto__.__proto__.__proto__;
stylesBinding = styles;
tagAvatar = stylesBinding.tagAvatar;
avatarProps.avatarStyle = tagAvatar;
tagAvatar = stylesBinding.tagAvatar;
avatarProps.style = tagAvatar;
object3.icon = <Avatar {...avatarProps} />;
if (object3 != null) {
binding = env0_0;
object4[binding.id] = {display: object3, row: binding};
function _toPropertyKey_123289(a0) { // fn#123289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16160:226, offset: 0x00deffed, size: 138 bytes, params: 2, frame: 16
var r1;
var property;
let value = a0;
if (typeof value === 'object') {
if (value) {
property = value[global.Symbol.toPrimitive];
if (property !== undefined) {
value = property.call(value, 'string');
if (typeof value !== 'object') {
r1 = value;
return typeof r1 === 'symbol' ? r1 : String(r1);
}
throw new global.TypeError('@@toPrimitive must return a primitive value.');
}
value = global.String(value);
r1 = value;
return typeof r1 === 'symbol' ? r1 : String(r1);
}
}
return object4;
r1 = value;
return typeof r1 === 'symbol' ? r1 : String(r1);
}
global.__d(_fun123288, 15952, [29, 57, 31, 27, 15946, 33, 4501, 697, 3874, 12140, 7974, 5463, 4100, 1305, 3869,
1244, 8416, 9100, 6592, 15951, 21, 9105, 6902, 6275, 6758, 4578, 9112, 4080, 4573,
2]) /* metro module 15952, dependencies: [29, 57, 31, 27, 15946, 33, 4501, 697, 3874, 12140, 7974, 5463, 4100, 1305, 3869, 1244, 8416, 9100, 6592, 15951, 21, 9105, 6902, 6275, 6758, 4578, 9112, 4080, 4573, 2] */;
@@ -1,90 +1,101 @@
/* Metro module 15971; source: modules/guild_settings/roles/native/action_sheet/RolePermissionTemplatesActionSheet.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 683, 4080, 3856, 6758, 1244, 6805, 15950, 4647, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import GuildSettingsRoleTemplate from '../GuildSettingsRoleTemplate.tsx'; /* Metro dependency 15950 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ToastUtilsModule from '../../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
function _fun123475(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:6, offset: 0x0258f1b9, size: 269 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_5 = value.AnalyticEvents;
const env0_6 = value.AnalyticsSections;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
const env0_8 = Reflect.apply(createStyles, value, [{templateContainer: {'paddingVertical': 16, 'flex': 1,
backgroundColor: BACKGROUND_BASE_LOWER}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/action_sheet/RolePermissionTemplatesActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/action_sheet/RolePermissionTemplatesActionSheet.tsx');
exports.default = RolePermissionTemplatesActionSheet;
}
function RolePermissionTemplatesActionSheet({permissionsEdited, onPermissionsChanged, guildId}) { // fn#123476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:443, offset: 0x0258f2c6, size: 294 bytes, params: 2, frame: 22
const styles = useStyles();
ReactModule.useEffect(function() {
var defaultImport = importDefault(dependencyMap[6]);
var OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
defaultImport.track(OPEN_POPOUT, {type: AnalyticsSections.GUILD_ROLE_TEMPLATE_POPOUT});
}, []);
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const KgCkoQ = (IndexNativeModule).t.KgCkoQ;
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [KgCkoQ])} />;
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const GUILD_ROLE_TEMPLATE_POPOUT = AnalyticsSections.GUILD_ROLE_TEMPLATE_POPOUT;
return (
<ActionSheet header={bottomSheetTitleHeader} startExpanded>
<View style={styles.templateContainer}>
<GuildSettingsRoleTemplate
onSelect={onSelect_123479}
location={GUILD_ROLE_TEMPLATE_POPOUT}
guildId={guildId}
/>
</View>
</ActionSheet>
);
function saveTemplate(a0) { // fn#123477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:553, owner: RolePermissionTemplatesActionSheet.saveTemplate, offset: 0x0258f3ec, size: 78 bytes, params: 2, frame: 13
onPermissionsChanged(a0);
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
(ToastUtilsModule).roleTemplateAppliedToast();
}
function RolePermissionTemplatesActionSheet({permissionsEdited, onPermissionsChanged, guildId}) { // fn#123476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:443, offset: 0x0258f2c6, size: 294 bytes, params: 2, frame: 22
const styles = useStyles();
env0_3.useEffect(function() {
var defaultImport = importDefault(dependencyMap[6]);
var OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
defaultImport.track(OPEN_POPOUT, {type: AnalyticsSections.GUILD_ROLE_TEMPLATE_POPOUT});
}, []);
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const KgCkoQ = (require(1244) /* metro dependency 1244: indexNative */).t.KgCkoQ;
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [KgCkoQ])} />;
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const GuildSettingsRoleTemplate = importDefault(15950) /* metro dependency 15950: GuildSettingsRoleTemplate */;
const GUILD_ROLE_TEMPLATE_POPOUT = AnalyticsSections.GUILD_ROLE_TEMPLATE_POPOUT;
return (
<ActionSheet header={bottomSheetTitleHeader} startExpanded>
<View style={styles.templateContainer}>
<GuildSettingsRoleTemplate
onSelect={onSelect}
location={GUILD_ROLE_TEMPLATE_POPOUT}
guildId={guildId}
/>
</View>
</ActionSheet>
);
}
function RolePermissionTemplatesActionSheetOnSelect(a0) { // fn#123479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:948, owner: RolePermissionTemplatesActionSheet.onSelect, offset: 0x0258f47a, size: 313 bytes, params: 2, frame: 19
var environment;
var defaultImport;
var show;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const env0_0 = a0;
if (permissionsEdited) {
value = environment.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object = {};
object.title = intl.string(t.MVdkgB);
object.body = intl.string(t.LpogjK);
object.cancelText = intl.string(t['ETE/oC']);
object.confirmText = intl.string(t.p89ACt);
object.onConfirm = onConfirm_123480;
object.onCancel = onCancel_123481;
object.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object]);
} else {
saveTemplate(a0);
}
function onSelectOnConfirm() { // fn#123480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:1184, owner: RolePermissionTemplatesActionSheet.onSelect.onConfirm, offset: 0x00d6c9a4, size: 23 bytes, params: 1, frame: 11
saveTemplate(env0_0);
}
function saveTemplate(a0) { // fn#123477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:553, owner: RolePermissionTemplatesActionSheet.saveTemplate, offset: 0x0258f3ec, size: 78 bytes, params: 2, frame: 13
onPermissionsChanged(a0);
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(3856) /* metro dependency 3856: ToastUtils */).roleTemplateAppliedToast();
}
function onSelectOnCancel() { // fn#123481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:1215, owner: RolePermissionTemplatesActionSheet.onSelect.onCancel, offset: 0x0258f5b3, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
function RolePermissionTemplatesActionSheetOnSelect(a0) { // fn#123479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:948, owner: RolePermissionTemplatesActionSheet.onSelect, offset: 0x0258f47a, size: 313 bytes, params: 2, frame: 19
var environment;
var defaultImport;
var show;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const env0_0 = a0;
if (permissionsEdited) {
value = environment.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.MVdkgB);
object2.body = intl.string(t.LpogjK);
object2.cancelText = intl.string(t['ETE/oC']);
object2.confirmText = intl.string(t.p89ACt);
object2.onConfirm = onConfirm_123480;
object2.onCancel = onCancel_123481;
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object2]);
} else {
saveTemplate(a0);
}
}
function onSelectOnConfirm() { // fn#123480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:1184, owner: RolePermissionTemplatesActionSheet.onSelect.onConfirm, offset: 0x00d6c9a4, size: 23 bytes, params: 1, frame: 11
saveTemplate(env0_0);
}
function onSelectOnCancel() { // fn#123481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16179:1215, owner: RolePermissionTemplatesActionSheet.onSelect.onCancel, offset: 0x0258f5b3, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun123475, 15971, [31, 27, 661, 33, 4501, 697, 683, 4080, 3856, 6758, 1244, 6805, 15950, 4647,
2]) /* metro module 15971, dependencies: [31, 27, 661, 33, 4501, 697, 683, 4080, 3856, 6758, 1244, 6805, 15950, 4647, 2] */;
@@ -1,176 +1,202 @@
/* Metro module 15975; source: modules/guild_settings/roles/native/action_sheet/SelectConnectionActionSheet.tsx; dependencies: [57, 31, 27, 33, 11364, 6238, 1305, 4048, 6758, 1244, 5039, 1423, 4002, 4080, 8853, 6805, 9221, 6277, 6618, 6231, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseTheme from '../../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as AvatarUtilsModule from '../../../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */
import * as SharedModule from '../../../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as Module06277Module from '../../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as SafeAreaViewModule from '../../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as SegmentedControlStateNativeModule from '../../../../../design/components/SegmentedControl/native/SegmentedControlState.native.tsx'; /* Metro dependency 8853 */
import * as UseGetOrFetchApplicationBatchedModule from '../../../../applications/useGetOrFetchApplicationBatched.tsx'; /* Metro dependency 11364 */
function _fun123552(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:6, offset: 0x025938e8, size: 199 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(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/roles/native/action_sheet/SelectConnectionActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/roles/native/action_sheet/SelectConnectionActionSheet.tsx');
exports.default = SelectConnectionActionSheet;
}
function IdentityApplicationRow({applicationId, onPress}) { // fn#123553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:158, offset: 0x025939af, size: 228 bytes, params: 2, frame: 24
const value3 = (require(11364) /* metro dependency 11364: useGetOrFetchApplicationBatched */).useGetOrFetchApplicationBatched(applicationId);
if (value3 == null) {
return null;
function IdentityApplicationRow({applicationId, onPress}) { // fn#123553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:158, offset: 0x025939af, size: 228 bytes, params: 2, frame: 24
const value3 = (UseGetOrFetchApplicationBatchedModule).useGetOrFetchApplicationBatched(applicationId);
if (value3 == null) {
return null;
}
const bot = value3.bot;
const TableRow = (TableRowNativeModule).TableRow;
const r6 = (
bot != null
? ((Avatar) => <Avatar user={bot} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} guildId={undefined} />)((require(1305) /* metro dependency 1305: native */).Avatar)
: null
);
const name = value3.name;
let description = value3.description;
description = description === '' ? undefined : value3.description;
return (
<TableRow
icon={r6}
label={name}
subLabel={description}
onPress={onPress}
/>
);
}
const bot = value3.bot;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const r6 = bot != null ? ((Avatar) => <Avatar user={bot} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} guildId={undefined} />)((require(1305) /* metro dependency 1305: native */).Avatar) : null;
const name = value3.name;
let description = value3.description;
description = description === '' ? undefined : value3.description;
return (
<TableRow
icon={r6}
label={name}
subLabel={description}
onPress={onPress}
/>
);
}
function SelectConnectionActionSheet({addConnection, excludedConnections, excludedApplications, integrations, onCompleteApplication, gameApplicationIds, onCompleteIdentityApplication}) { // fn#123554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:621, offset: 0x02593a93, size: 984 bytes, params: 2, frame: 31
const env0_4 = onCompleteIdentityApplication;
const env0_5 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Sm0YG7 = (require(1244) /* metro dependency 1244: indexNative */).t.Sm0YG7;
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [Sm0YG7])} />;
let [property, property2] = onCompleteApplication(env0_4.useState(0), 2);
const r13 = integrations?.filter(function(a0) {
var property = a0.application;
var value = undefined;
return (property == null ? value : property.roleConnectionsVerificationUrl) != null && !excludedApplications.has(a0.application == null ? value : a0.application.id);
});
const value11 = (require(5039) /* metro dependency 5039: ConnectionsHooks */).usePlatforms().filter(function(a0) {
return !excludedConnections.has(a0.type);
}).map(_fun123557);
const r1 = r13?.map(_fun123559);
const r0 = onCompleteIdentityApplication != null ? (gameApplicationIds ?? []).filter(function(a0) {
return !excludedApplications.has(a0);
}).map(_fun123562) : [];
const value15 = (r1?.length ?? 0) > 0;
const value16 = r0.length > 0;
items = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3fe7U5'])];
if (value15) {
items.push(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE));
function SelectConnectionActionSheet({addConnection, excludedConnections, excludedApplications, integrations, onCompleteApplication, gameApplicationIds, onCompleteIdentityApplication}) { // fn#123554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:621, offset: 0x02593a93, size: 984 bytes, params: 2, frame: 31
const onCompleteIdentityApplication2 = onCompleteIdentityApplication;
const env0_5 = (UseTheme)();
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Sm0YG7 = (require(1244) /* metro dependency 1244: indexNative */).t.Sm0YG7;
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [Sm0YG7])} />;
let [property, property2] = onCompleteApplication(onCompleteIdentityApplication2.useState(0), 2);
const r13 = integrations?.filter(function(a0) {
var property = a0.application;
var value = undefined;
return (property == null ? value : property.roleConnectionsVerificationUrl) != null && !excludedApplications.has(a0.application == null ? value : a0.application.id);
});
const value11 = (require(5039) /* metro dependency 5039: ConnectionsHooks */).usePlatforms().filter(function(a0) {
return !excludedConnections.has(a0.type);
}).map(_fun123557);
const r1 = r13?.map(_fun123559);
const r0 = onCompleteIdentityApplication != null ? (gameApplicationIds ?? []).filter(function(a0) {
return !excludedApplications.has(a0);
}).map(_fun123562) : [];
const value15 = (r1?.length ?? 0) > 0;
const value16 = r0.length > 0;
items2 = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3fe7U5'])];
if (value15) {
items2.push(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE));
}
if (value16) {
items2.push(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y3ZnnU));
}
const useSegmentedControlState = SegmentedControlStateNativeModule.useSegmentedControlState;
const object = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: property2};
object.items = items2.map(function(a0) {
return {id: a0, label: a0, page: null};
});
const value18 = Reflect.apply(useSegmentedControlState, SegmentedControlStateNativeModule, [object]);
const r14 = property === 1 ? value15 ? r1 : r0 : property !== 2 ? value11 : r0;
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const r5 = (
value15 || value16
? (
<View>
{((SegmentedControl) => <SegmentedControl state={value18} />)((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)}
</View>
)
: null
);
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
<ActionSheet
scrollable
header={bottomSheetTitleHeader}
startExpanded
>
{r5}
<BottomSheetScrollView>
<SafeAreaPaddingView bottom>
<TableRowGroup hasIcons>
{r14}
</TableRowGroup>
</SafeAreaPaddingView>
</BottomSheetScrollView>
</ActionSheet>
);
function _fun123557(a0) { // fn#123557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1178, offset: 0x02593ed2, size: 231 bytes, params: 2, frame: 21
const env0_0 = a0;
const makeSource = AvatarUtilsModule.makeSource;
const isThemeDark2 = (SharedModule).isThemeDark(env0_5);
const icon = a0.icon;
const source = Reflect.apply(makeSource, AvatarUtilsModule, [isThemeDark2 ? icon.darkPNG : icon.lightPNG]);
const TableRow = (TableRowNativeModule).TableRow;
const Icon = (NativeModule).Icon;
return (
<TableRow
icon={<Icon source={source} disableColor />}
label={a0.name}
onPress={onPress_123558}
key={'row-' + a0.type}
/>
);
function onPress_123558() { // fn#123558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1360, offset: 0x02593fb9, size: 61 bytes, params: 1, frame: 12
let value = environment.__proto__;
addConnection(env0_0.type);
value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
function _fun123559({application}) { // fn#123559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1448, offset: 0x02593ff6, size: 219 bytes, params: 2, frame: 24
var environment;
var description;
var r0;
var value2;
var TableRow;
let value = null;
if (value == application) {
r0 = value;
} else {
value = environment.__proto__;
value2 = undefined;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {icon: ((Avatar) => <Avatar user={application.bot} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} guildId={value2} />)((require(1305) /* metro dependency 1305: native */).Avatar),
label: application.name};
description = application.description;
description = description === '' ? value2 : application.description;
tableRowProps.subLabel = description;
tableRowProps.onPress = onPress_123560;
value = <TableRow {...tableRowProps} key={'row-' + application.id} />;
r0 = value;
}
return r0;
function onPress_123560() { // fn#123560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1665, offset: 0x025940d1, size: 61 bytes, params: 1, frame: 12
let value = environment.__proto__;
onCompleteApplication(application.id);
value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
function _fun123562(a0) { // fn#123562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1782, offset: 0x0259410e, size: 72 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return (
<IdentityApplicationRow
applicationId={a0}
onPress={onPress_123563}
key={'row-identity-' + a0}
/>
);
function onPress_123563() { // fn#123563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1835, offset: 0x02594156, size: 56 bytes, params: 1, frame: 12
let value = environment.__proto__;
onCompleteIdentityApplication(env0_0);
value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
}
if (value16) {
items.push(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y3ZnnU));
}
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
const object3 = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: property2};
object3.items = items.map(function(a0) {
return {id: a0, label: a0, page: null};
});
const value18 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object3]);
const r14 = property === 1 ? value15 ? r1 : r0 : property !== 2 ? value11 : r0;
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const r5 = value15 || value16 ? <View>{((SegmentedControl) => <SegmentedControl state={value18} />)((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)}</View> : null;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<ActionSheet
scrollable
header={bottomSheetTitleHeader}
startExpanded
>
{r5}
<BottomSheetScrollView>
<SafeAreaPaddingView bottom>
<TableRowGroup hasIcons>
{r14}
</TableRowGroup>
</SafeAreaPaddingView>
</BottomSheetScrollView>
</ActionSheet>
);
}
function _fun123557(a0) { // fn#123557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1178, offset: 0x02593ed2, size: 231 bytes, params: 2, frame: 21
const env0_0 = a0;
const avatarUtilsModule = require(1423) /* metro dependency 1423: AvatarUtils */;
const makeSource = avatarUtilsModule.makeSource;
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_5);
const icon = a0.icon;
const source = Reflect.apply(makeSource, avatarUtilsModule, [isThemeDark2 ? icon.darkPNG : icon.lightPNG]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
return (
<TableRow
icon={<Icon source={source} disableColor />}
label={a0.name}
onPress={onPress_123558}
key={'row-' + a0.type}
/>
);
}
function _fun123559({application}) { // fn#123559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1448, offset: 0x02593ff6, size: 219 bytes, params: 2, frame: 24
var environment;
var description;
var r0;
var value2;
var TableRow;
let value = null;
if (value == application) {
r0 = value;
} else {
value = environment.__proto__;
value2 = undefined;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {icon: ((Avatar) => <Avatar user={application.bot} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} guildId={value2} />)((require(1305) /* metro dependency 1305: native */).Avatar),
label: application.name};
description = application.description;
description = description === '' ? value2 : application.description;
tableRowProps.subLabel = description;
tableRowProps.onPress = onPress_123560;
value = <TableRow {...tableRowProps} key={'row-' + application.id} />;
r0 = value;
}
return r0;
}
function _fun123562(a0) { // fn#123562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1782, offset: 0x0259410e, size: 72 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return (
<IdentityApplicationRow
applicationId={a0}
onPress={onPress_123563}
key={'row-identity-' + a0}
/>
);
}
function onPress_123558() { // fn#123558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1360, offset: 0x02593fb9, size: 61 bytes, params: 1, frame: 12
let value = environment.__proto__;
addConnection(env0_0.type);
value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function onPress_123560() { // fn#123560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1665, offset: 0x025940d1, size: 61 bytes, params: 1, frame: 12
let value = environment.__proto__;
onCompleteApplication(application.id);
value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function onPress_123563() { // fn#123563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16183:1835, offset: 0x02594156, size: 56 bytes, params: 1, frame: 12
let value = environment.__proto__;
onCompleteIdentityApplication(env0_0);
value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun123552, 15975, [57, 31, 27, 33, 11364, 6238, 1305, 4048, 6758, 1244, 5039, 1423, 4002, 4080, 8853,
6805, 9221, 6277, 6618, 6231,
2]) /* metro module 15975, dependencies: [57, 31, 27, 33, 11364, 6238, 1305, 4048, 6758, 1244, 5039, 1423, 4002, 4080, 8853, 6805, 9221, 6277, 6618, 6231, 2] */;
@@ -1,75 +1,78 @@
/* Metro module 11838; source: modules/guild_settings/safety/GuildInvitesDisabledUtils.tsx; dependencies: [10906, 3784, 661, 566, 2] */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import GuildIncidentsStore from '../../guild_antiraid/GuildIncidentsStore.tsx'; /* Metro dependency 10906 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun90739(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12024:6, offset: 0x02043b57, size: 198 bytes, params: 8, frame: 21
let env0_0 = require;
const closure = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStores([PermissionStore], _fun90741, [a0]);
};
const closure2 = useInvitesDisabled;
const useInvitesDisabled2 = useInvitesDisabled;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildIncidentsStore = importDefault(10906) /* metro dependency 10906: GuildIncidentsStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.GuildFeatures;
const env0_5 = constantsModule.Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/safety/GuildInvitesDisabledUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/safety/GuildInvitesDisabledUtils.tsx');
exports.useInvitesDisabledPermission = closure;
exports.useInvitesDisabled = closure2;
exports.useInvitesDisabled = useInvitesDisabled2;
exports.useShouldShowInvitesDisabledNotif = useShouldShowInvitesDisabledNotif;
}
function useInvitesDisabledPermission(a0) { // fn#90740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12024:160, offset: 0x02043c1d, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun90741, [a0]);
}
function useInvitesDisabled(a0) { // fn#90742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12024:283, offset: 0x02043c9b, size: 195 bytes, params: 2, frame: 17
var invitesDisabledUntil;
var r1;
var Date;
var prototype;
var date;
var value4;
const env0_0 = a0;
var value;
const value2 = undefined;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildIncidentsStore], _fun90743);
let r0 = a0 == null ? value2 : a0.features.has(GuildFeatures.INVITES_DISABLED);
if (!r0) {
invitesDisabledUntil = value3 == null ? value2 : value3.invitesDisabledUntil;
value = invitesDisabledUntil != null;
if (value) {
Date = global.Date;
invitesDisabledUntil = value3.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;
function useInvitesDisabledPermission(a0) { // fn#90740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12024:160, offset: 0x02043c1d, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (FluxModule).useStateFromStores([PermissionStore], _fun90741, [a0]);
function _fun90741() { // fn#90741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12024:240, offset: 0x02043c68, size: 51 bytes, params: 1, frame: 14
return env0_0 != null && PermissionStore.can(Permissions.MANAGE_GUILD, env0_0);
}
r0 = r1;
}
return r0;
}
function useShouldShowInvitesDisabledNotif(a0) { // fn#90744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12024:773, offset: 0x02043d8b, size: 34 bytes, params: 2, frame: 12
return useInvitesDisabledPermission(a0) && useInvitesDisabled(a0);
}
function useInvitesDisabled(a0) { // fn#90742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12024:283, offset: 0x02043c9b, size: 195 bytes, params: 2, frame: 17
var invitesDisabledUntil;
var r1;
var Date;
var prototype;
var date;
var value4;
const env0_0 = a0;
var value;
const value2 = undefined;
const value3 = (FluxModule).useStateFromStores([GuildIncidentsStore], _fun90743);
let r0 = a0 == null ? value2 : a0.features.has(GuildFeatures.INVITES_DISABLED);
if (!r0) {
invitesDisabledUntil = value3 == null ? value2 : value3.invitesDisabledUntil;
value = invitesDisabledUntil != null;
if (value) {
Date = global.Date;
invitesDisabledUntil = value3.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 _fun90743() { // fn#90743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12024:352, offset: 0x02043d5e, size: 45 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_0 ? GuildIncidentsStore.getGuildIncident(env0_0.id) : value2;
}
function _fun90741() { // fn#90741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12024:240, offset: 0x02043c68, size: 51 bytes, params: 1, frame: 14
return env0_0 != null && PermissionStore.can(Permissions.MANAGE_GUILD, env0_0);
}
}
function useShouldShowInvitesDisabledNotif(a0) { // fn#90744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12024:773, offset: 0x02043d8b, size: 34 bytes, params: 2, frame: 12
return useInvitesDisabledPermission(a0) && useInvitesDisabled(a0);
}
function _fun90743() { // fn#90743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12024:352, offset: 0x02043d5e, size: 45 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_0 ? GuildIncidentsStore.getGuildIncident(env0_0.id) : value2;
}
global.__d(_fun90739, 11838, [10906, 3784, 661, 566,
2]) /* metro module 11838, dependencies: [10906, 3784, 661, 566, 2] */;
@@ -1,9 +1,12 @@
/* Metro module 13361; source: modules/guild_settings/safety/HighlightedSettingsTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun101739(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13551:6, offset: 0x0221de8e, size: 150 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/safety/HighlightedSettingsTypes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/safety/HighlightedSettingsTypes.tsx');
exports.HighlightColors = {ACCENT: 'accent', GREEN: 'statusGreen', YELLOW: 'statusYellow', ORANGE: 'statusOrange',
RED: 'statusRed', NONE: 'transparent'};
}
global.__d(_fun101739, 13361, [2]) /* metro module 13361, dependencies: [2] */;
@@ -1,10 +1,13 @@
/* Metro module 10308; source: modules/guild_settings/safety/TransferOwnershipConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun80008(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10494:6, offset: 0x01e693c6, size: 138 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/safety/TransferOwnershipConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/safety/TransferOwnershipConstants.tsx');
exports.TransferOwnershipModalScenes = {TRANFSER_OWNERSHIP: 'TRANFSER_OWNERSHIP',
CONFIRM_EMAIL_CODE: 'CONFIRM_EMAIL_CODE'};
exports.TransferOwnershipVerificationTypes = {MFA: 'mfa', SMS: 'sms', EMAIL: 'email'};
}
global.__d(_fun80008, 10308, [2]) /* metro module 10308, dependencies: [2] */;
@@ -1,6 +1,21 @@
/* Metro module 15987; source: modules/guild_settings/safety/native/GuildSettingsModalBans.tsx; dependencies: [57, 31, 27, 1867, 1878, 9113, 33, 4501, 697, 566, 7705, 3829, 6590, 6593, 9112, 6238, 1305, 6243, 1244, 6797, 3856, 6802, 5460, 15988, 6984, 8754, 8671, 5462, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UseScaledRowHeight from '../../../main_tabs_v2/native/shared_components/user_list/useScaledRowHeight.tsx'; /* Metro dependency 7705 */
import GuildSettingsActionCreators from '../../GuildSettingsActionCreators.tsx'; /* Metro dependency 9112 */
import GuildSettingsStore from '../../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UserSettingsModule from '../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as ToastUtilsModule from '../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as NavScrimAndroidModule from '../../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
function _fun123660(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:6, offset: 0x025969e2, size: 375 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const _arrayLikeToArray_123663 = function(a0, a1) {
var r0;
@@ -47,341 +62,376 @@ function _fun123660(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.StyleSheet;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const env0_12 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.containerInner = {paddingHorizontal: PX_12, flex: 1};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.searchField = {paddingVertical: PX_16};
const env0_13 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/safety/native/GuildSettingsModalBans.tsx');
object = {};
const PX_12 = (Native).space.PX_12;
object.containerInner = {paddingHorizontal: PX_12, flex: 1};
const PX_16 = (Native).space.PX_16;
object.searchField = {paddingVertical: PX_16};
const env0_13 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/safety/native/GuildSettingsModalBans.tsx');
exports.default = ConnectedGuildSettingsModalBans;
}
function _createForOfIteratorHelperLoose_123661(a0, a1) { // fn#123661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:227, offset: 0x02596b59, 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)) {
function _createForOfIteratorHelperLoose_123661(a0, a1) { // fn#123661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:227, offset: 0x02596b59, 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);
}
return _fun123662;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_123663(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun123662;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_123663(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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_123663(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_123663(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun123662;
}
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 ConnectedGuildSettingsModalBans({guildId, contentContainerStyle}) { // fn#123664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:1390, offset: 0x02596ccd, size: 1055 bytes, params: 2, frame: 31
var r9;
var r6;
var items2;
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const {bans, searchQuery,
bansVersion} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsStore],
_fun123666);
const value4 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const paddingBottom = StyleSheet.flatten(contentContainerStyle)?.paddingBottom;
const r12 = typeof paddingBottom !== 'number' ? 0 : paddingBottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const value8 = DeveloperMode.useSetting();
const binding = value8;
const {users, sections} = binding.useMemo(_fun123667, [bans, bansVersion, searchQuery]);
binding.useEffect(_fun123669, [guildId]);
const value10 = binding.useCallback(_fun123671, [bans, value8, guild, users]);
const value11 = binding.useCallback(_fun123675, []);
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
if (bans == null) {
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
r6 = <SceneLoadingIndicator />;
} else if (searchQuery !== '') {
var viewBindingProps = {style: styles.containerInner};
items2 = [<View style={styles.searchField}>{((SearchField) => <SearchField size="md" onChange={value11} />)((require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField)}</View>];
if (searchQuery === '') {
r9 = ((Component) => <Component sections={sections} itemSize={value4} estimatedListSize="windowSize" renderItem={value10} insetEnd={r12} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */);
} else if (users.length === 0) {
r9 = <EmptyState Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.z3cK5j)} />;
} else {
r9 = ((Component) => <Component sections={sections} itemSize={value4} estimatedListSize="windowSize" renderItem={value10} insetEnd={r12} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */);
}
items2[1] = r9;
r6 = <View {...viewBindingProps}>{items2}</View>;
} else if (users.length === 0) {
r6 = <EmptyState Illustration={(require(15988) /* metro dependency 15988: BansEmpty */).BansEmpty} title={intl.string(t.ZEiY1D)} body={intl.string(t.zfCsAw)} />;
} else {
var viewBindingProps = {style: styles.containerInner};
items2 = [<View style={styles.searchField}>{((SearchField) => <SearchField size="md" onChange={value11} />)((require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField)}</View>];
if (searchQuery === '') {
r9 = ((Component) => <Component sections={sections} itemSize={value4} estimatedListSize="windowSize" renderItem={value10} insetEnd={r12} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */);
} else if (users.length === 0) {
r9 = <EmptyState Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.z3cK5j)} />;
} else {
r9 = ((Component) => <Component sections={sections} itemSize={value4} estimatedListSize="windowSize" renderItem={value10} insetEnd={r12} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */);
}
items2[1] = r9;
r6 = <View {...viewBindingProps}>{items2}</View>;
}
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<>
{r6}
<NavScrim />
</>
);
}
function _fun123666() { // fn#123666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:1576, offset: 0x025970ec, size: 70 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = GuildSettingsStore.getProps();
return {bans: value.bans, searchQuery: value.searchQuery ?? '', bansVersion: value.bansVersion};
}
function _fun123667() { // fn#123667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:1893, offset: 0x02597132, size: 324 bytes, params: 1, frame: 26
var environment;
var r2;
var r12;
var value5;
var property;
var user;
var length;
var value7;
var defaultImport;
var toLowerCase;
var value8;
var username;
var value9;
var globalName;
var value10;
var defaultImport2;
var value11;
var value12;
var value13;
let items2 = [];
let value = environment.__proto__;
const _createForOfIteratorHelperLoose_123661Binding = _createForOfIteratorHelperLoose_123661;
let r0 = bans ?? [];
const value3 = _createForOfIteratorHelperLoose_123661Binding(r0);
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
while (true) {
value5 = r2.value;
property = env1_3(value5, 1)[0];
user = UserStore.getUser(property);
if (user != null) {
length = searchQuery.length;
value7 = length === 0;
if (value7) {
r0 = value7;
continue;
}
defaultImport = importDefault(6590) /* metro dependency 6590 */;
value8 = searchQuery.toLowerCase();
username = user.username;
toLowerCase = username.toLowerCase;
value9 = defaultImport(value8, Reflect.apply(toLowerCase, username, []));
r0 = value9;
if (r0) {
continue;
}
globalName = user.globalName;
value10 = globalName != null;
if (!value10) {
r12 = value10;
continue;
}
defaultImport2 = importDefault(6590) /* metro dependency 6590 */;
value11 = searchQuery.toLowerCase();
globalName = user.globalName;
toLowerCase = globalName.toLowerCase;
value12 = defaultImport2(value11, Reflect.apply(toLowerCase, globalName, []));
r12 = value12;
r0 = r12;
if (r0) {
items2.push(user);
break;
}
break;
if (r5) {
}
value13 = value3();
done = value13.done;
if (done) {
break;
return _fun123662;
}
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 _fun123662() { // fn#123662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:798, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function ConnectedGuildSettingsModalBans({guildId, contentContainerStyle}) { // fn#123664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:1390, offset: 0x02596ccd, size: 1055 bytes, params: 2, frame: 31
var r9;
var r6;
var items2;
const EmptyState = (NativeModule).EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const {bans, searchQuery,
bansVersion} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsStore],
_fun123666);
const value4 = (UseScaledRowHeight)();
const paddingBottom = StyleSheet.flatten(contentContainerStyle)?.paddingBottom;
const r12 = typeof paddingBottom !== 'number' ? 0 : paddingBottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const DeveloperMode = (UserSettingsModule).DeveloperMode;
const value8 = DeveloperMode.useSetting();
const binding = value8;
const {users, sections} = binding.useMemo(_fun123667, [bans, bansVersion, searchQuery]);
binding.useEffect(_fun123669, [guildId]);
const value10 = binding.useCallback(_fun123671, [bans, value8, guild, users]);
const value11 = binding.useCallback(_fun123675, []);
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
if (bans == null) {
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
r6 = <SceneLoadingIndicator />;
} else if (searchQuery !== '') {
var viewBindingProps = {style: styles.containerInner};
items2 = [
<View style={styles.searchField}>
{((SearchField) => <SearchField size="md" onChange={value11} />)((require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField)}
</View>,
];
if (searchQuery === '') {
r9 = ((Component) => <Component sections={sections} itemSize={value4} estimatedListSize="windowSize" renderItem={value10} insetEnd={r12} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */);
} else if (users.length === 0) {
r9 = (
<EmptyState
Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults}
body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.z3cK5j)}
/>
);
} else {
r9 = ((Component) => <Component sections={sections} itemSize={value4} estimatedListSize="windowSize" renderItem={value10} insetEnd={r12} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */);
}
r2 = value13;
continue;
items2[1] = r9;
r6 = (
<View {...viewBindingProps}>
{items2}
</View>
);
} else if (users.length === 0) {
r6 = (
<EmptyState
Illustration={(require(15988) /* metro dependency 15988: BansEmpty */).BansEmpty}
title={intl.string(t.ZEiY1D)}
body={intl.string(t.zfCsAw)}
/>
);
} else {
var viewBindingProps = {style: styles.containerInner};
items2 = [
<View style={styles.searchField}>
{((SearchField) => <SearchField size="md" onChange={value11} />)((require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField)}
</View>,
];
if (searchQuery === '') {
r9 = ((Component) => <Component sections={sections} itemSize={value4} estimatedListSize="windowSize" renderItem={value10} insetEnd={r12} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */);
} else if (users.length === 0) {
r9 = (
<EmptyState
Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults}
body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.z3cK5j)}
/>
);
} else {
r9 = ((Component) => <Component sections={sections} itemSize={value4} estimatedListSize="windowSize" renderItem={value10} insetEnd={r12} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */);
}
items2[1] = r9;
r6 = (
<View {...viewBindingProps}>
{items2}
</View>
);
}
}
items2.sort(function(a0, a1) {
var username = a0.username;
var value = username.toLowerCase();
username = a1.username;
return value.localeCompare(username.toLowerCase());
});
const object2 = {users: items2};
items2 = [items2.length];
object2.sections = items2;
return object2;
}
function _fun123669() { // fn#123669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:2347, offset: 0x02597276, size: 64 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.fetchGuildBansBatch(guildId, 1000, null);
return _fun123670;
}
function _fun123671(a0, a1) { // fn#123671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:2455, offset: 0x025972e0, size: 334 bytes, params: 3, frame: 24
var environment;
var r0;
var value5;
var TableRow;
var globalName;
const property = users[a1];
const bansBinding = bans;
const value2 = null;
const value3 = undefined;
const env0_1 = value2 == bansBinding ? value3 : bans.get(property.id);
if (value2 == r0) {
r0 = value2;
} else {
value5 = environment.__proto__;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {start: a1 === 0, end: a1 === users.length - 1,
icon: ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SMALL} user={property} guildId={value2 == guild ? value3 : guild.id} />)((require(1305) /* metro dependency 1305: native */).Avatar)};
globalName = property.globalName;
tableRowProps.label = value2 != globalName ? globalName : property.username;
globalName = property.globalName;
tableRowProps.subLabel = value2 != globalName ? property.username : value2;
tableRowProps.trailing = ((TableRowArrow) => <TableRowArrow />)((require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow);
tableRowProps.onPress = onPress_123672;
r0 = <TableRow {...tableRowProps} />;
}
return r0;
}
function _fun123675(a0) { // fn#123675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:3414, offset: 0x025976b4, size: 41 bytes, params: 2, frame: 12
const value = environment.__proto__;
(importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).setSearchQuery(a0);
}
function _fun123670() { // fn#123670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:2393, offset: 0x025972b6, size: 42 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).setSearchQuery('');
}
function onPress_123672() { // fn#123672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:2806, offset: 0x0259742e, size: 511 bytes, params: 1, frame: 27
var environment;
var object3;
var value2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
var push;
var showSimpleActionSheet;
var object4;
let value = environment.__proto__;
if (guild != null) {
object3 = {};
value2 = environment.__proto__.__proto__;
object3.label = intl.string(t.Mp6Z2l);
object3.isDestructive = true;
object3.onPress = onPress_123673;
items2 = [object3];
if (env1_4) {
push = items2.push;
object3 = {};
object3.label = intl.string(t['/AXYnE']);
object3.onPress = onPress_123674;
Reflect.apply(push, items2, [object3]);
const NavScrim = (NavScrimAndroidModule).NavScrim;
return (
<>
{r6}
<NavScrim />
</>
);
function _fun123666() { // fn#123666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:1576, offset: 0x025970ec, size: 70 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = GuildSettingsStore.getProps();
return {bans: value.bans, searchQuery: value.searchQuery ?? '', bansVersion: value.bansVersion};
}
value = require(6802) /* metro dependency 6802: showSimpleActionSheet */;
showSimpleActionSheet = value.showSimpleActionSheet;
object4 = {};
object4.title = intl.formatToPlainString(t.XvAG5t, {user: env0_0.username});
object4.subtitle = '' + intl.string(t['9Ki66N']) + ': ' + (env0_1.reason == null ? intl.string(t['t+2Zci']) : env0_1.reason !== '' ? env0_1.reason : intl.string(t['t+2Zci']));
Reflect.apply(showSimpleActionSheet, value, [{key: 'GuildSettingsUnban', header: object4, options: items2,
hasIcons: false}]);
function _fun123667() { // fn#123667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:1893, offset: 0x02597132, size: 324 bytes, params: 1, frame: 26
var environment;
var r2;
var r12;
var value5;
var property;
var user;
var length;
var value7;
var defaultImport;
var toLowerCase;
var value8;
var username;
var value9;
var globalName;
var value10;
var defaultImport2;
var value11;
var value12;
var value13;
let items2 = [];
let value = environment.__proto__;
const _createForOfIteratorHelperLoose_123661Binding = _createForOfIteratorHelperLoose_123661;
let r0 = bans ?? [];
const value3 = _createForOfIteratorHelperLoose_123661Binding(r0);
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
while (true) {
value5 = r2.value;
property = env1_3(value5, 1)[0];
user = UserStore.getUser(property);
if (user != null) {
length = searchQuery.length;
value7 = length === 0;
if (value7) {
r0 = value7;
continue;
}
defaultImport = importDefault(6590) /* metro dependency 6590 */;
value8 = searchQuery.toLowerCase();
username = user.username;
toLowerCase = username.toLowerCase;
value9 = defaultImport(value8, Reflect.apply(toLowerCase, username, []));
r0 = value9;
if (r0) {
continue;
}
globalName = user.globalName;
value10 = globalName != null;
if (!value10) {
r12 = value10;
continue;
}
defaultImport2 = importDefault(6590) /* metro dependency 6590 */;
value11 = searchQuery.toLowerCase();
globalName = user.globalName;
toLowerCase = globalName.toLowerCase;
value12 = defaultImport2(value11, Reflect.apply(toLowerCase, globalName, []));
r12 = value12;
r0 = r12;
if (r0) {
items2.push(user);
break;
}
break;
}
value13 = value3();
done = value13.done;
if (done) {
break;
}
r2 = value13;
continue;
}
}
items2.sort(function(a0, a1) {
var username = a0.username;
var value = username.toLowerCase();
username = a1.username;
return value.localeCompare(username.toLowerCase());
});
const object = {users: items2};
items2 = [items2.length];
object.sections = items2;
return object;
}
function _fun123669() { // fn#123669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:2347, offset: 0x02597276, size: 64 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.fetchGuildBansBatch(guildId, 1000, null);
return _fun123670;
function _fun123670() { // fn#123670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:2393, offset: 0x025972b6, size: 42 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(GuildSettingsActionCreators).setSearchQuery('');
}
}
function _fun123671(a0, a1) { // fn#123671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:2455, offset: 0x025972e0, size: 334 bytes, params: 3, frame: 24
var environment;
var r0;
var value5;
var TableRow;
var globalName;
const property = users[a1];
const bansBinding = bans;
const value2 = null;
const value3 = undefined;
const env0_1 = value2 == bansBinding ? value3 : bans.get(property.id);
if (value2 == r0) {
r0 = value2;
} else {
value5 = environment.__proto__;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {start: a1 === 0, end: a1 === users.length - 1,
icon: ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SMALL} user={property} guildId={value2 == guild ? value3 : guild.id} />)((require(1305) /* metro dependency 1305: native */).Avatar)};
globalName = property.globalName;
tableRowProps.label = value2 != globalName ? globalName : property.username;
globalName = property.globalName;
tableRowProps.subLabel = value2 != globalName ? property.username : value2;
tableRowProps.trailing = ((TableRowArrow) => <TableRowArrow />)((require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow);
tableRowProps.onPress = onPress_123672;
r0 = <TableRow {...tableRowProps} />;
}
return r0;
function onPress_123672() { // fn#123672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:2806, offset: 0x0259742e, size: 511 bytes, params: 1, frame: 27
var environment;
var object;
var value2;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items2;
var push;
var showSimpleActionSheet;
var object2;
let value = environment.__proto__;
if (guild != null) {
object = {};
value2 = environment.__proto__.__proto__;
object.label = intl.string(t.Mp6Z2l);
object.isDestructive = true;
object.onPress = onPress_123673;
items2 = [object];
if (env1_4) {
push = items2.push;
object = {};
object.label = intl.string(t['/AXYnE']);
object.onPress = onPress_123674;
Reflect.apply(push, items2, [object]);
}
value = require(6802) /* metro dependency 6802: showSimpleActionSheet */;
showSimpleActionSheet = value.showSimpleActionSheet;
object2 = {};
object2.title = intl.formatToPlainString(t.XvAG5t, {user: env0_0.username});
object2.subtitle = '' + intl.string(t['9Ki66N']) + ': ' + (env0_1.reason == null ? intl.string(t['t+2Zci']) : env0_1.reason !== '' ? env0_1.reason : intl.string(t['t+2Zci']));
Reflect.apply(showSimpleActionSheet, value, [{key: 'GuildSettingsUnban', header: object2, options: items2,
hasIcons: false}]);
}
function onPress_123672OnPress() { // fn#123673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:2896, owner: onPress_123672.onPress, offset: 0x0259762d, size: 63 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.unbanUser(guild.id, env1_0.id);
}
function onPress_123672OnPress_123674() { // fn#123674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:3001, owner: onPress_123672.onPress, offset: 0x0259766c, size: 72 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(env1_0.id);
(ToastUtilsModule).presentIdCopied();
}
}
}
function _fun123675(a0) { // fn#123675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:3414, offset: 0x025976b4, size: 41 bytes, params: 2, frame: 12
const value = environment.__proto__;
(GuildSettingsActionCreators).setSearchQuery(a0);
}
}
}
function onPress_123672OnPress() { // fn#123673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:2896, owner: onPress_123672.onPress, offset: 0x0259762d, size: 63 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.unbanUser(guild.id, env1_0.id);
}
function onPress_123672OnPress_123674() { // fn#123674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16195:3001, owner: onPress_123672.onPress, offset: 0x0259766c, size: 72 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(env1_0.id);
(require(3856) /* metro dependency 3856: ToastUtils */).presentIdCopied();
}
global.__d(_fun123660, 15987, [57, 31, 27, 1867, 1878, 9113, 33, 4501, 697, 566, 7705, 3829, 6590, 6593, 9112, 6238,
1305, 6243, 1244, 6797, 3856, 6802, 5460, 15988, 6984, 8754, 8671, 5462,
2]) /* metro module 15987, dependencies: [57, 31, 27, 1867, 1878, 9113, 33, 4501, 697, 566, 7705, 3829, 6590, 6593, 9112, 6238, 1305, 6243, 1244, 6797, 3856, 6802, 5460, 15988, 6984, 8754, 8671, 5462, 2] */;
@@ -1,326 +1,357 @@
/* Metro module 15876; source: modules/guild_settings/safety/native/GuildSettingsModalModeration.tsx; dependencies: [6, 7, 15, 17, 18, 31, 3784, 9113, 661, 33, 4501, 697, 8169, 9112, 6231, 1244, 1948, 6808, 5282, 5277, 7988, 13360, 7987, 4573, 7972, 4572, 5462, 3868, 1484, 566, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import HelpdeskUtils from '../../../../utils/HelpdeskUtils.tsx'; /* Metro dependency 1948 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import GuildSettingsActionCreators from '../../GuildSettingsActionCreators.tsx'; /* Metro dependency 9112 */
import GuildSettingsStore from '../../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as HeaderActionButtonNativeModule from '../../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as NavigatorHeaderNativeModule from '../../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
import * as NavScrimAndroidModule from '../../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
import * as NativeModule2 from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as TableRadioRowNativeModule from '../../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
import * as UseUserIsTeenModule from '../../../self_mod/hooks/useUserIsTeen.tsx'; /* Metro dependency 8169 */
import * as ModerationUtilsModule from '../../../../utils/ModerationUtils.tsx'; /* Metro dependency 13360 */
function _fun122192(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:6, offset: 0x0255d7ba, size: 463 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_11 = constantsModule.GuildFeatures;
const env0_12 = constantsModule.HelpdeskArticles;
const env0_13 = constantsModule.Permissions;
const env0_14 = constantsModule.GuildNSFWContentLevel;
const value3 = require(33) /* metro dependency 33 */;
const env0_15 = value3.jsx;
const env0_16 = value3.jsxs;
const env0_17 = value3.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const env0_18 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule,
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
const env0_18 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule,
[{stack: {paddingHorizontal: TABLE_ROW_PADDING}}]);
const PureComponent = value.PureComponent;
value = _fun122198(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/safety/native/GuildSettingsModalModeration.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/safety/native/GuildSettingsModalModeration.tsx');
exports.default = ConnectedGuildSettingsModalModeration;
}
function _isNativeReflectConstruct_122193() { // fn#122193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:309, offset: 0x0255d989, 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) {
function _isNativeReflectConstruct_122193() { // fn#122193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:309, offset: 0x0255d989, 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_122193_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_122193_isNativeReflectConstruct = function() {
return !!result;
})();
}
function GuildSettingsOwnerConfiguredContentLevel({guild}) { // fn#122196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:662, offset: 0x0255d9eb, size: 467 bytes, params: 2, frame: 29
var r0;
var TableRowGroup;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var format;
var iyQQ62;
const nsfwLevel = guild.nsfwLevel;
let value = null;
const r3 = value != nsfwLevel ? nsfwLevel : GuildNSFWContentLevel.DEFAULT;
const ownerConfiguredContentLevel = guild.ownerConfiguredContentLevel;
const r10 = value != ownerConfiguredContentLevel ? ownerConfiguredContentLevel : GuildNSFWContentLevel.DEFAULT;
const value5 = (require(8169) /* metro dependency 8169: useUserIsTeen */).useUserIsTeen();
const AGE_RESTRICTED = GuildNSFWContentLevel.AGE_RESTRICTED;
if (value5) {
r0 = value;
} else {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
var tableRowGroupProps = {title: intl.string(t.YJlvBM), hasIcons: false};
format = intl.format;
iyQQ62 = t.iyQQ62;
value = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
tableRowGroupProps.description = Reflect.apply(format, intl, [iyQQ62,
{helpArticleLink: value.getArticleURL(HelpdeskArticles.NSFW_SERVER_AGE_RESTRICTION)}]);
value = <TableRowGroup {...tableRowGroupProps} key="filter-section">{((TableSwitchRow) => <TableSwitchRow label={intl.string(t.N9xEJF)} value={r10 === GuildNSFWContentLevel.AGE_RESTRICTED} onValueChange={env0_8.useCallback(function(a0) {
var defaultImport = importDefault(dependencyMap[13]);
defaultImport.updateGuild({ownerConfiguredContentLevel: a0 ? GuildNSFWContentLevel.AGE_RESTRICTED : GuildNSFWContentLevel.DEFAULT});
},
[])} disabled={r3 === AGE_RESTRICTED && r10 !== GuildNSFWContentLevel.AGE_RESTRICTED} />)((require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow)}</TableRowGroup>;
r0 = value;
function GuildSettingsOwnerConfiguredContentLevel({guild}) { // fn#122196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:662, offset: 0x0255d9eb, size: 467 bytes, params: 2, frame: 29
var r0;
var TableRowGroup;
var object2;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var format;
var iyQQ62;
const nsfwLevel = guild.nsfwLevel;
let value = null;
const r3 = value != nsfwLevel ? nsfwLevel : GuildNSFWContentLevel.DEFAULT;
const ownerConfiguredContentLevel = guild.ownerConfiguredContentLevel;
const r10 = value != ownerConfiguredContentLevel ? ownerConfiguredContentLevel : GuildNSFWContentLevel.DEFAULT;
const value5 = (UseUserIsTeenModule).useUserIsTeen();
const AGE_RESTRICTED = GuildNSFWContentLevel.AGE_RESTRICTED;
if (value5) {
r0 = value;
} else {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
var tableRowGroupProps = {title: intl.string(t.YJlvBM), hasIcons: false};
format = intl.format;
iyQQ62 = t.iyQQ62;
value = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
tableRowGroupProps.description = Reflect.apply(format, intl, [iyQQ62,
{helpArticleLink: value.getArticleURL(HelpdeskArticles.NSFW_SERVER_AGE_RESTRICTION)}]);
value = (
<TableRowGroup {...tableRowGroupProps} key="filter-section">
{((TableSwitchRow) => <TableSwitchRow label={intl.string(t.N9xEJF)} value={r10 === GuildNSFWContentLevel.AGE_RESTRICTED} onValueChange={env0_8.useCallback(function(a0) {
var defaultImport = importDefault(dependencyMap[13]);
defaultImport.updateGuild({ownerConfiguredContentLevel: a0 ? GuildNSFWContentLevel.AGE_RESTRICTED : GuildNSFWContentLevel.DEFAULT});
},
[])} disabled={r3 === AGE_RESTRICTED && r10 !== GuildNSFWContentLevel.AGE_RESTRICTED} />)((require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow)}
</TableRowGroup>
);
r0 = value;
}
return r0;
}
return r0;
}
function _fun122198(a0) { // fn#122198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:1336, offset: 0x0255dc03, size: 280 bytes, params: 2, frame: 16
const closure = GuildSettingsModalModeration;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentDidMount', value: function() {
this.updateNavigation();
}}, {key: 'componentDidUpdate', value: function(a0) {
this.updateNavigation(a0);
}}, {key: 'updateNavigation', value: value_122203}, {key: 'renderVerificationLevelSection', value: value_122207},
{key: 'renderExplicitContentFilter', value: value_122210}, {key: 'render', value: value_122213},
{key: 'componentWillUnmount', value: value_122214}, {key: 'handleVerificationLevelChange', value: value_122215},
{key: 'handleExplicitContentFilterChange', value: value_122216}]);
}
function _fun122198(a0) { // fn#122198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:1336, offset: 0x0255dc03, size: 280 bytes, params: 2, frame: 16
const GuildSettingsModalModeration2 = GuildSettingsModalModeration;
Inherits(GuildSettingsModalModeration2, a0);
return CreateClass(GuildSettingsModalModeration2, [{key: 'componentDidMount', value: function() {
this.updateNavigation();
}}, {key: 'componentDidUpdate', value: function(a0) {
this.updateNavigation(a0);
}}, {key: 'updateNavigation', value: value_122203}, {key: 'renderVerificationLevelSection', value: value_122207},
{key: 'renderExplicitContentFilter', value: value_122210}, {key: 'render', value: value_122213},
{key: 'componentWillUnmount', value: value_122214}, {key: 'handleVerificationLevelChange', value: value_122215},
{key: 'handleExplicitContentFilterChange', value: value_122216}]);
function GuildSettingsModalModeration(a0) { // fn#122199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:1348, offset: 0x0255dd1b, size: 145 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, GuildSettingsModalModeration);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(GuildSettingsModalModeration);
binding = env1_5;
if (_isNativeReflectConstruct_122193()) {
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.handleSaveChanges = handleSaveChanges;
return value;
function handleSaveChanges() { // fn#122200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:1638, owner: GuildSettingsModalModeration.handleSaveChanges, offset: 0x0255ddac, size: 96 bytes, params: 1, frame: 16
const guild = env0_0.props.guild;
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.saveGuild(guild.id, {verificationLevel: guild.verificationLevel,
explicitContentFilter: guild.explicitContentFilter,
ownerConfiguredContentLevel: guild.ownerConfiguredContentLevel});
}
function ConnectedGuildSettingsModalModeration({contentContainerStyle}) { // fn#122217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:4664, offset: 0x0255e52e, size: 205 bytes, params: 2, frame: 21
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsStore],
_fun122218);
const guild = value3.guild;
return guild != null ? ((Component) => <Component navigation={value2} guild={guild} submitting={value3.submitting} hasChanges={value3.hasChanges} canManageGuild={(require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore],
function() {
var MANAGE_GUILD = Permissions.MANAGE_GUILD;
return PermissionStore.can(MANAGE_GUILD, guild);
})} contentContainerStyle={contentContainerStyle} />)(env0_20) : null;
}
}
function value_122203(a0) { // fn#122203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:2077, offset: 0x0255de32, size: 133 bytes, params: 2, frame: 17
const {submitting, hasChanges, navigation} = this.props;
let value = a0 != null;
if (!(value && submitting === a0.submitting && hasChanges === a0.hasChanges)) {
value = undefined;
navigation.setOptions({headerLeft: submitting ? function() {
return null;
} : value, headerRight: submitting ? _fun122205 : hasChanges ? _fun122206 : value});
}
function _fun122205() { // fn#122205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:2253, offset: 0x0255deb7, size: 45 bytes, params: 1, frame: 13
const HeaderSubmittingIndicator = (NavigatorHeaderNativeModule).HeaderSubmittingIndicator;
return <HeaderSubmittingIndicator />;
}
function _fun122206() { // fn#122206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:2300, offset: 0x0255dee4, size: 113 bytes, params: 1, frame: 18
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const handleSaveChanges = env0_0.handleSaveChanges;
const intl = (IndexNativeModule).intl;
return (
<HeaderActionButton
onPress={handleSaveChanges}
text={intl.string((IndexNativeModule).t['R3BPH+'])}
/>
);
}
}
function value_122207() { // fn#122207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:2471, offset: 0x0255df55, size: 276 bytes, params: 1, frame: 23
var environment;
const guild = this.props.guild;
const value = environment.__proto__;
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
const object = {hasIcons: false};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const DpRdYK = (require(1244) /* metro dependency 1244: indexNative */).t.DpRdYK;
object.title = Reflect.apply(string, intl, [DpRdYK]);
object.description = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.iuRk2j, {});
object.value = guild.verificationLevel;
object.onChange = onChange_122208;
const generateVerificationLevelOptions = ModerationUtilsModule.generateVerificationLevelOptions;
const features = guild.features;
const has = features.has;
const COMMUNITY = GuildFeatures.COMMUNITY;
return (
<TableRadioGroup {...object} key="level-section">
{Reflect.apply(generateVerificationLevelOptions, ModerationUtilsModule, [Reflect.apply(has, features,
[COMMUNITY])]).map(_fun122209)}
</TableRadioGroup>
);
function value_122207OnChange(a0) { // fn#122208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:2688, owner: value_122207.onChange, offset: 0x0255e069, size: 25 bytes, params: 2, frame: 11
return env0_0.handleVerificationLevelChange(a0);
}
function _fun122209({name, desc, color, value, disabled}) { // fn#122209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:2814, offset: 0x0255e082, size: 211 bytes, params: 2, frame: 24
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
const r7 = (
color == null
? name
: ((Text) => <Text variant="text-md/semibold" style={{color: color}}>{name}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
);
const canManageGuild = env0_0.props.canManageGuild;
return (
<TableRadioRow
value={value}
label={r7}
subLabel={desc}
disabled={canManageGuild ? disabled : !canManageGuild}
key={'level-' + value}
/>
);
}
}
function value_122210() { // fn#122210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:3111, offset: 0x0255e155, size: 318 bytes, params: 1, frame: 26
var environment;
const guild = this.props.guild;
const value = environment.__proto__;
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
const object = {hasIcons: false};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bPgfJz);
const format = intl.format;
const BI4ukC = (require(1244) /* metro dependency 1244: indexNative */).t.BI4ukC;
const defaultImport = HelpdeskUtils;
const getArticleURL = defaultImport.getArticleURL;
const SAFE_DIRECT_MESSAGING = HelpdeskArticles.SAFE_DIRECT_MESSAGING;
object.description = Reflect.apply(format, intl, [BI4ukC, {helpdeskArticle: Reflect.apply(getArticleURL,
defaultImport, [SAFE_DIRECT_MESSAGING])}]);
object.value = guild.explicitContentFilter;
object.onChange = onChange_122211;
const generateContentFilterOptions = ModerationUtilsModule.generateContentFilterOptions;
const features = guild.features;
const has = features.has;
const COMMUNITY = GuildFeatures.COMMUNITY;
return (
<TableRadioGroup {...object} key="filter-section">
{Reflect.apply(generateContentFilterOptions, ModerationUtilsModule, [Reflect.apply(has, features,
[COMMUNITY])]).map(_fun122212)}
</TableRadioGroup>
);
function value_122210OnChange(a0) { // fn#122211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:3395, owner: value_122210.onChange, offset: 0x0255e293, size: 25 bytes, params: 2, frame: 11
return env0_0.handleExplicitContentFilterChange(a0);
}
function _fun122212({name, desc, value, disabled}) { // fn#122212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:3521, offset: 0x0255e2ac, size: 138 bytes, params: 2, frame: 19
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
const canManageGuild = env0_0.props.canManageGuild;
return (
<TableRadioRow
value={value}
label={name}
subLabel={desc}
disabled={canManageGuild ? disabled : !canManageGuild}
key={'filter-' + value}
/>
);
}
}
function value_122213() { // fn#122213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:3710, offset: 0x0255e336, size: 336 bytes, params: 1, frame: 26
const {canManageGuild, guild, hasChanges} = this.props;
const value2 = env1_18(this.context);
const jsxRuntimeEnv1_17Binding = jsxRuntimeEnv1_17;
const Form = (NativeModule2).Form;
const items3 = [{paddingTop: 16}];
items3[1] = this.props.contentContainerStyle;
const Stack = (StackNativeModule).Stack;
const stack = value2.stack;
const PX_24 = (Native).space.PX_24;
const items2 = [this.renderVerificationLevelSection()];
items2[1] = this.renderExplicitContentFilter();
items2[2] = canManageGuild && <GuildSettingsOwnerConfiguredContentLevel guild={guild} hasChanges={hasChanges} />;
const form = (
<Form contentContainerStyle={items3}>
<Stack style={stack} spacing={PX_24}>
{items2}
</Stack>
</Form>
);
const NavScrim = (NavScrimAndroidModule).NavScrim;
return (
<>
{form}
<NavScrim />
</>
);
}
function value_122214() { // fn#122214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:4203, offset: 0x0255e486, size: 72 bytes, params: 1, frame: 12
var value;
if (this.props.hasChanges) {
value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.cancelChanges(this.props.guild.id);
}
}
function value_122215(a0) { // fn#122215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:4326, offset: 0x0255e4ce, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
(GuildSettingsActionCreators).updateGuild({verificationLevel: a0});
}
function value_122216(a0) { // fn#122216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:4431, offset: 0x0255e4fe, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
(GuildSettingsActionCreators).updateGuild({explicitContentFilter: a0});
}
function GuildSettingsModalModeration(a0) { // fn#122199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:1348, offset: 0x0255dd1b, size: 145 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, GuildSettingsModalModeration);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(GuildSettingsModalModeration);
binding = env1_5;
if (_isNativeReflectConstruct_122193()) {
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.handleSaveChanges = handleSaveChanges_122200;
return value;
}
function value_122203(a0) { // fn#122203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:2077, offset: 0x0255de32, size: 133 bytes, params: 2, frame: 17
const {submitting, hasChanges, navigation} = this.props;
let value = a0 != null;
if (!(value && submitting === a0.submitting && hasChanges === a0.hasChanges)) {
value = undefined;
navigation.setOptions({headerLeft: submitting ? function() {
return null;
} : value, headerRight: submitting ? _fun122205 : hasChanges ? _fun122206 : value});
function ConnectedGuildSettingsModalModeration({contentContainerStyle}) { // fn#122217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:4664, offset: 0x0255e52e, size: 205 bytes, params: 2, frame: 21
const value2 = (UseNavigationNativeModule).useNavigation();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsStore],
_fun122218);
const guild = value3.guild;
return (
guild != null
? ((Component) => <Component navigation={value2} guild={guild} submitting={value3.submitting} hasChanges={value3.hasChanges} canManageGuild={(require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore],
function() {
var permissionStoreBinding = PermissionStore;
var MANAGE_GUILD = Permissions.MANAGE_GUILD;
return permissionStoreBinding.can(MANAGE_GUILD, guild);
})} contentContainerStyle={contentContainerStyle} />)(env0_20)
: null
);
function _fun122218() { // fn#122218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:4810, offset: 0x0255e5fb, size: 52 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = GuildSettingsStore.getProps();
return {guild: value.guild, submitting: value.submitting, hasChanges: value.hasChanges};
}
}
}
function value_122207() { // fn#122207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:2471, offset: 0x0255df55, size: 276 bytes, params: 1, frame: 23
var environment;
const guild = this.props.guild;
const value = environment.__proto__;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const object2 = {hasIcons: false};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const DpRdYK = (require(1244) /* metro dependency 1244: indexNative */).t.DpRdYK;
object2.title = Reflect.apply(string, intl, [DpRdYK]);
object2.description = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.iuRk2j, {});
object2.value = guild.verificationLevel;
object2.onChange = onChange_122208;
const moderationUtilsModule = require(13360) /* metro dependency 13360: ModerationUtils */;
const generateVerificationLevelOptions = moderationUtilsModule.generateVerificationLevelOptions;
const features = guild.features;
const has = features.has;
const COMMUNITY = GuildFeatures.COMMUNITY;
return (
<TableRadioGroup {...object2} key="level-section">
{Reflect.apply(generateVerificationLevelOptions, moderationUtilsModule, [Reflect.apply(has, features,
[COMMUNITY])]).map(_fun122209)}
</TableRadioGroup>
);
}
function value_122210() { // fn#122210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:3111, offset: 0x0255e155, size: 318 bytes, params: 1, frame: 26
var environment;
const guild = this.props.guild;
const value = environment.__proto__;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const object2 = {hasIcons: false};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bPgfJz);
const format = intl.format;
const BI4ukC = (require(1244) /* metro dependency 1244: indexNative */).t.BI4ukC;
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport.getArticleURL;
const SAFE_DIRECT_MESSAGING = HelpdeskArticles.SAFE_DIRECT_MESSAGING;
object2.description = Reflect.apply(format, intl, [BI4ukC, {helpdeskArticle: Reflect.apply(getArticleURL,
defaultImport, [SAFE_DIRECT_MESSAGING])}]);
object2.value = guild.explicitContentFilter;
object2.onChange = onChange_122211;
const moderationUtilsModule = require(13360) /* metro dependency 13360: ModerationUtils */;
const generateContentFilterOptions = moderationUtilsModule.generateContentFilterOptions;
const features = guild.features;
const has = features.has;
const COMMUNITY = GuildFeatures.COMMUNITY;
return (
<TableRadioGroup {...object2} key="filter-section">
{Reflect.apply(generateContentFilterOptions, moderationUtilsModule, [Reflect.apply(has, features,
[COMMUNITY])]).map(_fun122212)}
</TableRadioGroup>
);
}
function value_122213() { // fn#122213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:3710, offset: 0x0255e336, size: 336 bytes, params: 1, frame: 26
const {canManageGuild, guild, hasChanges} = this.props;
const value2 = env1_18(this.context);
const jsxRuntimeEnv1_17Binding = jsxRuntimeEnv1_17;
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const items3 = [{paddingTop: 16}];
items3[1] = this.props.contentContainerStyle;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const stack = value2.stack;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const items2 = [this.renderVerificationLevelSection()];
items2[1] = this.renderExplicitContentFilter();
items2[2] = canManageGuild && <GuildSettingsOwnerConfiguredContentLevel guild={guild} hasChanges={hasChanges} />;
const form = <Form contentContainerStyle={items3}><Stack style={stack} spacing={PX_24}>{items2}</Stack></Form>;
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<>
{form}
<NavScrim />
</>
);
}
function value_122214() { // fn#122214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:4203, offset: 0x0255e486, size: 72 bytes, params: 1, frame: 12
var value;
if (this.props.hasChanges) {
value = environment.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.cancelChanges(this.props.guild.id);
}
}
function value_122215(a0) { // fn#122215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:4326, offset: 0x0255e4ce, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).updateGuild({verificationLevel: a0});
}
function value_122216(a0) { // fn#122216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:4431, offset: 0x0255e4fe, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).updateGuild({explicitContentFilter: a0});
}
function _fun122218() { // fn#122218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:4810, offset: 0x0255e5fb, size: 52 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = GuildSettingsStore.getProps();
return {guild: value.guild, submitting: value.submitting, hasChanges: value.hasChanges};
}
function GuildSettingsModalModerationHandleSaveChanges() { // fn#122200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:1638, owner: GuildSettingsModalModeration.handleSaveChanges, offset: 0x0255ddac, size: 96 bytes, params: 1, frame: 16
const guild = env0_0.props.guild;
let value = environment.__proto__.__proto__;
value = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
value.saveGuild(guild.id, {verificationLevel: guild.verificationLevel,
explicitContentFilter: guild.explicitContentFilter,
ownerConfiguredContentLevel: guild.ownerConfiguredContentLevel});
}
function _fun122205() { // fn#122205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:2253, offset: 0x0255deb7, size: 45 bytes, params: 1, frame: 13
const HeaderSubmittingIndicator = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).HeaderSubmittingIndicator;
return <HeaderSubmittingIndicator />;
}
function _fun122206() { // fn#122206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:2300, offset: 0x0255dee4, size: 113 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const handleSaveChanges = env0_0.handleSaveChanges;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HeaderActionButton
onPress={handleSaveChanges}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+'])}
/>
);
}
function value_122207OnChange(a0) { // fn#122208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:2688, owner: value_122207.onChange, offset: 0x0255e069, size: 25 bytes, params: 2, frame: 11
return env0_0.handleVerificationLevelChange(a0);
}
function _fun122209({name, desc, color, value, disabled}) { // fn#122209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:2814, offset: 0x0255e082, size: 211 bytes, params: 2, frame: 24
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
const r7 = color == null ? name : ((Text) => <Text variant="text-md/semibold" style={{color: color}}>{name}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
const canManageGuild = env0_0.props.canManageGuild;
return (
<TableRadioRow
value={value}
label={r7}
subLabel={desc}
disabled={canManageGuild ? disabled : !canManageGuild}
key={'level-' + value}
/>
);
}
function value_122210OnChange(a0) { // fn#122211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:3395, owner: value_122210.onChange, offset: 0x0255e293, size: 25 bytes, params: 2, frame: 11
return env0_0.handleExplicitContentFilterChange(a0);
}
function _fun122212({name, desc, value, disabled}) { // fn#122212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16084:3521, offset: 0x0255e2ac, size: 138 bytes, params: 2, frame: 19
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
const canManageGuild = env0_0.props.canManageGuild;
return (
<TableRadioRow
value={value}
label={name}
subLabel={desc}
disabled={canManageGuild ? disabled : !canManageGuild}
key={'filter-' + value}
/>
);
}
global.__d(_fun122192, 15876, [6, 7, 15, 17, 18, 31, 3784, 9113, 661, 33, 4501, 697, 8169, 9112, 6231, 1244, 1948,
6808, 5282, 5277, 7988, 13360, 7987, 4573, 7972, 4572, 5462, 3868, 1484, 566,
2]) /* metro module 15876, dependencies: [6, 7, 15, 17, 18, 31, 3784, 9113, 661, 33, 4501, 697, 8169, 9112, 6231, 1244, 1948, 6808, 5282, 5277, 7988, 13360, 7987, 4573, 7972, 4572, 5462, 3868, 1484, 566, 2] */;
@@ -1,16 +1,24 @@
/* Metro module 15939; source: modules/guild_settings/safety/native/GuildSettingsModalSecurity.tsx; dependencies: [31, 27, 1422, 1867, 1878, 9113, 661, 33, 4501, 697, 566, 9112, 4573, 1244, 4578, 13315, 5462, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildSettingsStore from '../../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import Module13315 from '../../../../by-id/module-13315.js'; /* Metro dependency 13315 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as GuildRecordModule from '../../../../records/GuildRecord.tsx'; /* Metro dependency 1422 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavScrimAndroidModule from '../../../../design/components/Navigator/native/NavScrim.android.tsx'; /* Metro dependency 5462 */
function _fun123026(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16147:6, offset: 0x0257e4d6, size: 464 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.Image;
const env0_6 = (require(1422) /* metro dependency 1422: GuildRecord */).isGuildOwnerWithRequiredMfaLevel;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_10 = value.GuildFeatures;
const env0_11 = value.MFALevels;
@@ -20,64 +28,107 @@ function _fun123026(global, require, importDefault, importAll, module, exports,
const env0_14 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
const env0_15 = Reflect.apply(createStyles, value, [{wrapper: {'flex': 1, 'justifyContent': 'space-between',
'paddingTop': 99}, center: {'alignItems': 'center', 'flexDirection': 'column',
paddingHorizontal: TABLE_ROW_PADDING}, label: {'textAlign': 'center', 'marginBottom': 8}, image: {'width': 295,
'height': 142, 'marginHorizontal': 35}, infoWrapper: {marginBottom: 40}, button: {'alignSelf': 'center',
'paddingHorizontal': 16, 'marginTop': 16}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/safety/native/GuildSettingsModalSecurity.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/safety/native/GuildSettingsModalSecurity.tsx');
exports.default = GuildSettingsModalSecurity;
}
function GuildSettingsModalSecurity({guildId, contentContainerStyle}) { // fn#123027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16147:784, offset: 0x0257e6a6, size: 1044 bytes, params: 2, frame: 36
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const mfaLevel = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore],
function() {
return GuildSettingsStore.getProps().mfaLevel;
});
const currentUser = UserStore.getCurrentUser();
const ELEVATED = MFALevels.ELEVATED;
const value4 = mfaLevel === ELEVATED;
const r20 = currentUser?.mfaEnabled === true && guild != null && isGuildOwnerWithRequiredMfaLevel(guild,
currentUser) && (value4 ? !guild.features.has(GuildFeatures.DISCOVERABLE) : !value4);
const value10 = ReactModule.useCallback(_fun123030, [guild, value4]);
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const items3 = [styles.wrapper, contentContainerStyle];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Wi9LEV = t.Wi9LEV;
const items2 = [
<Text
style={styles.label}
variant="text-md/medium"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [Wi9LEV])}
</Text>,
];
const Button = (ButtonNativeModule).Button;
string = intl.string;
items2[1] = (
<View style={styles.button}>
<Button
text={value4 ? Reflect.apply(string, intl, [t['MP0Ho+']]) : Reflect.apply(string, intl, [t.yZcYGa])}
disabled={!r20}
variant={value4 ? 'destructive' : 'primary'}
onPress={value10}
shrink
/>
</View>
);
items2[2] = (
guild != null && guild.features.has(GuildFeatures.DISCOVERABLE)
? (
<Text variant="text-sm/normal" color="text-feedback-critical">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['KG1V/E'])}
</Text>
)
: null
);
const view = (
<View style={items3}>
<View style={styles.center}>
{items2}
</View>
<View style={styles.center}>
<Image
source={Module13315}
style={styles.image}
resizeMode="contain"
/>
<View style={styles.infoWrapper}>
<Text variant="text-sm/medium" color="text-muted">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['FK0+iX'], {})}
</Text>
</View>
</View>
</View>
);
const NavScrim = (NavScrimAndroidModule).NavScrim;
return (
<>
{view}
<NavScrim />
</>
);
function _fun123030() { // fn#123030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16147:1133, offset: 0x0257ead3, size: 98 bytes, params: 1, frame: 14
var value2;
if (guild != null) {
value2 = environment.__proto__;
(importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).updateMFALevel({guildId: guild.id,
level: result ? MFALevels.NONE : MFALevels.ELEVATED});
}
}
function GuildSettingsModalSecurity({guildId, contentContainerStyle}) { // fn#123027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16147:784, offset: 0x0257e6a6, size: 1044 bytes, params: 2, frame: 36
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const mfaLevel = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore],
function() {
return GuildSettingsStore.getProps().mfaLevel;
});
const currentUser = UserStore.getCurrentUser();
const ELEVATED = MFALevels.ELEVATED;
const value4 = mfaLevel === ELEVATED;
const r20 = currentUser?.mfaEnabled === true && guild != null && isGuildOwnerWithRequiredMfaLevel(guild,
currentUser) && (value4 ? !guild.features.has(GuildFeatures.DISCOVERABLE) : !value4);
const value10 = env0_3.useCallback(_fun123030, [guild, value4]);
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const items3 = [styles.wrapper, contentContainerStyle];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Wi9LEV = t.Wi9LEV;
const items2 = [<Text style={styles.label} variant="text-md/medium" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [Wi9LEV])}</Text>];
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[1] = <View style={styles.button}><Button text={value4 ? Reflect.apply(string, intl,
[t['MP0Ho+']]) : Reflect.apply(string, intl,
[t.yZcYGa])} disabled={!r20} variant={value4 ? 'destructive' : 'primary'} onPress={value10} shrink /></View>;
items2[2] = guild != null && guild.features.has(GuildFeatures.DISCOVERABLE) ? <Text variant="text-sm/normal" color="text-feedback-critical">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['KG1V/E'])}</Text> : null;
const view = <View style={items3}><View style={styles.center}>{items2}</View><View style={styles.center}><Image source={importDefault(13315) /* metro dependency 13315 */} style={styles.image} resizeMode="contain" /><View style={styles.infoWrapper}><Text variant="text-sm/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['FK0+iX'],
{})}</Text></View></View></View>;
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<>
{view}
<NavScrim />
</>
);
}
function _fun123030() { // fn#123030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16147:1133, offset: 0x0257ead3, size: 98 bytes, params: 1, frame: 14
var value2;
if (guild != null) {
value2 = environment.__proto__;
(importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).updateMFALevel({guildId: guild.id,
level: result ? MFALevels.NONE : MFALevels.ELEVATED});
}
}
global.__d(_fun123026, 15939, [31, 27, 1422, 1867, 1878, 9113, 661, 33, 4501, 697, 566, 9112, 4573, 1244, 4578,
13315, 5462,
2]) /* metro module 15939, dependencies: [31, 27, 1422, 1867, 1878, 9113, 661, 33, 4501, 697, 566, 9112, 4573, 1244, 4578, 13315, 5462, 2] */;
@@ -1,245 +1,334 @@
/* Metro module 10309; source: modules/guild_settings/safety/native/TransferOwnership.tsx; dependencies: [5, 57, 31, 27, 1878, 10308, 661, 33, 4501, 697, 3860, 1484, 566, 44, 9112, 10306, 3856, 4617, 6819, 4573, 10310, 1305, 1244, 3995, 6231, 8950, 4578, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import NicknameUtils from '../../../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */
import Module10310 from '../../../../by-id/module-10310.js'; /* Metro dependency 10310 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableCheckboxRowNativeModule from '../../../../design/components/TableRow/native/TableCheckboxRow.native.tsx'; /* Metro dependency 8950 */
function _fun80009(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:6, offset: 0x01e69450, size: 553 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 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.View;
const env0_7 = value.Image;
const env0_8 = value.ScrollView;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(10308) /* metro dependency 10308: TransferOwnershipConstants */;
const env0_10 = value.TransferOwnershipModalScenes;
const env0_11 = value.TransferOwnershipVerificationTypes;
const env0_12 = (require(661) /* metro dependency 661: Constants */).NOOP;
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.Fragment;
const env0_15 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.background = {backgroundColor: BACKGROUND_BASE_LOW};
object.background = {backgroundColor: BACKGROUND_BASE_LOW};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.header = {'alignItems': 'center', 'paddingVertical': 16, backgroundColor: BACKGROUND_BASE_LOW};
object2.arrow = {'width': 78, 'height': 15, 'paddingVertical': 1, 'marginBottom': 2};
object2.avatarsWrapper = {'flexDirection': 'row', 'justifyContent': 'flex-start', 'width': 160, 'height': 80,
object.header = {'alignItems': 'center', 'paddingVertical': 16, backgroundColor: BACKGROUND_BASE_LOW};
object.arrow = {'width': 78, 'height': 15, 'paddingVertical': 1, 'marginBottom': 2};
object.avatarsWrapper = {'flexDirection': 'row', 'justifyContent': 'flex-start', 'width': 160, 'height': 80,
'marginBottom': 30};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.avatarFauxBorder = {'position': 'absolute', 'left': 71, 'top': -2, 'borderRadius': 44, 'width': 88,
object.avatarFauxBorder = {'position': 'absolute', 'left': 71, 'top': -2, 'borderRadius': 44, 'width': 88,
'height': 88, backgroundColor: BACKGROUND_BASE_LOW};
object2.otherUserAvatar = {'top': 4, 'left': 4};
object2.aka = {flex: 1};
object2.miniAvatar = {'marginRight': 4, 'justifyContent': 'center', 'alignContent': 'center'};
object2.miniGuildIcon = {'paddingRight': 4, 'paddingLeft': 2, 'justifyContent': 'center', 'alignContent': 'center'};
const env0_16 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/safety/native/TransferOwnership.tsx');
object.otherUserAvatar = {'top': 4, 'left': 4};
object.aka = {flex: 1};
object.miniAvatar = {'marginRight': 4, 'justifyContent': 'center', 'alignContent': 'center'};
object.miniGuildIcon = {'paddingRight': 4, 'paddingLeft': 2, 'justifyContent': 'center', 'alignContent': 'center'};
const env0_16 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/safety/native/TransferOwnership.tsx');
exports.default = TransferOwnership;
}
function TransferOwnership({guild, toUser}) { // fn#80010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:1118, offset: 0x01e69679, size: 1305 bytes, params: 2, frame: 38
var r9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
var property2;
var object;
var E90vgp;
var object2;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const value2 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
const styles = useStyles();
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun80015);
const [property, env0_4] = env0_4Binding(env0_5.useState(false), 2);
const defaultImport = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
const getNickname = defaultImport.getNickname;
let id = guild.id;
const value5 = Reflect.apply(getNickname, defaultImport, [id, undefined, toUser]);
const hasAvatarForGuild2 = toUser.hasAvatarForGuild(guild.id);
const closure = GuildHook;
const object4 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingTop = PX_16;
object4.paddingHorizontal = value2;
const items2 = [<Image source={importDefault(10310) /* metro dependency 10310 */} style={styles.arrow} />];
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
id = guild.id;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
let XXLARGE = AvatarSizes.XXLARGE;
const avatar = <Avatar user={currentUser} guildId={id} size={XXLARGE} />;
XXLARGE = AvatarSizes.XXLARGE;
items2[1] = <View style={styles.avatarsWrapper}>{avatar}<View style={styles.avatarFauxBorder}><Avatar user={toUser} guildId={undefined} size={XXLARGE} style={styles.otherUserAvatar} /></View></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[2] = <Text variant="text-xs/medium" color="text-default">{guild.name}</Text>;
if (value5 != null) {
format = intl.format;
E90vgp = (require(1244) /* metro dependency 1244: indexNative */).t.E90vgp;
object2 = {GuildHook: closure};
object2.user = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(toUser);
object2.AKAHook = AKAHook;
r9 = Reflect.apply(format, intl, [E90vgp, object2]);
} else if (hasAvatarForGuild2) {
format = intl.format;
E90vgp = (require(1244) /* metro dependency 1244: indexNative */).t.E90vgp;
object2 = {GuildHook: closure};
object2.user = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(toUser);
object2.AKAHook = AKAHook;
r9 = Reflect.apply(format, intl, [E90vgp, object2]);
} else {
format = intl.format;
property2 = (require(1244) /* metro dependency 1244: indexNative */).t['2XLnG0'];
object = {GuildHook: closure};
object.user = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(toUser);
r9 = Reflect.apply(format, intl, [property2, object]);
}
items2[3] = <Text variant="text-md/medium" color="text-default" key="transfer-ownership-details">{r9}</Text>;
const items3 = [<View style={styles.header}>{items2}</View>];
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const string = intl.string;
const Z5s7PM = (require(1244) /* metro dependency 1244: indexNative */).t.Z5s7PM;
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
format = intl.format;
const xm6ACJ = (require(1244) /* metro dependency 1244: indexNative */).t.xm6ACJ;
const object5 = {};
object5.username = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(toUser);
items3[1] = <TableRowGroup title={Reflect.apply(string, intl,
[Z5s7PM])} hasIcons={false}><TableCheckboxRow checked={property} label={Reflect.apply(format, intl, [xm6ACJ,
object5])} onPress={onPress_80018} /></TableRowGroup>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items3[2] = <Button onPress={function() {
return _handleTransfer.apply(this, arguments);
}} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jqqLb6)} disabled={!property} />;
return (
<ScrollView
style={styles.background}
keyboardShouldPersistTaps="handled"
alwaysBounceVertical={false}
>
<View style={object4}>
{items3}
function TransferOwnership({guild, toUser}) { // fn#80010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:1118, offset: 0x01e69679, size: 1305 bytes, params: 2, frame: 38
var r9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
var property2;
var object3;
var E90vgp;
var object5;
const useToken = UseTokenModule.useToken;
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
const value2 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_PADDING]);
const styles = useStyles();
const env0_2 = (UseNavigationNativeModule).useNavigation();
const currentUser = (FluxModule).useStateFromStores([UserStore], _fun80015);
const [property, env0_4] = env0_4Binding(ReactModule.useState(false), 2);
const defaultImport = NicknameUtils;
const getNickname = defaultImport.getNickname;
let id = guild.id;
const value5 = Reflect.apply(getNickname, defaultImport, [id, undefined, toUser]);
const hasAvatarForGuild2 = toUser.hasAvatarForGuild(guild.id);
const GuildHook2 = GuildHook;
const object7 = {};
const PX_16 = (Native).space.PX_16;
object7.paddingTop = PX_16;
object7.paddingHorizontal = value2;
const items2 = [
<Image source={Module10310} style={styles.arrow} />,
];
const Avatar = (NativeModule).Avatar;
id = guild.id;
const AvatarSizes = (NativeModule).AvatarSizes;
let XXLARGE = AvatarSizes.XXLARGE;
const avatar = (
<Avatar
user={currentUser}
guildId={id}
size={XXLARGE}
/>
);
XXLARGE = AvatarSizes.XXLARGE;
items2[1] = (
<View style={styles.avatarsWrapper}>
{avatar}
<View style={styles.avatarFauxBorder}>
<Avatar
user={toUser}
guildId={undefined}
size={XXLARGE}
style={styles.otherUserAvatar}
/>
</View>
</View>
</ScrollView>
);
}
function _handleTransfer() { // fn#80011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:1452, owner: TransferOwnership._handleTransfer, offset: 0x01e69b92, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun80013).apply(this, arguments);
}
function _fun80015() { // fn#80015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:1299, offset: 0x01e69d16, size: 58 bytes, params: 1, frame: 14
const value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
(importDefault(44) /* metro dependency 44 */)(currentUser != null,
'TransferOwnership: currentUser cannot be undefined');
return currentUser;
}
function GuildHook() { // fn#80016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:1893, owner: TransferOwnership.GuildHook, offset: 0x01e69d50, size: 223 bytes, params: 1, frame: 24
const styles = useStyles();
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const icon = guild.icon;
const value3 = null;
const r6 = value3 != icon ? <View style={styles.miniGuildIcon}>{((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XXSMALL} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}</View> : value3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<>
{r6}
<Text variant="text-md/bold">
);
const Text = (TextModule).Text;
items2[2] = (
<Text variant="text-xs/medium" color="text-default">
{guild.name}
</Text>
</>
);
}
function AKAHook() { // fn#80017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:2875, owner: TransferOwnership.AKAHook, offset: 0x01e69e2f, size: 303 bytes, params: 1, frame: 26
const value = environment.__proto__;
const styles = useStyles();
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text style={styles.aka} variant="text-sm/bold" color="text-default">{'AKA'}{' '}</Text>;
const value4 = null;
return (
<>
{text}
{env0_6 ? ((Avatar) => <Avatar style={styles.miniAvatar} user={toUser} guildId={guild.id} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XXSMALL} />)((require(1305) /* metro dependency 1305: native */).Avatar) : value4}
<Text variant="text-md/medium">
{value4 != env0_5 ? env0_5 : toUser.toString()}
</Text>
</>
);
}
function* _fun80013() { // fn#80013, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:1505, offset: 0x01e69bd2, size: 239 bytes, params: 1, frame: 18
var environment;
var binding;
var id;
var value7;
var value8;
var transferOwnership;
var id2;
var then;
if (true) {
value = environment.__proto__.__proto__;
var mfaEnabled = env2_3.mfaEnabled;
if (mfaEnabled) {
value7 = environment.__proto__.__proto__.__proto__;
binding = env3_1;
value8 = binding(env3_2[14]);
transferOwnership = value8.transferOwnership;
id = require.id;
id2 = importDefault.id;
mfaEnabled = env2_3.mfaEnabled;
value = null;
value = Reflect.apply(transferOwnership, value8, [id, id2, mfaEnabled ? env3_11.MFA : value]);
then = value.then;
binding = env3_12;
Reflect.apply(then, value, [_fun80014, binding]);
);
if (value5 != null) {
format = intl.format;
E90vgp = (require(1244) /* metro dependency 1244: indexNative */).t.E90vgp;
object5 = {GuildHook: GuildHook2};
object5.user = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(toUser);
object5.AKAHook = AKAHook;
r9 = Reflect.apply(format, intl, [E90vgp, object5]);
} else if (hasAvatarForGuild2) {
format = intl.format;
E90vgp = (require(1244) /* metro dependency 1244: indexNative */).t.E90vgp;
object5 = {GuildHook: GuildHook2};
object5.user = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(toUser);
object5.AKAHook = AKAHook;
r9 = Reflect.apply(format, intl, [E90vgp, object5]);
} else {
if (env2_3.email == null) {
value7 = environment.__proto__.__proto__.__proto__;
binding = env3_1;
value8 = binding(env3_2[14]);
transferOwnership = value8.transferOwnership;
id = require.id;
id2 = importDefault.id;
mfaEnabled = env2_3.mfaEnabled;
value = null;
value = Reflect.apply(transferOwnership, value8, [id, id2, mfaEnabled ? env3_11.MFA : value]);
then = value.then;
binding = env3_12;
Reflect.apply(then, value, [_fun80014, binding]);
return undefined;
}
binding = env3_1;
var value4 = binding(env3_2[14]);
var sendTransferOwnershipPincode = value4.sendTransferOwnershipPincode;
id = require.id;
yield Reflect.apply(sendTransferOwnershipPincode, value4, [id]);
if (false) {
return undefined;
}
var push = dependencyMap.push;
var CONFIRM_EMAIL_CODE = env3_10.CONFIRM_EMAIL_CODE;
Reflect.apply(push, dependencyMap, [CONFIRM_EMAIL_CODE]);
format = intl.format;
property2 = (require(1244) /* metro dependency 1244: indexNative */).t['2XLnG0'];
object3 = {GuildHook: GuildHook2};
object3.user = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(toUser);
r9 = Reflect.apply(format, intl, [property2, object3]);
}
items2[3] = (
<Text
variant="text-md/medium"
color="text-default"
key="transfer-ownership-details"
>
{r9}
</Text>
);
const items3 = [
<View style={styles.header}>
{items2}
</View>,
];
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const string = intl.string;
const Z5s7PM = (require(1244) /* metro dependency 1244: indexNative */).t.Z5s7PM;
const TableCheckboxRow = (TableCheckboxRowNativeModule).TableCheckboxRow;
format = intl.format;
const xm6ACJ = (require(1244) /* metro dependency 1244: indexNative */).t.xm6ACJ;
const object8 = {};
object8.username = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(toUser);
items3[1] = (
<TableRowGroup title={Reflect.apply(string, intl, [Z5s7PM])} hasIcons={false}>
<TableCheckboxRow
checked={property}
label={Reflect.apply(format, intl, [xm6ACJ, object8])}
onPress={onPress_80018}
/>
</TableRowGroup>
);
const Button = (ButtonNativeModule).Button;
items3[2] = (
<Button
onPress={function() {
return _handleTransfer.apply(this, arguments);
}}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jqqLb6)}
disabled={!property}
/>
);
return (
<ScrollView
style={styles.background}
keyboardShouldPersistTaps="handled"
alwaysBounceVertical={false}
>
<View style={object7}>
{items3}
</View>
</ScrollView>
);
function _handleTransfer() { // fn#80011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:1452, owner: TransferOwnership._handleTransfer, offset: 0x01e69b92, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun80013).apply(this, arguments);
function* _fun80013() { // fn#80013, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:1505, offset: 0x01e69bd2, size: 239 bytes, params: 1, frame: 18
var environment;
var binding;
var id;
var value7;
var value8;
var transferOwnership;
var id2;
var then;
if (true) {
value = environment.__proto__.__proto__;
var mfaEnabled = env2_3.mfaEnabled;
if (mfaEnabled) {
value7 = environment.__proto__.__proto__.__proto__;
binding = env3_1;
value8 = binding(env3_2[14]);
transferOwnership = value8.transferOwnership;
id = require.id;
id2 = importDefault.id;
mfaEnabled = env2_3.mfaEnabled;
value = null;
value = Reflect.apply(transferOwnership, value8, [id, id2, mfaEnabled ? env3_11.MFA : value]);
then = value.then;
binding = env3_12;
Reflect.apply(then, value, [_fun80014, binding]);
} else {
if (env2_3.email == null) {
value7 = environment.__proto__.__proto__.__proto__;
binding = env3_1;
value8 = binding(env3_2[14]);
transferOwnership = value8.transferOwnership;
id = require.id;
id2 = importDefault.id;
mfaEnabled = env2_3.mfaEnabled;
value = null;
value = Reflect.apply(transferOwnership, value8, [id, id2, mfaEnabled ? env3_11.MFA : value]);
then = value.then;
binding = env3_12;
Reflect.apply(then, value, [_fun80014, binding]);
return undefined;
}
binding = env3_1;
var value4 = binding(env3_2[14]);
var sendTransferOwnershipPincode = value4.sendTransferOwnershipPincode;
id = require.id;
yield Reflect.apply(sendTransferOwnershipPincode, value4, [id]);
if (false) {
return undefined;
}
var push = dependencyMap.push;
var CONFIRM_EMAIL_CODE = env3_10.CONFIRM_EMAIL_CODE;
Reflect.apply(push, dependencyMap, [CONFIRM_EMAIL_CODE]);
}
}
function _fun80014() { // fn#80014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:1613, offset: 0x01e69cc1, size: 85 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__.__proto__;
const binding = env4_1;
const binding2 = env4_2;
binding(binding2[15]).close();
binding(binding2[14]).close();
env4_0(binding2[16]).showTransferOwnershipSuccess();
}
}
}
function _fun80015() { // fn#80015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:1299, offset: 0x01e69d16, size: 58 bytes, params: 1, frame: 14
const value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
(Module00044)(currentUser != null,
'TransferOwnership: currentUser cannot be undefined');
return currentUser;
}
function GuildHook() { // fn#80016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:1893, owner: TransferOwnership.GuildHook, offset: 0x01e69d50, size: 223 bytes, params: 1, frame: 24
const styles = useStyles();
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const icon = guild.icon;
const value3 = null;
const r6 = (
value3 != icon
? (
<View style={styles.miniGuildIcon}>
{((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XXSMALL} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}
</View>
)
: value3
);
const Text = (TextModule).Text;
return (
<>
{r6}
<Text variant="text-md/bold">
{guild.name}
</Text>
</>
);
}
function AKAHook() { // fn#80017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:2875, owner: TransferOwnership.AKAHook, offset: 0x01e69e2f, size: 303 bytes, params: 1, frame: 26
const value = environment.__proto__;
const styles = useStyles();
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const Text = (TextModule).Text;
const text = (
<Text
style={styles.aka}
variant="text-sm/bold"
color="text-default"
>
{'AKA'}
{' '}
</Text>
);
const value4 = null;
return (
<>
{text}
{
env0_6
? ((Avatar) => <Avatar style={styles.miniAvatar} user={toUser} guildId={guild.id} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XXSMALL} />)((require(1305) /* metro dependency 1305: native */).Avatar)
: value4
}
<Text variant="text-md/medium">
{value4 != ReactModule ? ReactModule : toUser.toString()}
</Text>
</>
);
}
function TransferOwnershipOnPress(a0) { // fn#80018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:3565, owner: TransferOwnership.onPress, offset: 0x01e67c9c, size: 19 bytes, params: 2, frame: 11
env0_4(a0);
}
}
}
function _fun80014() { // fn#80014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10495:1613, offset: 0x01e69cc1, size: 85 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__.__proto__;
const binding = env4_1;
const binding2 = env4_2;
binding(binding2[15]).close();
binding(binding2[14]).close();
env4_0(binding2[16]).showTransferOwnershipSuccess();
}
global.__d(_fun80009, 10309, [5, 57, 31, 27, 1878, 10308, 661, 33, 4501, 697, 3860, 1484, 566, 44, 9112, 10306,
3856, 4617, 6819, 4573, 10310, 1305, 1244, 3995, 6231, 8950, 4578,
2]) /* metro module 10309, dependencies: [5, 57, 31, 27, 1878, 10308, 661, 33, 4501, 697, 3860, 1484, 566, 44, 9112, 10306, 3856, 4617, 6819, 4573, 10310, 1305, 1244, 3995, 6231, 8950, 4578, 2] */;
@@ -1,126 +1,143 @@
/* Metro module 10307; source: modules/guild_settings/safety/native/TransferOwnershipModal.tsx; dependencies: [5, 31, 10308, 33, 10306, 480, 1244, 5282, 10309, 8966, 9112, 3856, 5280, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ConfirmEmailCode from '../../../verification/native/components/ConfirmEmailCode.tsx'; /* Metro dependency 8966 */
import GuildSettingsActionCreators from '../../GuildSettingsActionCreators.tsx'; /* Metro dependency 9112 */
import TransferOwnershipModalActionCreators from './TransferOwnershipModalActionCreators.tsx'; /* Metro dependency 10306 */
import TransferOwnership from './TransferOwnership.tsx'; /* Metro dependency 10309 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AnalyticsUtilsModule from '../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ToastUtilsModule from '../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorHeaderNativeModule from '../../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
import * as TransferOwnershipConstantsModule from '../TransferOwnershipConstants.tsx'; /* Metro dependency 10308 */
function _fun79994(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:6, offset: 0x01e68e8b, size: 201 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const transferOwnershipConstantsModule = require(10308) /* metro dependency 10308: TransferOwnershipConstants */;
const env0_5 = transferOwnershipConstantsModule.TransferOwnershipModalScenes;
const env0_6 = transferOwnershipConstantsModule.TransferOwnershipVerificationTypes;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/safety/native/TransferOwnershipModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/safety/native/TransferOwnershipModal.tsx');
exports.default = TransferOwnershipModal;
}
function TransferOwnershipModal({guild, toUser}) { // fn#79996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:358, offset: 0x01e68f79, size: 175 bytes, params: 2, frame: 18
const value2 = env0_4.useMemo(function() {
return _fun79998(guild, toUser);
}, [guild, toUser]);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const TRANFSER_OWNERSHIP = TransferOwnershipModalScenes.TRANFSER_OWNERSHIP;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Navigator
screens={value2}
initialRouteName={TRANFSER_OWNERSHIP}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function _fun79997() { // fn#79997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:427, offset: 0x01e69028, size: 30 bytes, params: 1, frame: 13
return getScreens_79998(guild, toUser);
}
function getScreens_79998(a0, a1) { // fn#79998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:431, offset: 0x01e69046, size: 338 bytes, params: 3, frame: 23
var environment;
const env0_0 = a0;
const env0_1 = a1;
const object5 = {};
const value = environment.__proto__.__proto__;
const ImpressionGroups = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionGroups;
const GUILD_TRANSFER_OWNERSHIP_FLOW = ImpressionGroups.GUILD_TRANSFER_OWNERSHIP_FLOW;
object5.impression_group = GUILD_TRANSFER_OWNERSHIP_FLOW;
const object6 = {};
const TRANFSER_OWNERSHIP = TransferOwnershipModalScenes.TRANFSER_OWNERSHIP;
const object7 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
let Z5s7PM = t.Z5s7PM;
object7.headerTitle = Reflect.apply(string, intl, [Z5s7PM]);
const navigatorHeaderNativeModule = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
const getHeaderCloseButton = navigatorHeaderNativeModule.getHeaderCloseButton;
const closeModal_79995Binding = closeModal_79995;
object7.headerLeft = Reflect.apply(getHeaderCloseButton, navigatorHeaderNativeModule, [closeModal_79995Binding]);
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const GUILD_TRANSFER_OWNERSHIP = ImpressionNames.GUILD_TRANSFER_OWNERSHIP;
object7.impressionName = GUILD_TRANSFER_OWNERSHIP;
object7.impressionProperties = object5;
object7.render = render_79999;
object6[TRANFSER_OWNERSHIP] = object7;
const CONFIRM_EMAIL_CODE = TransferOwnershipModalScenes.CONFIRM_EMAIL_CODE;
const object8 = {};
string = intl.string;
Z5s7PM = t.Z5s7PM;
object8.headerTitle = Reflect.apply(string, intl, [Z5s7PM]);
object8.headerLeft = navigatorHeaderNativeModule.getHeaderCloseButton(closeModal_79995Binding);
const GUILD_TRANSFER_OWNERSHIP_CONFIRM_EMAIL_CODE = ImpressionNames.GUILD_TRANSFER_OWNERSHIP_CONFIRM_EMAIL_CODE;
object8.impressionName = GUILD_TRANSFER_OWNERSHIP_CONFIRM_EMAIL_CODE;
object8.impressionProperties = object5;
object8.render = render_80000;
object6[CONFIRM_EMAIL_CODE] = object8;
return object6;
}
function getScreens_79998Render() { // fn#79999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:763, owner: getScreens_79998.render, offset: 0x01e69198, size: 59 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guild={env0_0} toUser={require} />)(importDefault(10309) /* metro dependency 10309: TransferOwnership */);
}
function getScreens_79998Render_80000() { // fn#80000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:1037, owner: getScreens_79998.render, offset: 0x01e691d3, size: 195 bytes, params: 1, frame: 19
const ConfirmEmailCode = importDefault(8966) /* metro dependency 8966: ConfirmEmailCode */;
const defaultImportProps = {onFormSubmit: _fun80001(), onSuccess: onSuccess_80005, onResend: env3_3(_fun80007)};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let Z5s7PM = (require(1244) /* metro dependency 1244: indexNative */).t.Z5s7PM;
defaultImportProps.headerText = Reflect.apply(string, intl, [Z5s7PM]);
string = intl.string;
Z5s7PM = (require(1244) /* metro dependency 1244: indexNative */).t.Z5s7PM;
defaultImportProps.confirmButtonText = Reflect.apply(string, intl, [Z5s7PM]);
return <ConfirmEmailCode {...defaultImportProps} />;
}
function _fun80001() { // fn#80001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:1065, offset: 0x01e69296, size: 36 bytes, params: 1, frame: 12
const env0_0 = env4_3(_fun80003);
return _fun80004;
}
function renderOnSuccess_80005() { // fn#80005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:1225, owner: getScreens_79998.render.onSuccess, offset: 0x01e69327, size: 71 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__;
closeModal_79995();
(importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */).close();
(require(3856) /* metro dependency 3856: ToastUtils */).showTransferOwnershipSuccess();
}
function* _fun80007() { // fn#80007, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:1313, offset: 0x01e69379, size: 77 bytes, params: 1, frame: 15
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
value = env5_1(env5_2[10]);
yield value.sendTransferOwnershipPincode(env2_0.id, true);
function closeModal_79995() { // fn#79995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:212, offset: 0x01e68f54, size: 37 bytes, params: 1, frame: 11
(TransferOwnershipModalActionCreators).close();
}
}
function* _fun80003(a0) { // fn#80003, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:1085, offset: 0x01e692c5, size: 98 bytes, params: 2, frame: 18
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__;
var value3 = env6_1(env6_2[10]);
var transferOwnership = value3.transferOwnership;
var id = env3_0.id;
var id2 = env3_1.id;
var EMAIL = env6_6.EMAIL;
yield Reflect.apply(transferOwnership, value3, [id, id2, EMAIL, a0]);
function TransferOwnershipModal({guild, toUser}) { // fn#79996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:358, offset: 0x01e68f79, size: 175 bytes, params: 2, frame: 18
const value2 = ReactModule.useMemo(function() {
return _fun79998(guild, toUser);
}, [guild, toUser]);
const Navigator = (NavigatorNativeModule).Navigator;
const TRANFSER_OWNERSHIP = TransferOwnershipModalScenes.TRANFSER_OWNERSHIP;
const intl = (IndexNativeModule).intl;
return (
<Navigator
screens={value2}
initialRouteName={TRANFSER_OWNERSHIP}
headerBackTitle={intl.string((IndexNativeModule).t['13/7kX'])}
/>
);
function _fun79997() { // fn#79997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:427, offset: 0x01e69028, size: 30 bytes, params: 1, frame: 13
return getScreens_79998(guild, toUser);
function getScreens_79998(a0, a1) { // fn#79998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:431, offset: 0x01e69046, size: 338 bytes, params: 3, frame: 23
var environment;
const env0_0 = a0;
const env0_1 = a1;
const object = {};
const value = environment.__proto__.__proto__;
const ImpressionGroups = (AnalyticsUtilsModule).ImpressionGroups;
const GUILD_TRANSFER_OWNERSHIP_FLOW = ImpressionGroups.GUILD_TRANSFER_OWNERSHIP_FLOW;
object.impression_group = GUILD_TRANSFER_OWNERSHIP_FLOW;
const object2 = {};
const TRANFSER_OWNERSHIP = TransferOwnershipModalScenes.TRANFSER_OWNERSHIP;
const object3 = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
let Z5s7PM = t.Z5s7PM;
object3.headerTitle = Reflect.apply(string, intl, [Z5s7PM]);
const getHeaderCloseButton = NavigatorHeaderNativeModule.getHeaderCloseButton;
const closeModal_79995Binding = closeModal_79995;
object3.headerLeft = Reflect.apply(getHeaderCloseButton, NavigatorHeaderNativeModule, [closeModal_79995Binding]);
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const GUILD_TRANSFER_OWNERSHIP = ImpressionNames.GUILD_TRANSFER_OWNERSHIP;
object3.impressionName = GUILD_TRANSFER_OWNERSHIP;
object3.impressionProperties = object;
object3.render = render_79999;
object2[TRANFSER_OWNERSHIP] = object3;
const CONFIRM_EMAIL_CODE = TransferOwnershipModalScenes.CONFIRM_EMAIL_CODE;
const object4 = {};
string = intl.string;
Z5s7PM = t.Z5s7PM;
object4.headerTitle = Reflect.apply(string, intl, [Z5s7PM]);
object4.headerLeft = NavigatorHeaderNativeModule.getHeaderCloseButton(closeModal_79995Binding);
const GUILD_TRANSFER_OWNERSHIP_CONFIRM_EMAIL_CODE = ImpressionNames.GUILD_TRANSFER_OWNERSHIP_CONFIRM_EMAIL_CODE;
object4.impressionName = GUILD_TRANSFER_OWNERSHIP_CONFIRM_EMAIL_CODE;
object4.impressionProperties = object;
object4.render = render_80000;
object2[CONFIRM_EMAIL_CODE] = object4;
return object2;
function getScreens_79998Render() { // fn#79999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:763, owner: getScreens_79998.render, offset: 0x01e69198, size: 59 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component guild={env0_0} toUser={require} />)(TransferOwnership);
}
function getScreens_79998Render_80000() { // fn#80000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:1037, owner: getScreens_79998.render, offset: 0x01e691d3, size: 195 bytes, params: 1, frame: 19
const defaultImportProps = {onFormSubmit: _fun80001(), onSuccess: onSuccess_80005, onResend: env3_3(_fun80007)};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let Z5s7PM = (require(1244) /* metro dependency 1244: indexNative */).t.Z5s7PM;
defaultImportProps.headerText = Reflect.apply(string, intl, [Z5s7PM]);
string = intl.string;
Z5s7PM = (require(1244) /* metro dependency 1244: indexNative */).t.Z5s7PM;
defaultImportProps.confirmButtonText = Reflect.apply(string, intl, [Z5s7PM]);
return <ConfirmEmailCode {...defaultImportProps} />;
function _fun80001() { // fn#80001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:1065, offset: 0x01e69296, size: 36 bytes, params: 1, frame: 12
const env0_0 = env4_3(_fun80003);
return _fun80004;
function* _fun80003(a0) { // fn#80003, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:1085, offset: 0x01e692c5, size: 98 bytes, params: 2, frame: 18
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__;
var value3 = env6_1(env6_2[10]);
var transferOwnership = value3.transferOwnership;
var id = env3_0.id;
var id2 = env3_1.id;
var EMAIL = env6_6.EMAIL;
yield Reflect.apply(transferOwnership, value3, [id, id2, EMAIL, a0]);
}
}
function _fun80004() { // fn#80004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:1169, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function renderOnSuccess() { // fn#80005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:1225, owner: getScreens_79998.render.onSuccess, offset: 0x01e69327, size: 71 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__;
closeModal_79995();
(GuildSettingsActionCreators).close();
(ToastUtilsModule).showTransferOwnershipSuccess();
}
function* _fun80007() { // fn#80007, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10493:1313, offset: 0x01e69379, size: 77 bytes, params: 1, frame: 15
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
value = env5_1(env5_2[10]);
yield value.sendTransferOwnershipPincode(env2_0.id, true);
}
}
}
}
}
}
}
global.__d(_fun79994, 10307, [5, 31, 10308, 33, 10306, 480, 1244, 5282, 10309, 8966, 9112, 3856, 5280,
2]) /* metro module 10307, dependencies: [5, 31, 10308, 33, 10306, 480, 1244, 5282, 10309, 8966, 9112, 3856, 5280, 2] */;
@@ -1,28 +1,33 @@
/* Metro module 10306; source: modules/guild_settings/safety/native/TransferOwnershipModalActionCreators.tsx; dependencies: [5080, 10307, 1962, 694, 2] */
import Dispatcher from '../../../../Dispatcher.tsx'; /* Metro dependency 694 */
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun79990(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10492:6, offset: 0x01e68d57, size: 122 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {open: open_79991, close: close_79992};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/safety/native/TransferOwnershipModalActionCreators.tsx');
exports.default = object2;
}
object = {open: open_79991, close: close_79992};
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/safety/native/TransferOwnershipModalActionCreators.tsx');
exports.default = object;
function open_79991(a0, a1) { // fn#79991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10492:132, offset: 0x01e68dd1, size: 96 bytes, params: 3, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {guild: a0, toUser: a1}, 'TRANSFER_OWNERSHIP_MODAL_KEY']);
}
function open_79991(a0, a1) { // fn#79991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10492:132, offset: 0x01e68dd1, size: 96 bytes, params: 3, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {guild: a0, toUser: a1}, 'TRANSFER_OWNERSHIP_MODAL_KEY']);
}
function close_79992() { // fn#79992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10492:204, offset: 0x01e68e31, size: 47 bytes, params: 1, frame: 12
(Dispatcher).wait(_fun79993);
function _fun79993() { // fn#79993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10492:226, offset: 0x01e68e60, size: 43 bytes, params: 1, frame: 12
const value = environment.__proto__;
(ModalActionCreators).popWithKey('TRANSFER_OWNERSHIP_MODAL_KEY');
}
function close_79992() { // fn#79992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10492:204, offset: 0x01e68e31, size: 47 bytes, params: 1, frame: 12
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun79993);
}
}
function _fun79993() { // fn#79993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10492:226, offset: 0x01e68e60, size: 43 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('TRANSFER_OWNERSHIP_MODAL_KEY');
}
global.__d(_fun79990, 10306, [5080, 10307, 1962, 694,
2]) /* metro module 10306, dependencies: [5080, 10307, 1962, 694, 2] */;
@@ -1,71 +1,76 @@
/* Metro module 9115; source: modules/guild_settings/server_monetization/boost_perks/GuildSettingsVanityURLActionCreators.tsx; dependencies: [661, 507, 694, 2] */
import Dispatcher from '../../../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as HTTPUtilsModule from '../../../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
function _fun71417(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:6, offset: 0x01d1f4a2, size: 167 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/server_monetization/boost_perks/GuildSettingsVanityURLActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/server_monetization/boost_perks/GuildSettingsVanityURLActionCreators.tsx');
exports.fetchVanityUrl = fetchVanityUrl;
exports.resetCode = resetCode;
exports.setCode = setCode;
exports.saveCode = saveCode;
}
function fetchVanityUrl(a0) { // fn#71418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:262, offset: 0x01d1f549, size: 95 bytes, params: 2, frame: 14
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
object2.url = Endpoints.GUILD_VANITY_URL(a0);
return Reflect.apply(get, HTTP, [object2]).then(_fun71419);
}
function resetCode() { // fn#71420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:514, offset: 0x01d1f5fe, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_VANITY_URL_RESET'});
}
function setCode(a0) { // fn#71421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:605, offset: 0x01d1f62f, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_VANITY_URL_SET',
code: a0});
}
function saveCode(a0, a1, a2) { // fn#71422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:701, offset: 0x01d1f667, size: 127 bytes, params: 4, frame: 16
const env0_0 = a2;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const patch = HTTP.patch;
const object2 = {};
object2.url = Endpoints.GUILD_VANITY_URL(a0);
object2.body = {code: a1};
object2.oldFormErrors = true;
object2.rejectWithError = false;
return Reflect.apply(patch, HTTP, [object2]).then(_fun71423, _fun71424);
}
function _fun71419({body}) { // fn#71419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:384, offset: 0x01d1f5a8, size: 86 bytes, params: 2, frame: 16
const code = body.code;
const uses = body.uses;
const error = body.error;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'GUILD_SETTINGS_SET_VANITY_URL', code: code, uses: uses, error: error});
}
function _fun71423({body}) { // fn#71423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:837, offset: 0x01d1f6e6, size: 77 bytes, params: 2, frame: 15
const code = body.code;
const uses = body.uses;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'GUILD_SETTINGS_SET_VANITY_URL', code: code, uses: uses});
}
function _fun71424(a0) { // fn#71424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:938, offset: 0x01d1f733, size: 89 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SETTINGS_VANITY_URL_ERROR',
error: a0.body});
if (importDefault != null) {
if (importDefault.throwErr) {
throw a0;
function fetchVanityUrl(a0) { // fn#71418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:262, offset: 0x01d1f549, size: 95 bytes, params: 2, frame: 14
const HTTP = (HTTPUtilsModule).HTTP;
const get = HTTP.get;
const object = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
object.url = Endpoints.GUILD_VANITY_URL(a0);
return Reflect.apply(get, HTTP, [object]).then(_fun71419);
function _fun71419({body}) { // fn#71419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:384, offset: 0x01d1f5a8, size: 86 bytes, params: 2, frame: 16
const code = body.code;
const uses = body.uses;
const error = body.error;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'GUILD_SETTINGS_SET_VANITY_URL', code: code, uses: uses, error: error});
}
}
return a0;
function resetCode() { // fn#71420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:514, offset: 0x01d1f5fe, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_VANITY_URL_RESET'});
}
function setCode(a0) { // fn#71421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:605, offset: 0x01d1f62f, size: 56 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_VANITY_URL_SET',
code: a0});
}
function saveCode(a0, a1, a2) { // fn#71422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:701, offset: 0x01d1f667, size: 127 bytes, params: 4, frame: 16
const env0_0 = a2;
const HTTP = (HTTPUtilsModule).HTTP;
const patch = HTTP.patch;
const object = {};
object.url = Endpoints.GUILD_VANITY_URL(a0);
object.body = {code: a1};
object.oldFormErrors = true;
object.rejectWithError = false;
return Reflect.apply(patch, HTTP, [object]).then(_fun71423, _fun71424);
function _fun71423({body}) { // fn#71423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:837, offset: 0x01d1f6e6, size: 77 bytes, params: 2, frame: 15
const code = body.code;
const uses = body.uses;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'GUILD_SETTINGS_SET_VANITY_URL', code: code, uses: uses});
}
function _fun71424(a0) { // fn#71424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9300:938, offset: 0x01d1f733, size: 89 bytes, params: 2, frame: 13
const value = environment.__proto__;
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_VANITY_URL_ERROR',
error: a0.body});
if (importDefault != null) {
if (importDefault.throwErr) {
throw a0;
}
}
return a0;
}
}
}
global.__d(_fun71417, 9115, [661, 507, 694, 2]) /* metro module 9115, dependencies: [661, 507, 694, 2] */;
@@ -1,51 +1,53 @@
/* Metro module 15865; source: modules/guild_settings/server_monetization/boost_perks/GuildSettingsVanityURLUtils.tsx; dependencies: [661, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun122091(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16073:6, offset: 0x0255999f, size: 140 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_2 = constantsModule.AbortCodes;
const env0_3 = constantsModule.GuildFeatures;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/server_monetization/boost_perks/GuildSettingsVanityURLUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/server_monetization/boost_perks/GuildSettingsVanityURLUtils.tsx');
exports.getErrorMessageFromErrorCode = getErrorMessageFromErrorCode;
exports.canSeeVanityUrlSettings = canSeeVanityUrlSettings;
function getErrorMessageFromErrorCode(a0) { // fn#122092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16073:290, offset: 0x02559a2b, size: 532 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const UNKNOWN_CHANNEL = AbortCodes.UNKNOWN_CHANNEL;
if (UNKNOWN_CHANNEL === a0) {
return intl.string(t.ETCmRa);
}
const INVALID_PERMISSIONS = AbortCodes.INVALID_PERMISSIONS;
if (INVALID_PERMISSIONS === a0) {
return intl.string(t.lXtut1);
}
const INVALID_ACCESS = AbortCodes.INVALID_ACCESS;
if (INVALID_ACCESS === a0) {
return intl.string(t.TAXOKw);
}
const VANITY_URL_REQUIRED_FOR_PUBLISHED_GUILDS = AbortCodes.VANITY_URL_REQUIRED_FOR_PUBLISHED_GUILDS;
if (VANITY_URL_REQUIRED_FOR_PUBLISHED_GUILDS === a0) {
return intl.string(t.ZpuxVs);
}
const VANITY_URL_EMPLOYEE_ONLY_GUILD_DISABLED = AbortCodes.VANITY_URL_EMPLOYEE_ONLY_GUILD_DISABLED;
if (VANITY_URL_EMPLOYEE_ONLY_GUILD_DISABLED === a0) {
return intl.string(t.tSBmIv);
}
const VANITY_URL_REQUIREMENTS_NOT_MET = AbortCodes.VANITY_URL_REQUIREMENTS_NOT_MET;
if (VANITY_URL_REQUIREMENTS_NOT_MET === a0) {
return intl.string(t['w+yGQT']);
}
return intl.string(t.ckQidX);
}
function canSeeVanityUrlSettings(a0) { // fn#122093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16073:901, offset: 0x02559c3f, size: 81 bytes, params: 2, frame: 13
const features = a0.features;
const has = features.has;
const VANITY_URL = GuildFeatures.VANITY_URL;
return Reflect.apply(has, features,
[VANITY_URL]) || a0.features.has(GuildFeatures.GUILD_WEB_PAGE_VANITY_URL) && a0.vanityURLCode != null;
}
}
function getErrorMessageFromErrorCode(a0) { // fn#122092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16073:290, offset: 0x02559a2b, size: 532 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const UNKNOWN_CHANNEL = AbortCodes.UNKNOWN_CHANNEL;
if (UNKNOWN_CHANNEL === a0) {
return intl.string(t.ETCmRa);
}
const INVALID_PERMISSIONS = AbortCodes.INVALID_PERMISSIONS;
if (INVALID_PERMISSIONS === a0) {
return intl.string(t.lXtut1);
}
const INVALID_ACCESS = AbortCodes.INVALID_ACCESS;
if (INVALID_ACCESS === a0) {
return intl.string(t.TAXOKw);
}
const VANITY_URL_REQUIRED_FOR_PUBLISHED_GUILDS = AbortCodes.VANITY_URL_REQUIRED_FOR_PUBLISHED_GUILDS;
if (VANITY_URL_REQUIRED_FOR_PUBLISHED_GUILDS === a0) {
return intl.string(t.ZpuxVs);
}
const VANITY_URL_EMPLOYEE_ONLY_GUILD_DISABLED = AbortCodes.VANITY_URL_EMPLOYEE_ONLY_GUILD_DISABLED;
if (VANITY_URL_EMPLOYEE_ONLY_GUILD_DISABLED === a0) {
return intl.string(t.tSBmIv);
}
const VANITY_URL_REQUIREMENTS_NOT_MET = AbortCodes.VANITY_URL_REQUIREMENTS_NOT_MET;
if (VANITY_URL_REQUIREMENTS_NOT_MET === a0) {
return intl.string(t['w+yGQT']);
}
return intl.string(t.ckQidX);
}
function canSeeVanityUrlSettings(a0) { // fn#122093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16073:901, offset: 0x02559c3f, size: 81 bytes, params: 2, frame: 13
const features = a0.features;
const has = features.has;
const VANITY_URL = GuildFeatures.VANITY_URL;
return Reflect.apply(has, features,
[VANITY_URL]) || a0.features.has(GuildFeatures.GUILD_WEB_PAGE_VANITY_URL) && a0.vanityURLCode != null;
}
global.__d(_fun122091, 15865, [661, 1244, 2]) /* metro module 15865, dependencies: [661, 1244, 2] */;
@@ -1,296 +1,345 @@
/* Metro module 15979; source: modules/guild_settings/server_monetization/boost_perks/native/GuildSettingsModalVanityURL.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 15980, 1867, 9113, 661, 33, 4501, 697, 15981, 5282, 5277, 1244, 7147, 4573, 15865, 7981, 15982, 1484, 566, 5462, 2] */
import ClassCallCheck from '../../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildSettingsStore from '../../../GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import ChangeVanityURLModalStore from '../../../../../stores/ChangeVanityURLModalStore.tsx'; /* Metro dependency 15980 */
import ChangeVanityURLActionCreators from '../../../../../actions/ChangeVanityURLActionCreators.tsx'; /* Metro dependency 15981 */
import Module15982 from '../../../../../by-id/module-15982.js'; /* Metro dependency 15982 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as HeaderActionButtonNativeModule from '../../../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as NavigatorHeaderNativeModule from '../../../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
import * as TextInputNativeModule from '../../../../../design/components/TextInput/native/TextInput.native.tsx'; /* Metro dependency 7981 */
function _fun123585(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:6, offset: 0x02594708, size: 569 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(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_8 = value2.View;
const env0_9 = value2.Image;
const changeVanityURLModalStore = importDefault(15980) /* metro dependency 15980: ChangeVanityURLModalStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
const env0_13 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
const value3 = require(33) /* metro dependency 33 */;
const env0_14 = value3.jsx;
const env0_15 = value3.jsxs;
const env0_16 = value3.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.wrapper = {'flex': 1, 'justifyContent': 'space-between', paddingTop: PX_32};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.section = {paddingHorizontal: PX_12};
const object3 = {};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.marginTop = PX_8;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.gap = PX_4;
object2.hints = object3;
object2.center = {'alignItems': 'center', 'flexDirection': 'column'};
object2.image = {'width': 135, 'height': 183, 'marginBottom': 27};
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object2]);
const PureComponent = value.PureComponent;
const createStyles = CreateStylesModule.createStyles;
object = {};
const PX_32 = (Native).space.PX_32;
object.wrapper = {'flex': 1, 'justifyContent': 'space-between', paddingTop: PX_32};
const PX_12 = (Native).space.PX_12;
object.section = {paddingHorizontal: PX_12};
const object4 = {};
const PX_8 = (Native).space.PX_8;
object4.marginTop = PX_8;
const PX_4 = (Native).space.PX_4;
object4.gap = PX_4;
object.hints = object4;
object.center = {'alignItems': 'center', 'flexDirection': 'column'};
object.image = {'width': 135, 'height': 183, 'marginBottom': 27};
const env0_17 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const PureComponent = ReactModule.PureComponent;
const env0_18 = _fun123589(PureComponent);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/server_monetization/boost_perks/native/GuildSettingsModalVanityURL.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/server_monetization/boost_perks/native/GuildSettingsModalVanityURL.tsx');
exports.default = ConnectedGuildSettingsModalVanityURL;
}
function _isNativeReflectConstruct_123586() { // fn#123586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:283, offset: 0x02594941, 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_123586_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun123589(a0) { // fn#123589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:797, offset: 0x025949a3, size: 172 bytes, params: 2, frame: 16
const closure = GuildSettingsModalVanityURL;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentDidMount', value: function() {
this.updateNavigator(undefined, this.state);
}}, {key: 'componentDidUpdate', value: function(a0, a1) {
if (this.props.vanityURLCode !== a0.vanityURLCode) {
this.setState({vanityURLCode: this.props.vanityURLCode ?? ''});
}
this.updateNavigator(a0, a1);
}}, {key: 'updateNavigator', value: value_123598}, {key: 'componentWillUnmount', value: value_123603},
{key: 'render', value: value_123604}]);
}
function ConnectedGuildSettingsModalVanityURL({guildId, contentContainerStyle}) { // fn#123605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:3997, offset: 0x0259533b, size: 323 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const vanityURLCode = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore],
function() {
return GuildSettingsStore.getProps().vanityURLCode;
});
const {submitting,
errorDetails} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChangeVanityURLModalStore],
_fun123608);
return guild != null ? <>{((Component) => <Component guild={guild} vanityURLCode={vanityURLCode} submitting={submitting} errorDetails={errorDetails} navigation={value2} styles={styles} contentContainerStyle={contentContainerStyle} />)(env0_18)}{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}</> : null;
}
function GuildSettingsModalVanityURL(a0) { // fn#123590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:809, offset: 0x02594a4f, size: 231 bytes, params: 2, frame: 20
var environment;
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let value2 = environment.__proto__;
let binding = env1_3;
binding(this, GuildSettingsModalVanityURL);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(GuildSettingsModalVanityURL);
binding = env1_5;
if (_isNativeReflectConstruct_123586()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.state = {isEditing: false, vanityURLCode: value.props.vanityURLCode ?? ''};
value.handleStartEditing = handleStartEditing;
value.handleChange = handleChange_123592;
value.handleCancel = function() {
var Promise = global.Promise;
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
var value2 = new Promise(_fun123594);
return value2 instanceof Object ? value2 : value;
};
value.handleSave = handleSave;
return value;
}
function value_123598(a0, a1) { // fn#123598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:1901, offset: 0x02594cf2, size: 195 bytes, params: 3, frame: 20
var environment;
var r6;
var setOptions;
var value2;
const {submitting, navigation} = this.props;
const isEditing = this.state.isEditing;
let value = a0 != null;
if (!(value && submitting === a0.submitting && isEditing === a1.isEditing)) {
setOptions = navigation.setOptions;
if (submitting) {
r6 = function() {
return null;
function _isNativeReflectConstruct_123586() { // fn#123586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:283, offset: 0x02594941, 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() {
};
} else {
value = undefined;
if (isEditing) {
value2 = environment.__proto__;
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
value = value.getHeaderConditionalBackButton(this.handleCancel);
r6 = value;
} else {
r6 = value;
}
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
Reflect.apply(setOptions, navigation, [{headerLeft: r6,
headerRight: submitting ? _fun123600 : isEditing ? _fun123601 : _fun123602}]);
return (_isNativeReflectConstruct_123586_isNativeReflectConstruct = function() {
return !!result;
})();
}
}
function value_123603() { // fn#123603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:2455, offset: 0x02594ec4, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(15981) /* metro dependency 15981: ChangeVanityURLActionCreators */).closeModal();
}
function _fun123589(a0) { // fn#123589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:797, offset: 0x025949a3, size: 172 bytes, params: 2, frame: 16
const GuildSettingsModalVanityURL2 = GuildSettingsModalVanityURL;
Inherits(GuildSettingsModalVanityURL2, a0);
return CreateClass(GuildSettingsModalVanityURL2, [{key: 'componentDidMount', value: function() {
this.updateNavigator(undefined, this.state);
}}, {key: 'componentDidUpdate', value: function(a0, a1) {
if (this.props.vanityURLCode !== a0.vanityURLCode) {
this.setState({vanityURLCode: this.props.vanityURLCode ?? ''});
}
this.updateNavigator(a0, a1);
}}, {key: 'updateNavigator', value: value_123598}, {key: 'componentWillUnmount', value: value_123603},
{key: 'render', value: value_123604}]);
function GuildSettingsModalVanityURL(a0) { // fn#123590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:809, offset: 0x02594a4f, size: 231 bytes, params: 2, frame: 20
var environment;
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let value2 = environment.__proto__;
let binding = env1_3;
binding(this, GuildSettingsModalVanityURL);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(GuildSettingsModalVanityURL);
binding = env1_5;
if (_isNativeReflectConstruct_123586()) {
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.state = {isEditing: false, vanityURLCode: value.props.vanityURLCode ?? ''};
value.handleStartEditing = handleStartEditing;
value.handleChange = handleChange_123592;
value.handleCancel = function() {
var Promise = global.Promise;
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
var value2 = new Promise(_fun123594);
return value2 instanceof Object ? value2 : value;
};
value.handleSave = handleSave_123595;
return value;
function handleStartEditing() { // fn#123591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:1173, owner: GuildSettingsModalVanityURL.handleStartEditing, offset: 0x02594b36, size: 92 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(15981) /* metro dependency 15981: ChangeVanityURLActionCreators */;
const openModal = value.openModal;
const binding = env0_0;
Reflect.apply(openModal, value, [binding.props.guild.id, binding.state.vanityURLCode]);
binding.setState({isEditing: true});
}
function value_123604() { // fn#123604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:2510, offset: 0x02594ee9, size: 1106 bytes, params: 1, frame: 31
var r7;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value8;
var moduleValue;
const {errorDetails, guild, styles} = this.props;
const {isEditing, vanityURLCode} = this.state;
const value = undefined;
const r8 = vanityURLCode != null ? vanityURLCode === '' ? value : <Text variant="text-sm/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.FcGpNU,
{url: (importDefault(7147) /* metro dependency 7147: getInviteURL */)(vanityURLCode)})}</Text> : value;
const r14 = isEditing ? vanityURLCode : vanityURLCode !== '' ? 'discord.gg/' + vanityURLCode : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['FaXGO/']);
if (errorDetails != null) {
value8 = environment.__proto__;
moduleValue = require(15865) /* metro dependency 15865: GuildSettingsVanityURLUtils */;
r7 = moduleValue.getErrorMessageFromErrorCode(errorDetails.code);
} else {
r7 = value;
}
let r9 = (guild == null ? value : guild.features.has(GuildFeatures.GUILD_WEB_PAGE_VANITY_URL)) === true && (guild == null ? value : guild.features.has(GuildFeatures.VANITY_URL)) !== true;
const items2 = [styles.wrapper];
items2[1] = this.props.contentContainerStyle;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const textInput = <TextInput isDisabled={!isEditing} value={r14} onChange={this.handleChange} autoFocus={isEditing} errorMessage={r7} />;
const string = intl.string;
const IhWDcu = (require(1244) /* metro dependency 1244: indexNative */).t.IhWDcu;
const items3 = [<Text variant="text-sm/medium" color="text-muted">{Reflect.apply(string, intl, [IhWDcu])}</Text>];
items3[1] = <Text variant="text-sm/medium" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1mRkFr'])}</Text>;
items3[2] = <Text variant="text-sm/medium" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eH/HMz'])}</Text>;
r9 = r9 && <Text variant="text-sm/medium" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.o3kmm3)}</Text>;
items3[3] = r9;
items3[4] = r8;
return (
<View style={items2}>
<View style={styles.section}>
{textInput}
<View style={styles.hints}>
{items3}
</View>
</View>
<View style={styles.center}>
<Image
source={importDefault(15982) /* metro dependency 15982 */}
style={styles.image}
resizeMode="contain"
function GuildSettingsModalVanityURLHandleChange(a0) { // fn#123592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:1280, owner: GuildSettingsModalVanityURL.handleChange, offset: 0x02594b92, size: 32 bytes, params: 2, frame: 12
env0_0.setState({vanityURLCode: a0});
}
function GuildSettingsModalVanityURLHandleCancel() { // fn#123593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:1330, owner: GuildSettingsModalVanityURL.handleCancel, offset: 0x02594bb2, size: 39 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun123594);
return promise instanceof Object ? promise : value;
function _fun123594(a0) { // fn#123594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:1347, offset: 0x02594bd9, size: 74 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__.__proto__;
(ChangeVanityURLActionCreators).closeModal();
value = environment.__proto__;
env1_0.setState({isEditing: false});
a0(true);
}
}
function GuildSettingsModalVanityURLHandleSave() { // fn#123595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:1422, owner: GuildSettingsModalVanityURL.handleSave, offset: 0x02594c23, size: 92 bytes, params: 1, frame: 14
const binding = env0_0;
binding.setState({isEditing: false});
let value = environment.__proto__.__proto__;
value = importDefault(15981) /* metro dependency 15981: ChangeVanityURLActionCreators */;
value.changeVanityURL(binding.props.guild.id, binding.state.vanityURLCode);
}
}
function value_123598(a0, a1) { // fn#123598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:1901, offset: 0x02594cf2, size: 195 bytes, params: 3, frame: 20
var environment;
var r6;
var setOptions;
var value2;
const {submitting, navigation} = this.props;
const isEditing = this.state.isEditing;
let value = a0 != null;
if (!(value && submitting === a0.submitting && isEditing === a1.isEditing)) {
setOptions = navigation.setOptions;
if (submitting) {
r6 = function() {
return null;
};
} else {
value = undefined;
if (isEditing) {
value2 = environment.__proto__;
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
value = value.getHeaderConditionalBackButton(this.handleCancel);
r6 = value;
} else {
r6 = value;
}
}
Reflect.apply(setOptions, navigation, [{headerLeft: r6,
headerRight: submitting ? _fun123600 : isEditing ? _fun123601 : _fun123602}]);
}
function _fun123600() { // fn#123600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:2147, offset: 0x02594db5, size: 45 bytes, params: 1, frame: 13
const HeaderSubmittingIndicator = (NavigatorHeaderNativeModule).HeaderSubmittingIndicator;
return <HeaderSubmittingIndicator />;
}
function _fun123601() { // fn#123601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:2194, offset: 0x02594de2, size: 113 bytes, params: 1, frame: 18
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const handleSave = env0_0.handleSave;
const intl = (IndexNativeModule).intl;
return (
<HeaderActionButton
onPress={handleSave}
text={intl.string((IndexNativeModule).t['R3BPH+'])}
/>
);
}
function _fun123602() { // fn#123602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:2303, offset: 0x02594e53, size: 113 bytes, params: 1, frame: 18
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const handleStartEditing = env0_0.handleStartEditing;
const intl = (IndexNativeModule).intl;
return (
<HeaderActionButton
onPress={handleStartEditing}
text={intl.string((IndexNativeModule).t.bt75uw)}
/>
);
}
}
function value_123603() { // fn#123603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:2455, offset: 0x02594ec4, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ChangeVanityURLActionCreators).closeModal();
}
function value_123604() { // fn#123604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:2510, offset: 0x02594ee9, size: 1106 bytes, params: 1, frame: 31
var r7;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value8;
var moduleValue;
const {errorDetails, guild, styles} = this.props;
const {isEditing, vanityURLCode} = this.state;
const value = undefined;
const r8 = (
vanityURLCode != null
? (
vanityURLCode === ''
? value
: (
<Text variant="text-sm/medium" color="text-muted">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.FcGpNU,
{url: (importDefault(7147) /* metro dependency 7147: getInviteURL */)(vanityURLCode)})}
</Text>
)
)
: value
);
const r14 = isEditing ? vanityURLCode : vanityURLCode !== '' ? 'discord.gg/' + vanityURLCode : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['FaXGO/']);
if (errorDetails != null) {
value8 = environment.__proto__;
moduleValue = require(15865) /* metro dependency 15865: GuildSettingsVanityURLUtils */;
r7 = moduleValue.getErrorMessageFromErrorCode(errorDetails.code);
} else {
r7 = value;
}
let r9 = (guild == null ? value : guild.features.has(GuildFeatures.GUILD_WEB_PAGE_VANITY_URL)) === true && (guild == null ? value : guild.features.has(GuildFeatures.VANITY_URL)) !== true;
const items2 = [styles.wrapper];
items2[1] = this.props.contentContainerStyle;
const TextInput = (TextInputNativeModule).TextInput;
const textInput = (
<TextInput
isDisabled={!isEditing}
value={r14}
onChange={this.handleChange}
autoFocus={isEditing}
errorMessage={r7}
/>
</View>
</View>
);
}
);
const string = intl.string;
const IhWDcu = (require(1244) /* metro dependency 1244: indexNative */).t.IhWDcu;
const items3 = [
<Text variant="text-sm/medium" color="text-muted">
{Reflect.apply(string, intl, [IhWDcu])}
</Text>,
];
items3[1] = (
<Text variant="text-sm/medium" color="text-muted">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1mRkFr'])}
</Text>
);
items3[2] = (
<Text variant="text-sm/medium" color="text-muted">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eH/HMz'])}
</Text>
);
r9 = r9 && <Text variant="text-sm/medium" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.o3kmm3)}</Text>;
items3[3] = r9;
items3[4] = r8;
return (
<View style={items2}>
<View style={styles.section}>
{textInput}
<View style={styles.hints}>
{items3}
</View>
</View>
<View style={styles.center}>
<Image
source={Module15982}
style={styles.image}
resizeMode="contain"
/>
</View>
</View>
);
}
function _fun123608() { // fn#123608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:4281, offset: 0x02595497, size: 43 bytes, params: 1, frame: 10
let value = environment.__proto__;
value = ChangeVanityURLModalStore.getProps();
return {submitting: value.submitting, errorDetails: value.errorDetails};
}
}
function handleStartEditing() { // fn#123591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:1173, owner: GuildSettingsModalVanityURL.handleStartEditing, offset: 0x02594b36, size: 92 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(15981) /* metro dependency 15981: ChangeVanityURLActionCreators */;
const openModal = value.openModal;
const binding = env0_0;
Reflect.apply(openModal, value, [binding.props.guild.id, binding.state.vanityURLCode]);
binding.setState({isEditing: true});
}
function ConnectedGuildSettingsModalVanityURL({guildId, contentContainerStyle}) { // fn#123605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:3997, offset: 0x0259533b, size: 323 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (UseNavigationNativeModule).useNavigation();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const vanityURLCode = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore],
function() {
return GuildSettingsStore.getProps().vanityURLCode;
});
const {submitting,
errorDetails} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChangeVanityURLModalStore],
_fun123608);
return (
guild != null
? (
<>
{((Component) => <Component guild={guild} vanityURLCode={vanityURLCode} submitting={submitting} errorDetails={errorDetails} navigation={value2} styles={styles} contentContainerStyle={contentContainerStyle} />)(env0_18)}
{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}
</>
)
: null
);
function _fun123608() { // fn#123608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:4281, offset: 0x02595497, size: 43 bytes, params: 1, frame: 10
let value = environment.__proto__;
value = ChangeVanityURLModalStore.getProps();
return {submitting: value.submitting, errorDetails: value.errorDetails};
}
function GuildSettingsModalVanityURLHandleChange(a0) { // fn#123592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:1280, owner: GuildSettingsModalVanityURL.handleChange, offset: 0x02594b92, size: 32 bytes, params: 2, frame: 12
env0_0.setState({vanityURLCode: a0});
}
}
function GuildSettingsModalVanityURLHandleCancel() { // fn#123593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:1330, owner: GuildSettingsModalVanityURL.handleCancel, offset: 0x02594bb2, size: 39 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun123594);
return promise instanceof Object ? promise : value;
}
function GuildSettingsModalVanityURLHandleSave() { // fn#123595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:1422, owner: GuildSettingsModalVanityURL.handleSave, offset: 0x02594c23, size: 92 bytes, params: 1, frame: 14
const binding = env0_0;
binding.setState({isEditing: false});
let value = environment.__proto__.__proto__;
value = importDefault(15981) /* metro dependency 15981: ChangeVanityURLActionCreators */;
value.changeVanityURL(binding.props.guild.id, binding.state.vanityURLCode);
}
function _fun123600() { // fn#123600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:2147, offset: 0x02594db5, size: 45 bytes, params: 1, frame: 13
const HeaderSubmittingIndicator = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).HeaderSubmittingIndicator;
return <HeaderSubmittingIndicator />;
}
function _fun123601() { // fn#123601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:2194, offset: 0x02594de2, size: 113 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const handleSave = env0_0.handleSave;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HeaderActionButton
onPress={handleSave}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+'])}
/>
);
}
function _fun123602() { // fn#123602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:2303, offset: 0x02594e53, size: 113 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const handleStartEditing = env0_0.handleStartEditing;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HeaderActionButton
onPress={handleStartEditing}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bt75uw)}
/>
);
}
function _fun123594(a0) { // fn#123594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16187:1347, offset: 0x02594bd9, size: 74 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__.__proto__;
(importDefault(15981) /* metro dependency 15981: ChangeVanityURLActionCreators */).closeModal();
value = environment.__proto__;
env1_0.setState({isEditing: false});
a0(true);
}
global.__d(_fun123585, 15979, [6, 7, 15, 17, 18, 31, 27, 15980, 1867, 9113, 661, 33, 4501, 697, 15981, 5282, 5277,
1244, 7147, 4573, 15865, 7981, 15982, 1484, 566, 5462,
2]) /* metro module 15979, dependencies: [6, 7, 15, 17, 18, 31, 27, 15980, 1867, 9113, 661, 33, 4501, 697, 15981, 5282, 5277, 1244, 7147, 4573, 15865, 7981, 15982, 1484, 566, 5462, 2] */;
@@ -1,289 +1,296 @@
/* Metro module 2192; source: modules/guild_settings/server_monetization/guild_theme/web/GuildSettingsGuildTheme.messages.js; dependencies: [1247, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 1282, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as AssetJsonUtilsModule from '../../../../asset_json/native/AssetJsonUtils.tsx'; /* Metro dependency 1247 */
import * as Module01282Module from '../../../../../by-id/module-01282.js'; /* Metro dependency 1282 */
function _fun22540(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#22540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:6, offset: 0x00f031de, size: 453 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {bg: bg_22541, cs: cs_22543, da: da_22545, de: de_22547, el: el_22549};
object2['en-GB'] = _fun22551;
object2['es-419'] = _fun22553;
object2['es-ES'] = _fun22555;
object2.fi = fi_22557;
object2.fr = fr_22559;
object2.hi = hi_22561;
object2.hr = hr_22563;
object2.hu = hu_22565;
object2.it = it_22567;
object2.ja = ja_22569;
object2.ko = ko_22571;
object2.lt = lt_22573;
object2.nl = nl_22575;
object2.no = no_22577;
object2.pl = pl_22579;
object2['pt-BR'] = _fun22581;
object2.ro = ro_22583;
object2.ru = ru_22585;
object2['sv-SE'] = _fun22587;
object2.th = th_22589;
object2.tr = tr_22591;
object2.uk = uk_22593;
object2.vi = vi_22595;
object2['zh-CN'] = _fun22597;
object2['zh-TW'] = _fun22599;
object2['en-US'] = _fun22601;
let value = require(1282) /* metro dependency 1282 */;
value = value.createLoader(object2, 'en-US');
const messagesProxy = (require(1282) /* metro dependency 1282 */).makeMessagesProxy(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/server_monetization/guild_theme/web/GuildSettingsGuildTheme.messages.js');
object = {bg: bg_22541, cs: cs_22543, da: da_22545, de: de_22547, el: el_22549};
object['en-GB'] = _fun22551;
object['es-419'] = _fun22553;
object['es-ES'] = _fun22555;
object.fi = fi_22557;
object.fr = fr_22559;
object.hi = hi_22561;
object.hr = hr_22563;
object.hu = hu_22565;
object.it = it_22567;
object.ja = ja_22569;
object.ko = ko_22571;
object.lt = lt_22573;
object.nl = nl_22575;
object.no = no_22577;
object.pl = pl_22579;
object['pt-BR'] = _fun22581;
object.ro = ro_22583;
object.ru = ru_22585;
object['sv-SE'] = _fun22587;
object.th = th_22589;
object.tr = tr_22591;
object.uk = uk_22593;
object.vi = vi_22595;
object['zh-CN'] = _fun22597;
object['zh-TW'] = _fun22599;
object['en-US'] = _fun22601;
let value = Module01282Module;
value = value.createLoader(object, 'en-US');
const messagesProxy = (Module01282Module).makeMessagesProxy(value);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/server_monetization/guild_theme/web/GuildSettingsGuildTheme.messages.js');
exports.default = messagesProxy;
exports.messagesLoader = value;
function bg_22541() { // fn#22541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:102, offset: 0x00f033a3, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2193) /* metro dependency 2193 */);
return value.then(function(a0) {
return {default: a0};
});
}
function cs_22543() { // fn#22543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:165, offset: 0x00f033e4, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2194) /* metro dependency 2194 */);
return value.then(function(a0) {
return {default: a0};
});
}
function da_22545() { // fn#22545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:228, offset: 0x00f03425, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2195) /* metro dependency 2195 */);
return value.then(function(a0) {
return {default: a0};
});
}
function de_22547() { // fn#22547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:291, offset: 0x00f03466, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2196) /* metro dependency 2196 */);
return value.then(function(a0) {
return {default: a0};
});
}
function el_22549() { // fn#22549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:354, offset: 0x00f034a7, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2197) /* metro dependency 2197 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22551() { // fn#22551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:422, offset: 0x00f034e8, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2198) /* metro dependency 2198 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22553() { // fn#22553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:491, offset: 0x00f03529, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2199) /* metro dependency 2199 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22555() { // fn#22555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:559, offset: 0x00f0356a, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2200) /* metro dependency 2200 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fi_22557() { // fn#22557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:622, offset: 0x00f035ab, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2201) /* metro dependency 2201 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fr_22559() { // fn#22559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:685, offset: 0x00f035ec, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2202) /* metro dependency 2202 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hi_22561() { // fn#22561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:749, offset: 0x00f0362d, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2203) /* metro dependency 2203 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hr_22563() { // fn#22563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:813, offset: 0x00f0366e, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2204) /* metro dependency 2204 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hu_22565() { // fn#22565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:877, offset: 0x00f036af, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2205) /* metro dependency 2205 */);
return value.then(function(a0) {
return {default: a0};
});
}
function it_22567() { // fn#22567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:941, offset: 0x00f036f0, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2206) /* metro dependency 2206 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ja_22569() { // fn#22569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1005, offset: 0x00f03731, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2207) /* metro dependency 2207 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ko_22571() { // fn#22571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1069, offset: 0x00f03772, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2208) /* metro dependency 2208 */);
return value.then(function(a0) {
return {default: a0};
});
}
function lt_22573() { // fn#22573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1133, offset: 0x00f037b3, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2209) /* metro dependency 2209 */);
return value.then(function(a0) {
return {default: a0};
});
}
function nl_22575() { // fn#22575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1197, offset: 0x00f037f4, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2210) /* metro dependency 2210 */);
return value.then(function(a0) {
return {default: a0};
});
}
function no_22577() { // fn#22577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1261, offset: 0x00f03835, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2211) /* metro dependency 2211 */);
return value.then(function(a0) {
return {default: a0};
});
}
function pl_22579() { // fn#22579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1325, offset: 0x00f03876, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2212) /* metro dependency 2212 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22581() { // fn#22581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1394, offset: 0x00f038b7, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2213) /* metro dependency 2213 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ro_22583() { // fn#22583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1458, offset: 0x00f038f8, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2214) /* metro dependency 2214 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ru_22585() { // fn#22585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1522, offset: 0x00f03939, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2215) /* metro dependency 2215 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22587() { // fn#22587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1591, offset: 0x00f0397a, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2216) /* metro dependency 2216 */);
return value.then(function(a0) {
return {default: a0};
});
}
function th_22589() { // fn#22589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1655, offset: 0x00f039bb, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2217) /* metro dependency 2217 */);
return value.then(function(a0) {
return {default: a0};
});
}
function tr_22591() { // fn#22591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1719, offset: 0x00f039fc, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2218) /* metro dependency 2218 */);
return value.then(function(a0) {
return {default: a0};
});
}
function uk_22593() { // fn#22593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1783, offset: 0x00f03a3d, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2219) /* metro dependency 2219 */);
return value.then(function(a0) {
return {default: a0};
});
}
function vi_22595() { // fn#22595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1847, offset: 0x00f03a7e, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2220) /* metro dependency 2220 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22597() { // fn#22597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1916, offset: 0x00f03abf, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2221) /* metro dependency 2221 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22599() { // fn#22599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1985, offset: 0x00f03b00, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2222) /* metro dependency 2222 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22601() { // fn#22601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:2054, offset: 0x00f03b41, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2223) /* metro dependency 2223 */);
return value.then(function(a0) {
return {default: a0};
});
}
}
function bg_22541() { // fn#22541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:102, offset: 0x00f033a3, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2193) /* metro dependency 2193 */);
return value.then(function(a0) {
return {default: a0};
});
}
function cs_22543() { // fn#22543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:165, offset: 0x00f033e4, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2194) /* metro dependency 2194 */);
return value.then(function(a0) {
return {default: a0};
});
}
function da_22545() { // fn#22545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:228, offset: 0x00f03425, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2195) /* metro dependency 2195 */);
return value.then(function(a0) {
return {default: a0};
});
}
function de_22547() { // fn#22547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:291, offset: 0x00f03466, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2196) /* metro dependency 2196 */);
return value.then(function(a0) {
return {default: a0};
});
}
function el_22549() { // fn#22549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:354, offset: 0x00f034a7, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2197) /* metro dependency 2197 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22551() { // fn#22551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:422, offset: 0x00f034e8, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2198) /* metro dependency 2198 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22553() { // fn#22553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:491, offset: 0x00f03529, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2199) /* metro dependency 2199 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22555() { // fn#22555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:559, offset: 0x00f0356a, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2200) /* metro dependency 2200 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fi_22557() { // fn#22557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:622, offset: 0x00f035ab, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2201) /* metro dependency 2201 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fr_22559() { // fn#22559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:685, offset: 0x00f035ec, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2202) /* metro dependency 2202 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hi_22561() { // fn#22561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:749, offset: 0x00f0362d, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2203) /* metro dependency 2203 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hr_22563() { // fn#22563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:813, offset: 0x00f0366e, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2204) /* metro dependency 2204 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hu_22565() { // fn#22565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:877, offset: 0x00f036af, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2205) /* metro dependency 2205 */);
return value.then(function(a0) {
return {default: a0};
});
}
function it_22567() { // fn#22567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:941, offset: 0x00f036f0, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2206) /* metro dependency 2206 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ja_22569() { // fn#22569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1005, offset: 0x00f03731, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2207) /* metro dependency 2207 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ko_22571() { // fn#22571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1069, offset: 0x00f03772, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2208) /* metro dependency 2208 */);
return value.then(function(a0) {
return {default: a0};
});
}
function lt_22573() { // fn#22573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1133, offset: 0x00f037b3, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2209) /* metro dependency 2209 */);
return value.then(function(a0) {
return {default: a0};
});
}
function nl_22575() { // fn#22575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1197, offset: 0x00f037f4, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2210) /* metro dependency 2210 */);
return value.then(function(a0) {
return {default: a0};
});
}
function no_22577() { // fn#22577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1261, offset: 0x00f03835, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2211) /* metro dependency 2211 */);
return value.then(function(a0) {
return {default: a0};
});
}
function pl_22579() { // fn#22579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1325, offset: 0x00f03876, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2212) /* metro dependency 2212 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22581() { // fn#22581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1394, offset: 0x00f038b7, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2213) /* metro dependency 2213 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ro_22583() { // fn#22583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1458, offset: 0x00f038f8, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2214) /* metro dependency 2214 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ru_22585() { // fn#22585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1522, offset: 0x00f03939, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2215) /* metro dependency 2215 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22587() { // fn#22587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1591, offset: 0x00f0397a, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2216) /* metro dependency 2216 */);
return value.then(function(a0) {
return {default: a0};
});
}
function th_22589() { // fn#22589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1655, offset: 0x00f039bb, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2217) /* metro dependency 2217 */);
return value.then(function(a0) {
return {default: a0};
});
}
function tr_22591() { // fn#22591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1719, offset: 0x00f039fc, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2218) /* metro dependency 2218 */);
return value.then(function(a0) {
return {default: a0};
});
}
function uk_22593() { // fn#22593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1783, offset: 0x00f03a3d, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2219) /* metro dependency 2219 */);
return value.then(function(a0) {
return {default: a0};
});
}
function vi_22595() { // fn#22595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1847, offset: 0x00f03a7e, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2220) /* metro dependency 2220 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22597() { // fn#22597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1916, offset: 0x00f03abf, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2221) /* metro dependency 2221 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22599() { // fn#22599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:1985, offset: 0x00f03b00, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2222) /* metro dependency 2222 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22601() { // fn#22601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2319:2054, offset: 0x00f03b41, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2223) /* metro dependency 2223 */);
return value.then(function(a0) {
return {default: a0};
});
}
global.__d(_fun22540, 2192, [1247, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205,
2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223,
1282,
2]) /* metro module 2192, dependencies: [1247, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 1282, 2] */;
@@ -1,352 +1,389 @@
/* Metro module 15926; source: modules/guild_settings/server_monetization/stickers/native/GuildSettingsModalStickerInfoActionSheet.tsx; dependencies: [5, 57, 31, 27, 6583, 33, 566, 11050, 3857, 7684, 1244, 6275, 6758, 697, 6231, 6238, 9646, 15919, 4071, 2] */
import Module00005 from '../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import StickersStore from '../../../../stickers/StickersStore.tsx'; /* Metro dependency 6583 */
import ShowGuildSettingsStickerCreateModal from './showGuildSettingsStickerCreateModal.tsx'; /* Metro dependency 15919 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
function _fun122829(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:6, offset: 0x02576f1f, size: 240 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_6 = value2.ActivityIndicator;
const env0_7 = value2.View;
const stickersStore = importDefault(6583) /* metro dependency 6583: StickersStore */;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.jsxs;
let value = ReactModule;
value = value.memo(GuildSettingsModalStickerInfoActionSheet);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/server_monetization/stickers/native/GuildSettingsModalStickerInfoActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/server_monetization/stickers/native/GuildSettingsModalStickerInfoActionSheet.tsx');
exports.default = value;
}
function GuildSettingsModalStickerInfoActionSheet({guildId, stickerId, hideActionSheet}) { // fn#122830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:218, offset: 0x0257700f, size: 696 bytes, params: 2, frame: 33
var r0;
var BottomSheet;
var object;
var object2;
var space;
var TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StickersStore], _fun122831);
const binding = env0_5;
const [property, env0_4] = env0_4Binding(binding.useState(false), 2);
const value5 = _fun122833();
binding.useEffect(_fun122837, [hideActionSheet, value2]);
if (value2 == null) {
r0 = null;
} else {
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
var bottomSheetProps = {header: ((BottomSheetTitleHeader) => <BottomSheetTitleHeader title={value2.name} subtitle={value2.description} />)((require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader)};
object = {};
object2 = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object2.paddingHorizontal = space.PX_12;
space = (importDefault(697) /* metro dependency 697: native */).space;
object2.paddingBottom = space.PX_16;
object.style = object2;
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
items2 = [<TableRow icon={((PencilIcon) => <PencilIcon />)((require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon)} label={intl.string(t.tdhW5b)} onPress={onPress_122838} />];
items2[1] = <TableRow icon={((TrashIcon) => <TrashIcon color="text-feedback-critical" />)((require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon)} trailing={property ? <ActivityIndicator /> : null} label={intl.string(t['+ZhGOk'])} variant="danger" disabled={property} onPress={value5} />;
r0 = <BottomSheet {...bottomSheetProps}><View {...object}><TableRowGroup hasIcons>{items2}</TableRowGroup></View></BottomSheet>;
}
return r0;
}
function _fun122831() { // fn#122831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:349, offset: 0x025772c7, size: 58 bytes, params: 1, frame: 12
var environment;
var r0;
let value = environment.__proto__;
value = StickersStore.getStickersByGuildId(guildId);
if (value == null) {
r0 = undefined;
} else {
value = value.find(function({id}) {
return id === stickerId;
});
r0 = value;
}
return r0;
}
function _fun122833() { // fn#122833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:479, offset: 0x02577301, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun122835);
return _fun122836;
}
function _fun122837() { // fn#122837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:804, offset: 0x02577441, size: 27 bytes, params: 1, frame: 10
if (env0_3 == null) {
hideActionSheet();
}
}
function GuildSettingsModalStickerInfoActionSheetOnPress() { // fn#122838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:1207, owner: GuildSettingsModalStickerInfoActionSheet.onPress, offset: 0x0257745c, size: 54 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(15919) /* metro dependency 15919: showGuildSettingsStickerCreateModal */)({guildId: guildId,
stickerId: stickerId});
}
function* _fun122835() { // fn#122835, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:499, offset: 0x02577330, size: 273 bytes, params: 1, frame: 19
var value;
var value2;
var value3;
var binding;
var binding2;
var property;
var value4;
var deleteGuildSticker;
var value5;
var value6;
var value7;
var error;
var binding3;
var value8;
var open;
var object2;
var value9;
var CircleErrorIcon;
var value10;
var intl;
var string;
var value11;
var t;
var value12;
exceptionLanding50: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
function GuildSettingsModalStickerInfoActionSheet({guildId, stickerId, hideActionSheet}) { // fn#122830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:218, offset: 0x0257700f, size: 696 bytes, params: 2, frame: 33
var r0;
var BottomSheet;
var object3;
var object4;
var space;
var TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items2;
const value2 = (FluxModule).useStateFromStores([StickersStore], _fun122831);
const binding = env0_5;
const [property, env0_4] = env0_4Binding(binding.useState(false), 2);
const value5 = _fun122833();
binding.useEffect(_fun122837, [hideActionSheet, value2]);
if (value2 == null) {
r0 = null;
} else {
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
var bottomSheetProps = {header: ((BottomSheetTitleHeader) => <BottomSheetTitleHeader title={value2.name} subtitle={value2.description} />)((require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader)};
object3 = {};
object4 = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object4.paddingHorizontal = space.PX_12;
space = (importDefault(697) /* metro dependency 697: native */).space;
object4.paddingBottom = space.PX_16;
object3.style = object4;
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
items2 = [
<TableRow
icon={((PencilIcon) => <PencilIcon />)((require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon)}
label={intl.string(t.tdhW5b)}
onPress={onPress_122838}
/>,
];
items2[1] = (
<TableRow
icon={((TrashIcon) => <TrashIcon color="text-feedback-critical" />)((require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon)}
trailing={property
? (
<ActivityIndicator />
)
: null}
label={intl.string(t['+ZhGOk'])}
variant="danger"
disabled={property}
onPress={value5}
/>
);
r0 = (
<BottomSheet {...bottomSheetProps}>
<View {...object3}>
<TableRowGroup hasIcons>
{items2}
</TableRowGroup>
</View>
</BottomSheet>
);
}
value = environment.__proto__.__proto__;
if (env2_3 != null) {
env2_4(true);
value3 = environment.__proto__.__proto__.__proto__;
reducibleJoin5: while (true) {
reduciblePort48: while (true) {
exceptionLanding19: while (true) {
return r0;
function _fun122831() { // fn#122831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:349, offset: 0x025772c7, size: 58 bytes, params: 1, frame: 12
var environment;
var r0;
let value = environment.__proto__;
value = StickersStore.getStickersByGuildId(guildId);
if (value == null) {
r0 = undefined;
} else {
value = value.find(function({id}) {
return id === stickerId;
});
r0 = value;
}
return r0;
}
function _fun122833() { // fn#122833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:479, offset: 0x02577301, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun122835);
return _fun122836;
function* _fun122835() { // fn#122835, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:499, offset: 0x02577330, size: 273 bytes, params: 1, frame: 19
var value;
var value2;
var value3;
var binding;
var binding2;
var property;
var value4;
var deleteGuildSticker;
var value5;
var value6;
var value7;
var error;
var binding3;
var value8;
var open;
var object;
var value9;
var CircleErrorIcon;
var value10;
var intl;
var string;
var value11;
var t;
var value12;
exceptionLanding50: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = environment.__proto__.__proto__;
if (env2_3 != null) {
env2_4(true);
value3 = environment.__proto__.__proto__.__proto__;
reducibleJoin5: while (true) {
reduciblePort48: while (true) {
exceptionLanding19: while (true) {
try {
try {
binding = env3_0;
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
break reducibleJoin5;
}
try {
binding = env3_1;
} catch (error) {
break exceptionLanding50;
}
try {
binding3 = env3_2;
} catch (error) {
break exceptionLanding50;
}
try {
property = binding3[8];
} catch (error) {
break exceptionLanding50;
}
try {
value8 = binding(property);
} catch (error) {
break exceptionLanding50;
}
try {
open = value8.open;
} catch (error) {
break exceptionLanding50;
}
try {
object = {};
} catch (error) {
break exceptionLanding50;
}
try {
object.key = 'IMAGE_PICKER_ERROR';
} catch (error) {
break exceptionLanding50;
}
try {
binding = env3_0;
} catch (error) {
break exceptionLanding50;
}
try {
property = binding3[9];
} catch (error) {
break exceptionLanding50;
}
try {
value9 = binding(property);
} catch (error) {
break exceptionLanding50;
}
try {
CircleErrorIcon = value9.CircleErrorIcon;
} catch (error) {
break exceptionLanding50;
}
try {
object.IconComponent = CircleErrorIcon;
} catch (error) {
break exceptionLanding50;
}
try {
property = binding3[10];
} catch (error) {
break exceptionLanding50;
}
try {
value10 = binding(property);
} catch (error) {
break exceptionLanding50;
}
try {
intl = value10.intl;
} catch (error) {
break exceptionLanding50;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding50;
}
try {
property = binding3[10];
} catch (error) {
break exceptionLanding50;
}
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding50;
}
try {
t = value11.t;
} catch (error) {
break exceptionLanding50;
}
try {
property = t['5NMPSS'];
} catch (error) {
break exceptionLanding50;
}
try {
value12 = Reflect.apply(string, intl, [property]);
} catch (error) {
break exceptionLanding50;
}
try {
object.content = value12;
} catch (error) {
break exceptionLanding50;
}
try {
Reflect.apply(open, value8, [object]);
} catch (error) {
break exceptionLanding50;
}
break reduciblePort48;
}
env2_4(false);
return undefined;
}
try {
try {
binding = env3_0;
binding2 = env3_2;
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
break reducibleJoin5;
try {
try {
property = binding2[7];
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
try {
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
try {
try {
deleteGuildSticker = value4.deleteGuildSticker;
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
try {
try {
binding = env2_3;
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
try {
try {
value5 = Reflect.apply(deleteGuildSticker, value4, [binding]);
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
yield value5;
try {
try {
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
if (value7) {
env2_4(false);
return value6;
}
try {
try {
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
try {
try {
dependencyMap();
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
env2_4(false);
}
try {
binding = env3_1;
} catch (error) {
break exceptionLanding50;
}
try {
binding3 = env3_2;
} catch (error) {
break exceptionLanding50;
}
try {
property = binding3[8];
} catch (error) {
break exceptionLanding50;
}
try {
value8 = binding(property);
} catch (error) {
break exceptionLanding50;
}
try {
open = value8.open;
} catch (error) {
break exceptionLanding50;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding50;
}
try {
object2.key = 'IMAGE_PICKER_ERROR';
} catch (error) {
break exceptionLanding50;
}
try {
binding = env3_0;
} catch (error) {
break exceptionLanding50;
}
try {
property = binding3[9];
} catch (error) {
break exceptionLanding50;
}
try {
value9 = binding(property);
} catch (error) {
break exceptionLanding50;
}
try {
CircleErrorIcon = value9.CircleErrorIcon;
} catch (error) {
break exceptionLanding50;
}
try {
object2.IconComponent = CircleErrorIcon;
} catch (error) {
break exceptionLanding50;
}
try {
property = binding3[10];
} catch (error) {
break exceptionLanding50;
}
try {
value10 = binding(property);
} catch (error) {
break exceptionLanding50;
}
try {
intl = value10.intl;
} catch (error) {
break exceptionLanding50;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding50;
}
try {
property = binding3[10];
} catch (error) {
break exceptionLanding50;
}
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding50;
}
try {
t = value11.t;
} catch (error) {
break exceptionLanding50;
}
try {
property = t['5NMPSS'];
} catch (error) {
break exceptionLanding50;
}
try {
value12 = Reflect.apply(string, intl, [property]);
} catch (error) {
break exceptionLanding50;
}
try {
object2.content = value12;
} catch (error) {
break exceptionLanding50;
}
try {
Reflect.apply(open, value8, [object2]);
} catch (error) {
break exceptionLanding50;
}
break reduciblePort48;
return undefined;
}
env2_4(false);
return undefined;
throw error;
}
try {
try {
binding2 = env3_2;
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
function _fun122836() { // fn#122836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:738, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
try {
try {
property = binding2[7];
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
try {
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
try {
try {
deleteGuildSticker = value4.deleteGuildSticker;
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
try {
try {
binding = env2_3;
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
try {
try {
value5 = Reflect.apply(deleteGuildSticker, value4, [binding]);
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
yield value5;
try {
try {
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
if (value7) {
env2_4(false);
return value6;
}
try {
try {
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
try {
try {
dependencyMap();
} catch (error) {
break exceptionLanding19;
}
} catch (error) {
break exceptionLanding50;
}
env2_4(false);
}
return undefined;
function _fun122837() { // fn#122837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:804, offset: 0x02577441, size: 27 bytes, params: 1, frame: 10
if (Module00005 == null) {
hideActionSheet();
}
}
function GuildSettingsModalStickerInfoActionSheetOnPress() { // fn#122838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16134:1207, owner: GuildSettingsModalStickerInfoActionSheet.onPress, offset: 0x0257745c, size: 54 bytes, params: 1, frame: 13
const value = environment.__proto__;
(ShowGuildSettingsStickerCreateModal)({guildId: guildId,
stickerId: stickerId});
}
}
env2_4(false);
throw error;
}
global.__d(_fun122829, 15926, [5, 57, 31, 27, 6583, 33, 566, 11050, 3857, 7684, 1244, 6275, 6758, 697, 6231, 6238,
9646, 15919, 4071,
2]) /* metro module 15926, dependencies: [5, 57, 31, 27, 6583, 33, 566, 11050, 3857, 7684, 1244, 6275, 6758, 697, 6231, 6238, 9646, 15919, 4071, 2] */;
@@ -1,248 +1,332 @@
/* Metro module 15915; source: modules/guild_settings/server_monetization/stickers/native/GuildSettingsModalStickers.tsx; dependencies: [31, 27, 1867, 3784, 1878, 661, 3832, 33, 1244, 15916, 7958, 12252, 4501, 697, 1585, 566, 9077, 15918, 5460, 8249, 4573, 4136, 4578, 15919, 7972, 4572, 6231, 6238, 6705, 10970, 1305, 3995, 6243, 15925, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import GuildStore from '../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PermissionStore from '../../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import Sticker from '../../../../stickers/native/Sticker.tsx'; /* Metro dependency 10970 */
import UseLoadGuildStickerWithCreator from '../../../../stickers/useLoadGuildStickerWithCreator.tsx'; /* Metro dependency 15918 */
import ShowGuildSettingsStickerCreateModal from './showGuildSettingsStickerCreateModal.tsx'; /* Metro dependency 15919 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as StickersConstantsModule from '../../../../stickers/StickersConstants.tsx'; /* Metro dependency 3832 */
import * as FileSizeUtilsModule from '../../../../../utils/FileSizeUtils.tsx'; /* Metro dependency 4136 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as BoostGemIconModule from '../../../../../design/components/Icon/native/redesign/generated/BoostGemIcon.tsx'; /* Metro dependency 7958 */
import * as NativeModule from '../../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as GuildBoostingUtilsModule from '../../../../../utils/GuildBoostingUtils.tsx'; /* Metro dependency 8249 */
import * as UseManageResourcePermissionsModule from '../../../../permissions/useManageResourcePermissions.tsx'; /* Metro dependency 9077 */
import * as BoostTier3IconModule from '../../../../../design/components/Icon/native/redesign/generated/BoostTier3Icon.tsx'; /* Metro dependency 12252 */
import * as BoostGemOutlineIconModule from '../../../../../design/components/Icon/native/redesign/generated/BoostGemOutlineIcon.tsx'; /* Metro dependency 15916 */
import * as ShowGuildSettingsModalStickerInfoActionSheetModule from './showGuildSettingsModalStickerInfoActionSheet.tsx'; /* Metro dependency 15925 */
function _fun122777(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:6, offset: 0x0257441e, size: 676 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_3 = value2.ScrollView;
const env0_4 = value2.View;
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 constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.AppliedGuildBoostsRequiredForBoostedGuildTier;
const BoostedGuildTiers = constantsModule.BoostedGuildTiers;
const env0_10 = constantsModule.GuildFeatures;
const env0_11 = (require(3832) /* metro dependency 3832: StickersConstants */).MAX_STICKER_FILE_SIZE;
const value4 = require(33) /* metro dependency 33 */;
const env0_12 = value4.jsx;
const env0_13 = value4.jsxs;
object2 = {};
let value = ReactModule;
const BoostedGuildTiers = ConstantsModule.BoostedGuildTiers;
object = {};
const NONE = BoostedGuildTiers.NONE;
object2.tier = NONE;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.tier = NONE;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.title = Reflect.apply(string, intl, [t.tfVXhP]);
object2.IconComponent = undefined;
const items2 = [object2];
object2 = {};
const t = (IndexNativeModule).t;
object.title = Reflect.apply(string, intl, [t.tfVXhP]);
object.IconComponent = undefined;
const items2 = [object];
object = {};
const TIER_1 = BoostedGuildTiers.TIER_1;
object2.tier = TIER_1;
object2.title = intl.string(t.nzXtaS);
const BoostGemOutlineIcon = (require(15916) /* metro dependency 15916: BoostGemOutlineIcon */).BoostGemOutlineIcon;
object2.IconComponent = BoostGemOutlineIcon;
items2[1] = object2;
object2 = {};
object.tier = TIER_1;
object.title = intl.string(t.nzXtaS);
const BoostGemOutlineIcon = (BoostGemOutlineIconModule).BoostGemOutlineIcon;
object.IconComponent = BoostGemOutlineIcon;
items2[1] = object;
object = {};
const TIER_2 = BoostedGuildTiers.TIER_2;
object2.tier = TIER_2;
object2.title = intl.string(t['h33/uW']);
const BoostGemIcon = (require(7958) /* metro dependency 7958: BoostGemIcon */).BoostGemIcon;
object2.IconComponent = BoostGemIcon;
items2[2] = object2;
object2 = {};
object.tier = TIER_2;
object.title = intl.string(t['h33/uW']);
const BoostGemIcon = (BoostGemIconModule).BoostGemIcon;
object.IconComponent = BoostGemIcon;
items2[2] = object;
object = {};
const TIER_3 = BoostedGuildTiers.TIER_3;
object2.tier = TIER_3;
object.tier = TIER_3;
string = intl.string;
const BfF6ED = t.BfF6ED;
object2.title = Reflect.apply(string, intl, [BfF6ED]);
const BoostTier3Icon = (require(12252) /* metro dependency 12252: BoostTier3Icon */).BoostTier3Icon;
object2.IconComponent = BoostTier3Icon;
items2[3] = object2;
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun122778);
object.title = Reflect.apply(string, intl, [BfF6ED]);
const BoostTier3Icon = (BoostTier3IconModule).BoostTier3Icon;
object.IconComponent = BoostTier3Icon;
items2[3] = object;
const env0_15 = (CreateStylesModule).createStyles(_fun122778);
value = value.memo(GuildSettingsModalStickers);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/server_monetization/stickers/native/GuildSettingsModalStickers.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/server_monetization/stickers/native/GuildSettingsModalStickers.tsx');
exports.default = value;
}
function _fun122778(a0) { // fn#122778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:736, offset: 0x025746c2, size: 330 bytes, params: 2, frame: 16
const object = {};
const object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.padding = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.paddingBottom = PX_16 + a0;
object.container = object2;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.label = {marginBottom: PX_8};
const object4 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginBottom = PX_16;
object.divider = object4;
const object5 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object5.backgroundColor = BACKGROUND_BASE_LOWEST;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
let PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
object5.width = PX_64;
PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
object5.height = PX_64;
object5.overflow = 'hidden';
object5.alignItems = 'center';
object5.justifyContent = 'center';
object.stickerSlot = object5;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.userRow = {'gap': null, 'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
return object;
}
function _fun122778(a0) { // fn#122778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:736, offset: 0x025746c2, size: 330 bytes, params: 2, frame: 16
const object3 = {};
const object6 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.padding = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingBottom = PX_16 + a0;
object3.container = object6;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.label = {marginBottom: PX_8};
const object7 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.marginTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.marginBottom = PX_16;
object3.divider = object7;
const object8 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object8.backgroundColor = BACKGROUND_BASE_LOWEST;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
let PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
object8.width = PX_64;
PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
object8.height = PX_64;
object8.overflow = 'hidden';
object8.alignItems = 'center';
object8.justifyContent = 'center';
object3.stickerSlot = object8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.userRow = {'gap': null, 'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
return object3;
}
function GuildSettingsModalStickers({guildId}) { // fn#122779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:1244, offset: 0x0257480c, size: 872 bytes, params: 2, frame: 35
const styles = useStyles((importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom);
let value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildStore], function() {
var r0;
var r1;
var value3 = GuildStore.getGuild(guildId);
var value4 = undefined;
if ((value3 == null ? value4 : value3.features.has(GuildFeatures.MORE_STICKERS)) !== true) {
r0 = value3 == null ? value4 : value3.premiumTier;
r0 = r0 ?? BoostedGuildTiers.NONE;
r1 = r0;
} else {
r1 = BoostedGuildTiers.TIER_3;
function GuildSettingsModalStickers({guildId}) { // fn#122779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:1244, offset: 0x0257480c, size: 872 bytes, params: 2, frame: 35
const styles = useStyles((UseSafeAreaInsetsNative)().bottom);
let value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildStore], function() {
var r0;
var r1;
var value3 = GuildStore.getGuild(guildId);
var value4 = undefined;
if ((value3 == null ? value4 : value3.features.has(GuildFeatures.MORE_STICKERS)) !== true) {
r0 = value3 == null ? value4 : value3.premiumTier;
r0 = r0 ?? BoostedGuildTiers.NONE;
r1 = r0;
} else {
r1 = BoostedGuildTiers.TIER_3;
}
return {guild: value3, guildTier: r1};
}, [guildId]);
const guild = value3.guild;
const env0_3 = value3.guildTier;
const manageResourcePermissions = (UseManageResourcePermissionsModule).getManageResourcePermissions(guild,
PermissionStore, UserStore);
const canCreateExpressions = manageResourcePermissions.canCreateExpressions;
const env0_4 = manageResourcePermissions.canManageGuildExpression;
const value5 = (UseLoadGuildStickerWithCreator)(guildId);
if (value5.status !== 'success') {
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
return <SceneLoadingIndicator />;
}
return {guild: value3, guildTier: r1};
}, [guildId]);
const guild = value3.guild;
const env0_3 = value3.guildTier;
const manageResourcePermissions = (require(9077) /* metro dependency 9077: useManageResourcePermissions */).getManageResourcePermissions(guild,
PermissionStore, UserStore);
const canCreateExpressions = manageResourcePermissions.canCreateExpressions;
const env0_4 = manageResourcePermissions.canManageGuildExpression;
const value5 = (importDefault(15918) /* metro dependency 15918: useLoadGuildStickerWithCreator */)(guildId);
if (value5.status !== 'success') {
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
return <SceneLoadingIndicator />;
const r10 = canCreateExpressions && value5.stickers.length < env0_14.reduce(_fun122781, 0);
const Text = (TextModule).Text;
let label = styles.label;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const items2 = [
<Text variant="heading-md/semibold" style={label}>
{Reflect.apply(string, intl, [t.yxVsBJ])}
</Text>,
];
label = styles.label;
const format = intl.format;
const kpcMft = (IndexNativeModule).t.kpcMft;
items2[1] = (
<Text
variant="text-sm/medium"
color="text-muted"
style={label}
>
{Reflect.apply(format, intl, [kpcMft, {fileSize: FileSizeUtilsModule.formatKbSize(MAX_STICKER_FILE_SIZE,
{useKibibytes: true})}])}
</Text>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
items2[2] = (
<Button
text={r10 ? Reflect.apply(string, intl, [t['3DzNjU']]) : Reflect.apply(string, intl, [t['IuvV5+']])}
onPress={onPress_122782}
disabled={!r10}
/>
);
const FormDivider = (NativeModule).FormDivider;
items2[3] = <FormDivider outer style={styles.divider} />;
const Stack = (StackNativeModule).Stack;
const PX_16 = (Native).space.PX_16;
items2[4] = (
<Stack spacing={PX_16}>
{env0_14.map(_fun122783)}
</Stack>
);
return (
<ScrollView contentContainerStyle={styles.container}>
{items2}
</ScrollView>
);
function _fun122781(a0, {tier}) { // fn#122781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:1781, offset: 0x02574bf1, size: 73 bytes, params: 3, frame: 16
var r0;
var value3;
var moduleValue;
let value = a0;
if (guildTier >= tier) {
value3 = environment.__proto__;
moduleValue = require(8249) /* metro dependency 8249: GuildBoostingUtils */;
value += moduleValue.getTotalStickerCountForTier(tier, guild);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function GuildSettingsModalStickersOnPress() { // fn#122782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:2329, owner: GuildSettingsModalStickers.onPress, offset: 0x02574c3a, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(ShowGuildSettingsStickerCreateModal)({guildId: guildId});
}
function _fun122783({tier, title, IconComponent}) { // fn#122783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:2485, offset: 0x02574c67, size: 446 bytes, params: 2, frame: 30
const value2 = guildTier < tier;
const incrementalStickerCountForTier = (GuildBoostingUtilsModule).getIncrementalStickerCountForTier(tier);
let value = (GuildBoostingUtilsModule).getAvailableStickerSlotCount(stickers,
tier);
const property = AppliedGuildBoostsRequiredForBoostedGuildTier[tier];
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const tableRowProps = {icon: IconComponent != null ? <IconComponent color={value2 ? 'icon-muted' : 'premium-nitro-pink-text'} /> : undefined,
label: title};
const intl = (IndexNativeModule).intl;
const format = intl.format;
const t = (IndexNativeModule).t;
tableRowProps.subLabel = value2 ? Reflect.apply(format, intl, [t.t2Wbo1, {required: property,
decorator: ''}]) : Reflect.apply(format, intl, [t.ZLoNtm, {numTotal: incrementalStickerCountForTier,
numAvailable: value}]);
tableRowProps.trailing = (
value2
? ((LockIcon) => <LockIcon color="icon-muted" />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon)
: undefined
);
const items2 = [
<TableRow {...tableRowProps} />,
];
const Array = global.Array;
value = Array.from({length: incrementalStickerCountForTier});
items2[1] = value.map(_fun122784);
return (
<TableRowGroup hasIcons key={tier}>
{items2}
</TableRowGroup>
);
function _fun122784(a0, a1) { // fn#122784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:3021, offset: 0x02574e25, size: 551 bytes, params: 3, frame: 36
var environment;
var r12;
var items2;
let value = environment.__proto__;
const stickersBinding = stickers;
const binding = env1_6;
const value2 = typeof binding === 'bigint' ? binding : +binding;
env1_6 = typeof value2 === 'bigint' ? value2 + 1n : +value2 + 1;
const property = stickersBinding[value2];
const value3 = null;
if (value3 == property) {
return value3;
}
const canManageGuildExpressionBinding = canManageGuildExpression;
const value4 = undefined;
const canManageGuildExpression2 = canManageGuildExpressionBinding(property);
const user = property.user;
const TableRow = (TableRowNativeModule).TableRow;
const object = {};
const stylesBinding = styles;
const stickerSlot = stylesBinding.stickerSlot;
const PX_48 = (Native).space.PX_48;
object.icon = (
<View style={stickerSlot}>
<Sticker
sticker={property}
size={PX_48}
animated
/>
</View>
);
const Text = (TextModule).Text;
const text = (
<Text
variant="heading-sm/semibold"
color="text-strong"
style={stylesBinding.label}
>
{property.name}
</Text>
);
if (value3 != user) {
var viewBinding2Props = {style: styles.userRow};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
value = (
<Avatar
user={user}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL_20}
guildId={guildId}
/>
);
items2 = [value];
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
items2[1] = (
<Text variant="text-sm/medium" color="text-subtle">
{value.getName(user)}
</Text>
);
value = (
<View {...viewBinding2Props}>
{items2}
</View>
);
r12 = value;
} else {
r12 = value3;
}
object.label = (
<View>
{text}
{r12}
</View>
);
object.trailing = (
canManageGuildExpression2
? ((TableRowArrow) => <TableRowArrow />)((require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow)
: value4
);
object.onPress = canManageGuildExpression2 ? _fun122785 : value4;
return <TableRow {...object} key={a1} />;
function _fun122785() { // fn#122785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:3610, offset: 0x0257504c, size: 68 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
(ShowGuildSettingsModalStickerInfoActionSheetModule).showGuildSettingsModalStickerInfoActionSheet({guildId: guildId,
stickerId: env0_0.id});
}
}
}
}
const r10 = canCreateExpressions && value5.stickers.length < env0_14.reduce(_fun122781, 0);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let label = styles.label;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items2 = [<Text variant="heading-md/semibold" style={label}>{Reflect.apply(string, intl, [t.yxVsBJ])}</Text>];
label = styles.label;
const format = intl.format;
const kpcMft = (require(1244) /* metro dependency 1244: indexNative */).t.kpcMft;
const fileSizeUtilsModule = require(4136) /* metro dependency 4136: FileSizeUtils */;
items2[1] = <Text variant="text-sm/medium" color="text-muted" style={label}>{Reflect.apply(format, intl, [kpcMft,
{fileSize: fileSizeUtilsModule.formatKbSize(MAX_STICKER_FILE_SIZE, {useKibibytes: true})}])}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[2] = <Button text={r10 ? Reflect.apply(string, intl, [t['3DzNjU']]) : Reflect.apply(string, intl,
[t['IuvV5+']])} onPress={onPress_122782} disabled={!r10} />;
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
items2[3] = <FormDivider outer style={styles.divider} />;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[4] = <Stack spacing={PX_16}>{env0_14.map(_fun122783)}</Stack>;
return (
<ScrollView contentContainerStyle={styles.container}>
{items2}
</ScrollView>
);
}
function _fun122781(a0, {tier}) { // fn#122781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:1781, offset: 0x02574bf1, size: 73 bytes, params: 3, frame: 16
var r0;
var value3;
var moduleValue;
let value = a0;
if (guildTier >= tier) {
value3 = environment.__proto__;
moduleValue = require(8249) /* metro dependency 8249: GuildBoostingUtils */;
value += moduleValue.getTotalStickerCountForTier(tier, guild);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function GuildSettingsModalStickersOnPress() { // fn#122782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:2329, owner: GuildSettingsModalStickers.onPress, offset: 0x02574c3a, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(15919) /* metro dependency 15919: showGuildSettingsStickerCreateModal */)({guildId: guildId});
}
function _fun122783({tier, title, IconComponent}) { // fn#122783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:2485, offset: 0x02574c67, size: 446 bytes, params: 2, frame: 30
const value2 = guildTier < tier;
const incrementalStickerCountForTier = (require(8249) /* metro dependency 8249: GuildBoostingUtils */).getIncrementalStickerCountForTier(tier);
let value = (require(8249) /* metro dependency 8249: GuildBoostingUtils */).getAvailableStickerSlotCount(stickers,
tier);
const property = AppliedGuildBoostsRequiredForBoostedGuildTier[tier];
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {icon: IconComponent != null ? <IconComponent color={value2 ? 'icon-muted' : 'premium-nitro-pink-text'} /> : undefined,
label: title};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
tableRowProps.subLabel = value2 ? Reflect.apply(format, intl, [t.t2Wbo1, {required: property,
decorator: ''}]) : Reflect.apply(format, intl, [t.ZLoNtm, {numTotal: incrementalStickerCountForTier,
numAvailable: value}]);
tableRowProps.trailing = value2 ? ((LockIcon) => <LockIcon color="icon-muted" />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon) : undefined;
const items2 = [<TableRow {...tableRowProps} />];
const Array = global.Array;
value = Array.from({length: incrementalStickerCountForTier});
items2[1] = value.map(_fun122784);
return (
<TableRowGroup hasIcons key={tier}>
{items2}
</TableRowGroup>
);
}
function _fun122784(a0, a1) { // fn#122784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:3021, offset: 0x02574e25, size: 551 bytes, params: 3, frame: 36
var environment;
var r12;
var items2;
let value = environment.__proto__;
const stickersBinding = stickers;
const binding = env1_6;
const value2 = typeof binding === 'bigint' ? binding : +binding;
env1_6 = typeof value2 === 'bigint' ? value2 + 1n : +value2 + 1;
const property = stickersBinding[value2];
const value3 = null;
if (value3 == property) {
return value3;
}
const canManageGuildExpressionBinding = canManageGuildExpression;
const value4 = undefined;
const canManageGuildExpression2 = canManageGuildExpressionBinding(property);
const user = property.user;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {};
const stylesBinding = styles;
const stickerSlot = stylesBinding.stickerSlot;
const Sticker = importDefault(10970) /* metro dependency 10970: Sticker */;
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
object2.icon = <View style={stickerSlot}><Sticker sticker={property} size={PX_48} animated /></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="heading-sm/semibold" color="text-strong" style={stylesBinding.label}>{property.name}</Text>;
if (value3 != user) {
var viewBinding2Props = {style: styles.userRow};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
value = <Avatar user={user} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL_20} guildId={guildId} />;
items2 = [value];
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
items2[1] = <Text variant="text-sm/medium" color="text-subtle">{value.getName(user)}</Text>;
value = <View {...viewBinding2Props}>{items2}</View>;
r12 = value;
} else {
r12 = value3;
}
object2.label = <View>{text}{r12}</View>;
object2.trailing = canManageGuildExpression2 ? ((TableRowArrow) => <TableRowArrow />)((require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow) : value4;
object2.onPress = canManageGuildExpression2 ? _fun122785 : value4;
return <TableRow {...object2} key={a1} />;
}
function _fun122785() { // fn#122785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16123:3610, offset: 0x0257504c, size: 68 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
(require(15925) /* metro dependency 15925: showGuildSettingsModalStickerInfoActionSheet */).showGuildSettingsModalStickerInfoActionSheet({guildId: guildId,
stickerId: env0_0.id});
}
global.__d(_fun122777, 15915, [31, 27, 1867, 3784, 1878, 661, 3832, 33, 1244, 15916, 7958, 12252, 4501, 697, 1585,
566, 9077, 15918, 5460, 8249, 4573, 4136, 4578, 15919, 7972, 4572, 6231, 6238, 6705, 10970, 1305, 3995, 6243,
15925,
2]) /* metro module 15915, dependencies: [31, 27, 1867, 3784, 1878, 661, 3832, 33, 1244, 15916, 7958, 12252, 4501, 697, 1585, 566, 9077, 15918, 5460, 8249, 4573, 4136, 4578, 15919, 7972, 4572, 6231, 6238, 6705, 10970, 1305, 3995, 6243, 15925, 2] */;
@@ -1,31 +1,38 @@
/* Metro module 15920; source: modules/guild_settings/server_monetization/stickers/native/GuildSettingsStickerCreateModal.tsx; dependencies: [31, 33, 9881, 9883, 1244, 15921, 2] */
import UseNavigatorConfirmChangesOnBack from '../../../../main_tabs_v2/native/utils/useNavigatorConfirmChangesOnBack.tsx'; /* Metro dependency 9881 */
import ModalStackNavigator from '../../../../main_tabs_v2/native/utils/ModalStackNavigator.tsx'; /* Metro dependency 9883 */
import GuildSettingsStickerCreate from './GuildSettingsStickerCreate.tsx'; /* Metro dependency 15921 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun122801(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16128:6, offset: 0x02575527, 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_settings/server_monetization/stickers/native/GuildSettingsStickerCreateModal.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/server_monetization/stickers/native/GuildSettingsStickerCreateModal.tsx');
exports.default = GuildSettingsStickerCreateModal;
function GuildSettingsStickerCreateModal({guildId, stickerId}) { // fn#122802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16128:124, offset: 0x025755b1, size: 220 bytes, params: 2, frame: 20
const value2 = (UseNavigatorConfirmChangesOnBack)();
const env0_2 = value2.onGoBack;
const env0_3 = value2.ref;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ModalStackNavigator
screenKey="guild-settings-sticker-create"
title={intl.string(stickerId != null ? (require(1244) /* metro dependency 1244: indexNative */).t.tdhW5b : (require(1244) /* metro dependency 1244: indexNative */).t['3DzNjU'])}
render={render_122803}
/>
);
function GuildSettingsStickerCreateModalRender() { // fn#122803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16128:366, owner: GuildSettingsStickerCreateModal.render, offset: 0x0257568d, size: 76 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component ref={ref} guildId={guildId} stickerId={stickerId} onFinish={onGoBack} />)(GuildSettingsStickerCreate);
}
}
}
function GuildSettingsStickerCreateModal({guildId, stickerId}) { // fn#122802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16128:124, offset: 0x025755b1, size: 220 bytes, params: 2, frame: 20
const value2 = (importDefault(9881) /* metro dependency 9881: useNavigatorConfirmChangesOnBack */)();
const env0_2 = value2.onGoBack;
const env0_3 = value2.ref;
const ModalStackNavigator = importDefault(9883) /* metro dependency 9883: ModalStackNavigator */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ModalStackNavigator
screenKey="guild-settings-sticker-create"
title={intl.string(stickerId != null ? (require(1244) /* metro dependency 1244: indexNative */).t.tdhW5b : (require(1244) /* metro dependency 1244: indexNative */).t['3DzNjU'])}
render={render_122803}
/>
);
}
function GuildSettingsStickerCreateModalRender() { // fn#122803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16128:366, owner: GuildSettingsStickerCreateModal.render, offset: 0x0257568d, size: 76 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component ref={ref} guildId={guildId} stickerId={stickerId} onFinish={onGoBack} />)(importDefault(15921) /* metro dependency 15921: GuildSettingsStickerCreate */);
}
global.__d(_fun122801, 15920, [31, 33, 9881, 9883, 1244, 15921,
2]) /* metro module 15920, dependencies: [31, 33, 9881, 9883, 1244, 15921, 2] */;
@@ -1,9 +1,11 @@
/* Metro module 15922; source: modules/guild_settings/server_monetization/stickers/native/guildSettingsStickerToasts.tsx; dependencies: [3857, 7684, 1244, 4068, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun122820(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16130:6, offset: 0x02576bd7, size: 116 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/server_monetization/stickers/native/guildSettingsStickerToasts.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/server_monetization/stickers/native/guildSettingsStickerToasts.tsx');
exports.showGuildSettingsStickerError = function() {
var defaultImport = importDefault(dependencyMap[0]);
var object = {key: 'GUILD_SETTINGS_STICKER_ERROR'};
@@ -20,3 +22,5 @@ function _fun122820(global, require, importDefault, importAll, module, exports,
};
}
global.__d(_fun122820, 15922, [3857, 7684, 1244, 4068,
2]) /* metro module 15922, dependencies: [3857, 7684, 1244, 4068, 2] */;
@@ -1,23 +1,27 @@
/* Metro module 15925; source: modules/guild_settings/server_monetization/stickers/native/showGuildSettingsModalStickerInfoActionSheet.tsx; dependencies: [4080, 15926, 1962, 2] */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun122826(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16133:6, offset: 0x02576e17, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/server_monetization/stickers/native/showGuildSettingsModalStickerInfoActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/server_monetization/stickers/native/showGuildSettingsModalStickerInfoActionSheet.tsx');
exports.showGuildSettingsModalStickerInfoActionSheet = showGuildSettingsModalStickerInfoActionSheet;
function showGuildSettingsModalStickerInfoActionSheet({guildId, stickerId}) { // fn#122827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16133:329, offset: 0x02576e7e, size: 118 bytes, params: 2, frame: 18
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'GuildSettingsModalStickerInfoActionSheet', {guildId: guildId,
stickerId: stickerId, hideActionSheet: hideActionSheet_122828}]);
function showGuildSettingsModalStickerInfoActionSheetHideActionSheet() { // fn#122828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16133:472, owner: showGuildSettingsModalStickerInfoActionSheet.hideActionSheet, offset: 0x02576ef4, size: 43 bytes, params: 1, frame: 12
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet('GuildSettingsModalStickerInfoActionSheet');
}
}
}
function showGuildSettingsModalStickerInfoActionSheet({guildId, stickerId}) { // fn#122827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16133:329, offset: 0x02576e7e, size: 118 bytes, params: 2, frame: 18
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'GuildSettingsModalStickerInfoActionSheet', {guildId: guildId,
stickerId: stickerId, hideActionSheet: hideActionSheet_122828}]);
}
function showGuildSettingsModalStickerInfoActionSheetHideActionSheet() { // fn#122828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16133:472, owner: showGuildSettingsModalStickerInfoActionSheet.hideActionSheet, offset: 0x02576ef4, size: 43 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('GuildSettingsModalStickerInfoActionSheet');
}
global.__d(_fun122826, 15925, [4080, 15926, 1962, 2]) /* metro module 15925, dependencies: [4080, 15926, 1962, 2] */;
@@ -1,18 +1,22 @@
/* Metro module 15919; source: modules/guild_settings/server_monetization/stickers/native/showGuildSettingsStickerCreateModal.tsx; dependencies: [4080, 5080, 15920, 1962, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun122799(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16127:6, offset: 0x0257544a, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/server_monetization/stickers/native/showGuildSettingsStickerCreateModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/server_monetization/stickers/native/showGuildSettingsStickerCreateModal.tsx');
exports.default = showGuildSettingsStickerCreateModal;
function showGuildSettingsStickerCreateModal(a0) { // fn#122800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16127:234, offset: 0x025754b1, size: 118 bytes, params: 2, frame: 18
importDefault(dependencyMap[0]).hideActionSheet();
const defaultImport2 = importDefault(dependencyMap[1]);
const pushLazy = defaultImport2.pushLazy;
let value = require(dependencyMap[3]);
value = value(dependencyMap[2], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport2, [value, a0, 'guild-settings-sticker-create', {presentation: 'modal'}]);
}
}
function showGuildSettingsStickerCreateModal(a0) { // fn#122800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16127:234, offset: 0x025754b1, size: 118 bytes, params: 2, frame: 18
importDefault(dependencyMap[0]).hideActionSheet();
const defaultImport2 = importDefault(dependencyMap[1]);
const pushLazy = defaultImport2.pushLazy;
let value = require(dependencyMap[3]);
value = value(dependencyMap[2], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport2, [value, a0, 'guild-settings-sticker-create', {presentation: 'modal'}]);
}
global.__d(_fun122799, 15919, [4080, 5080, 15920, 1962,
2]) /* metro module 15919, dependencies: [4080, 5080, 15920, 1962, 2] */;
@@ -1,289 +1,296 @@
/* Metro module 2160; source: modules/guild_settings/server_monetization/tags/web/GuildSettingsTags.messages.js; dependencies: [1247, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 1282, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as AssetJsonUtilsModule from '../../../../asset_json/native/AssetJsonUtils.tsx'; /* Metro dependency 1247 */
import * as Module01282Module from '../../../../../by-id/module-01282.js'; /* Metro dependency 1282 */
function _fun22446(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#22446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:6, offset: 0x00f01fd4, size: 453 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {bg: bg_22447, cs: cs_22449, da: da_22451, de: de_22453, el: el_22455};
object2['en-GB'] = _fun22457;
object2['es-419'] = _fun22459;
object2['es-ES'] = _fun22461;
object2.fi = fi_22463;
object2.fr = fr_22465;
object2.hi = hi_22467;
object2.hr = hr_22469;
object2.hu = hu_22471;
object2.it = it_22473;
object2.ja = ja_22475;
object2.ko = ko_22477;
object2.lt = lt_22479;
object2.nl = nl_22481;
object2.no = no_22483;
object2.pl = pl_22485;
object2['pt-BR'] = _fun22487;
object2.ro = ro_22489;
object2.ru = ru_22491;
object2['sv-SE'] = _fun22493;
object2.th = th_22495;
object2.tr = tr_22497;
object2.uk = uk_22499;
object2.vi = vi_22501;
object2['zh-CN'] = _fun22503;
object2['zh-TW'] = _fun22505;
object2['en-US'] = _fun22507;
let value = require(1282) /* metro dependency 1282 */;
value = value.createLoader(object2, 'en-US');
const messagesProxy = (require(1282) /* metro dependency 1282 */).makeMessagesProxy(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/server_monetization/tags/web/GuildSettingsTags.messages.js');
object = {bg: bg_22447, cs: cs_22449, da: da_22451, de: de_22453, el: el_22455};
object['en-GB'] = _fun22457;
object['es-419'] = _fun22459;
object['es-ES'] = _fun22461;
object.fi = fi_22463;
object.fr = fr_22465;
object.hi = hi_22467;
object.hr = hr_22469;
object.hu = hu_22471;
object.it = it_22473;
object.ja = ja_22475;
object.ko = ko_22477;
object.lt = lt_22479;
object.nl = nl_22481;
object.no = no_22483;
object.pl = pl_22485;
object['pt-BR'] = _fun22487;
object.ro = ro_22489;
object.ru = ru_22491;
object['sv-SE'] = _fun22493;
object.th = th_22495;
object.tr = tr_22497;
object.uk = uk_22499;
object.vi = vi_22501;
object['zh-CN'] = _fun22503;
object['zh-TW'] = _fun22505;
object['en-US'] = _fun22507;
let value = Module01282Module;
value = value.createLoader(object, 'en-US');
const messagesProxy = (Module01282Module).makeMessagesProxy(value);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/server_monetization/tags/web/GuildSettingsTags.messages.js');
exports.default = messagesProxy;
exports.messagesLoader = value;
function bg_22447() { // fn#22447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:102, offset: 0x00f02199, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2161) /* metro dependency 2161 */);
return value.then(function(a0) {
return {default: a0};
});
}
function cs_22449() { // fn#22449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:165, offset: 0x00f021da, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2162) /* metro dependency 2162 */);
return value.then(function(a0) {
return {default: a0};
});
}
function da_22451() { // fn#22451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:228, offset: 0x00f0221b, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2163) /* metro dependency 2163 */);
return value.then(function(a0) {
return {default: a0};
});
}
function de_22453() { // fn#22453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:291, offset: 0x00f0225c, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2164) /* metro dependency 2164 */);
return value.then(function(a0) {
return {default: a0};
});
}
function el_22455() { // fn#22455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:354, offset: 0x00f0229d, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2165) /* metro dependency 2165 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22457() { // fn#22457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:422, offset: 0x00f022de, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2166) /* metro dependency 2166 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22459() { // fn#22459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:491, offset: 0x00f0231f, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2167) /* metro dependency 2167 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22461() { // fn#22461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:559, offset: 0x00f02360, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2168) /* metro dependency 2168 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fi_22463() { // fn#22463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:622, offset: 0x00f023a1, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2169) /* metro dependency 2169 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fr_22465() { // fn#22465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:685, offset: 0x00f023e2, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2170) /* metro dependency 2170 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hi_22467() { // fn#22467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:749, offset: 0x00f02423, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2171) /* metro dependency 2171 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hr_22469() { // fn#22469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:813, offset: 0x00f02464, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2172) /* metro dependency 2172 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hu_22471() { // fn#22471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:877, offset: 0x00f024a5, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2173) /* metro dependency 2173 */);
return value.then(function(a0) {
return {default: a0};
});
}
function it_22473() { // fn#22473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:941, offset: 0x00f024e6, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2174) /* metro dependency 2174 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ja_22475() { // fn#22475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1005, offset: 0x00f02527, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2175) /* metro dependency 2175 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ko_22477() { // fn#22477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1069, offset: 0x00f02568, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2176) /* metro dependency 2176 */);
return value.then(function(a0) {
return {default: a0};
});
}
function lt_22479() { // fn#22479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1133, offset: 0x00f025a9, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2177) /* metro dependency 2177 */);
return value.then(function(a0) {
return {default: a0};
});
}
function nl_22481() { // fn#22481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1197, offset: 0x00f025ea, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2178) /* metro dependency 2178 */);
return value.then(function(a0) {
return {default: a0};
});
}
function no_22483() { // fn#22483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1261, offset: 0x00f0262b, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2179) /* metro dependency 2179 */);
return value.then(function(a0) {
return {default: a0};
});
}
function pl_22485() { // fn#22485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1325, offset: 0x00f0266c, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2180) /* metro dependency 2180 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22487() { // fn#22487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1394, offset: 0x00f026ad, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2181) /* metro dependency 2181 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ro_22489() { // fn#22489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1458, offset: 0x00f026ee, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2182) /* metro dependency 2182 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ru_22491() { // fn#22491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1522, offset: 0x00f0272f, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2183) /* metro dependency 2183 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22493() { // fn#22493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1591, offset: 0x00f02770, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2184) /* metro dependency 2184 */);
return value.then(function(a0) {
return {default: a0};
});
}
function th_22495() { // fn#22495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1655, offset: 0x00f027b1, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2185) /* metro dependency 2185 */);
return value.then(function(a0) {
return {default: a0};
});
}
function tr_22497() { // fn#22497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1719, offset: 0x00f027f2, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2186) /* metro dependency 2186 */);
return value.then(function(a0) {
return {default: a0};
});
}
function uk_22499() { // fn#22499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1783, offset: 0x00f02833, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2187) /* metro dependency 2187 */);
return value.then(function(a0) {
return {default: a0};
});
}
function vi_22501() { // fn#22501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1847, offset: 0x00f02874, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2188) /* metro dependency 2188 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22503() { // fn#22503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1916, offset: 0x00f028b5, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2189) /* metro dependency 2189 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22505() { // fn#22505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1985, offset: 0x00f028f6, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2190) /* metro dependency 2190 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22507() { // fn#22507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:2054, offset: 0x00f02937, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2191) /* metro dependency 2191 */);
return value.then(function(a0) {
return {default: a0};
});
}
}
function bg_22447() { // fn#22447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:102, offset: 0x00f02199, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2161) /* metro dependency 2161 */);
return value.then(function(a0) {
return {default: a0};
});
}
function cs_22449() { // fn#22449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:165, offset: 0x00f021da, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2162) /* metro dependency 2162 */);
return value.then(function(a0) {
return {default: a0};
});
}
function da_22451() { // fn#22451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:228, offset: 0x00f0221b, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2163) /* metro dependency 2163 */);
return value.then(function(a0) {
return {default: a0};
});
}
function de_22453() { // fn#22453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:291, offset: 0x00f0225c, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2164) /* metro dependency 2164 */);
return value.then(function(a0) {
return {default: a0};
});
}
function el_22455() { // fn#22455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:354, offset: 0x00f0229d, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2165) /* metro dependency 2165 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22457() { // fn#22457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:422, offset: 0x00f022de, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2166) /* metro dependency 2166 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22459() { // fn#22459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:491, offset: 0x00f0231f, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2167) /* metro dependency 2167 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22461() { // fn#22461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:559, offset: 0x00f02360, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2168) /* metro dependency 2168 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fi_22463() { // fn#22463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:622, offset: 0x00f023a1, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2169) /* metro dependency 2169 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fr_22465() { // fn#22465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:685, offset: 0x00f023e2, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2170) /* metro dependency 2170 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hi_22467() { // fn#22467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:749, offset: 0x00f02423, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2171) /* metro dependency 2171 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hr_22469() { // fn#22469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:813, offset: 0x00f02464, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2172) /* metro dependency 2172 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hu_22471() { // fn#22471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:877, offset: 0x00f024a5, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2173) /* metro dependency 2173 */);
return value.then(function(a0) {
return {default: a0};
});
}
function it_22473() { // fn#22473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:941, offset: 0x00f024e6, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2174) /* metro dependency 2174 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ja_22475() { // fn#22475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1005, offset: 0x00f02527, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2175) /* metro dependency 2175 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ko_22477() { // fn#22477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1069, offset: 0x00f02568, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2176) /* metro dependency 2176 */);
return value.then(function(a0) {
return {default: a0};
});
}
function lt_22479() { // fn#22479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1133, offset: 0x00f025a9, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2177) /* metro dependency 2177 */);
return value.then(function(a0) {
return {default: a0};
});
}
function nl_22481() { // fn#22481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1197, offset: 0x00f025ea, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2178) /* metro dependency 2178 */);
return value.then(function(a0) {
return {default: a0};
});
}
function no_22483() { // fn#22483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1261, offset: 0x00f0262b, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2179) /* metro dependency 2179 */);
return value.then(function(a0) {
return {default: a0};
});
}
function pl_22485() { // fn#22485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1325, offset: 0x00f0266c, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2180) /* metro dependency 2180 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22487() { // fn#22487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1394, offset: 0x00f026ad, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2181) /* metro dependency 2181 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ro_22489() { // fn#22489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1458, offset: 0x00f026ee, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2182) /* metro dependency 2182 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ru_22491() { // fn#22491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1522, offset: 0x00f0272f, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2183) /* metro dependency 2183 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22493() { // fn#22493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1591, offset: 0x00f02770, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2184) /* metro dependency 2184 */);
return value.then(function(a0) {
return {default: a0};
});
}
function th_22495() { // fn#22495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1655, offset: 0x00f027b1, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2185) /* metro dependency 2185 */);
return value.then(function(a0) {
return {default: a0};
});
}
function tr_22497() { // fn#22497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1719, offset: 0x00f027f2, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2186) /* metro dependency 2186 */);
return value.then(function(a0) {
return {default: a0};
});
}
function uk_22499() { // fn#22499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1783, offset: 0x00f02833, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2187) /* metro dependency 2187 */);
return value.then(function(a0) {
return {default: a0};
});
}
function vi_22501() { // fn#22501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1847, offset: 0x00f02874, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2188) /* metro dependency 2188 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22503() { // fn#22503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1916, offset: 0x00f028b5, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2189) /* metro dependency 2189 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22505() { // fn#22505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:1985, offset: 0x00f028f6, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2190) /* metro dependency 2190 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22507() { // fn#22507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2287:2054, offset: 0x00f02937, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2191) /* metro dependency 2191 */);
return value.then(function(a0) {
return {default: a0};
});
}
global.__d(_fun22446, 2160, [1247, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173,
2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191,
1282,
2]) /* metro module 2160, dependencies: [1247, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 1282, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 4253; source: modules/guild_settings/urlPartToSettingsEnum.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun35321(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#35321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4425:6, offset: 0x0106ec87, size: 85 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/urlPartToSettingsEnum.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/urlPartToSettingsEnum.tsx');
exports.default = function(a0, a1) {
var r0;
var value2;
@@ -22,3 +24,4 @@ function _fun35321(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun35321, 4253, [2]) /* metro module 4253, dependencies: [2] */;
@@ -1,11 +1,14 @@
/* Metro module 9116; source: modules/guild_settings/utils/getDefaultGuildSettingsSection.tsx; dependencies: [661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun71425(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9301:6, offset: 0x01d1f78c, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(661) /* metro dependency 661: Constants */).GuildSettingsSections;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/utils/getDefaultGuildSettingsSection.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/utils/getDefaultGuildSettingsSection.tsx');
exports.getDefaultGuildSettingsSection = function() {
return GuildSettingsSections.PROFILE;
};
}
global.__d(_fun71425, 9116, [661, 2]) /* metro module 9116, dependencies: [661, 2] */;