119 lines
5.9 KiB
TypeScript
119 lines
5.9 KiB
TypeScript
/* Metro module 12346; source: stores/AppliedGuildBoostStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
|
|
function _fun94194(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:6, offset: 0x020f12ad, size: 422 bytes, params: 8, frame: 19
|
|
const closure = function() {
|
|
env0_9 = true;
|
|
};
|
|
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 = {};
|
|
let env0_7 = [];
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
let value = _fun94199(Store);
|
|
value.displayName = 'AppliedGuildBoostStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{GUILD_APPLIED_BOOSTS_FETCH_SUCCESS: GUILD_APPLIED_BOOSTS_FETCH_SUCCESS,
|
|
USER_APPLIED_BOOSTS_FETCH_SUCCESS: function({appliedGuildBoosts}) {
|
|
env0_8 = false;
|
|
env0_7 = appliedGuildBoosts;
|
|
}, APPLIED_BOOSTS_COOLDOWN_FETCH_SUCCESS: function(a0) {
|
|
env0_6 = a0.endsAt;
|
|
}, GUILD_UNAPPLY_BOOST_START: closure, GUILD_APPLY_BOOST_START: closure,
|
|
GUILD_APPLY_BOOST_SUCCESS: GUILD_APPLY_BOOST_SUCCESS, GUILD_APPLY_BOOST_FAIL: function({error}) {
|
|
env0_9 = false;
|
|
env0_10 = error;
|
|
}, GUILD_UNAPPLY_BOOST_SUCCESS: GUILD_UNAPPLY_BOOST_SUCCESS, GUILD_UNAPPLY_BOOST_FAIL: function({error}) {
|
|
env0_9 = false;
|
|
env0_11 = error;
|
|
}, USER_APPLIED_BOOSTS_FETCH_START: function() {
|
|
env0_8 = true;
|
|
}});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/AppliedGuildBoostStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_94195() { // fn#94195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:148, offset: 0x020f1453, size: 98 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_94195_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun94199(a0) { // fn#94199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:441, offset: 0x020f14b5, size: 286 bytes, params: 2, frame: 16
|
|
const closure = AppliedGuildBoostStore;
|
|
env0_4(closure, a0);
|
|
return env0_1(closure, [{key: 'getAppliedGuildBoostsForGuild', value: value_94201},
|
|
{key: 'getLastFetchedAtForGuild', value: value_94202}, {key: 'getCurrentUserAppliedBoosts', value: value_94203},
|
|
{key: 'getAppliedGuildBoost', value: value_94204}, {key: 'isModifyingAppliedBoost', get: get_94206},
|
|
{key: 'applyBoostError', get: get_94207}, {key: 'unapplyBoostError', get: get_94208}, {key: 'cooldownEndsAt',
|
|
get: get_94209}, {key: 'isFetchingCurrentUserAppliedBoosts', get: get_94210}]);
|
|
}
|
|
|
|
function GUILD_APPLIED_BOOSTS_FETCH_SUCCESS({guildId, appliedBoosts}) { // fn#94211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:1476, offset: 0x020f1645, size: 58 bytes, params: 2, frame: 12
|
|
const binding = env0_5;
|
|
const object2 = {subscriptions: appliedBoosts};
|
|
const Date = global.Date;
|
|
object2.lastFetchedAt = Date.now();
|
|
binding[guildId] = object2;
|
|
}
|
|
|
|
function GUILD_APPLY_BOOST_SUCCESS({appliedGuildBoost}) { // fn#94214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:1957, offset: 0x020f16ad, size: 127 bytes, params: 2, frame: 16
|
|
const Set = global.Set;
|
|
let set = new Set(appliedGuildBoost.map(function(a0) {
|
|
return a0.id;
|
|
}));
|
|
const items2 = [];
|
|
set = arraySpread(items2, appliedGuildBoost, 0, undefined);
|
|
const binding = env0_7;
|
|
arraySpread(items2, binding.filter(_fun94216), set, binding);
|
|
}
|
|
|
|
function GUILD_UNAPPLY_BOOST_SUCCESS({boostId}) { // fn#94218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:2200, offset: 0x020f1745, size: 53 bytes, params: 2, frame: 12
|
|
env0_7 = env0_7.filter(function({id}) {
|
|
return id !== boostId;
|
|
});
|
|
}
|
|
|
|
function value_94201(a0) { // fn#94201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:800, offset: 0x020f15d3, size: 39 bytes, params: 2, frame: 4
|
|
const value2 = null;
|
|
return value2 != env1_5[a0] ? env1_5[a0].subscriptions : value2;
|
|
}
|
|
|
|
function value_94202(a0) { // fn#94202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:894, offset: 0x020f15fa, size: 39 bytes, params: 2, frame: 4
|
|
const value2 = null;
|
|
return value2 != env1_5[a0] ? env1_5[a0].lastFetchedAt : value2;
|
|
}
|
|
|
|
function value_94204(a0) { // fn#94204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12532:1047, offset: 0x020f1621, size: 36 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return env1_7.find(_fun94205);
|
|
}
|
|
|