Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,307 @@
|
||||
/* Metro module 6607; source: modules/impersonate/ImpersonateActionCreators.tsx; dependencies: [1379, 1935, 1945, 1938, 3784, 1934, 4864, 1937, 661, 1386, 683, 4863, 1943, 694, 1230, 2] */
|
||||
function _fun52126(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6785:6, offset: 0x0131fa66, size: 388 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_52129 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const closure = updateImpersonating;
|
||||
const closure2 = updateImpersonatedChannels;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
|
||||
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_11 = constantsModule.Permissions;
|
||||
const env0_12 = constantsModule.Routes;
|
||||
const env0_13 = constantsModule.AnalyticEvents;
|
||||
const env0_14 = (require(1386) /* metro dependency 1386: ChannelConstants */).isStaticChannelRoute;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/impersonate/ImpersonateActionCreators.tsx');
|
||||
exports.startImpersonating = startImpersonating;
|
||||
exports.updateImpersonating = closure;
|
||||
exports.stopImpersonating = stopImpersonating;
|
||||
exports.updateImpersonatedChannels = closure2;
|
||||
exports.updateImpersonatedRoles = updateImpersonatedRoles;
|
||||
exports.updateImpersonatedData = function(a0, a1) {
|
||||
var updateImpersonatingBinding = updateImpersonating;
|
||||
var object = {};
|
||||
object.type = require(dependencyMap[12]).ImpersonateType.NEW_MEMBER;
|
||||
copyDataProperties(object, a1, require);
|
||||
updateImpersonatingBinding(a0, object);
|
||||
};
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_52127(a0, a1) { // fn#52127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6785:269, offset: 0x0131fbea, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun52128;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_52129(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_52129(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_52129(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun52128;
|
||||
}
|
||||
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 updateImpersonating(a0, a1) { // fn#52130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6785:1179, offset: 0x0131fd5c, size: 285 bytes, params: 3, frame: 23
|
||||
var defaultImport;
|
||||
var track;
|
||||
var VIEW_AS_ROLES_SELECTED;
|
||||
var object3;
|
||||
var Object;
|
||||
var moduleValue;
|
||||
var defaultImport2;
|
||||
var dispatch;
|
||||
var object4;
|
||||
const data = ImpersonateStore.getData(a0);
|
||||
if (data != null && data.type === a1.type) {
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
VIEW_AS_ROLES_SELECTED = AnalyticEvents.VIEW_AS_ROLES_SELECTED;
|
||||
object3 = {};
|
||||
Object = global.Object;
|
||||
object3.num_roles = Object.keys(data.roles).length;
|
||||
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object3, moduleValue.collectGuildAnalyticsMetadata(a0), require);
|
||||
object3['is_viewing_as_member'] = data.type === (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType.NEW_MEMBER;
|
||||
Reflect.apply(track, defaultImport, [VIEW_AS_ROLES_SELECTED, object3]);
|
||||
defaultImport2 = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatch = defaultImport2.dispatch;
|
||||
object4 = {};
|
||||
copyDataProperties(object4, data, require);
|
||||
copyDataProperties(object4, a1, require);
|
||||
Reflect.apply(dispatch, defaultImport2, [{type: 'IMPERSONATE_UPDATE', guildId: a0, data: object4}]);
|
||||
puntFromSelectedChannelIfInaccessible(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function puntFromSelectedChannelIfInaccessible(a0) { // fn#52131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6785:1569, offset: 0x0131fe79, size: 161 bytes, params: 2, frame: 16
|
||||
var defaultChannel;
|
||||
var moduleValue;
|
||||
const channelId = SelectedChannelStore.getChannelId(a0);
|
||||
const channel = ChannelStore.getChannel(channelId);
|
||||
if (channelId == null) {
|
||||
if (!PermissionStore.can(Permissions.VIEW_CHANNEL, channel)) {
|
||||
defaultChannel = GuildChannelStore.getDefaultChannel(a0);
|
||||
if (defaultChannel != null) {
|
||||
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue.transitionTo(Routes.CHANNEL(a0, defaultChannel.id));
|
||||
}
|
||||
}
|
||||
} else if (!isStaticChannelRoute(channelId)) {
|
||||
if (!PermissionStore.can(Permissions.VIEW_CHANNEL, channel)) {
|
||||
defaultChannel = GuildChannelStore.getDefaultChannel(a0);
|
||||
if (defaultChannel != null) {
|
||||
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue.transitionTo(Routes.CHANNEL(a0, defaultChannel.id));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateImpersonatedChannels(a0, a1, a2) { // fn#52132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6785:1789, offset: 0x0131ff1a, size: 148 bytes, params: 4, frame: 17
|
||||
const Set = global.Set;
|
||||
const set = new Set(UserGuildSettingsStore.getOptedInChannels(a0));
|
||||
a1.forEach(_fun52133);
|
||||
a2.forEach(_fun52134);
|
||||
const updateImpersonatingBinding = updateImpersonating;
|
||||
const ImpersonateType = (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType;
|
||||
const NEW_MEMBER = ImpersonateType.NEW_MEMBER;
|
||||
updateImpersonatingBinding(a0, {type: NEW_MEMBER, optInChannels: set});
|
||||
}
|
||||
|
||||
function startImpersonating(a0, a1) { // fn#52135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6785:2114, offset: 0x0131ffae, size: 217 bytes, params: 3, frame: 22
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const VIEW_AS_ROLES_SELECTED = AnalyticEvents.VIEW_AS_ROLES_SELECTED;
|
||||
const object2 = {};
|
||||
const Object = global.Object;
|
||||
object2.num_roles = Object.keys(a1.roles).length;
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(a0), require);
|
||||
const type = a1.type;
|
||||
const ImpersonateType = (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType;
|
||||
const NEW_MEMBER = ImpersonateType.NEW_MEMBER;
|
||||
object2['is_viewing_as_member'] = type === NEW_MEMBER;
|
||||
Reflect.apply(track, defaultImport, [VIEW_AS_ROLES_SELECTED, object2]);
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'IMPERSONATE_UPDATE', guildId: a0,
|
||||
data: a1});
|
||||
puntFromSelectedChannelIfInaccessible(a0);
|
||||
}
|
||||
|
||||
function stopImpersonating(a0) { // fn#52136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6785:2511, offset: 0x01320087, size: 54 bytes, params: 2, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'IMPERSONATE_STOP', guildId: a0});
|
||||
}
|
||||
|
||||
function updateImpersonatedRoles(a0, a1) { // fn#52137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6785:2681, offset: 0x013200bd, size: 147 bytes, params: 3, frame: 17
|
||||
var r2;
|
||||
var value4;
|
||||
var id;
|
||||
var value5;
|
||||
((a0, a1) => {
|
||||
var env0_0 = a0;
|
||||
var value2 = GuildChannelStore.getSelectableChannelIds(a0);
|
||||
var items = [];
|
||||
arraySpread(items, GuildChannelStore.getVocalChannelIds(a0), arraySpread(items, value2, 0, a0), a0);
|
||||
var env0_1 = items;
|
||||
var Array = global.Array;
|
||||
var env0_2 = Array.from(a1);
|
||||
GuildChannelStore.addConditionalChangeListener(_fun52139);
|
||||
})(a0, a1);
|
||||
const object2 = {};
|
||||
const _createForOfIteratorHelperLoose_52127Binding = _createForOfIteratorHelperLoose_52127;
|
||||
const getManyRoles = GuildRoleStore.getManyRoles;
|
||||
let value2 = _createForOfIteratorHelperLoose_52127Binding(Reflect.apply(getManyRoles, GuildRoleStore, [a0, a1]));
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (!done) {
|
||||
for (r2 = value3; true; r2 = value5) {
|
||||
value4 = r2.value;
|
||||
id = value4.id;
|
||||
object2[id] = value4;
|
||||
value5 = value2();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
const updateImpersonatingBinding = updateImpersonating;
|
||||
const ImpersonateType = (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType;
|
||||
const NEW_MEMBER = ImpersonateType.NEW_MEMBER;
|
||||
updateImpersonatingBinding(a0, {type: NEW_MEMBER, roles: object2});
|
||||
}
|
||||
|
||||
function optIntoPrivateChannelsForGrantedRolesForPreview(a0, a1) { // fn#52138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6785:2720, owner: updateImpersonatedRoles.optIntoPrivateChannelsForGrantedRolesForPreview, offset: 0x01320150, size: 115 bytes, params: 3, frame: 17
|
||||
const env0_0 = a0;
|
||||
const selectableChannelIds = GuildChannelStore.getSelectableChannelIds(a0);
|
||||
const items2 = [];
|
||||
const value3 = arraySpread(items2, selectableChannelIds, 0, a0);
|
||||
const getVocalChannelIds = GuildChannelStore.getVocalChannelIds;
|
||||
arraySpread(items2, Reflect.apply(getVocalChannelIds, GuildChannelStore, [a0]), value3, a0);
|
||||
const Array = global.Array;
|
||||
const env0_2 = Array.from(a1);
|
||||
GuildChannelStore.addConditionalChangeListener(_fun52139);
|
||||
}
|
||||
|
||||
function _fun52139() { // fn#52139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6785:2897, offset: 0x013201c3, size: 176 bytes, params: 1, frame: 19
|
||||
const selfMember = GuildMemberStore.getSelfMember(env0_0);
|
||||
var env0_0 = selfMember;
|
||||
if (selfMember != null) {
|
||||
var binding = env0_2;
|
||||
if (binding.some(_fun52140)) {
|
||||
return true;
|
||||
}
|
||||
var getSelectableChannelIds = GuildChannelStore.getSelectableChannelIds;
|
||||
binding = env0_0;
|
||||
var value4 = Reflect.apply(getSelectableChannelIds, GuildChannelStore, [binding]);
|
||||
var items2 = [];
|
||||
var value5 = arraySpread(items2, value4, 0, binding);
|
||||
var getVocalChannelIds = GuildChannelStore.getVocalChannelIds;
|
||||
arraySpread(items2, Reflect.apply(getVocalChannelIds, GuildChannelStore, [binding]), value5, binding);
|
||||
var value6 = items2.filter(_fun52141);
|
||||
if (value6.length > 0) {
|
||||
updateImpersonatedChannels(env0_0, value6, []);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function _fun52140(a0) { // fn#52140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6785:2958, offset: 0x01320273, size: 31 bytes, params: 2, frame: 11
|
||||
const roles = env0_0.roles;
|
||||
return !roles.includes(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,344 @@
|
||||
/* Metro module 1937; source: modules/impersonate/ImpersonateStore.tsx; dependencies: [6, 7, 15, 17, 18, 1938, 1867, 661, 670, 21, 1943, 1391, 1944, 566, 694, 2] */
|
||||
function _fun21484(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:6, offset: 0x00ef1d89, size: 410 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
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 env0_11 = (require(661) /* metro dependency 661: Constants */).GuildSettingsSections;
|
||||
const env0_12 = (require(670) /* metro dependency 670: UserSettingsConstants */).ChannelNotificationSettingsFlags;
|
||||
const env0_13 = {};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun21488(Store);
|
||||
value.displayName = 'ImpersonateStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{IMPERSONATE_UPDATE: IMPERSONATE_UPDATE, IMPERSONATE_STOP: IMPERSONATE_STOP,
|
||||
GUILD_ROLE_DELETE: GUILD_ROLE_DELETE,
|
||||
USER_GUILD_SETTINGS_CHANNEL_UPDATE_BULK: USER_GUILD_SETTINGS_CHANNEL_UPDATE_BULK,
|
||||
GUILD_ONBOARDING_SELECT_OPTION: GUILD_ONBOARDING_SELECT_OPTION,
|
||||
GUILD_MEMBER_UPDATE_LOCAL: GUILD_MEMBER_UPDATE_LOCAL});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/impersonate/ImpersonateStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_21485() { // fn#21485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:243, offset: 0x00ef1f23, 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_21485_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun21488(a0) { // fn#21488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:451, offset: 0x00ef1f81, size: 425 bytes, params: 2, frame: 16
|
||||
const closure = ImpersonateStore;
|
||||
env0_8(closure, a0);
|
||||
return env0_5(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(GuildStore, GuildRoleStore);
|
||||
}}, {key: 'hasViewingRoles', value: value_21491}, {key: 'isViewingRoles', value: value_21492},
|
||||
{key: 'getViewingRoles', value: value_21493}, {key: 'getViewingRolesTimestamp', value: value_21494},
|
||||
{key: 'getData', value: value_21495}, {key: 'isFullServerPreview', value: value_21496}, {key: 'isOptInEnabled',
|
||||
value: value_21497}, {key: 'isOnboardingEnabled', value: value_21498}, {key: 'getViewingChannels',
|
||||
value: value_21499}, {key: 'getOnboardingResponses', value: value_21500}, {key: 'getMemberOptions',
|
||||
value: value_21501}, {key: 'isChannelOptedIn', value: function(a0, a1) {
|
||||
var r0;
|
||||
var value = this.getViewingChannels(a0);
|
||||
var value2 = value != null;
|
||||
if (value2) {
|
||||
value = value.has(a1);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}}, {key: 'isViewingServerShop', value: value_21503}, {key: 'getImpersonateType', value: value_21504},
|
||||
{key: 'getBackNavigationSection', value: value_21505}]);
|
||||
}
|
||||
|
||||
function IMPERSONATE_UPDATE({guildId, data}) { // fn#21506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:2770, offset: 0x00ef2591, size: 107 bytes, params: 2, frame: 16
|
||||
const roles = data.roles;
|
||||
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
delete roles[defaultImport.castGuildIdAsEveryoneGuildRoleId(guildId)];
|
||||
const binding = env0_13;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, data, defaultImport);
|
||||
const Date = global.Date;
|
||||
object2['timestamp'] = Date.now();
|
||||
binding[guildId] = object2;
|
||||
}
|
||||
|
||||
function IMPERSONATE_STOP({guildId}) { // fn#21507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:2934, offset: 0x00ef25fc, size: 41 bytes, params: 2, frame: 4
|
||||
if (env0_13[guildId] == null) {
|
||||
return false;
|
||||
}
|
||||
delete env0_13[guildId];
|
||||
}
|
||||
|
||||
function GUILD_ROLE_DELETE({guildId, roleId}) { // fn#21508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:3032, offset: 0x00ef2625, size: 57 bytes, params: 2, frame: 5
|
||||
if (env0_13[guildId] == null) {
|
||||
return false;
|
||||
}
|
||||
delete env0_13[guildId].roles[roleId];
|
||||
}
|
||||
|
||||
function USER_GUILD_SETTINGS_CHANNEL_UPDATE_BULK({guildId, overrides}) { // fn#21509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:3170, offset: 0x00ef265e, size: 214 bytes, params: 2, frame: 18
|
||||
var r0;
|
||||
var set;
|
||||
if (guildId == null) {
|
||||
return false;
|
||||
}
|
||||
if (env0_13[guildId] == null) {
|
||||
return false;
|
||||
}
|
||||
const property = env0_13[guildId];
|
||||
if (property == null) {
|
||||
return false;
|
||||
}
|
||||
const type = property.type;
|
||||
const ImpersonateType = (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType;
|
||||
const NEW_MEMBER = ImpersonateType.NEW_MEMBER;
|
||||
if (type !== NEW_MEMBER) {
|
||||
return false;
|
||||
}
|
||||
const optInChannels = property.optInChannels;
|
||||
if (optInChannels != null) {
|
||||
r0 = optInChannels;
|
||||
} else {
|
||||
set = new global.Set();
|
||||
}
|
||||
let value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
value = value.keys(overrides);
|
||||
value.forEach(_fun21510);
|
||||
property.optInChannels = r0;
|
||||
return true;
|
||||
}
|
||||
|
||||
function GUILD_ONBOARDING_SELECT_OPTION({guildId, optionId, selected, removedOptionIds}) { // fn#21511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:3585, offset: 0x00ef27a3, size: 238 bytes, params: 2, frame: 19
|
||||
if (guildId == null) {
|
||||
return false;
|
||||
}
|
||||
if (env0_13[guildId] == null) {
|
||||
return false;
|
||||
}
|
||||
const property = env0_13[guildId];
|
||||
if (property == null) {
|
||||
return false;
|
||||
}
|
||||
const type = property.type;
|
||||
const ImpersonateType = (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType;
|
||||
const NEW_MEMBER = ImpersonateType.NEW_MEMBER;
|
||||
if (type !== NEW_MEMBER) {
|
||||
return false;
|
||||
}
|
||||
const r0 = property.onboardingResponses ?? new global.Set();
|
||||
if (removedOptionIds != null && removedOptionIds.length > 0) {
|
||||
removedOptionIds.forEach(_fun21512);
|
||||
}
|
||||
if (selected) {
|
||||
r0.add(optionId);
|
||||
} else {
|
||||
r0.delete(optionId);
|
||||
}
|
||||
property.onboardingResponses = r0;
|
||||
return true;
|
||||
}
|
||||
|
||||
function GUILD_MEMBER_UPDATE_LOCAL({guildId, roles, flags}) { // fn#21513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:3963, offset: 0x00ef28a7, size: 153 bytes, params: 2, frame: 18
|
||||
var r4;
|
||||
var r0;
|
||||
if (guildId == null) {
|
||||
return false;
|
||||
}
|
||||
var value;
|
||||
const property = env0_13[guildId];
|
||||
const value2 = property != null;
|
||||
if (value2) {
|
||||
if (roles != null) {
|
||||
property.roles = roles.reduce(_fun21514, {});
|
||||
}
|
||||
r4 = flags != null && property.type === (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType.NEW_MEMBER;
|
||||
value = true;
|
||||
if (r4) {
|
||||
property.memberOptions.flags = flags;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ImpersonateStore() { // fn#21489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:463, offset: 0x00ef212a, size: 113 bytes, params: 1, frame: 20
|
||||
const value = environment.__proto__;
|
||||
env1_4(this, ImpersonateStore);
|
||||
const value3 = env1_7(ImpersonateStore);
|
||||
return env1_6(this, _isNativeReflectConstruct_21485() ? global.Reflect.construct(value3, arguments,
|
||||
env1_7(this).constructor) : value3.apply(this, arguments));
|
||||
}
|
||||
|
||||
function value_21491() { // fn#21491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:821, offset: 0x00ef21b9, size: 45 bytes, params: 1, frame: 12
|
||||
const functionUtilsModule = require(1944) /* metro dependency 1944: FunctionUtils */;
|
||||
return !functionUtilsModule.isPlainObjectEmpty(env1_13);
|
||||
}
|
||||
|
||||
function value_21492(a0) { // fn#21492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:900, offset: 0x00ef21e6, size: 29 bytes, params: 2, frame: 4
|
||||
var r0;
|
||||
let value = a0 != null;
|
||||
if (value) {
|
||||
value = environment.__proto__;
|
||||
value = env1_13[a0] != null;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_21493(a0) { // fn#21493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:970, offset: 0x00ef2203, size: 33 bytes, params: 2, frame: 3
|
||||
const value = environment.__proto__;
|
||||
return env1_13[a0]?.roles;
|
||||
}
|
||||
|
||||
function value_21494(a0) { // fn#21494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:1065, offset: 0x00ef2224, size: 45 bytes, params: 2, frame: 4
|
||||
const value = null;
|
||||
return value != a0 ? env1_13[a0] == undefined ? undefined : env1_13[a0].timestamp : value;
|
||||
}
|
||||
|
||||
function value_21496(a0) { // fn#21496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:1219, offset: 0x00ef2261, size: 70 bytes, params: 2, frame: 13
|
||||
const type = env1_13[a0]?.type;
|
||||
const ImpersonateType = (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType;
|
||||
const NEW_MEMBER = ImpersonateType.NEW_MEMBER;
|
||||
return type === NEW_MEMBER;
|
||||
}
|
||||
|
||||
function value_21497(a0) { // fn#21497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:1342, offset: 0x00ef22a7, size: 77 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const property = env1_13[a0];
|
||||
return property != null && property.type === (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType.NEW_MEMBER && property.optInEnabled;
|
||||
}
|
||||
|
||||
function value_21498(a0) { // fn#21498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:1477, offset: 0x00ef22f4, size: 79 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const property = env1_13[a0];
|
||||
return property != null && property.type === (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType.NEW_MEMBER && property.onboardingEnabled;
|
||||
}
|
||||
|
||||
function value_21499(a0) { // fn#21499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:1616, offset: 0x00ef2343, size: 78 bytes, params: 2, frame: 15
|
||||
const property = env1_13[a0];
|
||||
const value2 = null;
|
||||
return value2 == property || property.type !== (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType.NEW_MEMBER ? value2 : property.optInChannels;
|
||||
}
|
||||
|
||||
function value_21500(a0) { // fn#21500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:1759, offset: 0x00ef2391, size: 78 bytes, params: 2, frame: 15
|
||||
const property = env1_13[a0];
|
||||
const value2 = null;
|
||||
return value2 == property || property.type !== (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType.NEW_MEMBER ? value2 : property.onboardingResponses;
|
||||
}
|
||||
|
||||
function value_21501(a0) { // fn#21501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:1902, offset: 0x00ef23df, size: 78 bytes, params: 2, frame: 15
|
||||
const property = env1_13[a0];
|
||||
const value2 = null;
|
||||
return value2 == property || property.type !== (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType.NEW_MEMBER ? value2 : property.memberOptions;
|
||||
}
|
||||
|
||||
function value_21503(a0) { // fn#21503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:2146, offset: 0x00ef2456, size: 77 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
let value = a0 != null;
|
||||
if (value) {
|
||||
value = environment.__proto__;
|
||||
value = env1_13[a0]?.type === (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType.SERVER_SHOP;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_21504(a0) { // fn#21504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:2284, offset: 0x00ef24a3, size: 38 bytes, params: 2, frame: 4
|
||||
const value = null;
|
||||
if (value == a0) {
|
||||
return value;
|
||||
}
|
||||
const property = env1_13[a0];
|
||||
return value == property ? value : property.type;
|
||||
}
|
||||
|
||||
function value_21505(a0) { // fn#21505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:2397, offset: 0x00ef24c9, size: 200 bytes, params: 2, frame: 15
|
||||
var value;
|
||||
if (a0 == null) {
|
||||
value = environment.__proto__;
|
||||
} else {
|
||||
var property = env1_13[a0];
|
||||
if (property == null) {
|
||||
return GuildSettingsSections.ROLES;
|
||||
}
|
||||
var type = property.type;
|
||||
var ImpersonateType = (require(1943) /* metro dependency 1943: ImpersonateTypes */).ImpersonateType;
|
||||
var ROLES = ImpersonateType.ROLES;
|
||||
if (ROLES === type) {
|
||||
return property.returnToSection;
|
||||
}
|
||||
var SERVER_SHOP = ImpersonateType.SERVER_SHOP;
|
||||
if (SERVER_SHOP === type) {
|
||||
return property.returnToSection;
|
||||
}
|
||||
var NEW_MEMBER = ImpersonateType.NEW_MEMBER;
|
||||
if (NEW_MEMBER === type) {
|
||||
return GuildSettingsSections.ONBOARDING;
|
||||
}
|
||||
}
|
||||
return GuildSettingsSections.ROLES;
|
||||
}
|
||||
|
||||
function _fun21510(a0) { // fn#21510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:3434, offset: 0x00ef2734, size: 111 bytes, params: 2, frame: 18
|
||||
const property = overrides[a0];
|
||||
const flagUtilsModule = importAll(1391) /* metro dependency 1391: FlagUtils */;
|
||||
const hasFlag = flagUtilsModule.hasFlag;
|
||||
const r4 = property.flags ?? 0;
|
||||
const OPT_IN_ENABLED = ChannelNotificationSettingsFlags.OPT_IN_ENABLED;
|
||||
const hasFlag2 = Reflect.apply(hasFlag, flagUtilsModule, [r4, OPT_IN_ENABLED]);
|
||||
const binding = env0_1;
|
||||
if (hasFlag2) {
|
||||
binding.add(a0);
|
||||
} else {
|
||||
binding.delete(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun21514(a0, a1) { // fn#21514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2064:4106, offset: 0x00ef2940, size: 44 bytes, params: 3, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = GuildRoleStore.getRole(guildId, a1);
|
||||
if (value != null) {
|
||||
a0[a1] = value;
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/* Metro module 1943; source: modules/impersonate/ImpersonateTypes.tsx; dependencies: [2] */
|
||||
function _fun21581(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2070:6, offset: 0x00ef458e, size: 110 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/impersonate/ImpersonateTypes.tsx');
|
||||
exports.ImpersonateType = {ROLES: 'ROLES', NEW_MEMBER: 'NEW_MEMBER', SERVER_SHOP: 'SERVER_SHOP'};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user