Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,745 @@
|
||||
/* Metro module 7634; source: modules/badges/BadgeDirectoryActionCreators.tsx; dependencies: [5, 1878, 661, 694, 507, 4826, 4831, 1216, 2] */
|
||||
function _fun61143(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7812:6, offset: 0x0171ba1a, size: 194 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const urlUserId = function(a0) {
|
||||
var value = a0;
|
||||
return value !== UserStore.getCurrentUser()?.id ? value : ME;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = value.Endpoints;
|
||||
const env0_6 = value.ME;
|
||||
value = _fun61145();
|
||||
const value2 = _fun61149();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/badges/BadgeDirectoryActionCreators.tsx');
|
||||
exports.fetchBadgeDirectory = value;
|
||||
exports.fetchBadge = value2;
|
||||
}
|
||||
|
||||
function _fun61145() { // fn#61145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7812:239, offset: 0x0171bb09, size: 32 bytes, params: 1, frame: 12
|
||||
const env0_0 = env0_3(_fun61147);
|
||||
return _fun61148;
|
||||
}
|
||||
|
||||
function _fun61149() { // fn#61149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7812:1239, offset: 0x0171be45, size: 32 bytes, params: 1, frame: 12
|
||||
const env0_0 = env0_3(_fun61151);
|
||||
return _fun61152;
|
||||
}
|
||||
|
||||
async function _fun61147(a0) { // fn#61147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7812:259, offset: 0x0171bb3b, size: 778 bytes, params: 2, frame: 29
|
||||
var r3;
|
||||
var id;
|
||||
var r5;
|
||||
var r6;
|
||||
var r4;
|
||||
var object;
|
||||
var binding;
|
||||
var getCurrentUser;
|
||||
var value8;
|
||||
var value9;
|
||||
var value10;
|
||||
var HermesInternal;
|
||||
var concat;
|
||||
var value11;
|
||||
var isRetry;
|
||||
var value12;
|
||||
var value13;
|
||||
var value14;
|
||||
var Date;
|
||||
var now;
|
||||
var value15;
|
||||
var value16;
|
||||
var dispatch;
|
||||
var binding2;
|
||||
var property;
|
||||
var value17;
|
||||
var HTTP;
|
||||
var get;
|
||||
var USER_BADGES;
|
||||
var binding3;
|
||||
var value18;
|
||||
var value19;
|
||||
var value20;
|
||||
var value21;
|
||||
var value22;
|
||||
var body;
|
||||
var badges;
|
||||
var length;
|
||||
var value23;
|
||||
var value24;
|
||||
var value25;
|
||||
var value26;
|
||||
var binding4;
|
||||
var value27;
|
||||
var distribution;
|
||||
var object3;
|
||||
var binding5;
|
||||
var value28;
|
||||
var MetricEvents;
|
||||
var BADGE_DIRECTORY_CATALOG_FETCH;
|
||||
var value29;
|
||||
var value30;
|
||||
var value31;
|
||||
var error;
|
||||
var binding6;
|
||||
var value32;
|
||||
var binding7;
|
||||
var captureException;
|
||||
let value = a0;
|
||||
const value2 = a1;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const value5 = undefined;
|
||||
reducibleJoin3: while (true) {
|
||||
if (value2 !== value5) {
|
||||
r3 = value2;
|
||||
break reducibleJoin3;
|
||||
}
|
||||
r3 = {};
|
||||
break reducibleJoin3;
|
||||
}
|
||||
await value5;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
reducibleJoin9: while (true) {
|
||||
if (value != null) {
|
||||
r5 = value;
|
||||
break reducibleJoin9;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_4;
|
||||
getCurrentUser = binding.getCurrentUser;
|
||||
value = Reflect.apply(getCurrentUser, binding, []);
|
||||
reducibleJoin8: while (true) {
|
||||
if (value == null) {
|
||||
id = value5;
|
||||
break reducibleJoin8;
|
||||
}
|
||||
id = value.id;
|
||||
break reducibleJoin8;
|
||||
}
|
||||
r5 = id;
|
||||
break reducibleJoin9;
|
||||
}
|
||||
reduciblePort88: while (true) {
|
||||
exceptionLanding87: while (true) {
|
||||
if (r5 == null) {
|
||||
break reduciblePort88;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_4;
|
||||
getCurrentUser = binding.getCurrentUser;
|
||||
value8 = Reflect.apply(getCurrentUser, binding, []);
|
||||
reducibleJoin12: while (true) {
|
||||
if (value8 == null) {
|
||||
id = value5;
|
||||
break reducibleJoin12;
|
||||
}
|
||||
id = value8.id;
|
||||
break reducibleJoin12;
|
||||
}
|
||||
value9 = 'other';
|
||||
reducibleJoin15: while (true) {
|
||||
if (id != null) {
|
||||
if (r5 !== id) {
|
||||
r6 = value9;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
value10 = 'self';
|
||||
r6 = value10;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
r6 = value9;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
HermesInternal = global.HermesInternal;
|
||||
concat = HermesInternal.concat;
|
||||
value11 = 'viewed_user:' + r6;
|
||||
isRetry = r3.isRetry;
|
||||
value12 = 'initial';
|
||||
reducibleJoin17: while (true) {
|
||||
if (isRetry !== true) {
|
||||
r4 = value12;
|
||||
break reducibleJoin17;
|
||||
}
|
||||
value13 = 'retry';
|
||||
r4 = value13;
|
||||
break reducibleJoin17;
|
||||
}
|
||||
value14 = 'attempt:' + r4;
|
||||
Date = global.Date;
|
||||
now = Date.now;
|
||||
value15 = Reflect.apply(now, Date, []);
|
||||
binding = env2_1;
|
||||
value16 = binding(env2_2[3]);
|
||||
dispatch = value16.dispatch;
|
||||
Reflect.apply(dispatch, value16, [{type: 'BADGE_DIRECTORY_FETCH_START', userId: r5}]);
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
property = binding2[4];
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
value17 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
HTTP = value17.HTTP;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
get = HTTP.get;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
binding = env2_5;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
USER_BADGES = binding.USER_BADGES;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
binding3 = env2_7;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
value18 = binding3(r5);
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
value19 = Reflect.apply(USER_BADGES, binding, [value18]);
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object.url = value19;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object.rejectWithError = true;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
value20 = Reflect.apply(get, HTTP, [object]);
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
await value20;
|
||||
try {
|
||||
value21 = undefined;
|
||||
value22 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
if (value22) {
|
||||
return value21;
|
||||
}
|
||||
try {
|
||||
body = value21.body;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object = [];
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object[0] = value11;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object[1] = 'result:success';
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
badges = body.badges;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
length = badges.length;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
value23 = 'non_empty';
|
||||
try {
|
||||
value24 = length !== 0;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
reducibleJoin49: while (true) {
|
||||
if (value24) {
|
||||
r6 = value23;
|
||||
break reducibleJoin49;
|
||||
}
|
||||
value25 = 'empty';
|
||||
r6 = value25;
|
||||
break reducibleJoin49;
|
||||
}
|
||||
try {
|
||||
value26 = 'catalog_state:' + r6;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object[2] = value26;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object[3] = value14;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
binding4 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
property = binding4[5];
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
value27 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
distribution = value27.distribution;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object3 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
binding5 = env2_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
property = binding4[6];
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
value28 = binding5(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
MetricEvents = value28.MetricEvents;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
BADGE_DIRECTORY_CATALOG_FETCH = MetricEvents.BADGE_DIRECTORY_CATALOG_FETCH;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object3.name = BADGE_DIRECTORY_CATALOG_FETCH;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object3.tags = object;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
Date = global.Date;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
now = Date.now;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
value29 = Reflect.apply(now, Date, []);
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
value30 = value29 - value15;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(distribution, value27, [object3, value30]);
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
property = binding4[3];
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
value31 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
dispatch = value31.dispatch;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object.type = 'BADGE_DIRECTORY_FETCH_SUCCESS';
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object.userId = r5;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
badges = body.badges;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
object.badges = badges;
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(dispatch, value31, [object]);
|
||||
} catch (error) {
|
||||
break exceptionLanding87;
|
||||
}
|
||||
break reduciblePort88;
|
||||
}
|
||||
binding = env2_1;
|
||||
binding6 = env2_2;
|
||||
value32 = binding(binding6[5]);
|
||||
distribution = value32.distribution;
|
||||
binding7 = env2_0;
|
||||
MetricEvents = binding7(binding6[6]).MetricEvents;
|
||||
BADGE_DIRECTORY_CATALOG_FETCH = MetricEvents.BADGE_DIRECTORY_CATALOG_FETCH;
|
||||
Date = global.Date;
|
||||
now = Date.now;
|
||||
Reflect.apply(distribution, value32, [{name: BADGE_DIRECTORY_CATALOG_FETCH, tags: [value11, 'result:failure',
|
||||
'catalog_state:unknown', value14]}, Reflect.apply(now, Date, []) - value15]);
|
||||
value = binding(binding6[3]);
|
||||
dispatch = value.dispatch;
|
||||
Reflect.apply(dispatch, value, [{type: 'BADGE_DIRECTORY_FETCH_FAILURE', userId: r5}]);
|
||||
value = binding(binding6[7]);
|
||||
captureException = value.captureException;
|
||||
Reflect.apply(captureException, value, [error]);
|
||||
break reduciblePort88;
|
||||
}
|
||||
return value5;
|
||||
}
|
||||
|
||||
function* _fun61151(a0, a1) { // fn#61151, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7812:1259, offset: 0x0171be6e, size: 260 bytes, params: 3, frame: 21
|
||||
var r3;
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value5;
|
||||
var HTTP;
|
||||
var get;
|
||||
var object2;
|
||||
var USER_BADGE;
|
||||
var binding3;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
var value10;
|
||||
var binding4;
|
||||
var value11;
|
||||
var dispatch;
|
||||
var body;
|
||||
var error;
|
||||
let value = a1;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const value4 = undefined;
|
||||
if (value != null) {
|
||||
r3 = value;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_4;
|
||||
value = binding.getCurrentUser();
|
||||
r3 = value == null ? value4 : value.id;
|
||||
}
|
||||
if (r3 != null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
property = binding2[4];
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
value5 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
HTTP = value5.HTTP;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
get = HTTP.get;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
binding = env2_5;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
USER_BADGE = binding.USER_BADGE;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
binding3 = env2_7;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
value6 = binding3(r3);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
value7 = Reflect.apply(USER_BADGE, binding, [value6, a0]);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
object2.url = value7;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
object2.rejectWithError = true;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
value8 = Reflect.apply(get, HTTP, [object2]);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
yield value8;
|
||||
try {
|
||||
value9 = undefined;
|
||||
value10 = false;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
if (value10) {
|
||||
return value9;
|
||||
}
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
binding4 = env2_2;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
property = binding4[3];
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
value11 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
dispatch = value11.dispatch;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
object2.type = 'BADGE_FETCH_SUCCESS';
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
object2.userId = r3;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
body = value9.body;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
object2.badge = body;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(dispatch, value11, [object2]);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[7]);
|
||||
value.captureException(error);
|
||||
}
|
||||
}
|
||||
return value4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
/* Metro module 7670; source: modules/badges/BadgeDirectoryStore.tsx; dependencies: [6, 7, 15, 17, 18, 1878, 566, 694, 2] */
|
||||
function _fun61260(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:6, offset: 0x01b39c7b, size: 445 bytes, params: 8, frame: 21
|
||||
const closure = function(a0) {
|
||||
return (a0 == null || a0.requirements[0] == null ? undefined : a0.requirements[0].threshold) ?? 0;
|
||||
};
|
||||
const closure2 = function(a0) {
|
||||
var r0;
|
||||
var value;
|
||||
if (a0 != null) {
|
||||
value = undefined;
|
||||
r0 = a0.current_tier != null ? a0.tier_obtained_at == null ? value : a0.tier_obtained_at[a0.current_tier] : value;
|
||||
r0 = r0 ?? a0.obtained_at;
|
||||
return r0;
|
||||
}
|
||||
};
|
||||
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 userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const Map = global.Map;
|
||||
const map = new Map();
|
||||
let Set = global.Set;
|
||||
let set = new Set();
|
||||
Set = global.Set;
|
||||
set = new Set();
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun61266(Store).displayName = 'BadgeDirectoryStore';
|
||||
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{BADGE_DIRECTORY_FETCH_START: BADGE_DIRECTORY_FETCH_START,
|
||||
BADGE_DIRECTORY_FETCH_SUCCESS: BADGE_DIRECTORY_FETCH_SUCCESS,
|
||||
BADGE_DIRECTORY_FETCH_FAILURE: BADGE_DIRECTORY_FETCH_FAILURE, BADGE_FETCH_SUCCESS: BADGE_FETCH_SUCCESS,
|
||||
LOGOUT: function() {
|
||||
env0_6 = new global.Map();
|
||||
env0_7 = new global.Set();
|
||||
env0_8 = new global.Set();
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/badges/BadgeDirectoryStore.tsx');
|
||||
exports.default = set;
|
||||
exports.getSingleRequirementThreshold = closure;
|
||||
exports.getObtainedAtFromBadge = closure2;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_61261() { // fn#61261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:158, offset: 0x01b39e38, 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_61261_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun61266(a0) { // fn#61266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:691, offset: 0x01b39f17, size: 281 bytes, params: 2, frame: 16
|
||||
const closure = BadgeDirectoryStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(UserStore);
|
||||
}}, {key: 'getBadges', value: value_61269}, {key: 'hasCatalogFor', value: value_61270},
|
||||
{key: 'hasCatalogFetchErrorFor', value: value_61271}, {key: 'getBadgeById', value: value_61272},
|
||||
{key: 'getSingleRequirementProgress', value: function(a0, a1) {
|
||||
var r1;
|
||||
var value = this.getBadgeById(a0, a1);
|
||||
var value2 = undefined;
|
||||
r1 = value == null ? value2 : value.progress;
|
||||
if (r1 != null) {
|
||||
if (r1.length !== 0) {
|
||||
return r1[0];
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}}, {key: 'getCurrentTier', value: function(a0, a1) {
|
||||
var value = this.getBadgeById(a0, a1);
|
||||
var env0_0 = value;
|
||||
var value2 = undefined;
|
||||
if ((value == null ? value2 : value.current_tier) != null) {
|
||||
return value.tiers.find(_fun61275);
|
||||
}
|
||||
return value2;
|
||||
}}, {key: 'getObtainedAt', value: value_61276}, {key: 'getNextTier', value: function(a0, a1) {
|
||||
var value = this.getBadgeById(a0, a1);
|
||||
var env0_0 = value;
|
||||
var value2 = undefined;
|
||||
if ((value == null ? value2 : value.next_tier) != null) {
|
||||
return value.tiers.find(_fun61278);
|
||||
}
|
||||
return value2;
|
||||
}}, {key: 'getRemainingToNextTier', value: value_61279}]);
|
||||
}
|
||||
|
||||
function BADGE_DIRECTORY_FETCH_START({userId}) { // fn#61280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:2442, offset: 0x01b3a2d4, size: 61 bytes, params: 2, frame: 13
|
||||
const Set = global.Set;
|
||||
const binding = env0_8;
|
||||
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set(binding);
|
||||
(set instanceof Object ? set : value2).delete(userId);
|
||||
}
|
||||
|
||||
function BADGE_DIRECTORY_FETCH_SUCCESS({userId, badges}) { // fn#61281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:2536, offset: 0x01b3a311, size: 199 bytes, params: 2, frame: 18
|
||||
let Map = global.Map;
|
||||
let binding = env0_6;
|
||||
let map = new Map(binding);
|
||||
let set = map.set;
|
||||
Map = global.Map;
|
||||
const value4 = badges.map(function(a0) {
|
||||
return [a0.badge_id, a0];
|
||||
});
|
||||
const value5 = Object.create(Map.prototype, {constructor: {value: Map}});
|
||||
map = new Map(value4);
|
||||
Reflect.apply(set, map, [userId, map instanceof Object ? map : value5]);
|
||||
let Set = global.Set;
|
||||
binding = env0_7;
|
||||
const value7 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set(binding);
|
||||
env0_7 = (set instanceof Object ? set : value7).add(userId);
|
||||
Set = global.Set;
|
||||
binding = env0_8;
|
||||
const value9 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set(binding);
|
||||
(set instanceof Object ? set : value9).delete(userId);
|
||||
}
|
||||
|
||||
function BADGE_DIRECTORY_FETCH_FAILURE({userId}) { // fn#61283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:2727, offset: 0x01b3a3ef, size: 61 bytes, params: 2, frame: 13
|
||||
const Set = global.Set;
|
||||
const binding = env0_8;
|
||||
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set(binding);
|
||||
env0_8 = (set instanceof Object ? set : value2).add(userId);
|
||||
}
|
||||
|
||||
function BADGE_FETCH_SUCCESS({userId, badge}) { // fn#61284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:2808, offset: 0x01b3a42c, size: 156 bytes, params: 2, frame: 17
|
||||
var r5;
|
||||
let Map = global.Map;
|
||||
let map = new Map(env0_6);
|
||||
const value4 = map.get(userId);
|
||||
if (value4 != null) {
|
||||
r5 = value4;
|
||||
} else {
|
||||
map = new global.Map();
|
||||
}
|
||||
Map = global.Map;
|
||||
map = new Map();
|
||||
map.set(badge.badge_id, badge);
|
||||
map.set(userId, map);
|
||||
}
|
||||
|
||||
function value_61269(a0) { // fn#61269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:1068, offset: 0x01b3a030, size: 108 bytes, params: 2, frame: 13
|
||||
var r3;
|
||||
let value = a0;
|
||||
if (value != null) {
|
||||
r3 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = UserStore.getCurrentUser();
|
||||
r3 = value?.id;
|
||||
}
|
||||
if (r3 == null) {
|
||||
return [];
|
||||
}
|
||||
value = environment.__proto__;
|
||||
value = env1_6.get(r3);
|
||||
return value != null ? global.Array.from(value.values()) : [];
|
||||
}
|
||||
|
||||
function value_61271(a0) { // fn#61271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:1311, offset: 0x01b3a09c, size: 68 bytes, params: 2, frame: 13
|
||||
var r3;
|
||||
var r0;
|
||||
let value = a0;
|
||||
if (value != null) {
|
||||
r3 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = UserStore.getCurrentUser();
|
||||
r3 = value?.id;
|
||||
}
|
||||
value = r3 != null;
|
||||
if (value) {
|
||||
value = environment.__proto__;
|
||||
value = env1_8.has(r3);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_61272(a0, a1) { // fn#61272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:1435, offset: 0x01b3a0e0, size: 95 bytes, params: 3, frame: 14
|
||||
var r5;
|
||||
var r0;
|
||||
var value3;
|
||||
var value4;
|
||||
let value = a1;
|
||||
if (value != null) {
|
||||
r5 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = UserStore.getCurrentUser();
|
||||
r5 = value?.id;
|
||||
}
|
||||
value = undefined;
|
||||
if (r5 != null) {
|
||||
value3 = environment.__proto__;
|
||||
value4 = env1_6.get(r5);
|
||||
r0 = value4 == null ? value : value4.get(a0);
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_61274(a0, a1) { // fn#61274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:1751, offset: 0x01b3a17e, size: 76 bytes, params: 3, frame: 15
|
||||
const badgeById = this.getBadgeById(a0, a1);
|
||||
const value2 = undefined;
|
||||
if ((badgeById == null ? value2 : badgeById.current_tier) != null) {
|
||||
return badgeById.tiers.find(_fun61275);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function value_61276(a0, a1) { // fn#61276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:1913, offset: 0x01b3a1e5, size: 37 bytes, params: 3, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return getObtainedAtFromBadge(this.getBadgeById(a0, a1));
|
||||
}
|
||||
|
||||
function value_61277(a0, a1) { // fn#61277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:2008, offset: 0x01b3a20a, size: 76 bytes, params: 3, frame: 15
|
||||
const badgeById = this.getBadgeById(a0, a1);
|
||||
const value2 = undefined;
|
||||
if ((badgeById == null ? value2 : badgeById.next_tier) != null) {
|
||||
return badgeById.tiers.find(_fun61278);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function value_61279(a0, a1) { // fn#61279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:2173, offset: 0x01b3a271, size: 99 bytes, params: 3, frame: 17
|
||||
var r0;
|
||||
var Math;
|
||||
var max;
|
||||
var value4;
|
||||
let value = this.getNextTier(a0, a1);
|
||||
const singleRequirementProgress = this.getSingleRequirementProgress(a0, a1);
|
||||
const value3 = 0;
|
||||
if (value == null) {
|
||||
r0 = value3;
|
||||
} else if (singleRequirementProgress == null) {
|
||||
r0 = value3;
|
||||
} else {
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
value4 = environment.__proto__;
|
||||
value = getSingleRequirementThreshold(value);
|
||||
value = Reflect.apply(max, Math, [value3, value - singleRequirementProgress.current]);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun61275({key}) { // fn#61275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:1856, offset: 0x01b3a1ca, size: 27 bytes, params: 2, frame: 2
|
||||
return key === env0_0.current_tier;
|
||||
}
|
||||
|
||||
function _fun61278({key}) { // fn#61278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7848:2110, offset: 0x01b3a256, size: 27 bytes, params: 2, frame: 2
|
||||
return key === env0_0.next_tier;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user