Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,792 @@
/* Metro module 6911; source: modules/lurker_mode/LurkerActionCreators.tsx; dependencies: [5, 4294, 3785, 661, 694, 507, 6912, 1360, 6913, 6929, 2] */
function _fun55006(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7089:6, offset: 0x0137312f, size: 267 bytes, params: 8, frame: 21
const env0_0 = require;
const _arrayLikeToArray_55009 = 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 = function() {
return _stopLurkingAll.apply(this, arguments);
};
const closure2 = function() {
return _stopLurkingForGuild.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(importDefault(6929) /* metro dependency 6929: LurkerPreviewManager */).initialize();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/lurker_mode/LurkerActionCreators.tsx');
exports.stopLurkingAll = closure;
exports.stopLurkingForGuild = closure2;
exports.stopLurking = function() {
return _stopLurking.apply(this, arguments);
};
}
function _createForOfIteratorHelperLoose_55007(a0, a1) { // fn#55007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7089:151, offset: 0x0137323a, 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 _fun55008;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_55009(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_55009(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_55009(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun55008;
}
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 _stopLurkingAll() { // fn#55011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7089:1132, offset: 0x013733ac, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun55013).apply(this, arguments);
}
function _stopLurkingForGuild() { // fn#55021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7089:1869, offset: 0x013735e2, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun55023).apply(this, arguments);
}
function _stopLurking() { // fn#55024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7089:2320, offset: 0x0137372b, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun55026).apply(this, arguments);
}
function* _fun55013(a0) { // fn#55013, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7089:1185, offset: 0x013733e5, size: 218 bytes, params: 2, frame: 18
var environment;
if (true) {
var env0_0 = a0;
var env0_1;
value = environment.__proto__.__proto__;
var value4 = env2_5.lurkingGuildIds().filter(_fun55014);
if (value4.length === 0) {
return undefined;
}
var Map = global.Map;
var map = value4.map;
map = new Map(Reflect.apply(map, value4, [_fun55015]));
env2_1(env2_2[4]).dispatch({type: 'GUILD_STOP_LURKING', ignoredGuildIds: a0});
var Promise = global.Promise;
yield Promise.all(value4.map(_fun55016()));
}
}
function* _fun55023(a0) { // fn#55023, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7089:1932, offset: 0x0137361b, size: 272 bytes, params: 2, frame: 20
var binding;
var lurkingGuildIds;
var value3;
var includes;
var getLurkingSourceForGuild;
var value4;
var value5;
var dispatch;
var object3;
var binding2;
var property;
var value6;
var HTTP;
var del;
var GUILD_LEAVE;
var value7;
var object4;
var value8;
var value9;
var value10;
var error;
let value = undefined;
if (false) {
return value;
}
reduciblePort28: while (true) {
exceptionLanding27: while (true) {
value = environment.__proto__.__proto__;
binding = env2_5;
lurkingGuildIds = binding.lurkingGuildIds;
value3 = Reflect.apply(lurkingGuildIds, binding, []);
includes = value3.includes;
if (Reflect.apply(includes, value3, [a0])) {
binding = env2_5;
getLurkingSourceForGuild = binding.getLurkingSourceForGuild;
value4 = Reflect.apply(getLurkingSourceForGuild, binding, [a0]);
binding = env2_1;
value5 = binding(env2_2[4]);
dispatch = value5.dispatch;
Reflect.apply(dispatch, value5, [{type: 'GUILD_STOP_LURKING_FOR_GUILD', lurkingGuildId: a0}]);
try {
binding = env2_0;
} catch (error) {
break exceptionLanding27;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding27;
}
try {
property = binding2[5];
} catch (error) {
break exceptionLanding27;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding27;
}
try {
HTTP = value6.HTTP;
} catch (error) {
break exceptionLanding27;
}
try {
del = HTTP.del;
} catch (error) {
break exceptionLanding27;
}
try {
object3 = {};
} catch (error) {
break exceptionLanding27;
}
try {
binding = env2_6;
} catch (error) {
break exceptionLanding27;
}
try {
GUILD_LEAVE = binding.GUILD_LEAVE;
} catch (error) {
break exceptionLanding27;
}
try {
value7 = Reflect.apply(GUILD_LEAVE, binding, [a0]);
} catch (error) {
break exceptionLanding27;
}
try {
object3.url = value7;
} catch (error) {
break exceptionLanding27;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding27;
}
try {
object4.lurking = true;
} catch (error) {
break exceptionLanding27;
}
try {
object3.body = object4;
} catch (error) {
break exceptionLanding27;
}
try {
object3.oldFormErrors = true;
} catch (error) {
break exceptionLanding27;
}
try {
object3.rejectWithError = true;
} catch (error) {
break exceptionLanding27;
}
try {
value8 = Reflect.apply(del, HTTP, [object3]);
} catch (error) {
break exceptionLanding27;
}
yield value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
break exceptionLanding27;
}
if (value10) {
return value9;
}
break reduciblePort28;
}
break reduciblePort28;
}
binding = env2_1;
value = binding(env2_2[4]);
dispatch = value.dispatch;
Reflect.apply(dispatch, value, [{type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0,
lurkingSource: value4}]);
break reduciblePort28;
}
}
async function _fun55026() { // fn#55026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7089:2367, offset: 0x0137376d, size: 631 bytes, params: 1, frame: 29
var r19;
var environment;
var r4;
var r2;
var r5;
var r6;
var r7;
var r8;
var r9;
var r10;
var r11;
var r13;
var r17;
var r18;
var r20;
var r3;
var value7;
var getMobileLurkerServerPreview;
var includes;
var items2;
var getGuildId;
var filter;
var binding2;
var isNotNullish;
var value8;
var value9;
var enabled;
var value10;
var value11;
var generator;
var value12;
var done;
var value13;
var value14;
var value15;
var value16;
var value17;
var Symbol;
var iterator;
var next;
var error;
var value18;
var value19;
var value20;
var value21;
var value22;
let value = a0;
if (false) {
return undefined;
}
const value4 = undefined;
reducibleJoin3: while (true) {
if (value !== value4) {
r4 = value;
break reducibleJoin3;
}
value = null;
r4 = value;
break reducibleJoin3;
}
var env0_0;
await value4;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_5;
const value6 = binding.lurkingGuildIds();
let length = value6.length;
if (length !== 0) {
binding = env2_0;
value7 = binding(env2_2[6]);
getMobileLurkerServerPreview = value7.getMobileLurkerServerPreview;
reducibleJoin35: while (true) {
if (Reflect.apply(getMobileLurkerServerPreview, value7, ['LurkerActionCreators.stopLurking']).stickyLurk) {
break reducibleJoin35;
}
if (r4 != null) {
includes = value6.includes;
reducibleJoin9: while (true) {
if (Reflect.apply(includes, value6, [r4])) {
break reducibleJoin35;
}
break reducibleJoin9;
}
}
items2 = [r4];
binding = env2_4;
getGuildId = binding.getGuildId;
items2[1] = Reflect.apply(getGuildId, binding, []);
filter = items2.filter;
binding = env2_0;
binding2 = env2_2;
isNotNullish = binding(binding2[7]).isNotNullish;
value8 = Reflect.apply(filter, items2, [isNotNullish]);
env0_0 = value8;
value9 = binding(binding2[6]);
getMobileLurkerServerPreview = value9.getMobileLurkerServerPreview;
enabled = Reflect.apply(getMobileLurkerServerPreview, value9, ['LurkerActionCreators.stopLurking']).enabled;
if (enabled) {
filter = value6.filter;
value10 = Reflect.apply(filter, value6, [_fun55027]);
length = value10.length;
reducibleJoin11: while (true) {
if (length > 0) {
generator = loop_55029;
value = env2_7(value10);
value12 = value();
done = value12.done;
value13 = global;
value14 = 'iterator is not an object';
value15 = 'iterator.throw() did not return an object';
value16 = 'throw';
value17 = 'iterator.next() did not return an object';
if (done) {
r2 = value4;
} else {
r2 = value4;
r4 = value12;
r5 = value17;
r6 = value16;
r7 = value15;
r8 = value14;
r9 = value13;
r10 = value;
r11 = generator;
reducibleLoop15: while (true) {
value = r4.value;
value = Reflect.apply(r11, r2, [value]);
Symbol = r9.Symbol;
iterator = Symbol.iterator;
value = value[iterator]();
ensureObject(value, r8, r19);
next = value.next;
r13 = value;
r17 = value4;
r18 = next;
reduciblePort33: while (true) {
exceptionLanding19: while (true) {
reducibleLoop16: while (true) {
value = Reflect.apply(r18, r13, [r17]);
ensureObject(value, r5, r19);
done = value.done;
if (done) {
r3 = value;
break reduciblePort33;
}
try {
generatorSetDelegated(value);
} catch (error) {
break exceptionLanding19;
}
await value;
reducibleLoop22: while (true) {
try {
value = undefined;
value18 = false;
} catch (error) {
break exceptionLanding19;
}
if (value18) {
value19 = getMethod(r13, 'return', r19);
if (value19 === r2) {
return value;
}
value = Reflect.apply(value19, r13, [value]);
ensureObject(value, 'iterator.return() did not return an object',
value19);
done = value.done;
if (done) {
return value.value;
}
value20 = generatorSetDelegated(value);
await value;
r19 = value20;
continue reducibleLoop22;
}
r17 = value;
continue reducibleLoop16;
}
continue reducibleLoop16;
}
break reduciblePort33;
}
exceptionRetry19: while (true) {
value = getMethod(r13, r6, r19);
if (value === r2) {
value = 'return';
value21 = getMethod(r13, value, r19);
reducibleJoin32: while (true) {
if (value21 === r2) {
r20 = value;
break reducibleJoin32;
}
value = Reflect.apply(value21, r13, []);
value22 = 'iterator.return() did not return an object';
ensureObject(value, value22, r19);
r20 = value22;
break reducibleJoin32;
}
throwTypeError('yield* delegate must have a .throw() method', r20);
throw r2;
}
value = Reflect.apply(value, r13, [error]);
ensureObject(value, r7, r19);
done = value.done;
reducibleJoin33: while (true) {
if (done) {
r3 = value;
break reducibleJoin33;
}
generatorSetDelegated(value);
await value;
reducibleLoop22: while (true) {
try {
value = undefined;
value18 = false;
} catch (error) {
continue exceptionRetry19;
}
reducibleJoin24: while (true) {
if (value18) {
break reducibleJoin24;
}
r17 = value;
value = Reflect.apply(r18, r13, [r17]);
ensureObject(value, r5, r19);
done = value.done;
if (done) {
r3 = value;
break reducibleJoin33;
}
try {
generatorSetDelegated(value);
} catch (error) {
continue exceptionRetry19;
}
await value;
continue reducibleLoop22;
}
value19 = getMethod(r13, 'return', r19);
if (value19 === r2) {
return value;
}
value = Reflect.apply(value19, r13, [value]);
ensureObject(value, 'iterator.return() did not return an object',
value19);
done = value.done;
if (done) {
return value.value;
}
value20 = generatorSetDelegated(value);
await value;
r19 = value20;
continue reducibleLoop22;
}
}
break reduciblePort33;
}
}
r3.value;
value = Reflect.apply(r10, r2, []);
done = value.done;
if (done) {
return r2;
}
r4 = value;
continue reducibleLoop15;
}
}
return r2;
}
break reducibleJoin11;
}
}
await env2_9(value8);
value = undefined;
value11 = false;
if (value11) {
return value;
}
break reducibleJoin35;
}
}
return value4;
}
function _fun55015(a0) { // fn#55015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7089:1290, offset: 0x013734bf, size: 35 bytes, params: 2, frame: 12
const binding = env3_5;
const getLurkingSourceForGuild = binding.getLurkingSourceForGuild;
return [a0, Reflect.apply(getLurkingSourceForGuild, binding, [a0])];
}
function _fun55016() { // fn#55016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7089:1418, offset: 0x013734e2, size: 32 bytes, params: 1, frame: 12
const env0_0 = env3_3(_fun55018);
return _fun55019;
}
function* loop_55029(a0) { // fn#55029, original name: ?anon_0__loop, inferred name: loop_55029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7089:2749, offset: 0x013739ed, size: 71 bytes, params: 2, frame: 16
var environment;
if (true) {
var env0_0 = a0;
value = environment.__proto__.__proto__.__proto__.__proto__;
value = env4_0(env4_2[8]);
value.openLurkerLeavePrompt(a0, {onLeave: onLeave_55030});
}
}
function* _fun55018(a0) { // fn#55018, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7089:1438, offset: 0x0137350b, size: 215 bytes, params: 2, frame: 18
var binding2;
var property;
var value4;
var HTTP;
var del;
var object3;
var GUILD_LEAVE;
var value5;
var object4;
var value6;
var value7;
var value8;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_1;
value = binding.get(a0);
const value3 = null;
const r2 = value3 != value ? value : value3;
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
try {
binding = env5_0;
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
binding2 = env5_2;
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
property = binding2[5];
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
HTTP = value4.HTTP;
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
del = HTTP.del;
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
object3 = {};
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
binding = env5_6;
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
GUILD_LEAVE = binding.GUILD_LEAVE;
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
value5 = Reflect.apply(GUILD_LEAVE, binding, [a0]);
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
object3.url = value5;
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
object4 = {};
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
object4.lurking = true;
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
object3.body = object4;
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
object3.oldFormErrors = true;
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
object3.rejectWithError = true;
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
try {
value6 = Reflect.apply(del, HTTP, [object3]);
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env5_1;
value = binding(env5_2[4]);
value.dispatch({type: 'GUILD_STOP_LURKING_FAILURE', lurkingGuildId: a0, lurkingSource: r2});
return undefined;
}
return value8 ? value7 : undefined;
}
function loop_55029OnLeave() { // fn#55030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7089:2804, owner: loop_55029.onLeave, offset: 0x01373a34, size: 23 bytes, params: 1, frame: 11
env5_11(env0_0);
}
@@ -0,0 +1,55 @@
/* Metro module 6914; source: modules/lurker_mode/LurkerPreviewAnalytics.tsx; dependencies: [3785, 661, 683, 2] */
function _fun55041(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7092:6, offset: 0x01374168, size: 187 bytes, params: 8, frame: 19
const getNumLurkedGuilds = function() {
return LurkingStore.lurkingGuildIds().length;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/lurker_mode/LurkerPreviewAnalytics.tsx');
exports.trackLurkStarted = function(a0, a1, a2) {
var value = a1;
var value2 = a2;
var defaultImport = importDefault(dependencyMap[2]);
var track = defaultImport.track;
var MOBILE_LURKER_PREVIEW_LURK_STARTED = AnalyticEvents.MOBILE_LURKER_PREVIEW_LURK_STARTED;
var object = {guild_id: a0};
object.num_lurked_guilds = getNumLurkedGuilds();
var value4 = null;
object.join_source = value4 != value ? value : value4;
object.location = value4 != value2 ? value2 : value4;
Reflect.apply(track, defaultImport, [MOBILE_LURKER_PREVIEW_LURK_STARTED, object]);
};
exports.trackJoinClicked = function(a0, a1, a2) {
var defaultImport = importDefault(dependencyMap[2]);
var MOBILE_LURKER_PREVIEW_JOIN_CLICKED = AnalyticEvents.MOBILE_LURKER_PREVIEW_JOIN_CLICKED;
var object = {guild_id: a0};
object.num_lurked_guilds = getNumLurkedGuilds();
object.join_source = a1;
object.has_navigated_away = a2;
defaultImport.track(MOBILE_LURKER_PREVIEW_JOIN_CLICKED, object);
};
exports.trackLeavePromptLeaveClicked = function(a0) {
var defaultImport = importDefault(dependencyMap[2]);
var MOBILE_LURKER_PREVIEW_LEAVE_PROMPT_LEAVE_CLICKED = AnalyticEvents.MOBILE_LURKER_PREVIEW_LEAVE_PROMPT_LEAVE_CLICKED;
var object = {guild_id: a0};
object.num_lurked_guilds = getNumLurkedGuilds();
defaultImport.track(MOBILE_LURKER_PREVIEW_LEAVE_PROMPT_LEAVE_CLICKED, object);
};
exports.trackGuildIconClicked = function(a0) {
var defaultImport = importDefault(dependencyMap[2]);
var MOBILE_LURKER_PREVIEW_GUILD_ICON_CLICKED = AnalyticEvents.MOBILE_LURKER_PREVIEW_GUILD_ICON_CLICKED;
var object = {guild_id: a0};
object.num_lurked_guilds = getNumLurkedGuilds();
defaultImport.track(MOBILE_LURKER_PREVIEW_GUILD_ICON_CLICKED, object);
};
exports.trackLongPressLeaveClicked = function(a0) {
var defaultImport = importDefault(dependencyMap[2]);
var MOBILE_LURKER_PREVIEW_LONG_PRESS_LEAVE_CLICKED = AnalyticEvents.MOBILE_LURKER_PREVIEW_LONG_PRESS_LEAVE_CLICKED;
var object = {guild_id: a0};
object.num_lurked_guilds = getNumLurkedGuilds();
defaultImport.track(MOBILE_LURKER_PREVIEW_LONG_PRESS_LEAVE_CLICKED, object);
};
}
@@ -0,0 +1,539 @@
/* Metro module 6929; source: modules/lurker_mode/LurkerPreviewManager.tsx; dependencies: [5, 6, 7, 15, 17, 18, 4294, 3969, 3785, 6912, 694, 6911, 4561, 2] */
function _fun55077(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:6, offset: 0x013753fd, size: 328 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_55080 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const 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 */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
value = _fun55084(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/lurker_mode/LurkerPreviewManager.tsx');
exports.default = value;
exports.LURKER_PREVIEW_PERSIST_MS = 60000;
exports.LURKER_PREVIEW_MAX_CONCURRENT = 3;
}
function _createForOfIteratorHelperLoose_55078(a0, a1) { // fn#55078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:190, offset: 0x01375545, 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 _fun55079;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_55080(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_55080(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_55080(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun55079;
}
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 _isNativeReflectConstruct_55081() { // fn#55081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:1100, offset: 0x013756b7, 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_55081_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun55084(a0) { // fn#55084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:1299, offset: 0x01375715, size: 114 bytes, params: 2, frame: 16
const closure = LurkerPreviewManager;
env0_8(closure, a0);
return env0_5(closure, [{key: 'hasNavigatedAway', value: function(a0) {
return this.navigatedAwayFromLurkingGuildIds.has(a0);
}}, {key: '_initialize', value: function() {
LurkingStore.addChangeListener(this.handleStoreChange);
SelectedGuildStore.addChangeListener(this.handleStoreChange);
RTCConnectionStore.addChangeListener(this.handleStoreChange);
this.handleStoreChange();
}}, {key: '_terminate', value: value_55102}]);
}
function LurkerPreviewManager(a0) { // fn#55085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:1311, offset: 0x01375787, size: 311 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, LurkerPreviewManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(LurkerPreviewManager);
binding = env1_6;
if (_isNativeReflectConstruct_55081()) {
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);
const Map = global.Map;
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map();
value.timers = map instanceof Object ? map : value4;
let Set = global.Set;
const value6 = Object.create(Set.prototype, {constructor: {value: Set}});
let set = new Set();
value.viewedLurkingGuildIds = set instanceof Object ? set : value6;
Set = global.Set;
const value8 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
value.navigatedAwayFromLurkingGuildIds = set instanceof Object ? set : value8;
value.handleStoreChange = handleStoreChange_55086;
value.trackViewedLurkingGuilds = trackViewedLurkingGuilds;
value.evictOverflowingLurkers = evictOverflowingLurkers;
value.ensureMissingExpiries = ensureMissingExpiries;
value.expireElapsed = expireElapsed;
value.syncTimers = syncTimers;
value.expireLurkerPreviews = _fun55095();
return value;
}
function value_55102() { // fn#55102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:4232, offset: 0x01375f45, size: 190 bytes, params: 1, frame: 15
var r3;
var value3;
var clearTimeout;
var value4;
let value = environment.__proto__;
LurkingStore.removeChangeListener(this.handleStoreChange);
SelectedGuildStore.removeChangeListener(this.handleStoreChange);
RTCConnectionStore.removeChangeListener(this.handleStoreChange);
const _createForOfIteratorHelperLoose_55078Binding = _createForOfIteratorHelperLoose_55078;
value = this.timers.values();
value = _createForOfIteratorHelperLoose_55078Binding(value);
const value2 = value();
let done = value2.done;
if (!done) {
for (r3 = value2; true; r3 = value4) {
value3 = r3.value;
clearTimeout = global.clearTimeout;
clearTimeout(value3);
value4 = value();
done = value4.done;
if (done) {
break;
}
}
}
this.timers.clear();
this.viewedLurkingGuildIds.clear();
this.navigatedAwayFromLurkingGuildIds.clear();
}
function LurkerPreviewManagerHandleStoreChange() { // fn#55086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:1669, owner: LurkerPreviewManager.handleStoreChange, offset: 0x013758be, size: 61 bytes, params: 1, frame: 9
const binding = env0_0;
binding.trackViewedLurkingGuilds();
binding.evictOverflowingLurkers();
binding.ensureMissingExpiries();
binding.expireElapsed();
binding.syncTimers();
}
function trackViewedLurkingGuilds() { // fn#55087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:1818, owner: LurkerPreviewManager.trackViewedLurkingGuilds, offset: 0x013758fb, size: 363 bytes, params: 1, frame: 18
var r6;
var r4;
var property;
var has;
var value8;
var value10;
var value13;
var value14;
const Set = global.Set;
let value = environment.__proto__.__proto__;
const set = new Set(LurkingStore.lurkingGuildIds());
let Array = global.Array;
let from = Array.from;
let viewedLurkingGuildIds = env0_0.viewedLurkingGuildIds;
const value6 = Reflect.apply(from, Array, [viewedLurkingGuildIds]);
let length = value6.length;
const value7 = 0;
if (value7 < length) {
r6 = value7;
while (true) {
property = value6[r6];
has = set.has;
if (!Reflect.apply(has, set, [property])) {
viewedLurkingGuildIds = env0_0.viewedLurkingGuildIds;
viewedLurkingGuildIds.delete(property);
}
value8 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
length = value6.length;
if (value8 < length) {
r6 = value8;
continue;
}
break;
}
}
Array = global.Array;
from = Array.from;
let navigatedAwayFromLurkingGuildIds = env0_0.navigatedAwayFromLurkingGuildIds;
const value9 = Reflect.apply(from, Array, [navigatedAwayFromLurkingGuildIds]);
length = value9.length;
if (value7 < length) {
r4 = value7;
while (true) {
property = value9[r4];
has = set.has;
if (!Reflect.apply(has, set, [property])) {
navigatedAwayFromLurkingGuildIds = env0_0.navigatedAwayFromLurkingGuildIds;
navigatedAwayFromLurkingGuildIds.delete(property);
}
value10 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
length = value9.length;
if (value10 < length) {
r4 = value10;
continue;
}
break;
}
}
const guildId = SelectedGuildStore.getGuildId();
value = _createForOfIteratorHelperLoose_55078(env0_0.viewedLurkingGuildIds);
const value12 = value();
let done = value12.done;
if (!done) {
r4 = value12;
while (true) {
value13 = r4.value;
if (value13 !== guildId) {
navigatedAwayFromLurkingGuildIds = env0_0.navigatedAwayFromLurkingGuildIds;
navigatedAwayFromLurkingGuildIds.add(value13);
}
value14 = value();
done = value14.done;
if (done) {
break;
}
r4 = value14;
continue;
}
}
if (guildId != null && set.has(guildId)) {
env0_0.viewedLurkingGuildIds.add(guildId);
}
}
function evictOverflowingLurkers() { // fn#55088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:2360, owner: LurkerPreviewManager.evictOverflowingLurkers, offset: 0x01375a66, size: 121 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
const value2 = LurkingStore.lurkingGuildIds();
if (!(value2.length <= 3)) {
value = require(6912) /* metro dependency 6912: MobileLurkerServerPreviewExperiment */;
if (value.getMobileLurkerServerPreview('LurkerPreviewManager.evictOverflowingLurkers').stickyLurk) {
value = value2.length - 3;
value = value2.slice(0, value);
env0_0.expireLurkerPreviews(value);
}
}
}
function ensureMissingExpiries() { // fn#55089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:2592, owner: LurkerPreviewManager.ensureMissingExpiries, offset: 0x01375adf, size: 229 bytes, params: 1, frame: 14
var environment;
var r1;
var value3;
var value4;
var moduleValue;
var dispatch;
var object2;
let value = environment.__proto__.__proto__;
const value2 = LurkingStore.lurkingGuildIds();
if (value2.length !== 0) {
var env0_0 = LurkingStore.getLurkingPreviewExpirations();
var env0_1 = SelectedGuildStore.getGuildId();
value3 = value2.filter(_fun55090);
value4 = value3.length !== 0;
if (value4) {
moduleValue = require(6912) /* metro dependency 6912: MobileLurkerServerPreviewExperiment */;
r1 = moduleValue.getMobileLurkerServerPreview('LurkerPreviewManager.ensureMissingExpiries').stickyLurk;
} else {
r1 = value4;
}
if (r1) {
value = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatch = value.dispatch;
object2 = {type: 'LURKER_PREVIEW_SET_EXPIRY', guildIds: value3};
object2.expiresAt = global.Date.now() + 60000;
Reflect.apply(dispatch, value, [object2]);
}
}
}
function expireElapsed() { // fn#55091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:2981, owner: LurkerPreviewManager.expireElapsed, offset: 0x01375bff, size: 177 bytes, params: 1, frame: 19
var r3;
var r0;
var property;
var value7;
var value8;
var value9;
let value = environment.__proto__.__proto__;
const lurkingPreviewExpirations = LurkingStore.getLurkingPreviewExpirations();
const guildId = SelectedGuildStore.getGuildId();
value = RTCConnectionStore.getGuildId();
const Date = global.Date;
const value4 = Date.now();
const items2 = [];
const Object = global.Object;
const value5 = Object.keys(lurkingPreviewExpirations);
let length = value5.length;
const value6 = 0;
if (value6 < length) {
r3 = value6;
while (true) {
property = value5[r3];
if (property !== guildId) {
value7 = property !== value;
if (!value7) {
r0 = value7;
continue;
}
value8 = lurkingPreviewExpirations[property] <= value4;
r0 = value8;
if (r0) {
items2.push(property);
break;
}
break;
}
value9 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
length = value5.length;
if (value9 < length) {
r3 = value9;
continue;
}
break;
}
}
if (items2.length > value6) {
env0_0.expireLurkerPreviews(items2);
}
}
function syncTimers() { // fn#55092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:3216, owner: LurkerPreviewManager.syncTimers, offset: 0x01375cb0, size: 225 bytes, params: 1, frame: 22
var environment;
var r7;
var r4;
var property;
var value5;
var clearTimeout;
var value6;
var value7;
let value = environment.__proto__.__proto__;
value = LurkingStore.getLurkingPreviewExpirations();
const env0_0 = value;
const Array = global.Array;
const from = Array.from;
let timers = env0_0.timers;
const value3 = Reflect.apply(from, Array, [timers.keys()]);
let length = value3.length;
const value4 = 0;
if (value4 < length) {
r7 = value4;
while (true) {
property = value3[r7];
if (value[property] == null) {
timers = env0_0.timers;
value5 = timers.get(property);
if (value5 == null) {
continue;
}
clearTimeout = global.clearTimeout;
clearTimeout(value5);
timers = env0_0.timers;
timers.delete(property);
}
value6 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
length = value3.length;
if (value6 < length) {
r7 = value6;
continue;
}
break;
}
}
const closure = syncTimers_loop;
const Object = global.Object;
value = Object.keys(value);
length = value.length;
if (value4 < length) {
for (r4 = value4; true; r4 = value7) {
closure(value[r4]);
value7 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
length = value.length;
if (!(value7 < length)) {
break;
}
}
}
}
function _fun55095() { // fn#55095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:3675, offset: 0x01375e45, size: 32 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun55097);
return _fun55099;
}
function _fun55090(a0) { // fn#55090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:2708, offset: 0x01375bc4, size: 59 bytes, params: 2, frame: 12
var value;
let r0 = env0_0[a0] == null && a0 !== env0_1;
if (r0) {
value = environment.__proto__;
value = env1_0.viewedLurkingGuildIds.has(a0);
r0 = value;
}
return r0;
}
function syncTimers_loop(a0) { // fn#55093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:3421, owner: LurkerPreviewManager.syncTimers._loop, offset: 0x01375d91, size: 136 bytes, params: 2, frame: 16
const env0_0 = a0;
const timers = env1_0.timers;
if (timers.has(a0)) {
return 0;
}
const property = env0_0[a0];
let Date = global.Date;
if (property <= Date.now()) {
return 0;
}
Date = global.Date;
env1_0.timers.set(a0, global.setTimeout(_fun55094, property - Date.now()));
}
function* _fun55097(a0) { // fn#55097, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:3695, offset: 0x01375e6e, size: 67 bytes, params: 2, frame: 14
if (true) {
var Promise = global.Promise;
yield Promise.all(a0.map(_fun55098));
if (false) {
return undefined;
}
}
}
function _fun55094() { // fn#55094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:3531, offset: 0x01375e19, size: 44 bytes, params: 1, frame: 12
const binding = env2_0;
binding.timers.delete(env0_0);
binding.handleStoreChange();
}
function _fun55098(a0) { // fn#55098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7107:3733, offset: 0x01375eb1, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
return env5_0(env5_2[11]).stopLurkingForGuild(a0);
}
@@ -0,0 +1,401 @@
/* Metro module 3785; source: modules/lurker_mode/LurkingStore.tsx; dependencies: [6, 7, 15, 17, 18, 1422, 1945, 1867, 1878, 661, 566, 694, 2] */
function _fun28721(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#28721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:6, offset: 0x00f811e2, size: 518 bytes, params: 8, frame: 19
const _arrayLikeToArray_28727 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const 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 = (require(1422) /* metro dependency 1422: GuildRecord */).isGuildLurker;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_9 = value.JoinGuildSources;
const env0_10 = value.ME;
let env0_11 = [];
const env0_12 = {};
let env0_13 = {};
let env0_14 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun28731(Store).displayName = 'LurkingStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
env0_11 = GuildStore.getGuildsArray().filter(_fun28742).map(_fun28743);
env0_13 = {};
env0_14 = {};
}, GUILD_JOIN: GUILD_JOIN_28744, GUILD_STOP_LURKING: function({ignoredGuildIds}) {
return _fun28746(ignoredGuildIds);
}, GUILD_STOP_LURKING_FOR_GUILD: function({lurkingGuildId}) {
return removeLurkedGuild(lurkingGuildId);
}, GUILD_STOP_LURKING_FAILURE: function({lurkingGuildId, lurkingSource}) {
addLurkingGuild(lurkingGuildId);
setLurkingSource(lurkingGuildId, lurkingSource);
return true;
}, GUILD_CREATE: GUILD_CREATE_28750, GUILD_DELETE: GUILD_DELETE_28751, GUILD_MEMBER_ADD: GUILD_MEMBER_ADD_28752,
LURKER_PREVIEW_SET_EXPIRY: LURKER_PREVIEW_SET_EXPIRY});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/lurker_mode/LurkingStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_28722() { // fn#28722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:244, offset: 0x00f813e8, 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_28722_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_28725(a0, a1) { // fn#28725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:437, offset: 0x00f81446, 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 _fun28726;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_28727(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_28727(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_28727(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun28726;
}
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 removeLurkedGuild(a0) { // fn#28728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:1371, offset: 0x00f815b8, size: 99 bytes, params: 2, frame: 16
var items2;
let binding = env0_11;
const value2 = binding.indexOf(a0);
if (value2 > -1) {
binding = env0_11;
items2 = [];
arraySpread(items2, binding, 0, value2);
items2.splice(value2, 1);
delete env0_12[a0];
delete env0_13[a0];
delete env0_14[a0];
return true;
}
return false;
}
function addLurkingGuild(a0) { // fn#28729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:1515, offset: 0x00f8161b, size: 77 bytes, params: 2, frame: 17
var r1;
var r0;
var binding;
var value3;
var items2;
var value5;
const value2 = a0 !== ME;
if (value2) {
binding = env0_11;
value3 = binding.includes(a0);
if (value3) {
r1 = !value3;
} else {
binding = env0_11;
items2 = [];
value5 = arraySpread(items2, binding, 0, undefined);
items2[value5] = a0;
value5 + 1;
r1 = true;
}
r0 = r1;
} else {
r0 = value2;
}
return r0;
}
function setLurkingSource(a0, a1) { // fn#28730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:1591, offset: 0x00f81668, size: 40 bytes, params: 3, frame: 3
if (a1 == null) {
delete env0_13[a0];
} else {
env0_13[a0] = a1;
}
}
function _fun28731(a0) { // fn#28731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:1655, offset: 0x00f81690, size: 233 bytes, params: 2, frame: 16
const closure = LurkingStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: function() {
this.waitFor(GuildMemberStore, GuildStore, UserStore);
}}, {key: 'lurkingGuildIds', value: value_28734}, {key: 'mostRecentLurkedGuildId', value: value_28735},
{key: 'isLurking', value: value_28736}, {key: 'getLurkingSourceForGuild', value: value_28737},
{key: 'getLoadId', value: value_28738}, {key: 'getLurkingPreviewExpirations', value: value_28739},
{key: 'getLurkingPreviewExpiry', value: value_28740}]);
}
function CONNECTION_OPEN_28741() { // fn#28741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:2665, offset: 0x00f818f5, size: 69 bytes, params: 1, frame: 13
env0_11 = GuildStore.getGuildsArray().filter(function(a0) {
return isGuildLurker(a0);
}).map(function(a0) {
return a0.id;
});
env0_13 = {};
env0_14 = {};
}
function GUILD_JOIN_28744({guildId, lurker, source, directoryChannelId, loadId}) { // fn#28744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:2773, offset: 0x00f8193a, size: 177 bytes, params: 2, frame: 17
if (lurker) {
addLurkingGuild(guildId);
if (loadId != null) {
env0_12[guildId] = loadId;
}
delete env0_14[guildId];
if (JoinGuildSources.MOBILE_GUILD_DISCOVERY === source) {
setLurkingSource(guildId, {type: JoinGuildSources.MOBILE_GUILD_DISCOVERY});
} else if (JoinGuildSources.DIRECTORY_ENTRY === source) {
setLurkingSource(guildId, {type: JoinGuildSources.DIRECTORY_ENTRY, directoryChannelId: directoryChannelId});
} else {
setLurkingSource(guildId, null);
}
return true;
}
return false;
}
function GUILD_STOP_LURKING({ignoredGuildIds}) { // fn#28745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:3215, offset: 0x00f819eb, size: 25 bytes, params: 2, frame: 11
return clearLurkingGuilds(ignoredGuildIds);
}
function GUILD_CREATE_28750({guild}) { // fn#28750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:3697, offset: 0x00f81ae7, size: 77 bytes, params: 2, frame: 13
var r0;
const r2 = guild.joined_at == null || !env0_11.includes(guild.id);
if (r2) {
r0 = !r2;
} else {
removeLurkedGuild(guild.id);
r0 = true;
}
return r0;
}
function GUILD_DELETE_28751({guild}) { // fn#28751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:3831, offset: 0x00f81b34, size: 59 bytes, params: 2, frame: 13
var r0;
const binding = env0_11;
const value2 = binding.includes(guild.id);
if (value2) {
removeLurkedGuild(guild.id);
r0 = true;
} else {
r0 = !!value2;
}
return r0;
}
function GUILD_MEMBER_ADD_28752({guildId, joinedAt, user}) { // fn#28752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:3948, offset: 0x00f81b6f, size: 108 bytes, params: 2, frame: 17
var r0;
let r4 = user.id !== UserStore.getCurrentUser()?.id || joinedAt == null;
r4 = !r4 ? !env0_11.includes(guildId) : r4;
if (r4) {
r0 = !r4;
} else {
removeLurkedGuild(guildId);
r0 = true;
}
return r0;
}
function LURKER_PREVIEW_SET_EXPIRY({guildIds, expiresAt}) { // fn#28753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:4155, offset: 0x00f81bdb, size: 121 bytes, params: 2, frame: 19
var r2;
var r3;
var r9;
var r0;
var value5;
var binding;
var includes;
var value6;
var value7;
const value2 = _createForOfIteratorHelperLoose_28725(guildIds);
const value3 = value2();
let done = value3.done;
if (done) {
r0 = false;
} else {
r2 = false;
r3 = value3;
while (true) {
value5 = r3.value;
binding = env0_11;
includes = binding.includes;
if (Reflect.apply(includes, binding, [value5])) {
if (env0_14[value5] === expiresAt) {
continue;
}
env0_14[value5] = expiresAt;
value6 = true;
r9 = value6;
} else {
r9 = r2;
}
value7 = value2();
done = value7.done;
if (done) {
r0 = r9;
break;
}
r2 = r9;
r3 = value7;
continue;
}
}
return r0;
}
function value_28735() { // fn#28735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:2066, offset: 0x00f8180d, size: 42 bytes, params: 1, frame: 4
return env1_11.length === 0 ? null : env1_11[env1_11.length - 1];
}
function value_28736(a0) { // fn#28736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:2141, offset: 0x00f81837, size: 81 bytes, params: 2, frame: 13
let value = environment.__proto__;
const guild = GuildStore.getGuild(a0);
if (guild == null) {
return false;
}
const isCurrentUserGuest2 = GuildMemberStore.isCurrentUserGuest(a0);
value = isGuildLurker(guild);
const Boolean = global.Boolean;
return Boolean(!isCurrentUserGuest2 && value);
}
function value_28738(a0) { // fn#28738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:2377, offset: 0x00f818b2, size: 25 bytes, params: 2, frame: 3
const value = null;
return value != a0 ? env1_12[a0] : value;
}
function value_28740(a0) { // fn#28740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:2517, offset: 0x00f818cb, size: 42 bytes, params: 2, frame: 4
const value = null;
return value == a0 ? value : value != env1_14[a0] ? env1_14[a0] : value;
}
function clearLurkingGuilds(a0) { // fn#28746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:3275, owner: GUILD_STOP_LURKING.clearLurkingGuilds, offset: 0x00f81a04, size: 105 bytes, params: 2, frame: 15
var environment;
const value = a0;
const Set = global.Set;
const r3 = value ?? [];
let items2 = [];
arraySpread(items2, r3, 0, Set);
let set = new Set(items2);
set = environment.__proto__;
const binding = env1_11;
items2 = [];
arraySpread(items2, binding, 0, Set);
return items2.reduce(_fun28747, false);
}
function _fun28747(a0, a1) { // fn#28747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3912:3360, offset: 0x00f81a6d, size: 54 bytes, params: 3, frame: 13
const value = a0;
const binding = env0_0;
return binding.has(a1) ? value : removeLurkedGuild(a1) || value;
}
@@ -0,0 +1,15 @@
/* Metro module 6912; source: modules/lurker_mode/experiments/MobileLurkerServerPreviewExperiment.tsx; dependencies: [1358, 2] */
function _fun55032(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7090:6, offset: 0x01373a4b, size: 210 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
value = value({'name': '2026-05-mobile-lurker-server-preview', 'kind': 'user', defaultConfig: {'enabled': false,
'stickyLurk': false}, variations: {[1]: {'enabled': true, 'stickyLurk': false}, [2]: {'enabled': true,
'stickyLurk': true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/lurker_mode/experiments/MobileLurkerServerPreviewExperiment.tsx');
exports.default = value;
exports.MobileLurkerServerPreviewExperiment = value;
exports.useMobileLurkerServerPreview = useMobileLurkerServerPreview;
exports.getMobileLurkerServerPreview = getMobileLurkerServerPreview;
}
@@ -0,0 +1,140 @@
/* Metro module 14398; source: modules/lurker_mode/native/LurkerPreviewCooldownBadge.tsx; dependencies: [57, 31, 27, 33, 4017, 7744, 4501, 697, 1305, 6929, 3860, 4504, 2] */
function _fun109035(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14595:6, offset: 0x0233ad8d, size: 596 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const Math = global.Math;
const PI = Math.PI;
const env0_7 = 2 * PI * 6;
object3 = {duration: 1000};
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object3.easing = Easing.linear;
const reanimatedRexport = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
const createAnimatedComponent = reanimatedRexport.createAnimatedComponent;
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
const env0_9 = Reflect.apply(createAnimatedComponent, reanimatedRexport, [Circle]);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'borderRadius': 20, 'backgroundColor': null, 'position': 'absolute'};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
const BADGE_PADDING = (require(1305) /* metro dependency 1305: native */).BADGE_PADDING;
object4.bottom = -BADGE_PADDING;
object4.right = -BADGE_PADDING;
object4.padding = BADGE_PADDING;
object4.height = 22;
object4.width = 22;
object4.alignItems = 'center';
object4.justifyContent = 'center';
object3.outerRing = object4;
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object3.innerFill = {'borderRadius': 20, 'backgroundColor': null, 'height': 16, 'width': 16, 'alignItems': 'center',
'justifyContent': 'center', backgroundColor: BACKGROUND_MOD_STRONG};
object3.progressRing = {position: 'absolute', transform: [{rotate: '90deg'}, {scaleX: -1}]};
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object3]);
object3 = {code: 'function LurkerPreviewCooldownBadgeTsx1(){const{PROGRESS_CIRCUMFERENCE,animatedProgress}=this.__closure;return{strokeDashoffset:PROGRESS_CIRCUMFERENCE*(1-animatedProgress.get())};}'};
value = value.memo(LurkerPreviewCooldownBadge);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/lurker_mode/native/LurkerPreviewCooldownBadge.tsx');
exports.default = value;
exports.useHasExpired = useHasExpired;
}
function LurkerPreviewCooldownBadge({expiresAt, totalDurationMs = require(dependencyMap[9]).LURKER_PREVIEW_PERSIST_MS, style}) { // fn#109036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14595:969, offset: 0x0233afe1, size: 485 bytes, params: 2, frame: 25
const styles = useStyles();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
const value2 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BRAND]);
let binding = env0_4;
const value3 = binding.useCallback(_fun109037, [expiresAt, totalDurationMs]);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(value3());
binding.useEffect(_fun109038, [value4, value3]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedProps = reanimatedRexportModule.useAnimatedProps;
const closure = LurkerPreviewCooldownBadgeP;
binding = env0_7;
closure.__closure = {PROGRESS_CIRCUMFERENCE: binding, animatedProgress: value4};
closure.__workletHash = 7162520447613;
closure.__initData = env0_11;
return (
<View
style={[styles.outerRing, style]}
pointerEvents="none"
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
>
<View style={styles.innerFill}>
{((Component) => <Component width={16} height={16} style={styles.progressRing}>{((Component) => <Component cx={8} cy={8} r={6} fill="none" stroke={value2} strokeWidth={4} strokeDasharray={binding} strokeLinecap="butt" animatedProps={Reflect.apply(useAnimatedProps,
reanimatedRexportModule,
[closure])} />)(env0_9)}</Component>)(importDefault(7744) /* metro dependency 7744 */)}
</View>
</View>
);
}
function useHasExpired(a0) { // fn#109042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14595:2111, offset: 0x0233b2f4, size: 99 bytes, params: 2, frame: 17
const env0_0 = a0;
const binding = env0_4;
const value = env0_3(binding.useState(null), 2);
const property = value[0];
const env0_1 = value[1];
binding.useEffect(_fun109043, [a0]);
return a0 != null && property === a0;
}
function _fun109037() { // fn#109037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14595:1160, offset: 0x0233b1c6, size: 71 bytes, params: 1, frame: 11
const expiresAtBinding = expiresAt;
const Date = global.Date;
const value = (expiresAtBinding - Date.now()) / env0_1;
const value3 = 0;
return 0.9 * (value < value3 ? value3 : value > 1 ? 1 : value);
}
function _fun109038() { // fn#109038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14595:1278, offset: 0x0233b20d, size: 114 bytes, params: 1, frame: 19
const binding = env0_3;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [timingModule.withTiming(env0_2(), env1_8, 'animate-always')]);
const env0_0 = global.setInterval(_fun109039, 1000);
return _fun109040;
}
function LurkerPreviewCooldownBadgeP() { // fn#109041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14595:1491, owner: LurkerPreviewCooldownBadge.p, offset: 0x0233b2c9, size: 43 bytes, params: 1, frame: 11
const object2 = {};
const value = environment.__proto__;
object2.strokeDashoffset = env1_7 * (1 - env0_3.get());
return object2;
}
function _fun109043() { // fn#109043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14595:2203, offset: 0x0233b357, size: 97 bytes, params: 1, frame: 16
var Math;
var max;
var binding;
var Date;
var value;
if (env0_0 != null) {
Math = global.Math;
max = Math.max;
binding = env0_0;
Date = global.Date;
value = binding - Date.now();
value = Reflect.apply(max, Math, [0, value]);
var env0_0 = global.setTimeout(_fun109044, value);
return _fun109045;
}
}
function _fun109039() { // fn#109039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14595:1353, offset: 0x0233b27f, size: 74 bytes, params: 1, frame: 18
const value = environment.__proto__;
const binding = env1_3;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [timingModule.withTiming(env1_2(), env2_8, 'animate-always')]);
}
@@ -0,0 +1,88 @@
/* Metro module 9321; source: modules/lurker_mode/native/LurkerServerPreviewJoinButton.tsx; dependencies: [31, 1379, 1878, 3785, 661, 33, 566, 6927, 1314, 6914, 6929, 6593, 4578, 1244, 1423, 3995, 2] */
function _fun72815(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9507:6, offset: 0x01d54ae7, size: 222 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).JoinGuildSources;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(LurkerServerPreviewJoinButton);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/lurker_mode/native/LurkerServerPreviewJoinButton.tsx');
exports.default = value;
}
function LurkerServerPreviewJoinButton({guildId, joinSource, onBeforeJoin}) { // fn#72816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9507:191, offset: 0x01d54bc5, size: 442 bytes, params: 2, frame: 20
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const value2 = currentUser.useCallback(_fun72818, [guildId, joinSource, onBeforeJoin]);
if (currentUser == null) {
return (
<Button
grow
variant="primary"
size="md"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VJlc0S)}
onPress={value2}
/>
);
}
const userAvatarSource = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getUserAvatarSource(currentUser,
false);
const value4 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['5qtVhX'],
{usernameHook: usernameHook_72819});
const Button2 = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const Icon = Button2.Icon;
return (
<Button
grow
variant="primary"
size="md"
text={value4}
icon={<Icon source={userAvatarSource} variant="entity" />}
onPress={value2}
/>
);
}
function _fun72818() { // fn#72818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9507:351, offset: 0x01d54d7f, size: 279 bytes, params: 1, frame: 21
var value5;
var moduleValue;
let value = environment.__proto__;
const lurkingSourceForGuild = LurkingStore.getLurkingSourceForGuild(guildId);
const value4 = undefined;
const type = lurkingSourceForGuild == null ? value4 : lurkingSourceForGuild.type;
const DIRECTORY_ENTRY = JoinGuildSources.DIRECTORY_ENTRY;
if (type === DIRECTORY_ENTRY) {
value5 = ChannelStore.getChannel(lurkingSourceForGuild.directoryChannelId);
if (value5 != null) {
moduleValue = require(6927) /* metro dependency 6927: HubProgressActionCreators */;
moduleValue.setHubProgressActionComplete(value5.getGuildId(),
(require(1314) /* metro dependency 1314: preloaded_user_settings */).HubProgressStep.JOIN_GUILD);
}
}
const lurkerPreviewAnalyticsModule = require(6914) /* metro dependency 6914: LurkerPreviewAnalytics */;
const trackJoinClicked = lurkerPreviewAnalyticsModule.trackJoinClicked;
guildIdBinding = guildId;
const joinSourceBinding = joinSource;
const defaultImport = importDefault(6929) /* metro dependency 6929: LurkerPreviewManager */;
Reflect.apply(trackJoinClicked, lurkerPreviewAnalyticsModule, [guildIdBinding, joinSourceBinding,
defaultImport.hasNavigatedAway(guildIdBinding)]);
if (onBeforeJoin != null) {
onBeforeJoin();
}
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.joinGuild(guildId, {source: joinSource});
return value4;
}
function LurkerServerPreviewJoinButtonUsernameHook() { // fn#72819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9507:936, owner: LurkerServerPreviewJoinButton.usernameHook, offset: 0x01d54e96, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(3995) /* metro dependency 3995: UserUtils */).getFormattedName(currentUser);
}
@@ -0,0 +1,39 @@
/* Metro module 9305; source: modules/lurker_mode/native/ServerPreviewPill.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 2] */
function _fun72729(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9491:6, offset: 0x01d5085e, size: 297 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_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'position': 'absolute', 'top': 16, 'left': 16, 'paddingHorizontal': 10, 'paddingVertical': 4};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object4.backgroundColor = WHITE;
object3.pill = object4;
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object3.text = {'color': null, 'textTransform': 'uppercase', 'letterSpacing': 0.5, color: BLACK};
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/lurker_mode/native/ServerPreviewPill.tsx');
exports.default = ServerPreviewPill;
}
function ServerPreviewPill() { // fn#72730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9491:476, offset: 0x01d50987, size: 158 bytes, params: 1, frame: 20
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const KNhFgD = (require(1244) /* metro dependency 1244: indexNative */).t.KNhFgD;
return (
<View style={styles.pill} accessibilityRole="text">
<Text variant="text-xs/bold" style={styles.text}>
{Reflect.apply(string, intl, [KNhFgD])}
</Text>
</View>
);
}
@@ -0,0 +1,117 @@
/* Metro module 6913; source: modules/lurker_mode/openLurkerLeavePrompt.native.tsx; dependencies: [31, 27, 1379, 1867, 3785, 661, 33, 4497, 6819, 4501, 6914, 4500, 1244, 6915, 1305, 6927, 1314, 6929, 6593, 2] */
function _fun55035(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7091:6, offset: 0x01373b3a, size: 427 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 */;
const env0_4 = value.StyleSheet;
const env0_5 = value.View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).JoinGuildSources;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const env0_12 = value.Fragment;
const Set = global.Set;
const set = new Set();
const ImageSizes = (require(6819) /* metro dependency 6819: GuildIcon */).ImageSizes;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const XLARGE = GuildIconSizes.XLARGE;
const property = ImageSizes[XLARGE];
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({headerRoot: {alignItems: 'center'},
iconWrapper: {width: property, height: property, position: 'relative'}, badgeOverlay: {'position': 'absolute',
'right': -4, 'bottom': -4, 'marginRight': 0}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/lurker_mode/openLurkerLeavePrompt.native.tsx');
exports.openLurkerLeavePrompt = openLurkerLeavePrompt;
}
function LurkerLeavePromptModal({guild, onJoin}) { // fn#55036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7091:481, offset: 0x01373ce5, size: 607 bytes, params: 2, frame: 34
var object2;
const styles = useStyles();
const value2 = env0_3.useCallback(_fun55037, [guild.id]);
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
object2 = {title: guild.name};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const I1yHxc = (require(1244) /* metro dependency 1244: indexNative */).t.I1yHxc;
object2.content = Reflect.apply(string, intl, [I1yHxc]);
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const XLARGE = GuildIconSizes.XLARGE;
const guildIcon = <GuildIcon guild={guild} size={XLARGE} value={guild.name} />;
const GuildBadgeV2 = importDefault(6915) /* metro dependency 6915: GuildBadgeV2 */;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon.Sizes;
const LARGE = Sizes.LARGE;
object2.header = <View style={styles.headerRoot}><View style={styles.iconWrapper}>{guildIcon}<GuildBadgeV2 guild={guild} size={LARGE} style={StyleSheet.flatten(styles.badgeOverlay)} /></View></View>;
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
string = intl.string;
const VJlc0S = (require(1244) /* metro dependency 1244: indexNative */).t.VJlc0S;
object2.actions = <><AlertActionButton variant="primary" text={Reflect.apply(string, intl,
[VJlc0S])} onPress={onJoin} /><AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2vl7qn'])} onPress={value2} /></>;
return <AlertModal {...object2} />;
}
function openLurkerLeavePrompt(a0, {onLeave}) { // fn#55038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7091:1298, offset: 0x01373f76, size: 192 bytes, params: 3, frame: 19
var guild;
const env0_0 = a0;
const binding = env0_13;
if (!binding.has(a0)) {
guild = GuildStore.getGuild(a0);
if (guild != null) {
env0_13.add(a0);
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert('lurker-leave-prompt:' + a0,
<LurkerLeavePromptModal guild={guild} onJoin={onJoin} />, _fun55040);
} else {
onLeave();
}
}
}
function _fun55037() { // fn#55037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7091:560, offset: 0x01373f44, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(6914) /* metro dependency 6914: LurkerPreviewAnalytics */;
value.trackLeavePromptLeaveClicked(guild.id);
}
function onJoin() { // fn#55039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7091:1494, owner: openLurkerLeavePrompt.onJoin, offset: 0x01374036, size: 261 bytes, params: 1, frame: 20
var value4;
var moduleValue;
const binding = env0_0;
let value = environment.__proto__;
const lurkingSourceForGuild = LurkingStore.getLurkingSourceForGuild(binding);
const value3 = undefined;
const type = lurkingSourceForGuild == null ? value3 : lurkingSourceForGuild.type;
const DIRECTORY_ENTRY = JoinGuildSources.DIRECTORY_ENTRY;
if (type === DIRECTORY_ENTRY) {
value4 = ChannelStore.getChannel(lurkingSourceForGuild.directoryChannelId);
if (value4 != null) {
moduleValue = require(6927) /* metro dependency 6927: HubProgressActionCreators */;
moduleValue.setHubProgressActionComplete(value4.getGuildId(),
(require(1314) /* metro dependency 1314: preloaded_user_settings */).HubProgressStep.JOIN_GUILD);
}
}
const lurkerPreviewAnalyticsModule = require(6914) /* metro dependency 6914: LurkerPreviewAnalytics */;
const trackJoinClicked = lurkerPreviewAnalyticsModule.trackJoinClicked;
let LEAVE_PROMPT_LURKER = JoinGuildSources.LEAVE_PROMPT_LURKER;
value = importDefault(6929) /* metro dependency 6929: LurkerPreviewManager */;
Reflect.apply(trackJoinClicked, lurkerPreviewAnalyticsModule, [binding, LEAVE_PROMPT_LURKER,
value.hasNavigatedAway(binding)]);
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
const joinGuild = value.joinGuild;
LEAVE_PROMPT_LURKER = JoinGuildSources.LEAVE_PROMPT_LURKER;
Reflect.apply(joinGuild, value, [binding, {source: LEAVE_PROMPT_LURKER}]);
return value3;
}
function _fun55040() { // fn#55040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7091:1892, offset: 0x0137413b, size: 45 bytes, params: 1, frame: 12
env1_13.delete(env0_0);
if (!env0_2) {
onLeave();
}
}