Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,57 @@
|
||||
/* Metro module 14612; source: modules/premium/powerups/hooks/GuildPowerupsNotificationsDCF.native.tsx; dependencies: [7013, 1365, 14598, 2] */
|
||||
function _fun110487(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14809:6, offset: 0x0237b17c, size: 174 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/GuildPowerupsNotificationsDCF.native.tsx');
|
||||
exports.usePerksCoachmarkDCF = function(a0) {
|
||||
return require(dependencyMap[0]).useSelectedDismissibleContent(a0 ? [require(dependencyMap[1]).DismissibleContent.GUILD_POWERUP_PERKS_COACHMARK] : []);
|
||||
};
|
||||
exports.useNewPerkAvailableCoachmarkDCF = function(a0, a1) {
|
||||
return require(dependencyMap[0]).useSelectedVersionedDismissibleContent(a0 && a1 > 0 ? require(dependencyMap[1]).DismissibleContent.GUILD_POWERUP_NEW_PERK_AVAILABLE_COACHMARK : null,
|
||||
|
||||
a1);
|
||||
};
|
||||
exports.useGuildPowerupNotificationDCF = function(a0) {
|
||||
var r1;
|
||||
var moduleValue = require(dependencyMap[0]);
|
||||
var useSelectedTimeRecurringDismissibleContent = moduleValue.useSelectedTimeRecurringDismissibleContent;
|
||||
r1 = a0 ? require(dependencyMap[1]).DismissibleContent.GUILD_POWERUP_NOTIFICATION : null;
|
||||
var object = {};
|
||||
object.cooldownDurationMs = require(dependencyMap[2]).GUILD_POWERUP_NOTIFICATION_COOLDOWN;
|
||||
return Reflect.apply(useSelectedTimeRecurringDismissibleContent, moduleValue, [r1, object]);
|
||||
};
|
||||
exports.useNewGamesCoachmarkDC = function() {
|
||||
return [null, _fun110492];
|
||||
};
|
||||
exports.useGameServerPricingCoachmarkDCF = function() {
|
||||
return [null, _fun110494];
|
||||
};
|
||||
exports.useBoostToUnlockCoachmarkDCF = function() {
|
||||
return [null, _fun110496];
|
||||
};
|
||||
exports.useExpiringPowerupCoachmarkDCF = function() {
|
||||
return [null, _fun110498];
|
||||
};
|
||||
}
|
||||
|
||||
function useNewGamesCoachmarkDC() { // fn#110491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14809:871, offset: 0x0237b34f, size: 23 bytes, params: 1, frame: 2
|
||||
return [null, function() {
|
||||
}];
|
||||
}
|
||||
|
||||
function useGameServerPricingCoachmarkDCF() { // fn#110493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14809:961, offset: 0x0237b366, size: 23 bytes, params: 1, frame: 2
|
||||
return [null, function() {
|
||||
}];
|
||||
}
|
||||
|
||||
function useBoostToUnlockCoachmarkDCF() { // fn#110495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14809:1057, offset: 0x0237b37d, size: 23 bytes, params: 1, frame: 2
|
||||
return [null, function() {
|
||||
}];
|
||||
}
|
||||
|
||||
function useExpiringPowerupCoachmarkDCF() { // fn#110497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14809:1151, offset: 0x0237b394, size: 23 bytes, params: 1, frame: 2
|
||||
return [null, function() {
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
/* Metro module 14652; source: modules/premium/powerups/hooks/useAvailableBoostCountForPowerup.tsx; dependencies: [31, 1867, 8258, 8259, 566, 8254, 1360, 2] */
|
||||
function _fun110685(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14849:6, offset: 0x02382957, size: 195 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildPowerupsStore = importDefault(8258) /* metro dependency 8258: GuildPowerupsStore */;
|
||||
const guildPowerupsConstantsModule = require(8259) /* metro dependency 8259: GuildPowerupsConstants */;
|
||||
const env0_6 = guildPowerupsConstantsModule.GuildPowerupType;
|
||||
const env0_7 = guildPowerupsConstantsModule.POWERUPS_INCLUDED_IN_LEVEL;
|
||||
const env0_8 = guildPowerupsConstantsModule.LEVEL_SKU_ID_TO_BOOSTING_TIER;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useAvailableBoostCountForPowerup.tsx');
|
||||
exports.default = useAvailableBoostCountForPowerup;
|
||||
}
|
||||
|
||||
function useAvailableBoostCountForPowerup(a0, a1) { // fn#110686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14849:333, offset: 0x02382a1a, size: 277 bytes, params: 3, frame: 21
|
||||
var r5;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const value2 = undefined;
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun110687);
|
||||
const stateForGuild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildPowerupsStore],
|
||||
_fun110688);
|
||||
const spent = (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(a0).spent;
|
||||
let value = env0_3.useMemo(_fun110689, [a1, stateForGuild]);
|
||||
if (value == null) {
|
||||
r5 = value2;
|
||||
} else {
|
||||
value = value.reduce(function(a0, a1) {
|
||||
return a0 + a1.cost;
|
||||
}, 0);
|
||||
r5 = value;
|
||||
}
|
||||
const Math = global.Math;
|
||||
const max = Math.max;
|
||||
const premiumSubscriberCount = guild == null ? value2 : guild.premiumSubscriberCount;
|
||||
value = 0;
|
||||
return Reflect.apply(max, Math, [(premiumSubscriberCount ?? value) - spent + (r5 ?? value), value]);
|
||||
}
|
||||
|
||||
function _fun110689() { // fn#110689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14849:534, offset: 0x02382b4a, size: 192 bytes, params: 1, frame: 14
|
||||
var r0;
|
||||
var value;
|
||||
if (require == null) {
|
||||
return [];
|
||||
}
|
||||
const type = require.type;
|
||||
const LEVEL = GuildPowerupType.LEVEL;
|
||||
if (type !== LEVEL) {
|
||||
return [];
|
||||
}
|
||||
if (stateForGuild == null) {
|
||||
return [];
|
||||
}
|
||||
if (LEVEL_SKU_ID_TO_BOOSTING_TIER[require.skuId] == null) {
|
||||
r0 = [];
|
||||
} else {
|
||||
value = global.Object.entries(POWERUPS_INCLUDED_IN_LEVEL);
|
||||
value = value.filter(_fun110690);
|
||||
value = value.map(_fun110691);
|
||||
value = value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun110690(a0) { // fn#110690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14849:647, offset: 0x02382c0a, size: 102 bytes, params: 2, frame: 7
|
||||
var r0;
|
||||
var r1;
|
||||
var r3;
|
||||
var item3;
|
||||
var value3;
|
||||
const iterator = a0[Symbol.iterator]();
|
||||
const iterator2 = iterator.next;
|
||||
let item2 = Reflect.apply(iterator2, iterator, []);
|
||||
let item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
let value = undefined;
|
||||
const value2 = item2 === value;
|
||||
const r2 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r1 = value;
|
||||
r3 = value2;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r1 = value;
|
||||
r3 = value3;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r1 = item;
|
||||
r3 = value3;
|
||||
}
|
||||
}
|
||||
if (!r3) {
|
||||
r0.return();
|
||||
}
|
||||
value = r1 === env0_0;
|
||||
if (value) {
|
||||
value = environment.__proto__;
|
||||
value = stateForGuild.unlockedPowerups[r2] != null;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun110691(a0) { // fn#110691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14849:698, offset: 0x02382c70, size: 50 bytes, params: 2, frame: 5
|
||||
const iterator = a0[Symbol.iterator]();
|
||||
let item2 = iterator.next();
|
||||
const item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
let value = undefined;
|
||||
const value2 = item2 === value;
|
||||
const r1 = value2 ? value : item;
|
||||
if (!value2) {
|
||||
item2.return();
|
||||
}
|
||||
value = environment.__proto__;
|
||||
return stateForGuild.allPowerups[r1];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,259 @@
|
||||
/* Metro module 14613; source: modules/premium/powerups/hooks/useBoostToUnlockFeaturedPowerup.tsx; dependencies: [57, 31, 1867, 8258, 8259, 661, 8188, 566, 8254, 14614, 2] */
|
||||
function _fun110499(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14810:6, offset: 0x0237b3ab, size: 456 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_110502 = 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(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildPowerupsStore = importDefault(8258) /* metro dependency 8258: GuildPowerupsStore */;
|
||||
const env0_7 = (require(8259) /* metro dependency 8259: GuildPowerupsConstants */).GUILD_POWERUP_TIER_3_OVERRIDDEN_SKUS;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
|
||||
const GUILD_POWERUP_LEVEL_1_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_LEVEL_1_SKU_ID;
|
||||
const items2 = [{skuId: GUILD_POWERUP_LEVEL_1_SKU_ID, threshold: 1}];
|
||||
const GUILD_POWERUP_LEVEL_2_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_LEVEL_2_SKU_ID;
|
||||
items2[1] = {skuId: GUILD_POWERUP_LEVEL_2_SKU_ID, threshold: 2};
|
||||
const GUILD_POWERUP_LEVEL_3_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_LEVEL_3_SKU_ID;
|
||||
items2[2] = {skuId: GUILD_POWERUP_LEVEL_3_SKU_ID, threshold: 2};
|
||||
const GUILD_POWERUP_TAG_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_TAG_SKU_ID;
|
||||
items2[3] = {skuId: GUILD_POWERUP_TAG_SKU_ID, threshold: 1};
|
||||
const GUILD_POWERUP_ROLE_COLOR_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_ROLE_COLOR_SKU_ID;
|
||||
items2[4] = {skuId: GUILD_POWERUP_ROLE_COLOR_SKU_ID, threshold: 1};
|
||||
const GUILD_TAGS_BADGE_PACK_FLEX_POWERUP_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_TAGS_BADGE_PACK_FLEX_POWERUP_SKU_ID;
|
||||
items2[5] = {skuId: GUILD_TAGS_BADGE_PACK_FLEX_POWERUP_SKU_ID, threshold: 1};
|
||||
const GUILD_TAGS_BADGE_PACK_PETS_POWERUP_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_TAGS_BADGE_PACK_PETS_POWERUP_SKU_ID;
|
||||
items2[6] = {skuId: GUILD_TAGS_BADGE_PACK_PETS_POWERUP_SKU_ID, threshold: 1};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useBoostToUnlockFeaturedPowerup.tsx');
|
||||
exports.default = useBoostToUnlockFeaturedPowerup;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_110500(a0, a1) { // fn#110500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14810:214, offset: 0x0237b573, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun110501;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_110502(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_110502(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_110502(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun110501;
|
||||
}
|
||||
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 useBoostToUnlockFeaturedPowerup(a0) { // fn#110503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14810:1676, offset: 0x0237b6e7, size: 263 bytes, params: 2, frame: 20
|
||||
const env0_0 = a0;
|
||||
const stateForGuild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildPowerupsStore],
|
||||
_fun110504);
|
||||
const available = (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(a0).available;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun110505);
|
||||
const env0_3 = value2;
|
||||
const value3 = (require(14614) /* metro dependency 14614: BoostToUnlockCoachmarkExperiment */).useBoostToUnlockCoachmarkEnabled('useBoostToUnlockFeaturedPowerup');
|
||||
const binding = value3;
|
||||
return binding.useMemo(_fun110507, [stateForGuild, available, value2, value3, env0_3(binding.useState(function() {
|
||||
var Math = global.Math;
|
||||
return Math.random();
|
||||
}), 1)[0]]);
|
||||
}
|
||||
|
||||
function _fun110505() { // fn#110505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14810:1845, offset: 0x0237b7ee, size: 70 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
const guild = GuildStore.getGuild(env0_0);
|
||||
return (guild == null ? undefined : guild.features.has(GuildFeatures.PREMIUM_TIER_3_OVERRIDE)) === true;
|
||||
}
|
||||
|
||||
function _fun110507() { // fn#110507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14810:2088, offset: 0x0237b834, size: 303 bytes, params: 1, frame: 26
|
||||
var environment;
|
||||
var r5;
|
||||
var r14;
|
||||
var allPowerups;
|
||||
var unlockedPowerups;
|
||||
var items2;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
var done;
|
||||
var value5;
|
||||
var skuId;
|
||||
var threshold;
|
||||
var property;
|
||||
var has;
|
||||
var dependencies;
|
||||
var every;
|
||||
var cost;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var push;
|
||||
var value9;
|
||||
var length;
|
||||
var Math;
|
||||
let stateForGuildBinding = stateForGuild;
|
||||
if (stateForGuildBinding != null) {
|
||||
reducibleJoin14: while (true) {
|
||||
if (env0_4) {
|
||||
stateForGuildBinding = stateForGuild;
|
||||
allPowerups = stateForGuildBinding.allPowerups;
|
||||
unlockedPowerups = stateForGuildBinding.unlockedPowerups;
|
||||
var env0_0 = unlockedPowerups;
|
||||
items2 = [];
|
||||
value2 = environment.__proto__;
|
||||
value3 = _createForOfIteratorHelperLoose_110500(env1_9);
|
||||
value4 = value3();
|
||||
done = value4.done;
|
||||
if (!done) {
|
||||
r5 = value4;
|
||||
reducibleLoop3: while (true) {
|
||||
value5 = r5.value;
|
||||
skuId = value5.skuId;
|
||||
threshold = value5.threshold;
|
||||
property = allPowerups[skuId];
|
||||
reducibleJoin12: while (true) {
|
||||
if (property == null) {
|
||||
break reducibleJoin12;
|
||||
}
|
||||
if (env0_3) {
|
||||
has = GUILD_POWERUP_TIER_3_OVERRIDDEN_SKUS.has;
|
||||
if (Reflect.apply(has, GUILD_POWERUP_TIER_3_OVERRIDDEN_SKUS, [skuId])) {
|
||||
break reducibleJoin12;
|
||||
}
|
||||
}
|
||||
if (unlockedPowerups[skuId] != null) {
|
||||
break reducibleJoin12;
|
||||
}
|
||||
dependencies = property.dependencies;
|
||||
every = dependencies.every;
|
||||
if (Reflect.apply(every, dependencies, [function(a0) {
|
||||
return unlockedPowerups[a0] != null;
|
||||
}])) {
|
||||
cost = property.cost;
|
||||
value6 = cost - available;
|
||||
value7 = value6 > 0;
|
||||
reducibleJoin10: while (true) {
|
||||
if (value7) {
|
||||
value8 = value6 <= threshold;
|
||||
r14 = value8;
|
||||
break reducibleJoin10;
|
||||
}
|
||||
r14 = value7;
|
||||
break reducibleJoin10;
|
||||
}
|
||||
if (r14) {
|
||||
push = items2.push;
|
||||
Reflect.apply(push, items2, [property]);
|
||||
break reducibleJoin12;
|
||||
}
|
||||
break reducibleJoin12;
|
||||
}
|
||||
break reducibleJoin12;
|
||||
}
|
||||
value9 = value3();
|
||||
done = value9.done;
|
||||
if (done) {
|
||||
break reducibleLoop3;
|
||||
}
|
||||
r5 = value9;
|
||||
continue reducibleLoop3;
|
||||
}
|
||||
}
|
||||
length = items2.length;
|
||||
if (length > 0) {
|
||||
Math = global.Math;
|
||||
return items2[Math.floor(env0_5 * items2.length)];
|
||||
}
|
||||
break reducibleJoin14;
|
||||
}
|
||||
break reducibleJoin14;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/* Metro module 14649; source: modules/premium/powerups/hooks/useCanGuildPowerupBeToggled.tsx; dependencies: [31, 8258, 8259, 566, 14635, 1244, 2256, 2] */
|
||||
function _fun110664(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14846:6, offset: 0x0238202a, size: 159 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const guildPowerupsStore = importDefault(8258) /* metro dependency 8258: GuildPowerupsStore */;
|
||||
const env0_5 = (require(8259) /* metro dependency 8259: GuildPowerupsConstants */).PowerupActiveStatusType;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useCanGuildPowerupBeToggled.tsx');
|
||||
exports.default = useCanGuildPowerupBeToggled;
|
||||
}
|
||||
|
||||
function useCanGuildPowerupBeToggled(a0, a1, a2) { // fn#110665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14846:256, offset: 0x023820c9, size: 172 bytes, params: 4, frame: 20
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const stateForGuild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildPowerupsStore],
|
||||
_fun110666);
|
||||
return stateForGuild.useMemo(_fun110667, [stateForGuild, a1.skuId, a1.dependencies, a2,
|
||||
(importDefault(14635) /* metro dependency 14635: usePowerupActiveStatus */)(a0, a1).type]);
|
||||
}
|
||||
|
||||
function _fun110667() { // fn#110667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14846:399, offset: 0x02382175, size: 339 bytes, params: 1, frame: 21
|
||||
var r3;
|
||||
var r1;
|
||||
var intl;
|
||||
var formatToPlainString;
|
||||
var property;
|
||||
var value;
|
||||
if (stateForGuild == null) {
|
||||
return {disabled: true, reason: undefined};
|
||||
}
|
||||
const type = env0_4.type;
|
||||
const LEVEL_ACTIVATED = PowerupActiveStatusType.LEVEL_ACTIVATED;
|
||||
if (type === LEVEL_ACTIVATED) {
|
||||
return {disabled: true, reason: undefined};
|
||||
}
|
||||
stateForGuildBinding = stateForGuild;
|
||||
const allPowerups = stateForGuildBinding.allPowerups;
|
||||
const r7 = importDefault ? global.Object.values(stateForGuildBinding.unlockedPowerups).find(_fun110668)?.sku_id : require.dependencies.find(function(a0) {
|
||||
return unlockedPowerups[a0] == null;
|
||||
});
|
||||
const object2 = {disabled: r7 != null};
|
||||
const value7 = undefined;
|
||||
if (r7 != null) {
|
||||
if (allPowerups[r7] != null) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
value = importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */;
|
||||
r3 = importDefault ? value.vCEBiS : value['1B8AZr'];
|
||||
property = allPowerups[r7];
|
||||
value = Reflect.apply(formatToPlainString, intl, [r3, {perk: property == null ? value7 : property.title}]);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value7;
|
||||
}
|
||||
} else {
|
||||
r1 = value7;
|
||||
}
|
||||
object2.reason = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun110668({sku}) { // fn#110668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14846:598, offset: 0x023822c8, size: 44 bytes, params: 2, frame: 3
|
||||
const dependent_sku_id = sku?.dependent_sku_id;
|
||||
value = environment.__proto__;
|
||||
return dependent_sku_id === require.skuId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/* Metro module 14656; source: modules/premium/powerups/hooks/useDeactivateWarningText.tsx; dependencies: [31, 4111, 1938, 1867, 566, 6736, 8188, 1244, 2256, 2] */
|
||||
function _fun110704(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14853:6, offset: 0x023833c1, size: 169 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useDeactivateWarningText.tsx');
|
||||
exports.default = useDeactivateWarningText;
|
||||
}
|
||||
|
||||
function useDeactivateWarningText(a0, a1) { // fn#110705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14853:239, offset: 0x0238346a, size: 252 bytes, params: 3, frame: 24
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const memberCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberCountStore],
|
||||
_fun110706);
|
||||
const value2 = (importDefault(6736) /* metro dependency 6736: useGuildRoleMemberCounts */)(a0);
|
||||
return value2.useMemo(_fun110710, [a1,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore], _fun110708, [a0, a1.skuId,
|
||||
value2]), memberCount, (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore],
|
||||
_fun110707)]);
|
||||
}
|
||||
|
||||
function _fun110706() { // fn#110706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14853:316, offset: 0x02383566, size: 27 bytes, params: 1, frame: 11
|
||||
return GuildMemberCountStore.getMemberCount(env0_0);
|
||||
}
|
||||
|
||||
function _fun110707() { // fn#110707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14853:389, offset: 0x02383581, size: 48 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return GuildStore.getGuild(env0_0)?.vanityURLCode != null;
|
||||
}
|
||||
|
||||
function _fun110708() { // fn#110708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14853:499, offset: 0x023835b1, size: 108 bytes, params: 1, frame: 15
|
||||
var r0;
|
||||
var value;
|
||||
const skuId = require.skuId;
|
||||
const GUILD_POWERUP_ROLE_COLOR_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_ROLE_COLOR_SKU_ID;
|
||||
const value3 = 0;
|
||||
if (skuId !== GUILD_POWERUP_ROLE_COLOR_SKU_ID) {
|
||||
r0 = value3;
|
||||
} else if (env0_3 == null) {
|
||||
r0 = value3;
|
||||
} else {
|
||||
value = GuildRoleStore.getSortedRoles(env0_0);
|
||||
value = value.reduce(_fun110709, value3);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun110710() { // fn#110710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14853:739, offset: 0x02383663, size: 688 bytes, params: 1, frame: 20
|
||||
var r2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
var binding;
|
||||
var defaultImport;
|
||||
const skuId = require.skuId;
|
||||
const GUILD_POWERUP_ROLE_COLOR_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_ROLE_COLOR_SKU_ID;
|
||||
if (GUILD_POWERUP_ROLE_COLOR_SKU_ID === skuId) {
|
||||
r2 = env0_5 > 0 ? intl.formatToPlainString((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */)['4jSvr1'],
|
||||
|
||||
{perk: require.title,
|
||||
memberCount: env0_5}) : intl.formatToPlainString((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).cavtEo,
|
||||
|
||||
{perk: require.title});
|
||||
} else if ((require(8188) /* metro dependency 8188: Powerups */).VANITY_URL_POWERUP_SKU_ID === skuId) {
|
||||
binding = env0_4;
|
||||
string = intl.string;
|
||||
defaultImport = importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */;
|
||||
r2 = binding ? Reflect.apply(string, intl, [defaultImport.hN75yb]) : Reflect.apply(string, intl,
|
||||
[defaultImport.Du91Rb]);
|
||||
} else {
|
||||
r2 = (require(8188) /* metro dependency 8188: Powerups */).GUILD_TAGS_BADGE_PACK_PETS_POWERUP_SKU_ID === skuId || (require(8188) /* metro dependency 8188: Powerups */).GUILD_TAGS_BADGE_PACK_FLEX_POWERUP_SKU_ID === skuId ? intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).Vf2ZcR) : intl.formatToPlainString((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */)['4jSvr1'],
|
||||
|
||||
{perk: require.title, memberCount: memberCount ?? 0});
|
||||
}
|
||||
return {warningText: r2,
|
||||
vanityUrlWarning: env0_4 && require.skuId === (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_LEVEL_3_SKU_ID ? intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).M4XL5n) : null};
|
||||
}
|
||||
|
||||
function _fun110709(a0, a1) { // fn#110709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14853:592, offset: 0x0238361d, size: 70 bytes, params: 3, frame: 6
|
||||
var r0;
|
||||
var value3;
|
||||
let value = a0;
|
||||
if (a1.colorStrings?.secondaryColor == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
value += env1_3[a1.id] ?? 0;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
/* Metro module 14615; source: modules/premium/powerups/hooks/useFeaturedExpiringPowerup.tsx; dependencies: [31, 8255, 8258, 566, 14616, 5134, 2] */
|
||||
function _fun110511(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14812:6, offset: 0x0237ba0e, size: 149 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const gameServerStore = importDefault(8255) /* metro dependency 8255: GameServerStore */;
|
||||
const guildPowerupsStore = importDefault(8258) /* metro dependency 8258: GuildPowerupsStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useFeaturedExpiringPowerup.tsx');
|
||||
exports.default = useFeaturedExpiringPowerup;
|
||||
}
|
||||
|
||||
function useFeaturedExpiringPowerup(a0) { // fn#110512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14812:231, offset: 0x0237baa3, size: 184 bytes, params: 2, frame: 19
|
||||
const env0_0 = a0;
|
||||
const stateForGuild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildPowerupsStore],
|
||||
_fun110513);
|
||||
const stateForGuild2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GameServerStore],
|
||||
_fun110514);
|
||||
return stateForGuild2.useMemo(_fun110515, [stateForGuild, stateForGuild2,
|
||||
(require(14616) /* metro dependency 14616: ExpiringPowerupCoachmarkExperiment */).useExpiringPowerupCoachmarkEnabled('useFeaturedExpiringPowerup')]);
|
||||
}
|
||||
|
||||
function _fun110515() { // fn#110515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14812:491, offset: 0x0237bb91, size: 463 bytes, params: 1, frame: 23
|
||||
var environment;
|
||||
var unlockedPowerups;
|
||||
var r1;
|
||||
var entitlements;
|
||||
var title;
|
||||
var r7;
|
||||
var num_expiring_boosts;
|
||||
var Object;
|
||||
var values;
|
||||
var stateForGuildBinding;
|
||||
var value2;
|
||||
var value3;
|
||||
var object;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var sku;
|
||||
var Math;
|
||||
var max;
|
||||
var value9;
|
||||
var moduleValue;
|
||||
var getDaysRemaining;
|
||||
var Date;
|
||||
var ends_at;
|
||||
var value10;
|
||||
var date;
|
||||
var metadata;
|
||||
var value;
|
||||
if (env0_3) {
|
||||
Object = global.Object;
|
||||
values = Object.values;
|
||||
stateForGuildBinding = stateForGuild;
|
||||
value2 = null;
|
||||
value3 = undefined;
|
||||
unlockedPowerups = value2 == stateForGuildBinding ? value3 : stateForGuild.unlockedPowerups;
|
||||
r1 = value2 != unlockedPowerups ? unlockedPowerups : {};
|
||||
value4 = Reflect.apply(values, Object, [r1]);
|
||||
object = [];
|
||||
value5 = 0;
|
||||
value6 = arraySpread(object, value4, value5, undefined);
|
||||
Object = global.Object;
|
||||
values = Object.values;
|
||||
entitlements = value2 == stateForGuild ? value3 : stateForGuild.entitlements;
|
||||
r1 = value2 != entitlements ? entitlements : {};
|
||||
arraySpread(object, Reflect.apply(values, Object, [r1]), value6, undefined);
|
||||
value7 = object.filter(function(a0) {
|
||||
var r3;
|
||||
var r0;
|
||||
var property;
|
||||
var value = a0.ends_at != null;
|
||||
if (value) {
|
||||
property = a0.metadata;
|
||||
value = undefined;
|
||||
r3 = property == null ? value : property.num_expiring_boosts;
|
||||
value = 0;
|
||||
value = (r3 ?? value) > value;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
});
|
||||
if (value5 === value7.length) {
|
||||
return undefined;
|
||||
}
|
||||
value8 = value7.reduce(_fun110517);
|
||||
title = value2 == stateForGuild || value2 == stateForGuild.allPowerups[value8.sku_id] ? value3 : stateForGuild.allPowerups[value8.sku_id].title;
|
||||
r7 = value2 != title ? title : value2;
|
||||
sku = value8.sku;
|
||||
value = value2 != (value2 == sku || value2 == sku.tenant_metadata || value2 == sku.tenant_metadata.guild_monetization ? value3 : sku.tenant_metadata.guild_monetization.game_server);
|
||||
if (value2 !== r7) {
|
||||
object = {name: r7};
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
value9 = environment.__proto__;
|
||||
moduleValue = require(5134) /* metro dependency 5134: CollectiblesUtils */;
|
||||
getDaysRemaining = moduleValue.getDaysRemaining;
|
||||
Date = global.Date;
|
||||
ends_at = value8.ends_at;
|
||||
value10 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
object.daysUntilExpiry = Reflect.apply(max, Math, [value5, Reflect.apply(getDaysRemaining, moduleValue,
|
||||
[date instanceof Object ? date : value10])]);
|
||||
metadata = value8.metadata;
|
||||
num_expiring_boosts = value2 == metadata ? value3 : metadata.num_expiring_boosts;
|
||||
object.numExpiringBoosts = value2 != num_expiring_boosts ? num_expiring_boosts : value5;
|
||||
object.isGameServer = value;
|
||||
object.skuId = value8.sku_id;
|
||||
return object;
|
||||
}
|
||||
if (value) {
|
||||
object = {name: r7};
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
value9 = environment.__proto__;
|
||||
moduleValue = require(5134) /* metro dependency 5134: CollectiblesUtils */;
|
||||
getDaysRemaining = moduleValue.getDaysRemaining;
|
||||
Date = global.Date;
|
||||
ends_at = value8.ends_at;
|
||||
value10 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
object.daysUntilExpiry = Reflect.apply(max, Math, [value5, Reflect.apply(getDaysRemaining, moduleValue,
|
||||
[date instanceof Object ? date : value10])]);
|
||||
metadata = value8.metadata;
|
||||
num_expiring_boosts = value2 == metadata ? value3 : metadata.num_expiring_boosts;
|
||||
object.numExpiringBoosts = value2 != num_expiring_boosts ? num_expiring_boosts : value5;
|
||||
object.isGameServer = value;
|
||||
object.skuId = value8.sku_id;
|
||||
return object;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun110517(a0, a1) { // fn#110517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14812:806, offset: 0x0237bd9b, size: 27 bytes, params: 3, frame: 4
|
||||
const value = a0;
|
||||
const value2 = a1;
|
||||
return value2.ends_at > value.ends_at ? value2 : value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Metro module 14625; source: modules/premium/powerups/hooks/useGetExpiringGuildPowerups.tsx; dependencies: [31, 8258, 566, 14609, 1360, 2] */
|
||||
function _fun110558(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14822:6, offset: 0x0237d3b2, size: 133 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const guildPowerupsStore = importDefault(8258) /* metro dependency 8258: GuildPowerupsStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGetExpiringGuildPowerups.tsx');
|
||||
exports.default = useGetExpiringGuildPowerups;
|
||||
}
|
||||
|
||||
function useGetExpiringGuildPowerups(a0) { // fn#110559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14822:222, offset: 0x0237d437, size: 100 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
return env0_2.useMemo(_fun110561,
|
||||
[(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildPowerupsStore], _fun110560)]);
|
||||
}
|
||||
|
||||
function _fun110561() { // fn#110561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14822:346, offset: 0x0237d49b, size: 145 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
if (stateForGuild == null) {
|
||||
return [];
|
||||
}
|
||||
stateForGuildBinding = stateForGuild;
|
||||
const env0_0 = stateForGuildBinding.allPowerups;
|
||||
const unlockedPowerups = stateForGuildBinding.unlockedPowerups;
|
||||
let value = environment.__proto__;
|
||||
const getExpiringGuildEntitlements = (require(14609) /* metro dependency 14609: getExpiringGuildEntitlements */).getExpiringGuildEntitlements;
|
||||
const Object = global.Object;
|
||||
value = Reflect.apply(getExpiringGuildEntitlements, value, [Object.values(unlockedPowerups)]);
|
||||
value = value.map(function(a0) {
|
||||
return allPowerups[a0.sku_id];
|
||||
});
|
||||
return value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/* Metro module 14640; source: modules/premium/powerups/hooks/useGetGuildPowerupBannerImage.tsx; dependencies: [4502, 566, 2] */
|
||||
function _fun110635(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14837:6, offset: 0x02380d1e, size: 131 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const closure = function(a0, a1, a2, a3) {
|
||||
if (a0 != null) {
|
||||
return a1 || a2 === false || a3 ? a0.staticImageUrl : a0.animatedImageUrl ?? a0.staticImageUrl;
|
||||
}
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGetGuildPowerupBannerImage.tsx');
|
||||
exports.default = useGetGuildPowerupBannerImage;
|
||||
exports.getGuildPowerupBannerImage = closure;
|
||||
}
|
||||
|
||||
function useGetGuildPowerupBannerImage(a0, a1, a2) { // fn#110637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14837:361, offset: 0x02380ddd, size: 78 bytes, params: 4, frame: 17
|
||||
const getGuildPowerupBannerImageBinding = getGuildPowerupBannerImage;
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
return getGuildPowerupBannerImageBinding(a0, useReducedMotion, a1, a2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/* Metro module 14648; source: modules/premium/powerups/hooks/useGuildPowerupCardFooterConfig.tsx; dependencies: [1867, 8259, 661, 14635, 566, 8188, 14610, 2] */
|
||||
function _fun110661(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14845:6, offset: 0x02381e27, size: 178 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildPowerupsConstantsModule = require(8259) /* metro dependency 8259: GuildPowerupsConstants */;
|
||||
guildPowerupsConstantsModule.GUILD_POWERUP_CONFIGURABLE_SKUS_DESKTOP;
|
||||
const env0_4 = guildPowerupsConstantsModule.GUILD_POWERUP_CONFIGURABLE_SKUS_MOBILE;
|
||||
const env0_5 = guildPowerupsConstantsModule.PowerupActiveStatusType;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupCardFooterConfig.tsx');
|
||||
exports.default = useGuildPowerupCardFooterConfig;
|
||||
}
|
||||
|
||||
function useGuildPowerupCardFooterConfig(a0, a1) { // fn#110662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14845:365, offset: 0x02381ed9, size: 267 bytes, params: 3, frame: 23
|
||||
const env0_0 = a0;
|
||||
const value2 = (importDefault(14635) /* metro dependency 14635: usePowerupActiveStatus */)(a0, a1);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun110663, [a0]);
|
||||
const skuId = a1.skuId;
|
||||
const GUILD_POWERUP_GUILD_THEME_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_GUILD_THEME_SKU_ID;
|
||||
const value4 = skuId === GUILD_POWERUP_GUILD_THEME_SKU_ID;
|
||||
let type = value2.type;
|
||||
const INACTIVE = PowerupActiveStatusType.INACTIVE;
|
||||
const r1 = type !== INACTIVE || value4 && value3;
|
||||
type = value2.type;
|
||||
const TIER_OVERRIDE_ACTIVATED = PowerupActiveStatusType.TIER_OVERRIDE_ACTIVATED;
|
||||
return {showToggleButton: (r1 || !(importDefault(14610) /* metro dependency 14610: useGuildPowerupRollbackEnabled */)(a0,
|
||||
a1, 'GuildPowerupCardFooterAdmin')) && !(type === TIER_OVERRIDE_ACTIVATED),
|
||||
showConfigureButton: r1 && GUILD_POWERUP_CONFIGURABLE_SKUS_MOBILE.has(a1.skuId), isPowerupActive: r1};
|
||||
}
|
||||
|
||||
function _fun110663() { // fn#110663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14845:464, offset: 0x02381fe4, size: 70 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
const guild = GuildStore.getGuild(env0_0);
|
||||
return (guild == null ? undefined : guild.features.has(GuildFeatures.GUILD_THEME)) === true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/* Metro module 14624; source: modules/premium/powerups/hooks/useGuildPowerupExpiringNotificationsConfig.tsx; dependencies: [14625, 14626, 1244, 2646, 8188, 2256, 2] */
|
||||
function _fun110554(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14821:6, offset: 0x0237d160, size: 103 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupExpiringNotificationsConfig.tsx');
|
||||
exports.default = useGuildPowerupExpiringNotificationsConfig;
|
||||
}
|
||||
|
||||
function useGuildPowerupExpiringNotificationsConfig(a0) { // fn#110555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14821:213, offset: 0x0237d1c7, size: 446 bytes, params: 2, frame: 24
|
||||
var r11;
|
||||
var items;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var value8;
|
||||
var items3;
|
||||
const value2 = undefined;
|
||||
const value3 = (importDefault(14625) /* metro dependency 14625: useGetExpiringGuildPowerups */)(a0);
|
||||
const value4 = (importDefault(14626) /* metro dependency 14626: useGameServerGetExpiringEntitlements */)(a0);
|
||||
let length = value3.length;
|
||||
const r4 = length > 0 || value4.length > 0;
|
||||
if (r4) {
|
||||
length = value4.length;
|
||||
r11 = length > 0 ? intl.string((importDefault(2646) /* metro dependency 2646: GameServerMessages */)['B3OfL/']) : value2;
|
||||
value8 = value3.map(function(a0) {
|
||||
return a0.title;
|
||||
});
|
||||
items = [];
|
||||
arraySpread(items, r11 != null ? [r11] : [], arraySpread(items, value8, 0, undefined), undefined);
|
||||
items3 = [];
|
||||
if (value3.some(_fun110557)) {
|
||||
items3.push(intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).Sfr0Jw));
|
||||
}
|
||||
length = value4.length;
|
||||
if (length > 0) {
|
||||
items3.push(intl.string((importDefault(2646) /* metro dependency 2646: GameServerMessages */).wiungr));
|
||||
}
|
||||
return {shouldShow: r4, expiringPowerups: value3, expiringPowerupNames: items, warnings: items3};
|
||||
}
|
||||
return {shouldShow: false, expiringPowerups: [], expiringPowerupNames: [], warnings: []};
|
||||
}
|
||||
|
||||
function _fun110557({skuId}) { // fn#110557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14821:535, offset: 0x0237d385, size: 45 bytes, params: 2, frame: 12
|
||||
const VANITY_URL_POWERUP_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).VANITY_URL_POWERUP_SKU_ID;
|
||||
return skuId === VANITY_URL_POWERUP_SKU_ID;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/* Metro module 14647; source: modules/premium/powerups/hooks/useGuildPowerupLevelPerks.tsx; dependencies: [31, 8259, 8249, 1244, 2256, 1360, 2] */
|
||||
function _fun110657(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14844:6, offset: 0x02381ae3, size: 143 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(8259) /* metro dependency 8259: GuildPowerupsConstants */).GUILD_FEATURE_TO_PERK;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupLevelPerks.tsx');
|
||||
exports.default = useGuildPowerupLevelPerks;
|
||||
}
|
||||
|
||||
function useGuildPowerupLevelPerks(a0) { // fn#110658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14844:242, offset: 0x02381b72, size: 109 bytes, params: 2, frame: 17
|
||||
const value = a1;
|
||||
const env0_0 = a0;
|
||||
const {includeEmojis, includeStickers, includeSoundboards} = value !== undefined ? value : {'includeEmojis': true,
|
||||
'includeStickers': true, 'includeSoundboards': true};
|
||||
return includeSoundboards.useMemo(_fun110659, [a0, includeEmojis, includeStickers, includeSoundboards]);
|
||||
}
|
||||
|
||||
function _fun110659() { // fn#110659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14844:415, offset: 0x02381bdf, size: 584 bytes, params: 1, frame: 22
|
||||
var push;
|
||||
var object7;
|
||||
const PerkIcons = (require(8249) /* metro dependency 8249: GuildBoostingUtils */).PerkIcons;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
var property;
|
||||
var object8;
|
||||
var binding;
|
||||
var features;
|
||||
var object9;
|
||||
var ZEvvPz;
|
||||
var object10;
|
||||
var object11;
|
||||
var object12;
|
||||
const items2 = [];
|
||||
const env0_0 = GUILD_FEATURE_TO_PERK();
|
||||
if (includeEmojis) {
|
||||
push = items2.push;
|
||||
object7 = {};
|
||||
object7.perkIcon = PerkIcons.EMOJI;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property = (importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */)['NXvV0+'];
|
||||
object8 = {};
|
||||
binding = env0_0;
|
||||
features = binding.features;
|
||||
object8.totalEmojis = features.total_emoji_slots;
|
||||
features = binding.features;
|
||||
object8.additionalEmojis = features.additional_emoji_slots;
|
||||
object7.description = Reflect.apply(formatToPlainString, intl, [property, object8]);
|
||||
Reflect.apply(push, items2, [object7]);
|
||||
}
|
||||
if (includeStickers) {
|
||||
push = items2.push;
|
||||
object9 = {};
|
||||
object9.perkIcon = PerkIcons.STICKER;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
ZEvvPz = (importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).ZEvvPz;
|
||||
object10 = {};
|
||||
binding = env0_0;
|
||||
features = binding.features;
|
||||
object10.totalStickers = features.total_sticker_slots;
|
||||
features = binding.features;
|
||||
object10.additionalStickers = features.additional_sticker_slots;
|
||||
object9.description = Reflect.apply(formatToPlainString, intl, [ZEvvPz, object10]);
|
||||
Reflect.apply(push, items2, [object9]);
|
||||
}
|
||||
if (includeSoundboards) {
|
||||
push = items2.push;
|
||||
object11 = {};
|
||||
object11.perkIcon = PerkIcons.SOUNDBOARD;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property = (importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */)['s9u/E7'];
|
||||
object12 = {};
|
||||
binding = env0_0;
|
||||
features = binding.features;
|
||||
object12.totalSoundboards = features.total_sound_slots;
|
||||
features = binding.features;
|
||||
object12.additionalSoundboards = features.additional_sound_slots;
|
||||
object11.description = Reflect.apply(formatToPlainString, intl, [property, object12]);
|
||||
Reflect.apply(push, items2, [object11]);
|
||||
}
|
||||
const concat = items2.concat;
|
||||
features = env0_0.features;
|
||||
features = features.features;
|
||||
const value3 = features.map(_fun110660);
|
||||
return Reflect.apply(concat, items2,
|
||||
[value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish)]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/* Metro module 14655; source: modules/premium/powerups/hooks/useGuildPowerupOnDeactivate.tsx; dependencies: [31, 14651, 2] */
|
||||
function _fun110701(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14852:6, offset: 0x023832e0, size: 117 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupOnDeactivate.tsx');
|
||||
exports.default = useGuildPowerupOnDeactivate;
|
||||
}
|
||||
|
||||
function useGuildPowerupOnDeactivate(a0, a1) { // fn#110702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14852:212, offset: 0x02383355, size: 108 bytes, params: 3, frame: 15
|
||||
const {isLoading, error,
|
||||
onToggle} = (importDefault(14651) /* metro dependency 14651: useGuildPowerupOnToggle */)(a0, a1);
|
||||
const binding = env0_2;
|
||||
const useCallback = binding.useCallback;
|
||||
return {isLoading: isLoading, error: error, onDeactivate: Reflect.apply(useCallback, binding, [function() {
|
||||
return onToggle(false);
|
||||
}, [onToggle]])};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/* Metro module 14651; source: modules/premium/powerups/hooks/useGuildPowerupOnToggle.tsx; dependencies: [57, 31, 12307, 2] */
|
||||
function _fun110680(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14848:6, offset: 0x02382770, size: 133 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupOnToggle.tsx');
|
||||
exports.default = useGuildPowerupOnToggle;
|
||||
}
|
||||
|
||||
function useGuildPowerupOnToggle(a0, a1) { // fn#110681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14848:221, offset: 0x023827f5, size: 143 bytes, params: 3, frame: 20
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const binding = env0_3;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, [false]);
|
||||
const binding2 = env0_2;
|
||||
let value = binding2(value2, 2);
|
||||
const property = value[0];
|
||||
var env0_2 = value[1];
|
||||
useState = binding.useState;
|
||||
value = binding2(Reflect.apply(useState, binding, [undefined]), 2);
|
||||
const property2 = value[0];
|
||||
var env0_3 = value[1];
|
||||
const object2 = {isLoading: property, error: property2};
|
||||
object2.onToggle = binding.useCallback(_fun110682, [a0, a1]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun110682(a0) { // fn#110682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14848:398, offset: 0x02382884, size: 159 bytes, params: 2, frame: 15
|
||||
if (require == null) {
|
||||
return global.Promise.resolve();
|
||||
}
|
||||
const guildPowerupsActionCreatorsModule = require(12307) /* metro dependency 12307: GuildPowerupsActionCreators */;
|
||||
const r3 = a0 ? guildPowerupsActionCreatorsModule.enablePowerupForGuild : guildPowerupsActionCreatorsModule.disablePowerupForGuild;
|
||||
env0_2(true);
|
||||
env0_3(undefined);
|
||||
let value = r3(env0_0, require.skuId);
|
||||
value = value.catch(_fun110683);
|
||||
return value.finally(_fun110684);
|
||||
}
|
||||
|
||||
function _fun110683(a0) { // fn#110683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14848:550, offset: 0x02382923, size: 52 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_3;
|
||||
const body = a0.body;
|
||||
value = undefined;
|
||||
binding((body == null ? value : body.message) ?? value);
|
||||
throw a0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 14610; source: modules/premium/powerups/hooks/useGuildPowerupRollbackEnabled.tsx; dependencies: [2] */
|
||||
function _fun110482(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14807:6, offset: 0x0237b0b1, size: 100 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupRollbackEnabled.tsx');
|
||||
exports.default = function() {
|
||||
return false;
|
||||
};
|
||||
exports.isGuildPowerupRollbackEnabled = function() {
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 14611; source: modules/premium/powerups/hooks/useGuildPowerupRollbackNotificationConfig.tsx; dependencies: [2] */
|
||||
function _fun110485(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14808:6, offset: 0x0237b115, size: 87 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupRollbackNotificationConfig.tsx');
|
||||
exports.default = function() {
|
||||
return {'shouldShow': false, 'notificationConfig': null};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Metro module 14623; source: modules/premium/powerups/hooks/useGuildPowerupTier3OverrideConfig.tsx; dependencies: [1867, 661, 566, 1244, 2256, 2] */
|
||||
function _fun110551(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14820:6, offset: 0x0237cfee, size: 140 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupTier3OverrideConfig.tsx');
|
||||
exports.default = useGuildPowerupTier3OverrideConfig;
|
||||
}
|
||||
|
||||
function useGuildPowerupTier3OverrideConfig(a0) { // fn#110552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14820:243, offset: 0x0237d07a, size: 160 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var intl;
|
||||
const env0_0 = a0;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [GuildStore];
|
||||
if (Reflect.apply(useStateFromStores, fluxModule, [object, _fun110553])) {
|
||||
object = {shouldShow: true};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.text = intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).l9n4QZ);
|
||||
r0 = object;
|
||||
} else {
|
||||
r0 = {'shouldShow': false, 'text': ''};
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun110553() { // fn#110553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14820:329, offset: 0x0237d11a, size: 70 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
const guild = GuildStore.getGuild(env0_0);
|
||||
return (guild == null ? undefined : guild.features.has(GuildFeatures.PREMIUM_TIER_3_OVERRIDE)) === true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/* Metro module 8254; source: modules/premium/powerups/hooks/useGuildPowerupsBoostCount.tsx; dependencies: [31, 1867, 8255, 8258, 6857, 566, 2] */
|
||||
function _fun66010(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:6, offset: 0x01be8f48, size: 178 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const gameServerStore = importDefault(8255) /* metro dependency 8255: GameServerStore */;
|
||||
const guildPowerupsStore = importDefault(8258) /* metro dependency 8258: GuildPowerupsStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupsBoostCount.tsx');
|
||||
exports.default = useGuildAppliedBoostCount;
|
||||
exports.getGuildPowerupsBoostCount = getGuildPowerupsBoostCount;
|
||||
}
|
||||
|
||||
function useGuildAppliedBoostCount(a0) { // fn#66011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:241, offset: 0x01be8ffa, size: 254 bytes, params: 2, frame: 21
|
||||
const env0_0 = a0;
|
||||
const r7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun66012) ?? 0;
|
||||
const value4 = (require(6857) /* metro dependency 6857: GameServerExperiment */).useGameServerEnabled(a0,
|
||||
'GuildPowerupsBoostCount');
|
||||
return value4.useMemo(_fun66015, [r7,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildPowerupsStore], _fun66013),
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([GameServerStore], _fun66014), value4]);
|
||||
}
|
||||
|
||||
function getGuildPowerupsBoostCount(a0) { // fn#66016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:887, offset: 0x01be91fe, size: 242 bytes, params: 2, frame: 19
|
||||
var object2;
|
||||
const guild = GuildStore.getGuild(a0);
|
||||
const value3 = undefined;
|
||||
const premiumSubscriberCount = guild == null ? value3 : guild.premiumSubscriberCount;
|
||||
const value4 = 0;
|
||||
const r1 = premiumSubscriberCount ?? value4;
|
||||
const gameServerEnabled = (require(6857) /* metro dependency 6857: GameServerExperiment */).getGameServerEnabled(a0,
|
||||
'GuildPowerupsBoostCount');
|
||||
const stateForGuild = GuildPowerupsStore.getStateForGuild(a0);
|
||||
const appliedBoosts = stateForGuild == null ? value3 : stateForGuild.appliedBoosts;
|
||||
let value = GameServerStore.getStateForGuild(a0);
|
||||
const appliedBoosts2 = value == null ? value3 : value.appliedBoosts;
|
||||
if (appliedBoosts == null) {
|
||||
return {'available': 0, 'spent': 0, total: r1};
|
||||
}
|
||||
if (gameServerEnabled) {
|
||||
if (appliedBoosts2 == null) {
|
||||
return {'available': 0, 'spent': 0, total: r1};
|
||||
}
|
||||
value = appliedBoosts + (appliedBoosts2 ?? value4);
|
||||
object2 = {};
|
||||
object2.available = global.Math.max(value4, r1 - value);
|
||||
} else {
|
||||
value = appliedBoosts + (appliedBoosts2 ?? value4);
|
||||
object2 = {};
|
||||
object2.available = global.Math.max(value4, r1 - value);
|
||||
}
|
||||
object2.spent = value;
|
||||
object2.total = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun66012() { // fn#66012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:328, offset: 0x01be90f8, size: 44 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return GuildStore.getGuild(env0_0)?.premiumSubscriberCount;
|
||||
}
|
||||
|
||||
function _fun66013() { // fn#66013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:504, offset: 0x01be9124, size: 44 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return GuildPowerupsStore.getStateForGuild(env0_0)?.appliedBoosts;
|
||||
}
|
||||
|
||||
function _fun66014() { // fn#66014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:614, offset: 0x01be9150, size: 44 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return GameServerStore.getStateForGuild(env0_0)?.appliedBoosts;
|
||||
}
|
||||
|
||||
function _fun66015() { // fn#66015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:708, offset: 0x01be917c, size: 130 bytes, params: 1, frame: 16
|
||||
var binding;
|
||||
var value2;
|
||||
var value3;
|
||||
var object2;
|
||||
if (env0_3 == null) {
|
||||
return {'available': 0, 'spent': 0, total: env0_1};
|
||||
}
|
||||
if (env0_2) {
|
||||
if (env0_4 == null) {
|
||||
return {'available': 0, 'spent': 0, total: env0_1};
|
||||
}
|
||||
binding = env0_3;
|
||||
value2 = 0;
|
||||
value3 = binding + (env0_4 ?? value2);
|
||||
object2 = {};
|
||||
object2.available = global.Math.max(value2, env0_1 - value3);
|
||||
} else {
|
||||
binding = env0_3;
|
||||
value2 = 0;
|
||||
value3 = binding + (env0_4 ?? value2);
|
||||
object2 = {};
|
||||
object2.available = global.Math.max(value2, env0_1 - value3);
|
||||
}
|
||||
object2.spent = value3;
|
||||
object2.total = env0_1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/* Metro module 8265; source: modules/premium/powerups/hooks/useGuildPowerupsBoostLevelProgress.tsx; dependencies: [1867, 661, 8254, 566, 2] */
|
||||
function _fun66101(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8450:6, offset: 0x01bec077, size: 173 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = constantsModule.AppliedGuildBoostsRequiredForBoostedGuildTier;
|
||||
const env0_5 = constantsModule.BoostedGuildTiers;
|
||||
const env0_6 = constantsModule.GuildFeatures;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupsBoostLevelProgress.tsx');
|
||||
exports.default = useGuildPowerupBoostLevelProgress;
|
||||
exports.getGuildPowerupBoostLevelProgress = function(a0) {
|
||||
var r2;
|
||||
var value2 = undefined;
|
||||
var value3 = require(dependencyMap[2]).getGuildPowerupsBoostCount(a0);
|
||||
var value4 = GuildStore.getGuild(a0);
|
||||
r2 = value4 == null ? value2 : value4.premiumTier;
|
||||
r2 = r2 ?? BoostedGuildTiers.NONE;
|
||||
return AppliedGuildBoostsRequiredForBoostedGuildTier[r2] + value3.available;
|
||||
};
|
||||
}
|
||||
|
||||
function useGuildPowerupBoostLevelProgress(a0) { // fn#66102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8450:319, offset: 0x01bec124, size: 145 bytes, params: 2, frame: 21
|
||||
const env0_0 = a0;
|
||||
const value2 = (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(a0);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
const value3 = Reflect.apply(useStateFromStores, fluxModule, [[GuildStore], _fun66103]);
|
||||
const moduleValue2 = fluxModule;
|
||||
useStateFromStores = moduleValue2.useStateFromStores;
|
||||
return (Reflect.apply(useStateFromStores, moduleValue2, [[GuildStore],
|
||||
_fun66104]) ? 0 : AppliedGuildBoostsRequiredForBoostedGuildTier[value3]) + value2.available;
|
||||
}
|
||||
|
||||
function _fun66103() { // fn#66103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8450:416, offset: 0x01bec1b5, size: 58 bytes, params: 1, frame: 13
|
||||
return GuildStore.getGuild(env0_0)?.premiumTier ?? BoostedGuildTiers.NONE;
|
||||
}
|
||||
|
||||
function _fun66104() { // fn#66104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8450:542, offset: 0x01bec1ef, size: 70 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
const guild = GuildStore.getGuild(env0_0);
|
||||
return (guild == null ? undefined : guild.features.has(GuildFeatures.PREMIUM_TIER_3_OVERRIDE)) === true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,998 @@
|
||||
/* Metro module 14607; source: modules/premium/powerups/hooks/useGuildPowerupsNotifications.tsx; dependencies: [57, 31, 1867, 8255, 14608, 8258, 8259, 661, 1376, 8249, 14247, 14598, 8188, 14610, 1360, 1365, 6857, 632, 8263, 4043, 8254, 14611, 1367, 14609, 14612, 14613, 14615, 14617, 14618, 12307, 2] */
|
||||
function _fun110428(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:6, offset: 0x0237911c, size: 468 bytes, params: 8, frame: 26
|
||||
const env0_0 = require;
|
||||
const closure = maybeGetLevelUnlockedPopoutDCF;
|
||||
const closure2 = maybeGetPerkPurchaseablePopoutDCF;
|
||||
const closure3 = maybeGetGameServerHostingGuildEligiblePopoutDCF;
|
||||
const closure4 = useGuildPowerupNewPerkAvailableCoachmarkVersion;
|
||||
const closure5 = useGuildPowerupsNotificationIndicator;
|
||||
const closure6 = useGuildPowerupsChannelListPopout;
|
||||
const closure7 = useGuildPowerupsNotifications;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const gameServerStore = importDefault(8255) /* metro dependency 8255: GameServerStore */;
|
||||
const guildPowerupsNotificationStore = importDefault(14608) /* metro dependency 14608: GuildPowerupsNotificationStore */;
|
||||
const guildPowerupsStore = importDefault(8258) /* metro dependency 8258: GuildPowerupsStore */;
|
||||
let value = require(8259) /* metro dependency 8259: GuildPowerupsConstants */;
|
||||
const env0_9 = value.BOOSTING_TIER_TO_LEVEL_SKU_ID;
|
||||
const env0_10 = value.BOOSTING_TIER_TO_LEVEL_UNLOCKED_DC;
|
||||
const env0_11 = value.GUILD_POWERUP_MIGRATION_USER_ID;
|
||||
const env0_12 = value.GUILD_POWERUP_NEW_PERK_GROUPS;
|
||||
const env0_13 = value.GuildPowerupNewPerkAvailableCoachmarkVersion;
|
||||
const env0_14 = value.NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET;
|
||||
const env0_15 = value.POWERUPS_INCLUDED_IN_LEVEL;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_16 = value.BoostedGuildTiers;
|
||||
const env0_17 = value.GuildFeatures;
|
||||
const env0_18 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupsNotifications.tsx');
|
||||
exports.default = closure7;
|
||||
exports.maybeGetLevelUnlockedPopoutDCF = closure;
|
||||
exports.maybeGetPerkPurchaseablePopoutDCF = closure2;
|
||||
exports.maybeGetGameServerHostingGuildEligiblePopoutDCF = closure3;
|
||||
exports.useGuildPowerupNewPerkAvailableCoachmarkVersion = closure4;
|
||||
exports.useGuildPowerupsNotificationIndicator = closure5;
|
||||
exports.useGuildPowerupsChannelListPopout = closure6;
|
||||
exports.useAutoDismissGuildPowerupsNotifications = useAutoDismissGuildPowerupsNotifications;
|
||||
}
|
||||
|
||||
function maybeGetLevelUnlockedPopoutDCF(a0, a1) { // fn#110429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:537, offset: 0x023792f0, size: 218 bytes, params: 3, frame: 20
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const value2 = undefined;
|
||||
const ReverseOrderedTiers = (require(8249) /* metro dependency 8249: GuildBoostingUtils */).ReverseOrderedTiers;
|
||||
const value3 = ReverseOrderedTiers.find(_fun110430);
|
||||
if (value3 == null) {
|
||||
return value2;
|
||||
}
|
||||
let property = BOOSTING_TIER_TO_LEVEL_UNLOCKED_DC[value3];
|
||||
if (property == null) {
|
||||
return value2;
|
||||
}
|
||||
const guildDismissibleContentUtilsModule = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
||||
if (guildDismissibleContentUtilsModule.isContentDismissed(property, a0)) {
|
||||
return value2;
|
||||
}
|
||||
property = BOOSTING_TIER_TO_LEVEL_SKU_ID[value3];
|
||||
const r3 = property != null ? a1.allPowerups[property] : value2;
|
||||
if (r3 == null) {
|
||||
return value2;
|
||||
}
|
||||
const GuildPowerupNotificationPopoutType = (require(14598) /* metro dependency 14598: GuildPowerupsNotification */).GuildPowerupNotificationPopoutType;
|
||||
const LEVEL_REACHED = GuildPowerupNotificationPopoutType.LEVEL_REACHED;
|
||||
return {type: LEVEL_REACHED, powerup: r3, markAsDismissed: markAsDismissed};
|
||||
}
|
||||
|
||||
function maybeGetPerkPurchaseablePopoutDCF(a0, a1, a2, a3) { // fn#110432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:981, offset: 0x02379443, size: 452 bytes, params: 5, frame: 21
|
||||
var r1;
|
||||
var moduleValue;
|
||||
const DismissibleGuildContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleGuildContent;
|
||||
const GuildPowerupNotificationPopoutType = (require(14598) /* metro dependency 14598: GuildPowerupsNotification */).GuildPowerupNotificationPopoutType;
|
||||
var moduleValue2;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const env0_3 = a3;
|
||||
const guild = GuildStore.getGuild(a0);
|
||||
const value3 = undefined;
|
||||
let r0 = (guild == null ? value3 : guild.premiumTier) ?? BoostedGuildTiers.NONE;
|
||||
const Array = global.Array;
|
||||
const value5 = Array.from(GUILD_POWERUP_NEW_PERK_GROUPS.values()).flatMap(function(a0) {
|
||||
return a0.length <= 0 || a0.some(_fun110434) ? [] : a0.map(_fun110435);
|
||||
});
|
||||
const value6 = value5.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
if (value6.length !== 0) {
|
||||
if (value6.length !== 1) {
|
||||
if (value6.length > 1) {
|
||||
moduleValue2 = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
||||
r1 = moduleValue2.isContentDismissed(DismissibleGuildContent.GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK,
|
||||
|
||||
a0) ? value3 : {type: GuildPowerupNotificationPopoutType.PERKS_PURCHASABLE, powerups: value6,
|
||||
markAsDismissed: markAsDismissed_110437};
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
moduleValue = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
||||
if (moduleValue.isContentDismissed(DismissibleGuildContent.GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK,
|
||||
a0)) {
|
||||
if (value6.length > 1) {
|
||||
moduleValue2 = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
||||
r1 = moduleValue2.isContentDismissed(DismissibleGuildContent.GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK,
|
||||
|
||||
|
||||
a0) ? value3 : {type: GuildPowerupNotificationPopoutType.PERKS_PURCHASABLE, powerups: value6,
|
||||
markAsDismissed: markAsDismissed_110437};
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = {type: GuildPowerupNotificationPopoutType.PERKS_PURCHASABLE, powerups: value6,
|
||||
markAsDismissed: markAsDismissed};
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
function maybeGetGameServerHostingGuildEligiblePopoutDCF(a0, a1, a2, a3) { // fn#110439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:2267, offset: 0x023797f0, size: 196 bytes, params: 5, frame: 18
|
||||
var moduleValue2;
|
||||
var object2;
|
||||
const env0_0 = a0;
|
||||
const gameServerExperimentModule = require(6857) /* metro dependency 6857: GameServerExperiment */;
|
||||
const getGameServerEnabled = gameServerExperimentModule.getGameServerEnabled;
|
||||
if (Reflect.apply(getGameServerEnabled, gameServerExperimentModule, [a0,
|
||||
'maybeGetGameServerHostingGuildEligiblePopoutDCF'])) {
|
||||
if (a1) {
|
||||
return undefined;
|
||||
}
|
||||
if (a3 == null) {
|
||||
return undefined;
|
||||
}
|
||||
if (a2 >= a3) {
|
||||
moduleValue2 = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
||||
if (moduleValue2.isContentDismissed((require(1365) /* metro dependency 1365: dismissible_content */).DismissibleGuildContent.GAME_SERVER_HOSTING_GUILD_ELIGIBLE_COACHMARK,
|
||||
|
||||
|
||||
a0)) {
|
||||
return undefined;
|
||||
}
|
||||
object2 = {};
|
||||
object2.type = (require(14598) /* metro dependency 14598: GuildPowerupsNotification */).GuildPowerupNotificationPopoutType.GAME_SERVER_HOSTING_GUILD_ELIGIBLE;
|
||||
object2.markAsDismissed = markAsDismissed;
|
||||
return object2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function useGuildPowerupNewPerkAvailableCoachmarkVersion(a0, a1) { // fn#110441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:2780, offset: 0x02379900, size: 219 bytes, params: 3, frame: 21
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const value2 = (require(6857) /* metro dependency 6857: GameServerExperiment */).useGameServerEnabled(a0,
|
||||
'GuildPowerupsChannelRow');
|
||||
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore],
|
||||
_fun110442);
|
||||
const r4 = (require(8263) /* metro dependency 8263: ServerThemeExperiment */).useServerThemeEnabled(a0,
|
||||
'useGuildPowerupNewPerkAvailableCoachmarkVersion') && (require(4043) /* metro dependency 4043: ServerThemeUserExperiment */).useServerThemeUserEnabled('useGuildPowerupNewPerkAvailableCoachmarkVersion');
|
||||
return r4.useMemo(_fun110443, [a1, value2, value3, r4]);
|
||||
}
|
||||
|
||||
function useGuildPowerupsNotificationIndicator(a0, a1, a2) { // fn#110446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:4093, offset: 0x02379c4e, size: 308 bytes, params: 4, frame: 22
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const value2 = undefined;
|
||||
const available = (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(a0).available;
|
||||
const shouldShow = (importDefault(14611) /* metro dependency 14611: useGuildPowerupRollbackNotificationConfig */)(a0,
|
||||
'useGuildPowerupsNotificationIndicator').shouldShow;
|
||||
const dismissibleContentUtilsModule = require(1367) /* metro dependency 1367: DismissibleContentUtils */;
|
||||
const useIsSingleUseGuildDismissibleContentDismissed = dismissibleContentUtilsModule.useIsSingleUseGuildDismissibleContentDismissed;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const VANITY_URL_POWERUP_ROLLBACK_NOTIFICATION = DismissibleContent.VANITY_URL_POWERUP_ROLLBACK_NOTIFICATION;
|
||||
const r7 = shouldShow && !Reflect.apply(useIsSingleUseGuildDismissibleContentDismissed,
|
||||
dismissibleContentUtilsModule, [VANITY_URL_POWERUP_ROLLBACK_NOTIFICATION, a0]);
|
||||
const env0_4 = r7;
|
||||
const stateForGuild = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GameServerStore],
|
||||
_fun110447);
|
||||
return env0_4.useMemo(_fun110448, [available, a2 == null ? value2 : a2.lastBoostCount,
|
||||
a2 == null ? value2 : a2.lastSeenWarningNotification, a1, r7,
|
||||
stateForGuild == null ? value2 : stateForGuild.entitlements]);
|
||||
}
|
||||
|
||||
function useGuildPowerupsChannelListPopout(a0, a1) { // fn#110449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:5239, offset: 0x02379f8c, size: 1176 bytes, params: 3, frame: 43
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const value3 = env0_3((require(14612) /* metro dependency 14612: GuildPowerupsNotificationsDCFNative */).usePerksCoachmarkDCF(a1 != null),
|
||||
2);
|
||||
let property = value3[0];
|
||||
const property2 = value3[1];
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const GUILD_POWERUP_PERKS_COACHMARK = DismissibleContent.GUILD_POWERUP_PERKS_COACHMARK;
|
||||
const value4 = property === GUILD_POWERUP_PERKS_COACHMARK;
|
||||
const available = (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(a0).available;
|
||||
const env0_4 = available;
|
||||
const value5 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore],
|
||||
_fun110450);
|
||||
const lowestGameCostForGuild = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GameServerStore],
|
||||
_fun110451);
|
||||
const r19 = (require(8263) /* metro dependency 8263: ServerThemeExperiment */).useServerThemeEnabled(a0,
|
||||
'useGuildPowerupsChannelListPopout') && (require(4043) /* metro dependency 4043: ServerThemeUserExperiment */).useServerThemeUserEnabled('useGuildPowerupsChannelListPopout');
|
||||
const value8 = useGuildPowerupNewPerkAvailableCoachmarkVersion(a0, a1);
|
||||
const guildPowerupsNotificationsDCFNativeModule = require(14612) /* metro dependency 14612: GuildPowerupsNotificationsDCFNative */;
|
||||
const useNewPerkAvailableCoachmarkDCF = guildPowerupsNotificationsDCFNativeModule.useNewPerkAvailableCoachmarkDCF;
|
||||
let r4 = a1 != null && !value4;
|
||||
const value12 = env0_3(Reflect.apply(useNewPerkAvailableCoachmarkDCF, guildPowerupsNotificationsDCFNativeModule,
|
||||
[r4, value8]), 2);
|
||||
property = value12[0];
|
||||
const property3 = value12[1];
|
||||
const GUILD_POWERUP_NEW_PERK_AVAILABLE_COACHMARK = DismissibleContent.GUILD_POWERUP_NEW_PERK_AVAILABLE_COACHMARK;
|
||||
const value13 = property === GUILD_POWERUP_NEW_PERK_AVAILABLE_COACHMARK;
|
||||
const value14 = (importDefault(14613) /* metro dependency 14613: useBoostToUnlockFeaturedPowerup */)(a0);
|
||||
const moduleValue7 = guildPowerupsNotificationsDCFNativeModule;
|
||||
const useBoostToUnlockCoachmarkDCF = moduleValue7.useBoostToUnlockCoachmarkDCF;
|
||||
const value20 = env0_3(Reflect.apply(useBoostToUnlockCoachmarkDCF, moduleValue7,
|
||||
[a1 != null && !value4 && !value13 && value14 != null, a0]), 2);
|
||||
property = value20[0];
|
||||
const property4 = value20[1];
|
||||
const BOOST_TO_UNLOCK_COACHMARK = DismissibleContent.BOOST_TO_UNLOCK_COACHMARK;
|
||||
const value21 = property === BOOST_TO_UNLOCK_COACHMARK;
|
||||
const value22 = (importDefault(14615) /* metro dependency 14615: useFeaturedExpiringPowerup */)(a0);
|
||||
const moduleValue8 = guildPowerupsNotificationsDCFNativeModule;
|
||||
const useExpiringPowerupCoachmarkDCF = moduleValue8.useExpiringPowerupCoachmarkDCF;
|
||||
r4 = a1 != null && !value4 && !value13;
|
||||
r4 = r4 && !value21 && value22 != null;
|
||||
const value29 = env0_3(Reflect.apply(useExpiringPowerupCoachmarkDCF, moduleValue8, [r4, a0]), 2);
|
||||
property = value29[0];
|
||||
const property5 = value29[1];
|
||||
const EXPIRING_POWERUP_COACHMARK = DismissibleContent.EXPIRING_POWERUP_COACHMARK;
|
||||
const value30 = property === EXPIRING_POWERUP_COACHMARK;
|
||||
const gameServerEnabled = (require(6857) /* metro dependency 6857: GameServerExperiment */).getGameServerEnabled(a0,
|
||||
'useGuildPowerupsChannelListPopout');
|
||||
const value32 = (require(14617) /* metro dependency 14617: NewGamesCoachmarkExperiment */).useIsNewGamesCoachmarkEnabled('useGuildPowerupsChannelListPopout');
|
||||
const moduleValue11 = guildPowerupsNotificationsDCFNativeModule;
|
||||
const useNewGamesCoachmarkDC = moduleValue11.useNewGamesCoachmarkDC;
|
||||
const value35 = env0_3(Reflect.apply(useNewGamesCoachmarkDC, moduleValue11,
|
||||
[a1 != null && gameServerEnabled && value32]), 2);
|
||||
property = value35[0];
|
||||
const property6 = value35[1];
|
||||
const GAME_SERVER_NEW_GAMES_COACHMARK = DismissibleContent.GAME_SERVER_NEW_GAMES_COACHMARK;
|
||||
const value36 = property === GAME_SERVER_NEW_GAMES_COACHMARK;
|
||||
const value37 = (require(14618) /* metro dependency 14618: GameServerPricingExperiment */).useIsGameServerPricingEnabled(a0,
|
||||
'useGuildPowerupsChannelListPopout');
|
||||
const moduleValue13 = guildPowerupsNotificationsDCFNativeModule;
|
||||
const useGameServerPricingCoachmarkDCF = moduleValue13.useGameServerPricingCoachmarkDCF;
|
||||
const value41 = env0_3(Reflect.apply(useGameServerPricingCoachmarkDCF, moduleValue13,
|
||||
[a1 != null && !value5 && gameServerEnabled && value37]), 2);
|
||||
property = value41[0];
|
||||
const property7 = value41[1];
|
||||
const GAME_SERVER_PRICING_CHANGE_COACHMARK = DismissibleContent.GAME_SERVER_PRICING_CHANGE_COACHMARK;
|
||||
const value42 = property === GAME_SERVER_PRICING_CHANGE_COACHMARK;
|
||||
const value43 = env0_4.useMemo(_fun110452, [a0, a1, value4, value13, value36, value42, value21, value30, available,
|
||||
value5, lowestGameCostForGuild, r19]);
|
||||
const value45 = env0_3(guildPowerupsNotificationsDCFNativeModule.useGuildPowerupNotificationDCF(value43 != null), 2);
|
||||
return env0_4.useMemo(_fun110453, [a1, value4, property2, value43, value45[0], value45[1], value13, property3,
|
||||
value8, value21, value14, property4, value30, value22, property5, value36, property6, value42, property7]);
|
||||
}
|
||||
|
||||
function useGuildPowerupsNotifications(a0) { // fn#110456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:8344, offset: 0x0237a829, size: 207 bytes, params: 2, frame: 22
|
||||
const env0_0 = a0;
|
||||
const value2 = undefined;
|
||||
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildPowerupsNotificationStore],
|
||||
_fun110457, [a0]);
|
||||
const stateForGuild = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildPowerupsStore],
|
||||
_fun110458);
|
||||
const {indicator, showUnread} = useGuildPowerupsNotificationIndicator(a0, stateForGuild ?? value2, value3);
|
||||
const value = useGuildPowerupsChannelListPopout(a0, stateForGuild ?? value2);
|
||||
if (stateForGuild !== null) {
|
||||
if (indicator != null) {
|
||||
return {indicator: indicator, showUnread: showUnread, popout: value};
|
||||
}
|
||||
if (showUnread) {
|
||||
return {indicator: indicator, showUnread: showUnread, popout: value};
|
||||
}
|
||||
if (value != null) {
|
||||
return {indicator: indicator, showUnread: showUnread, popout: value};
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function useAutoDismissGuildPowerupsNotifications(a0) { // fn#110459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:9416, offset: 0x0237a930, size: 177 bytes, params: 2, frame: 19
|
||||
const env0_0 = a0;
|
||||
const stateForGuild = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildPowerupsStore],
|
||||
_fun110460);
|
||||
const value2 = useGuildPowerupsNotifications(a0);
|
||||
env0_4.useEffect(_fun110461, [a0]);
|
||||
env0_4.useEffect(_fun110462, [value2]);
|
||||
env0_4.useEffect(_fun110463, [a0, stateForGuild]);
|
||||
}
|
||||
|
||||
function _fun110430(a0) { // fn#110430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:622, offset: 0x023793ca, size: 65 bytes, params: 2, frame: 5
|
||||
const value = environment.__proto__;
|
||||
const property = BOOSTING_TIER_TO_LEVEL_SKU_ID[a0];
|
||||
const r2 = property != null ? require.unlockedPowerups[property] : undefined;
|
||||
return r2 != null && r2.user_id !== GUILD_POWERUP_MIGRATION_USER_ID;
|
||||
}
|
||||
|
||||
function maybeGetLevelUnlockedPopoutDCFMarkAsDismissed(a0) { // fn#110431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:931, owner: maybeGetLevelUnlockedPopoutDCF.markAsDismissed, offset: 0x0237940b, size: 56 bytes, params: 2, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
||||
value.markContentAsDismissed(env0_2, env0_0, true, a0);
|
||||
}
|
||||
|
||||
function _fun110433(a0) { // fn#110433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:1141, offset: 0x02379607, size: 62 bytes, params: 2, frame: 12
|
||||
return a0.length <= 0 || a0.some(_fun110434) ? [] : a0.map(_fun110435);
|
||||
}
|
||||
|
||||
function maybeGetPerkPurchaseablePopoutDCFMarkAsDismissed(a0) { // fn#110437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:1919, owner: maybeGetPerkPurchaseablePopoutDCF.markAsDismissed, offset: 0x02379758, size: 76 bytes, params: 2, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
||||
const markContentAsDismissed = value.markContentAsDismissed;
|
||||
const DismissibleGuildContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleGuildContent;
|
||||
const GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK;
|
||||
Reflect.apply(markContentAsDismissed, value, [GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK, env0_0, true, a0]);
|
||||
}
|
||||
|
||||
function maybeGetPerkPurchaseablePopoutDCFMarkAsDismissed_110438(a0) { // fn#110438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:2144, owner: maybeGetPerkPurchaseablePopoutDCF.markAsDismissed, offset: 0x023797a4, size: 76 bytes, params: 2, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
||||
const markContentAsDismissed = value.markContentAsDismissed;
|
||||
const DismissibleGuildContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleGuildContent;
|
||||
const GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK;
|
||||
Reflect.apply(markContentAsDismissed, value, [GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK, env0_0, true, a0]);
|
||||
}
|
||||
|
||||
function maybeGetGameServerHostingGuildEligiblePopoutDCFMarkAsDismissed(a0) { // fn#110440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:2656, owner: maybeGetGameServerHostingGuildEligiblePopoutDCF.markAsDismissed, offset: 0x023798b4, size: 76 bytes, params: 2, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
||||
const markContentAsDismissed = value.markContentAsDismissed;
|
||||
const DismissibleGuildContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleGuildContent;
|
||||
const GAME_SERVER_HOSTING_GUILD_ELIGIBLE_COACHMARK = DismissibleGuildContent.GAME_SERVER_HOSTING_GUILD_ELIGIBLE_COACHMARK;
|
||||
Reflect.apply(markContentAsDismissed, value, [GAME_SERVER_HOSTING_GUILD_ELIGIBLE_COACHMARK, env0_0, true, a0]);
|
||||
}
|
||||
|
||||
function _fun110442() { // fn#110442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:2942, offset: 0x023799db, size: 64 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
const guild = GuildStore.getGuild(env0_0);
|
||||
return guild == null ? undefined : guild.features.has(GuildFeatures.GAME_SERVERS);
|
||||
}
|
||||
|
||||
function _fun110443() { // fn#110443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:3224, offset: 0x02379a1b, size: 513 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
var GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
var r2;
|
||||
var r1;
|
||||
const GUILD_POWERUP_GUILD_THEME_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_GUILD_THEME_SKU_ID;
|
||||
const GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID;
|
||||
var value8;
|
||||
var Array;
|
||||
var from;
|
||||
var value11;
|
||||
var value12;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const value4 = (require == null || require.allPowerups == null ? value2 : require.allPowerups[GUILD_POWERUP_GUILD_THEME_SKU_ID]) != null;
|
||||
let r0 = require == null || require.unlockedPowerups == null ? value2 : require.unlockedPowerups[GUILD_POWERUP_GUILD_THEME_SKU_ID];
|
||||
if (env0_4) {
|
||||
if (value4) {
|
||||
if (r0 != null) {
|
||||
r0 = require == null || require.allPowerups == null ? value2 : require.allPowerups[GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
|
||||
value8 = r0 != null;
|
||||
r0 = require == null || require.unlockedPowerups == null ? value2 : require.unlockedPowerups[GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
|
||||
if (value8) {
|
||||
if (r0 != null) {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
value11 = environment.__proto__;
|
||||
value12 = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO]]);
|
||||
if (value12.some(function(a0) {
|
||||
return (require == null || require.unlockedPowerups == null ? undefined : require.unlockedPowerups[a0]) != null;
|
||||
})) {
|
||||
if (env0_2) {
|
||||
if (env0_3) {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
value = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
||||
value = value.some(_fun110445);
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
} else {
|
||||
r2 = GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING;
|
||||
}
|
||||
} else {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
value = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
||||
value = value.some(_fun110445);
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
r0 = GuildPowerupNewPerkAvailableCoachmarkVersion.FILE_UPLOAD_250_MB;
|
||||
}
|
||||
} else {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
value11 = environment.__proto__;
|
||||
value12 = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO]]);
|
||||
if (value12.some(_fun110444)) {
|
||||
if (env0_2) {
|
||||
if (env0_3) {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
value = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
||||
value = value.some(_fun110445);
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
} else {
|
||||
r2 = GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING;
|
||||
}
|
||||
} else {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
value = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
||||
value = value.some(_fun110445);
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
return GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_THEME;
|
||||
}
|
||||
r0 = require == null || require.allPowerups == null ? value2 : require.allPowerups[GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
|
||||
value8 = r0 != null;
|
||||
r0 = require == null || require.unlockedPowerups == null ? value2 : require.unlockedPowerups[GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
|
||||
if (value8) {
|
||||
if (r0 != null) {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
value11 = environment.__proto__;
|
||||
value12 = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO]]);
|
||||
if (value12.some(_fun110444)) {
|
||||
if (env0_2) {
|
||||
if (env0_3) {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
value = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
||||
value = value.some(_fun110445);
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
} else {
|
||||
r2 = GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING;
|
||||
}
|
||||
} else {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
value = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
||||
value = value.some(_fun110445);
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
r0 = GuildPowerupNewPerkAvailableCoachmarkVersion.FILE_UPLOAD_250_MB;
|
||||
}
|
||||
} else {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
value11 = environment.__proto__;
|
||||
value12 = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO]]);
|
||||
if (value12.some(_fun110444)) {
|
||||
if (env0_2) {
|
||||
if (env0_3) {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
value = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
||||
value = value.some(_fun110445);
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
} else {
|
||||
r2 = GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING;
|
||||
}
|
||||
} else {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
value = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
||||
value = value.some(_fun110445);
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
} else {
|
||||
r0 = require == null || require.allPowerups == null ? value2 : require.allPowerups[GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
|
||||
value8 = r0 != null;
|
||||
r0 = require == null || require.unlockedPowerups == null ? value2 : require.unlockedPowerups[GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
|
||||
if (value8) {
|
||||
if (r0 != null) {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
value11 = environment.__proto__;
|
||||
value12 = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO]]);
|
||||
if (value12.some(function(a0) {
|
||||
return (require == null || require.unlockedPowerups == null ? undefined : require.unlockedPowerups[a0]) != null;
|
||||
})) {
|
||||
if (env0_2) {
|
||||
if (env0_3) {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
value = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
||||
value = value.some(_fun110445);
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
} else {
|
||||
r2 = GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING;
|
||||
}
|
||||
} else {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
value = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
||||
value = value.some(_fun110445);
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
r0 = GuildPowerupNewPerkAvailableCoachmarkVersion.FILE_UPLOAD_250_MB;
|
||||
}
|
||||
} else {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
value11 = environment.__proto__;
|
||||
value12 = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO]]);
|
||||
if (value12.some(_fun110444)) {
|
||||
if (env0_2) {
|
||||
if (env0_3) {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
value = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
||||
value = value.some(_fun110445);
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
} else {
|
||||
r2 = GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING;
|
||||
}
|
||||
} else {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
value = Reflect.apply(from, Array,
|
||||
[NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[GUILD_TAG_BADGE_PACKS_WAVE_ONE]]);
|
||||
value = value.some(_fun110445);
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE = value ? 0 : GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
r2 = GUILD_TAG_BADGE_PACKS_WAVE_ONE;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = GuildPowerupNewPerkAvailableCoachmarkVersion.GUILD_TAG_BADGE_PACKS_WAVE_TWO;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun110448() { // fn#110448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:4459, offset: 0x02379d9d, size: 495 bytes, params: 1, frame: 24
|
||||
var r13;
|
||||
var entitlements;
|
||||
const GuildPowerupNotificationIndicatorType = (require(14598) /* metro dependency 14598: GuildPowerupsNotification */).GuildPowerupNotificationIndicatorType;
|
||||
if (require == null) {
|
||||
return {indicator: undefined, showUnread: false};
|
||||
}
|
||||
const unlockedPowerups = require.unlockedPowerups;
|
||||
const value3 = undefined;
|
||||
const getExpiringGuildEntitlementsModule = require(14609) /* metro dependency 14609: getExpiringGuildEntitlements */;
|
||||
const getExpiringGuildEntitlements = getExpiringGuildEntitlementsModule.getExpiringGuildEntitlements;
|
||||
let Object = global.Object;
|
||||
let values = Object.values;
|
||||
const value4 = Reflect.apply(values, Object, [unlockedPowerups]);
|
||||
const items = [];
|
||||
const value5 = 0;
|
||||
const value6 = arraySpread(items, value4, value5, r13);
|
||||
Object = global.Object;
|
||||
values = Object.values;
|
||||
const value7 = stateForGuild == null;
|
||||
if (value7) {
|
||||
entitlements = value3;
|
||||
r13 = value7;
|
||||
} else {
|
||||
stateForGuildBinding = stateForGuild;
|
||||
entitlements = stateForGuildBinding.entitlements;
|
||||
r13 = stateForGuildBinding;
|
||||
}
|
||||
arraySpread(items, Reflect.apply(values, Object, [entitlements ?? ({})]), value6, r13);
|
||||
const value8 = Reflect.apply(getExpiringGuildEntitlements, getExpiringGuildEntitlementsModule, [items]);
|
||||
const r7 = (importDefault == null ? value3 : importDefault.lastSeenWarningNotification) ?? global.Date.now();
|
||||
const Date = global.Date;
|
||||
const property = value8[value8.length - 1];
|
||||
const ends_at = property == null ? value3 : property.ends_at;
|
||||
const value10 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
const date = new Date(ends_at);
|
||||
const time = (date instanceof Object ? date : value10).getTime();
|
||||
const r2 = (importDefault == null ? value3 : importDefault.lastBoostCount) ?? value5;
|
||||
const r6 = value8.length > value5 && r7 < time;
|
||||
const value15 = available - r2;
|
||||
return r6 || env0_4 ? {indicator: {type: GuildPowerupNotificationIndicatorType.WARNING},
|
||||
showUnread: true} : available === r2 ? {indicator: value3,
|
||||
showUnread: false} : value15 > value5 ? {indicator: {type: GuildPowerupNotificationIndicatorType.UNREAD,
|
||||
count: value15}, showUnread: true} : {indicator: value3, showUnread: false};
|
||||
}
|
||||
|
||||
function _fun110450() { // fn#110450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:5478, offset: 0x0237a424, size: 74 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const guild = GuildStore.getGuild(env0_0);
|
||||
const r1 = guild == null ? undefined : guild.features.has(GuildFeatures.GAME_SERVERS);
|
||||
return r1 != null && r1;
|
||||
}
|
||||
|
||||
function _fun110451() { // fn#110451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:5611, offset: 0x0237a46e, size: 27 bytes, params: 1, frame: 11
|
||||
return GameServerStore.getLowestGameCostForGuild(env0_0);
|
||||
}
|
||||
|
||||
function _fun110452() { // fn#110452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:6896, offset: 0x0237a489, size: 172 bytes, params: 1, frame: 21
|
||||
if (require == null) {
|
||||
return undefined;
|
||||
}
|
||||
if (result) {
|
||||
return undefined;
|
||||
}
|
||||
if (result_2) {
|
||||
return undefined;
|
||||
}
|
||||
if (result_5) {
|
||||
return undefined;
|
||||
}
|
||||
if (result_6) {
|
||||
return undefined;
|
||||
}
|
||||
if (result_3) {
|
||||
return undefined;
|
||||
}
|
||||
if (result_4) {
|
||||
return undefined;
|
||||
}
|
||||
const maybeGetLevelUnlockedPopoutDCFBinding = maybeGetLevelUnlockedPopoutDCF;
|
||||
const binding = env0_0;
|
||||
const value3 = undefined;
|
||||
const value4 = maybeGetLevelUnlockedPopoutDCFBinding(binding, require);
|
||||
if (value4 != null) {
|
||||
return value4;
|
||||
}
|
||||
const value5 = maybeGetPerkPurchaseablePopoutDCF(env0_0, require, available, env0_7);
|
||||
if (value5 != null) {
|
||||
return value5;
|
||||
}
|
||||
return maybeGetGameServerHostingGuildEligiblePopoutDCF(env0_0, env0_5, available, lowestGameCostForGuild) ?? value3;
|
||||
}
|
||||
|
||||
function _fun110453() { // fn#110453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:7284, offset: 0x0237a535, size: 695 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
var r2;
|
||||
var binding;
|
||||
var value2;
|
||||
var value3;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
var object2;
|
||||
var value4;
|
||||
const GuildPowerupNotificationPopoutType = (require(14598) /* metro dependency 14598: GuildPowerupsNotification */).GuildPowerupNotificationPopoutType;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var Object;
|
||||
var value10;
|
||||
var value11;
|
||||
if (require != null) {
|
||||
if (result) {
|
||||
value11 = environment.__proto__;
|
||||
return {type: GuildPowerupNotificationPopoutType.PERKS_AVAILABLE, markAsDismissed: env0_2};
|
||||
}
|
||||
if (result_2) {
|
||||
binding = env0_8;
|
||||
value8 = environment.__proto__;
|
||||
if (binding === GuildPowerupNewPerkAvailableCoachmarkVersion.GAME_SERVER_HOSTING) {
|
||||
return {type: GuildPowerupNotificationPopoutType.GAME_SERVER_HOSTING_AVAILABLE,
|
||||
markAsDismissed: env0_9};
|
||||
}
|
||||
var env0_0 = NEW_PERK_AVAILABLE_COACHMARK_VERSION_TO_POWERUP_SKU_ID_SET[env0_8];
|
||||
Object = global.Object;
|
||||
value10 = Object.values(require.allPowerups).filter(_fun110454);
|
||||
if (value10.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
return {powerups: value10, type: GuildPowerupNotificationPopoutType.NEW_PERK_AVAILABLE,
|
||||
markAsDismissed: env0_9};
|
||||
}
|
||||
if (result_3) {
|
||||
if (env0_11 != null) {
|
||||
value7 = environment.__proto__;
|
||||
r2 = {type: GuildPowerupNotificationPopoutType.BOOST_TO_UNLOCK, powerup: env0_11,
|
||||
markAsDismissed: env0_12};
|
||||
} else if (result_4) {
|
||||
if (env0_14 != null) {
|
||||
value6 = environment.__proto__;
|
||||
r2 = {type: GuildPowerupNotificationPopoutType.EXPIRING_PERK, featuredExpiringPowerup: env0_14,
|
||||
markAsDismissed: env0_15};
|
||||
} else if (result_5) {
|
||||
value5 = environment.__proto__;
|
||||
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_NEW_GAMES, markAsDismissed: env0_17};
|
||||
} else if (result_6) {
|
||||
value4 = environment.__proto__;
|
||||
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_PRICING_CHANGE,
|
||||
markAsDismissed: env0_19};
|
||||
} else {
|
||||
binding = env0_22;
|
||||
value2 = environment.__proto__;
|
||||
value3 = undefined;
|
||||
if (binding !== DismissibleContent.GUILD_POWERUP_NOTIFICATION) {
|
||||
r2 = value3;
|
||||
} else if (env0_21 != null) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_21, binding);
|
||||
object2['markAsDismissed'] = markAsDismissed_110455;
|
||||
r2 = object2;
|
||||
} else {
|
||||
r2 = value3;
|
||||
}
|
||||
}
|
||||
} else if (result_5) {
|
||||
value5 = environment.__proto__;
|
||||
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_NEW_GAMES, markAsDismissed: env0_17};
|
||||
} else if (result_6) {
|
||||
value4 = environment.__proto__;
|
||||
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_PRICING_CHANGE, markAsDismissed: env0_19};
|
||||
} else {
|
||||
binding = env0_22;
|
||||
value2 = environment.__proto__;
|
||||
value3 = undefined;
|
||||
if (binding !== DismissibleContent.GUILD_POWERUP_NOTIFICATION) {
|
||||
r2 = value3;
|
||||
} else if (env0_21 != null) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_21, binding);
|
||||
object2['markAsDismissed'] = markAsDismissed_110455;
|
||||
r2 = object2;
|
||||
} else {
|
||||
r2 = value3;
|
||||
}
|
||||
}
|
||||
} else if (result_4) {
|
||||
if (env0_14 != null) {
|
||||
value6 = environment.__proto__;
|
||||
r2 = {type: GuildPowerupNotificationPopoutType.EXPIRING_PERK, featuredExpiringPowerup: env0_14,
|
||||
markAsDismissed: env0_15};
|
||||
} else if (result_5) {
|
||||
value5 = environment.__proto__;
|
||||
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_NEW_GAMES, markAsDismissed: env0_17};
|
||||
} else if (result_6) {
|
||||
value4 = environment.__proto__;
|
||||
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_PRICING_CHANGE, markAsDismissed: env0_19};
|
||||
} else {
|
||||
binding = env0_22;
|
||||
value2 = environment.__proto__;
|
||||
value3 = undefined;
|
||||
if (binding !== DismissibleContent.GUILD_POWERUP_NOTIFICATION) {
|
||||
r2 = value3;
|
||||
} else if (env0_21 != null) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_21, binding);
|
||||
object2['markAsDismissed'] = markAsDismissed_110455;
|
||||
r2 = object2;
|
||||
} else {
|
||||
r2 = value3;
|
||||
}
|
||||
}
|
||||
} else if (result_5) {
|
||||
value5 = environment.__proto__;
|
||||
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_NEW_GAMES, markAsDismissed: env0_17};
|
||||
} else if (result_6) {
|
||||
value4 = environment.__proto__;
|
||||
r2 = {type: GuildPowerupNotificationPopoutType.GAME_SERVER_PRICING_CHANGE, markAsDismissed: env0_19};
|
||||
} else {
|
||||
binding = env0_22;
|
||||
value2 = environment.__proto__;
|
||||
value3 = undefined;
|
||||
if (binding !== DismissibleContent.GUILD_POWERUP_NOTIFICATION) {
|
||||
r2 = value3;
|
||||
} else if (env0_21 != null) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_21, binding);
|
||||
object2['markAsDismissed'] = markAsDismissed_110455;
|
||||
r2 = object2;
|
||||
} else {
|
||||
r2 = value3;
|
||||
}
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun110457() { // fn#110457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:8425, offset: 0x0237a8f8, size: 29 bytes, params: 1, frame: 11
|
||||
return GuildPowerupsNotificationStore.getNotificationStateForGuild(env0_0);
|
||||
}
|
||||
|
||||
function _fun110458() { // fn#110458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:8504, offset: 0x0237a915, size: 27 bytes, params: 1, frame: 11
|
||||
return GuildPowerupsStore.getStateForGuild(env0_0);
|
||||
}
|
||||
|
||||
function _fun110461() { // fn#110461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:9584, offset: 0x0237a9e1, size: 45 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(require(12307) /* metro dependency 12307: GuildPowerupsActionCreators */).guildPowerupsAckNotification(env0_0);
|
||||
}
|
||||
|
||||
function _fun110462() { // fn#110462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:9650, offset: 0x0237aa0e, size: 234 bytes, params: 1, frame: 16
|
||||
var type;
|
||||
var r3;
|
||||
var popout;
|
||||
const Set = global.Set;
|
||||
const value2 = undefined;
|
||||
const {BOOST_TO_UNLOCK,
|
||||
EXPIRING_PERK} = (require(14598) /* metro dependency 14598: GuildPowerupsNotification */).GuildPowerupNotificationPopoutType;
|
||||
const set = new Set([BOOST_TO_UNLOCK, EXPIRING_PERK]);
|
||||
if (env0_2 == null) {
|
||||
type = value2;
|
||||
} else {
|
||||
popout = env0_2.popout;
|
||||
type = popout == null ? value2 : popout.type;
|
||||
}
|
||||
let r2 = type != null && set.has(env0_2.popout.type);
|
||||
r2 = !r2 ? env0_2 == null : r2;
|
||||
if (r2) {
|
||||
r3 = value2;
|
||||
} else {
|
||||
popout = env0_2.popout;
|
||||
r2 = popout == null;
|
||||
r3 = popout;
|
||||
}
|
||||
if (!r2) {
|
||||
r3.markAsDismissed(ContentDismissActionType.AUTO_DISMISS);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun110463() { // fn#110463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:9950, offset: 0x0237aaf8, size: 67 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
if (stateForGuild != null) {
|
||||
value = environment.__proto__;
|
||||
(require(8249) /* metro dependency 8249: GuildBoostingUtils */).ReverseOrderedTiers.forEach(_fun110464);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun110434(a0) { // fn#110434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:1165, offset: 0x02379645, size: 58 bytes, params: 2, frame: 4
|
||||
const value = environment.__proto__;
|
||||
if (require.unlockedPowerups[a0] != null) {
|
||||
return true;
|
||||
}
|
||||
const property = POWERUPS_INCLUDED_IN_LEVEL[a0];
|
||||
return property != null && env1_4 >= property;
|
||||
}
|
||||
|
||||
function _fun110435(a0) { // fn#110435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:1254, offset: 0x0237967f, size: 189 bytes, params: 2, frame: 19
|
||||
var environment;
|
||||
var r1;
|
||||
var r0;
|
||||
var value3;
|
||||
var property;
|
||||
var value4;
|
||||
var dependencies;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const GUILD_POWERUP_GUILD_THEME_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_GUILD_THEME_SKU_ID;
|
||||
if (a0 !== GUILD_POWERUP_GUILD_THEME_SKU_ID) {
|
||||
value3 = environment.__proto__;
|
||||
property = require.allPowerups[a0];
|
||||
value4 = null;
|
||||
if (value4 == property) {
|
||||
r0 = value4;
|
||||
} else if (importDefault < property.cost) {
|
||||
r0 = value4;
|
||||
} else {
|
||||
dependencies = property.dependencies;
|
||||
if (dependencies.every(function(a0) {
|
||||
return require.unlockedPowerups[a0] != null;
|
||||
})) {
|
||||
value = require(14610) /* metro dependency 14610: useGuildPowerupRollbackEnabled */;
|
||||
r1 = value.isGuildPowerupRollbackEnabled(env1_0, property,
|
||||
'maybeGetPerkPurchaseablePopoutDCF') ? value4 : property;
|
||||
} else {
|
||||
r1 = value4;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
if (importAll) {
|
||||
value3 = environment.__proto__;
|
||||
property = require.allPowerups[a0];
|
||||
value4 = null;
|
||||
if (value4 == property) {
|
||||
r0 = value4;
|
||||
} else if (importDefault < property.cost) {
|
||||
r0 = value4;
|
||||
} else {
|
||||
dependencies = property.dependencies;
|
||||
if (dependencies.every(function(a0) {
|
||||
return require.unlockedPowerups[a0] != null;
|
||||
})) {
|
||||
value = require(14610) /* metro dependency 14610: useGuildPowerupRollbackEnabled */;
|
||||
r1 = value.isGuildPowerupRollbackEnabled(env1_0, property,
|
||||
'maybeGetPerkPurchaseablePopoutDCF') ? value4 : property;
|
||||
} else {
|
||||
r1 = value4;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun110444(a0) { // fn#110444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:3774, offset: 0x02379c1c, size: 50 bytes, params: 2, frame: 5
|
||||
return (require == null || require.unlockedPowerups == null ? undefined : require.unlockedPowerups[a0]) != null;
|
||||
}
|
||||
|
||||
function _fun110454({skuId}) { // fn#110454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:7587, offset: 0x0237a7ec, size: 27 bytes, params: 2, frame: 11
|
||||
return env0_0.has(skuId);
|
||||
}
|
||||
|
||||
function markAsDismissed_110455(a0) { // fn#110455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:8254, offset: 0x0237a807, size: 34 bytes, params: 2, frame: 12
|
||||
env1_23(a0);
|
||||
env1_21.markAsDismissed(a0);
|
||||
}
|
||||
|
||||
function _fun110464(a0) { // fn#110464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14804:10001, offset: 0x0237ab3b, size: 111 bytes, params: 2, frame: 17
|
||||
var value2;
|
||||
var moduleValue;
|
||||
let property = BOOSTING_TIER_TO_LEVEL_SKU_ID[a0];
|
||||
if (property != null) {
|
||||
value2 = environment.__proto__;
|
||||
if (stateForGuild.unlockedPowerups[property] != null) {
|
||||
property = BOOSTING_TIER_TO_LEVEL_UNLOCKED_DC[a0];
|
||||
if (property != null) {
|
||||
moduleValue = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
|
||||
moduleValue.markContentAsDismissed(property, env1_0, false, ContentDismissActionType.AUTO_DISMISS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/* Metro module 14628; source: modules/premium/powerups/hooks/useGuildPowerupsWarningConfig.tsx; dependencies: [31, 12346, 8254, 566, 1244, 2256, 2] */
|
||||
function _fun110570(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14825:6, offset: 0x0237da44, size: 137 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const appliedGuildBoostStore = importDefault(12346) /* metro dependency 12346: AppliedGuildBoostStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupsWarningConfig.tsx');
|
||||
exports.default = useGuildPowerupsWarningConfig;
|
||||
}
|
||||
|
||||
function useGuildPowerupsWarningConfig(a0, a1) { // fn#110571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14825:224, offset: 0x0237dacd, size: 181 bytes, params: 3, frame: 19
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const spent = (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(a0).spent;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppliedGuildBoostStore],
|
||||
_fun110572, [a0]);
|
||||
const binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
return binding.useMemo(_fun110575, [spent - Reflect.apply(useMemo, binding, [_fun110573, [value2]]), a1]);
|
||||
}
|
||||
|
||||
function _fun110572() { // fn#110572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14825:325, offset: 0x0237db82, size: 27 bytes, params: 1, frame: 11
|
||||
return AppliedGuildBoostStore.getAppliedGuildBoostsForGuild(env0_0);
|
||||
}
|
||||
|
||||
function _fun110573() { // fn#110573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14825:385, offset: 0x0237db9d, size: 87 bytes, params: 1, frame: 14
|
||||
var length;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
if (env0_2 == null) {
|
||||
length = value2;
|
||||
} else if (env0_2.filter == null) {
|
||||
length = value2;
|
||||
} else {
|
||||
value = env0_2.filter(function(a0) {
|
||||
return !a0.ended && a0.endsAt == null;
|
||||
});
|
||||
length = value == null ? value2 : value.length;
|
||||
}
|
||||
return length ?? 0;
|
||||
}
|
||||
|
||||
function _fun110575() { // fn#110575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14825:535, offset: 0x0237dc11, size: 200 bytes, params: 1, frame: 20
|
||||
var r0;
|
||||
var object3;
|
||||
var value2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
var iAaAiG;
|
||||
var object4;
|
||||
var binding;
|
||||
if (env0_3 <= 0) {
|
||||
r0 = {'shouldShow': false, 'title': '', 'description': '', 'requiredBoostCount': 0};
|
||||
} else {
|
||||
object3 = {shouldShow: true};
|
||||
value2 = environment.__proto__;
|
||||
object3.title = intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).n5hQhc);
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
iAaAiG = (importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).iAaAiG;
|
||||
object4 = {};
|
||||
binding = env0_3;
|
||||
object4.boostCount = binding;
|
||||
object4.perksString = require.join(', ');
|
||||
object3.description = Reflect.apply(formatToPlainString, intl, [iAaAiG, object4]);
|
||||
object3.requiredBoostCount = binding;
|
||||
r0 = object3;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Metro module 12310; source: modules/premium/powerups/hooks/useHasAllocateBoostPermission.tsx; dependencies: [1867, 3784, 482, 566, 2] */
|
||||
function _fun93999(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12496:6, offset: 0x020ce49e, size: 169 bytes, params: 8, frame: 20
|
||||
let env0_0 = require;
|
||||
const closure = getHasAllocateBoostPermission;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const env0_4 = (require(482) /* metro dependency 482: Constants */).Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useHasAllocateBoostPermission.tsx');
|
||||
exports.default = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[3]).useStateFromStores([PermissionStore, GuildStore], _fun94002);
|
||||
};
|
||||
exports.getHasAllocateBoostPermission = closure;
|
||||
}
|
||||
|
||||
function getHasAllocateBoostPermission(a0, a1) { // fn#94000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12496:138, offset: 0x020ce547, size: 64 bytes, params: 3, frame: 14
|
||||
const value = null;
|
||||
return value == a1 || value == a0.getGuildPermissions(a1) ? value : a0.can(Permissions.ADMINISTRATOR, a1);
|
||||
}
|
||||
|
||||
function useHasAllocateBoostPermission(a0) { // fn#94001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12496:367, offset: 0x020ce587, size: 74 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore, GuildStore], _fun94002);
|
||||
}
|
||||
|
||||
function _fun94002() { // fn#94002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12496:450, offset: 0x020ce5d1, size: 43 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return getHasAllocateBoostPermission(PermissionStore, GuildStore.getGuild(env0_0));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* Metro module 6630; source: modules/premium/powerups/hooks/useHasEnhancedRoleColors.tsx; dependencies: [1867, 661, 566, 2] */
|
||||
function _fun52491(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6808:6, offset: 0x0132e055, size: 167 bytes, params: 8, frame: 18
|
||||
let env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useHasEnhancedRoleColors.tsx');
|
||||
exports.default = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[2]).useStateFromStores([GuildStore], _fun52493);
|
||||
};
|
||||
exports.getHasEnhancedRoleColors = getHasEnhancedRoleColors;
|
||||
exports.useHasEnhancedRoleColorsForRole = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[2]).useStateFromStores([GuildStore], _fun52496);
|
||||
};
|
||||
exports.getHasEnhancedRoleColorsForRole = getHasEnhancedRoleColorsForRole;
|
||||
}
|
||||
|
||||
function useHasEnhancedRoleColors(a0) { // fn#52492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6808:233, offset: 0x0132e0fc, size: 64 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun52493);
|
||||
}
|
||||
|
||||
function getHasEnhancedRoleColors(a0) { // fn#52494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6808:420, offset: 0x0132e17a, size: 66 bytes, params: 2, frame: 13
|
||||
if (a0 == null) {
|
||||
return false;
|
||||
}
|
||||
const guild = GuildStore.getGuild(a0);
|
||||
return guild != null && guild.features.has(GuildFeatures.ENHANCED_ROLE_COLORS);
|
||||
}
|
||||
|
||||
function useHasEnhancedRoleColorsForRole(a0) { // fn#52495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6808:587, offset: 0x0132e1bc, size: 64 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun52496);
|
||||
}
|
||||
|
||||
function getHasEnhancedRoleColorsForRole(a0) { // fn#52497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6808:788, offset: 0x0132e1fc, size: 58 bytes, params: 2, frame: 12
|
||||
const guild = GuildStore.getGuild(a0);
|
||||
return guild != null && guild.features.has(GuildFeatures.ENHANCED_ROLE_COLORS);
|
||||
}
|
||||
|
||||
function _fun52493() { // fn#52493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6808:309, offset: 0x0132e13c, size: 62 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
const guild = GuildStore.getGuild(env0_0);
|
||||
return guild != null && guild.features.has(GuildFeatures.ENHANCED_ROLE_COLORS);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
/* Metro module 15722; source: modules/premium/powerups/hooks/useIsCurrentUserEligibleForPowerupUpsells.tsx; dependencies: [1945, 4896, 1878, 7020, 1880, 1900, 566, 2] */
|
||||
function _fun120732(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15930:6, offset: 0x02534577, size: 208 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const guildBoostSlotStore = importDefault(7020) /* metro dependency 7020: GuildBoostSlotStore */;
|
||||
const env0_6 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useIsCurrentUserEligibleForPowerupUpsells.tsx');
|
||||
exports.default = useIsCurrentUserEligibleForPowerupUpsells;
|
||||
exports.getIsCurrentUserEligibleForPowerupUpsells = getIsCurrentUserEligibleForPowerupUpsells;
|
||||
}
|
||||
|
||||
function checkPowerupUpsellEligibility(a0, a1, a2) { // fn#120733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15930:159, offset: 0x02534647, size: 155 bytes, params: 4, frame: 19
|
||||
var r2;
|
||||
var r1;
|
||||
var r0;
|
||||
var moduleValue;
|
||||
const env0_0 = a0;
|
||||
let value = a0 != null;
|
||||
if (value) {
|
||||
value = a0.isPremiumGroupMember();
|
||||
if (value) {
|
||||
r1 = !value;
|
||||
} else {
|
||||
moduleValue = require(1900) /* metro dependency 1900: PremiumTypeUtils */;
|
||||
value = moduleValue.isPremium(a0, PremiumTypes.TIER_2);
|
||||
if (value) {
|
||||
r2 = !!value;
|
||||
} else {
|
||||
value = a1.some(function(a0) {
|
||||
return a0.premiumGuildSubscription != null;
|
||||
});
|
||||
r2 = value ? !!value : a2.some(_fun120735);
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useIsCurrentUserEligibleForPowerupUpsells() { // fn#120736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15930:542, offset: 0x0253471b, size: 149 bytes, params: 1, frame: 22
|
||||
const checkPowerupUpsellEligibilityBinding = checkPowerupUpsellEligibility;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
const currentUser = Reflect.apply(useStateFromStores, fluxModule, [[UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
}]);
|
||||
const value2 = fluxModule.useStateFromStoresArray([GuildBoostSlotStore], _fun120738);
|
||||
const moduleValue3 = fluxModule;
|
||||
useStateFromStores = moduleValue3.useStateFromStores;
|
||||
return checkPowerupUpsellEligibilityBinding(currentUser, value2, Reflect.apply(useStateFromStores, moduleValue3,
|
||||
[[SortedGuildStore], function() {
|
||||
return SortedGuildStore.getFlattenedGuildIds();
|
||||
}]));
|
||||
}
|
||||
|
||||
function getIsCurrentUserEligibleForPowerupUpsells() { // fn#120740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15930:885, offset: 0x025347f7, size: 92 bytes, params: 1, frame: 17
|
||||
return checkPowerupUpsellEligibility(UserStore.getCurrentUser(),
|
||||
GuildBoostSlotStore.hasFetched ? global.Object.values(GuildBoostSlotStore.boostSlots) : [],
|
||||
SortedGuildStore.getFlattenedGuildIds());
|
||||
}
|
||||
|
||||
function _fun120735(a0) { // fn#120735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15930:341, offset: 0x025346e2, size: 57 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return GuildMemberStore.getMember(a0, env0_0.id)?.premiumSince != null;
|
||||
}
|
||||
|
||||
function _fun120738() { // fn#120738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15930:726, offset: 0x025347b0, size: 52 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return GuildBoostSlotStore.hasFetched ? global.Object.values(GuildBoostSlotStore.boostSlots) : [];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 12685; source: modules/premium/powerups/hooks/useIsServerThemeAvailableForGuild.tsx; dependencies: [8263, 4038, 2] */
|
||||
function _fun97220(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12875:6, offset: 0x02177b0b, size: 96 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useIsServerThemeAvailableForGuild.tsx');
|
||||
exports.default = function(a0, a1) {
|
||||
var value = a0;
|
||||
require(dependencyMap[0]).useServerThemeEnabled(value ?? undefined, a1);
|
||||
return require(dependencyMap[1]).useEnabledGuildThemeForGuildId(value, a1) != null;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* Metro module 14601; source: modules/premium/powerups/hooks/useLoadGuildPowerups.tsx; dependencies: [31, 6857, 14602, 12307, 2] */
|
||||
function _fun110385(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14798:6, offset: 0x02377c5d, size: 114 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useLoadGuildPowerups.tsx');
|
||||
exports.default = useLoadGuildPowerups;
|
||||
}
|
||||
|
||||
function useLoadGuildPowerups(a0) { // fn#110386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14798:205, offset: 0x02377ccf, size: 118 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
const value2 = (require(6857) /* metro dependency 6857: GameServerExperiment */).useGameServerEnabled(a0,
|
||||
'useLoadGuildPowerups');
|
||||
const binding = env0_2;
|
||||
binding.useEffect(_fun110387, [a0, value2]);
|
||||
binding.useEffect(_fun110388, [a0]);
|
||||
}
|
||||
|
||||
function _fun110387() { // fn#110387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14798:312, offset: 0x02377d45, size: 54 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
if (env0_1) {
|
||||
value2 = environment.__proto__;
|
||||
(require(14602) /* metro dependency 14602: GameServerActionCreators */).fetchGameServerCatalog(env0_0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun110388() { // fn#110388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14798:376, offset: 0x02377d7b, size: 65 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(12307) /* metro dependency 12307: GuildPowerupsActionCreators */;
|
||||
const fetchPowerupCatalogForGuild = value.fetchPowerupCatalogForGuild;
|
||||
const binding = env0_0;
|
||||
Reflect.apply(fetchPowerupCatalogForGuild, value, [binding]);
|
||||
(require(12307) /* metro dependency 12307: GuildPowerupsActionCreators */).fetchGuildBoostEntitlements(binding);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/* Metro module 12303; source: modules/premium/powerups/hooks/useMarketablePowerupPerks.tsx; dependencies: [31, 8258, 8259, 8188, 566, 12304, 2] */
|
||||
function _fun93968(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12489:6, offset: 0x020cd1e8, size: 283 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const guildPowerupsStore = importDefault(8258) /* metro dependency 8258: GuildPowerupsStore */;
|
||||
let value = require(8259) /* metro dependency 8259: GuildPowerupsConstants */;
|
||||
const GUILD_TAG_BADGE_PACKS_WAVE_ONE_SKU_ID_SET = value.GUILD_TAG_BADGE_PACKS_WAVE_ONE_SKU_ID_SET;
|
||||
const GUILD_TAG_BADGE_PACKS_WAVE_TWO_SKU_ID_SET = value.GUILD_TAG_BADGE_PACKS_WAVE_TWO_SKU_ID_SET;
|
||||
const env0_5 = value.GuildPowerupType;
|
||||
const Set = global.Set;
|
||||
let Array = global.Array;
|
||||
value = Array.from(GUILD_TAG_BADGE_PACKS_WAVE_ONE_SKU_ID_SET);
|
||||
items = [];
|
||||
value = arraySpread(items, value, 0, GUILD_TAG_BADGE_PACKS_WAVE_ONE_SKU_ID_SET);
|
||||
Array = global.Array;
|
||||
value = arraySpread(items, Array.from(GUILD_TAG_BADGE_PACKS_WAVE_TWO_SKU_ID_SET), value,
|
||||
GUILD_TAG_BADGE_PACKS_WAVE_ONE_SKU_ID_SET);
|
||||
const VANITY_URL_POWERUP_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).VANITY_URL_POWERUP_SKU_ID;
|
||||
items[value] = VANITY_URL_POWERUP_SKU_ID;
|
||||
value + 1;
|
||||
const set = new Set(items);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useMarketablePowerupPerks.tsx');
|
||||
exports.default = useMarketablePowerupPerks;
|
||||
}
|
||||
|
||||
function useMarketablePowerupPerks(a0) { // fn#93969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12489:424, offset: 0x020cd303, size: 129 bytes, params: 2, frame: 18
|
||||
const env0_0 = a0;
|
||||
return env0_3.useMemo(_fun93971,
|
||||
[(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildPowerupsStore], _fun93970),
|
||||
(importDefault(12304) /* metro dependency 12304: useGameServerPerk */)(a0)]);
|
||||
}
|
||||
|
||||
function _fun93970() { // fn#93970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12489:500, offset: 0x020cd384, size: 67 bytes, params: 1, frame: 14
|
||||
const stateForGuild = GuildPowerupsStore.getStateForGuild(env0_0);
|
||||
return stateForGuild == null || stateForGuild.powerupCatalog == null ? undefined : stateForGuild.powerupCatalog[GuildPowerupType.PERK];
|
||||
}
|
||||
|
||||
function _fun93971() { // fn#93971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12489:629, offset: 0x020cd3c7, size: 82 bytes, params: 1, frame: 15
|
||||
const r4 = env0_1 ?? [];
|
||||
const items2 = [];
|
||||
arraySpread(items2, r4, 0, r4);
|
||||
if (env0_2 != null) {
|
||||
items2.push(env0_2);
|
||||
}
|
||||
return items2.filter(_fun93972);
|
||||
}
|
||||
|
||||
function _fun93972({skuId}) { // fn#93972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12489:694, offset: 0x020cd419, size: 30 bytes, params: 2, frame: 11
|
||||
const binding = env2_6;
|
||||
return !binding.has(skuId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
/* Metro module 14674; source: modules/premium/powerups/hooks/useMaybeGetSortedBoosts.tsx; dependencies: [57, 31, 12346, 6269, 1945, 1867, 14675, 566, 14676, 8251, 21, 1244, 2] */
|
||||
function _fun110766(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:6, offset: 0x023868d8, size: 214 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const appliedGuildBoostStore = importDefault(12346) /* metro dependency 12346: AppliedGuildBoostStore */;
|
||||
const guildMemberRequesterStore = importDefault(6269) /* metro dependency 6269: GuildMemberRequesterStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useMaybeGetSortedBoosts.tsx');
|
||||
exports.default = useMaybeGetSortedBoosts;
|
||||
exports.useGetBoostUserConfig = useGetBoostUserConfig;
|
||||
}
|
||||
|
||||
function useMaybeGetSortedBoosts(a0, a1) { // fn#110767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:261, offset: 0x023869ae, size: 456 bytes, params: 3, frame: 27
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const value2 = (require(14675) /* metro dependency 14675: ExpiringBoostsExperiment */).useExpiringBoostsEnabled('GuildPowerupsRecentActivity');
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([AppliedGuildBoostStore],
|
||||
_fun110768, [a0]);
|
||||
const env0_3 = value3;
|
||||
const binding = env0_4;
|
||||
const value6 = binding.useMemo(_fun110770, [value3, a1, env0_3(binding.useState(function() {
|
||||
var Date = global.Date;
|
||||
return Date.now();
|
||||
}), 1)[0], value2]);
|
||||
binding.useEffect(_fun110775, [a0,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildMemberStore], _fun110773, [a0,
|
||||
value6])]);
|
||||
binding.useEffect(_fun110781, [a0, (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore],
|
||||
_fun110777), binding.useMemo(_fun110778, [value3]), value2,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([AppliedGuildBoostStore], _fun110780, [a0])]);
|
||||
return value6;
|
||||
}
|
||||
|
||||
function useGetBoostUserConfig(a0) { // fn#110782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:1460, offset: 0x02386e65, size: 176 bytes, params: 2, frame: 19
|
||||
const env0_0 = a0;
|
||||
const Date = global.Date;
|
||||
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
const date = new Date(defaultImport.extractTimestamp(a0.id));
|
||||
const value = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildMemberStore],
|
||||
_fun110783, [a0]);
|
||||
const username = value.username;
|
||||
return {timestamp: date, username: username, roleColor: value.roleColor, roleColorStrings: value.roleColorStrings};
|
||||
}
|
||||
|
||||
function _fun110768() { // fn#110768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:408, offset: 0x02386b76, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return AppliedGuildBoostStore.getAppliedGuildBoostsForGuild(env0_0) ?? [];
|
||||
}
|
||||
|
||||
function _fun110770() { // fn#110770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:539, offset: 0x02386b9b, size: 63 bytes, params: 1, frame: 14
|
||||
return env0_3.map(_fun110771).sort(function(a0, {sortKey}) {
|
||||
return sortKey - a0.sortKey;
|
||||
}).slice(0, require);
|
||||
}
|
||||
|
||||
function _fun110773() { // fn#110773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:868, offset: 0x02386ca9, size: 76 bytes, params: 1, frame: 13
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
env0_5.forEach(_fun110774);
|
||||
const Array = global.Array;
|
||||
return Array.from(set);
|
||||
}
|
||||
|
||||
function _fun110775() { // fn#110775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:1005, offset: 0x02386d3d, size: 45 bytes, params: 1, frame: 11
|
||||
if (env0_6.length > 0) {
|
||||
env0_6.forEach(_fun110776);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun110777() { // fn#110777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:1106, offset: 0x02386d89, size: 44 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return GuildStore.getGuild(env0_0)?.premiumSubscriberCount;
|
||||
}
|
||||
|
||||
function _fun110778() { // fn#110778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:1196, offset: 0x02386db5, size: 33 bytes, params: 1, frame: 11
|
||||
const binding = env0_3;
|
||||
return binding.filter(function(a0) {
|
||||
return !a0.ended;
|
||||
}).length;
|
||||
}
|
||||
|
||||
function _fun110780() { // fn#110780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:1271, offset: 0x02386de4, size: 35 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return AppliedGuildBoostStore.getLastFetchedAtForGuild(env0_0) != null;
|
||||
}
|
||||
|
||||
function _fun110781() { // fn#110781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:1337, offset: 0x02386e07, size: 94 bytes, params: 1, frame: 14
|
||||
var value4;
|
||||
var moduleValue;
|
||||
if (env0_7 !== env0_8 || env0_2 && !env0_9) {
|
||||
value4 = environment.__proto__;
|
||||
moduleValue = require(8251) /* metro dependency 8251: BoostingActionCreators */;
|
||||
moduleValue.fetchAppliedGuildBoostsForGuild(env0_0, {includeEnded: env0_2});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun110783() { // fn#110783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:1582, offset: 0x02386f15, size: 225 bytes, params: 1, frame: 19
|
||||
var intl;
|
||||
let value = environment.__proto__;
|
||||
const getMember = GuildMemberStore.getMember;
|
||||
const binding = env0_0;
|
||||
let guildId = binding.guildId;
|
||||
let userId = binding.userId;
|
||||
const value3 = Reflect.apply(getMember, GuildMemberStore, [guildId, userId]);
|
||||
const getNick = GuildMemberStore.getNick;
|
||||
guildId = binding.guildId;
|
||||
userId = binding.userId;
|
||||
const value4 = Reflect.apply(getNick, GuildMemberStore, [guildId, userId]);
|
||||
const value5 = null;
|
||||
let r2 = value5 != value4 ? value4 : value5 == env0_0.user ? undefined : env0_0.user.username;
|
||||
if (value5 == r2) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['30mdIx']);
|
||||
}
|
||||
value = undefined;
|
||||
const colorString = value5 == value3 ? value : value3.colorString;
|
||||
const colorStrings = value5 == value3 ? value : value3.colorStrings;
|
||||
return {username: r2, roleColor: value5 != colorString ? colorString : value5,
|
||||
roleColorStrings: value5 != colorStrings ? colorStrings : value5};
|
||||
}
|
||||
|
||||
function _fun110771(a0) { // fn#110771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:550, offset: 0x02386bda, size: 183 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
const r1 = env1_2 ? (require(14676) /* metro dependency 14676: getBoostLifecyclePhase */).getBoostLifecycleInfo(a0,
|
||||
env1_4) : {phase: 'gave'};
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(14676) /* metro dependency 14676: getBoostLifecyclePhase */;
|
||||
value = value.getBoostLifecycleTimestamp(a0, r1);
|
||||
return r1.phase === 'expiring' ? {boost: a0, phase: 'expiring', sortKey: value, endsAt: r1.endsAt} : {boost: a0,
|
||||
phase: r1.phase, sortKey: value};
|
||||
}
|
||||
|
||||
function _fun110774({boost}) { // fn#110774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:905, offset: 0x02386cf5, size: 72 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
const getMember = GuildMemberStore.getMember;
|
||||
value = environment.__proto__;
|
||||
let binding = env1_0;
|
||||
const userId = boost.userId;
|
||||
if (Reflect.apply(getMember, GuildMemberStore, [binding, userId]) == null) {
|
||||
binding = env0_0;
|
||||
binding.add(boost.userId);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun110776(a0) { // fn#110776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14871:1033, offset: 0x02386d6a, size: 31 bytes, params: 2, frame: 13
|
||||
return GuildMemberRequesterStore.requestMember(env1_0, a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/* Metro module 14668; source: modules/premium/powerups/hooks/useMultiPerkStatusValues.tsx; dependencies: [8259, 14635, 1244, 2256, 2] */
|
||||
function _fun110738(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14865:6, offset: 0x02385002, size: 124 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(8259) /* metro dependency 8259: GuildPowerupsConstants */).PowerupActiveStatusType;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useMultiPerkStatusValues.tsx');
|
||||
exports.default = useMultiPerkStatusValues;
|
||||
}
|
||||
|
||||
function useMultiPerkStatusValues({guildId, powerups}) { // fn#110739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14865:233, offset: 0x0238507e, size: 397 bytes, params: 2, frame: 23
|
||||
var r5;
|
||||
var object2;
|
||||
var intl;
|
||||
let value3 = (require(14635) /* metro dependency 14635: usePowerupActiveStatus */).usePowerupsActiveStatuses(guildId,
|
||||
powerups);
|
||||
const value4 = value3.some(function({type}) {
|
||||
return type !== PowerupActiveStatusType.INACTIVE;
|
||||
});
|
||||
if (powerups.length <= 0) {
|
||||
return null;
|
||||
}
|
||||
let reduce = value3.reduce;
|
||||
const value6 = Reflect.apply(reduce, value3, [function(a0, a1) {
|
||||
var r2;
|
||||
var value = a0;
|
||||
r2 = a1.sourceEntitlement?.ends_at;
|
||||
return r2 == null ? value : value == null || r2 < value ? r2 : value;
|
||||
}, undefined]);
|
||||
if (value6 != null) {
|
||||
r5 = {type: 'expiring', expiringAt: value6};
|
||||
} else if (value4) {
|
||||
object2 = {type: 'active'};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.statusText = intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).FFLkmx);
|
||||
r5 = object2;
|
||||
} else {
|
||||
r5 = undefined;
|
||||
}
|
||||
let value = value3.reduce(function(a0, a1) {
|
||||
var r0;
|
||||
var value = a0;
|
||||
if (a1.type !== PowerupActiveStatusType.POWERUP_ACTIVATED) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value += a1.powerup.cost;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}, 0);
|
||||
reduce = value3.reduce;
|
||||
let property = value3[0];
|
||||
const value7 = Reflect.apply(reduce, value3, [function(a0, a1) {
|
||||
var r6;
|
||||
var value = a0;
|
||||
var property = a1.powerup;
|
||||
var value2 = undefined;
|
||||
r6 = property == null ? value2 : property.cost;
|
||||
var value3 = 0;
|
||||
return value < (r6 ?? value3) ? value : (property == null ? value2 : property.cost) ?? value3;
|
||||
}, (property == null || property.powerup == null ? undefined : property.powerup.cost) ?? 0]);
|
||||
const value8 = value3.reduce(function(a0, {powerup}) {
|
||||
return a0 + (powerup?.cost ?? 0);
|
||||
}, 0);
|
||||
let r6 = value4 ? value : value7;
|
||||
return {isActive: value4, status: r5, cost: r6, costDecorator: value4 ? undefined : value8 > r6 ? '+' : undefined,
|
||||
expiringAt: value6, activeCost: value, minCost: value7, totalCost: value8};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* Metro module 14635; source: modules/premium/powerups/hooks/usePowerupActiveStatus.tsx; dependencies: [1867, 8258, 8260, 8259, 661, 566, 2] */
|
||||
function _fun110610(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14832:6, offset: 0x0237f806, size: 256 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = usePowerupsActiveStatuses;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildPowerupsStore = importDefault(8258) /* metro dependency 8258: GuildPowerupsStore */;
|
||||
const env0_4 = (require(8260) /* metro dependency 8260: GameServerConstants */).GAME_SERVER_POWERUP_SKU_ID;
|
||||
const guildPowerupsConstantsModule = require(8259) /* metro dependency 8259: GuildPowerupsConstants */;
|
||||
const env0_5 = guildPowerupsConstantsModule.GUILD_POWERUP_TIER_3_OVERRIDDEN_SKUS;
|
||||
const env0_6 = guildPowerupsConstantsModule.PowerupActiveStatusType;
|
||||
const env0_7 = guildPowerupsConstantsModule.POWERUPS_INCLUDED_IN_LEVEL;
|
||||
const env0_8 = guildPowerupsConstantsModule.BOOSTING_TIER_TO_LEVEL_SKU_ID;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/usePowerupActiveStatus.tsx');
|
||||
exports.default = function(a0, a1) {
|
||||
var value2 = usePowerupsActiveStatuses(a0, a1 == null ? [] : [a1]);
|
||||
return value2.length <= 0 ? {type: PowerupActiveStatusType.INACTIVE, sourceEntitlement: undefined,
|
||||
sourcePowerup: undefined} : value2[0];
|
||||
};
|
||||
exports.isPowerupActiveStatusActive = function({type}) {
|
||||
return type !== PowerupActiveStatusType.INACTIVE;
|
||||
};
|
||||
exports.usePowerupsActiveStatuses = closure;
|
||||
}
|
||||
|
||||
function usePowerupsActiveStatuses(a0, a1) { // fn#110611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14832:321, offset: 0x0237f906, size: 204 bytes, params: 3, frame: 20
|
||||
const env0_0 = a0;
|
||||
const value2 = undefined;
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun110613);
|
||||
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildPowerupsStore], _fun110614);
|
||||
const r3 = guild == null || guild.features == null ? value2 : guild.features.has(GuildFeatures.PREMIUM_TIER_3_OVERRIDE);
|
||||
const env0_3 = r3 != null && r3;
|
||||
return a1.map(function(a0) {
|
||||
return getPowerupActiveStatus(a0);
|
||||
});
|
||||
}
|
||||
|
||||
function getPowerupActiveStatus(a0) { // fn#110612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14832:570, owner: usePowerupsActiveStatuses.getPowerupActiveStatus, offset: 0x0237f9d2, size: 596 bytes, params: 2, frame: 19
|
||||
var r3;
|
||||
var guildBinding;
|
||||
var value10;
|
||||
if (a0.skuId === GAME_SERVER_POWERUP_SKU_ID) {
|
||||
guildBinding = guild;
|
||||
value10 = undefined;
|
||||
r3 = guildBinding == null || guild.features == null ? value10 : guild.features.has(GuildFeatures.GAME_SERVERS);
|
||||
r3 = r3 == null ? PowerupActiveStatusType.INACTIVE : r3 ? PowerupActiveStatusType.POWERUP_ACTIVATED : PowerupActiveStatusType.INACTIVE;
|
||||
return {type: r3, powerup: a0, sourceEntitlement: value10, sourcePowerup: value10};
|
||||
}
|
||||
const value2 = null;
|
||||
let r0 = value2 == a0 || value2 == guild || (value2 == stateForGuild || value2 == POWERUPS_INCLUDED_IN_LEVEL[a0.skuId]) ? {isActiveFromLevel: false,
|
||||
levelEntitlement: undefined,
|
||||
levelPowerup: undefined} : {isActiveFromLevel: guild.premiumTier >= POWERUPS_INCLUDED_IN_LEVEL[a0.skuId],
|
||||
levelEntitlement: value2 != BOOSTING_TIER_TO_LEVEL_SKU_ID[POWERUPS_INCLUDED_IN_LEVEL[a0.skuId]] ? value2 == stateForGuild.unlockedPowerups ? undefined : stateForGuild.unlockedPowerups[BOOSTING_TIER_TO_LEVEL_SKU_ID[POWERUPS_INCLUDED_IN_LEVEL[a0.skuId]]] : undefined,
|
||||
levelPowerup: value2 != BOOSTING_TIER_TO_LEVEL_SKU_ID[POWERUPS_INCLUDED_IN_LEVEL[a0.skuId]] ? value2 == stateForGuild.allPowerups ? undefined : stateForGuild.allPowerups[BOOSTING_TIER_TO_LEVEL_SKU_ID[POWERUPS_INCLUDED_IN_LEVEL[a0.skuId]]] : undefined};
|
||||
const isActiveFromLevel = r0.isActiveFromLevel;
|
||||
const levelEntitlement = r0.levelEntitlement;
|
||||
const levelPowerup = r0.levelPowerup;
|
||||
const r8 = env0_3 && GUILD_POWERUP_TIER_3_OVERRIDDEN_SKUS.has(a0.skuId);
|
||||
const stateForGuildBinding = stateForGuild;
|
||||
const value8 = undefined;
|
||||
r0 = value2 == stateForGuildBinding || value2 == stateForGuild.unlockedPowerups ? value8 : stateForGuild.unlockedPowerups[a0.skuId];
|
||||
const r7 = value2 != r0 ? r0 : value2;
|
||||
const INACTIVE = PowerupActiveStatusType.INACTIVE;
|
||||
return isActiveFromLevel ? {type: PowerupActiveStatusType.LEVEL_ACTIVATED, powerup: a0,
|
||||
sourceEntitlement: levelEntitlement,
|
||||
sourcePowerup: levelPowerup} : r8 ? {type: PowerupActiveStatusType.TIER_OVERRIDE_ACTIVATED, powerup: a0,
|
||||
sourceEntitlement: value8, sourcePowerup: a0} : value2 == r7 ? {type: INACTIVE, powerup: a0,
|
||||
sourceEntitlement: value8, sourcePowerup: value8} : {type: PowerupActiveStatusType.POWERUP_ACTIVATED,
|
||||
powerup: a0, sourceEntitlement: r7, sourcePowerup: a0};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/* Metro module 14691; source: modules/premium/powerups/hooks/useTotalPossibleBoostCount.tsx; dependencies: [31, 8259, 661, 2] */
|
||||
function _fun110852(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14888:6, offset: 0x023897ba, size: 182 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let env0_0 = (require(31) /* metro dependency 31 */).useMemo;
|
||||
let value = require(8259) /* metro dependency 8259: GuildPowerupsConstants */;
|
||||
const env0_1 = value.MULTIPLE_PURCHASEABLE_PREMIUM_FEATURES_BOOST_INFO;
|
||||
const env0_2 = value.PURCHASABLE_PREMIUM_FEATURES_BOOST_INFO;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_3 = value.AppliedGuildBoostsRequiredForBoostedGuildTier;
|
||||
const env0_4 = value.BoostedGuildTiers;
|
||||
const env0_5 = value.GuildFeatures;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useTotalPossibleBoostCount.tsx');
|
||||
exports.default = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return useMemo(_fun110854, [a0]);
|
||||
};
|
||||
}
|
||||
|
||||
function useTotalPossibleBoostCount(a0) { // fn#110853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14888:427, offset: 0x02389870, size: 41 bytes, params: 2, frame: 13
|
||||
const env0_0 = a0;
|
||||
return useMemo(_fun110854, [a0]);
|
||||
}
|
||||
|
||||
function _fun110854() { // fn#110854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14888:476, offset: 0x02389899, size: 179 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var r3;
|
||||
var features;
|
||||
var has;
|
||||
var value;
|
||||
if (env0_0 == null) {
|
||||
return 0;
|
||||
}
|
||||
if (env0_0 == null) {
|
||||
r3 = undefined;
|
||||
} else {
|
||||
features = env0_0.features;
|
||||
has = features.has;
|
||||
value = environment.__proto__;
|
||||
value = Reflect.apply(has, features, [GuildFeatures.PREMIUM_TIER_3_OVERRIDE]);
|
||||
r3 = value;
|
||||
}
|
||||
var env0_0 = r3 === true ? 0 : AppliedGuildBoostsRequiredForBoostedGuildTier[BoostedGuildTiers.TIER_3];
|
||||
let Object = global.Object;
|
||||
const values = Object.values;
|
||||
value = environment.__proto__;
|
||||
const value3 = Reflect.apply(values, Object, [PURCHASABLE_PREMIUM_FEATURES_BOOST_INFO]);
|
||||
Object = global.Object;
|
||||
value = Object.values(MULTIPLE_PURCHASEABLE_PREMIUM_FEATURES_BOOST_INFO);
|
||||
value = value3.concat(value);
|
||||
value.forEach(_fun110855);
|
||||
return env0_0;
|
||||
}
|
||||
|
||||
function _fun110855(a0) { // fn#110855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14888:651, offset: 0x0238994c, size: 97 bytes, params: 2, frame: 14
|
||||
var r3;
|
||||
var r1;
|
||||
var isEnabled;
|
||||
let value = a0.includedInLevel != null;
|
||||
if (value) {
|
||||
r1 = value;
|
||||
} else {
|
||||
isEnabled = a0.isEnabled;
|
||||
value = undefined;
|
||||
if (isEnabled == null) {
|
||||
r3 = value;
|
||||
} else {
|
||||
isEnabled = a0.isEnabled;
|
||||
value = environment.__proto__;
|
||||
value = Reflect.apply(isEnabled, a0, [env1_0.id]);
|
||||
r3 = value;
|
||||
}
|
||||
value = r3 != null;
|
||||
r1 = value && !r3;
|
||||
}
|
||||
if (!r1) {
|
||||
env0_0 = env0_0 + a0.boostPrice;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user