This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,9 +1,11 @@
/* Metro module 14612; source: modules/premium/powerups/hooks/GuildPowerupsNotificationsDCF.native.tsx; dependencies: [7013, 1365, 14598, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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] : []);
};
@@ -33,25 +35,38 @@ function _fun110487(global, require, importDefault, importAll, module, exports,
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() {
}];
}
}
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 _fun110492() { // fn#110492, offset: 0x00c37b63, size: 4 bytes, params: 1, frame: 1
}
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 _fun110494() { // fn#110494, offset: 0x00c37b63, size: 4 bytes, params: 1, frame: 1
}
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 _fun110496() { // fn#110496, offset: 0x00c37b63, size: 4 bytes, params: 1, frame: 1
}
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() {
}];
function _fun110498() { // fn#110498, offset: 0x00c37b63, size: 4 bytes, params: 1, frame: 1
}
global.__d(_fun110487, 14612, [7013, 1365, 14598, 2]) /* metro module 14612, dependencies: [7013, 1365, 14598, 2] */;
@@ -1,129 +1,140 @@
/* Metro module 14652; source: modules/premium/powerups/hooks/useAvailableBoostCountForPowerup.tsx; dependencies: [31, 1867, 8258, 8259, 566, 8254, 1360, 2] */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UseGuildPowerupsBoostCount from './useGuildPowerupsBoostCount.tsx'; /* Metro dependency 8254 */
import GuildPowerupsStore from '../GuildPowerupsStore.tsx'; /* Metro dependency 8258 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as GuildPowerupsConstantsModule from '../constants/GuildPowerupsConstants.tsx'; /* Metro dependency 8259 */
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');
(FileImportTrackerModule).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;
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 = (FluxModule).useStateFromStores([GuildStore], _fun110687);
const stateForGuild = (FluxModule).useStateFromStores([GuildPowerupsStore],
_fun110688);
const spent = (UseGuildPowerupsBoostCount)(a0).spent;
let value = ReactModule.useMemo(_fun110689, [a1, stateForGuild]);
if (value == null) {
r5 = value2;
} else {
r0 = item3;
r1 = item;
r3 = value3;
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 _fun110687() { // fn#110687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14849:420, offset: 0x01c7958f, size: 27 bytes, params: 1, frame: 11
return GuildStore.getGuild(env0_0);
}
function _fun110688() { // fn#110688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14849:474, offset: 0x02382b2f, size: 27 bytes, params: 1, frame: 11
return GuildPowerupsStore.getStateForGuild(env0_0);
}
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];
}
}
}
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];
}
global.__d(_fun110685, 14652, [31, 1867, 8258, 8259, 566, 8254, 1360,
2]) /* metro module 14652, dependencies: [31, 1867, 8258, 8259, 566, 8254, 1360, 2] */;
@@ -1,4 +1,16 @@
/* Metro module 14613; source: modules/premium/powerups/hooks/useBoostToUnlockFeaturedPowerup.tsx; dependencies: [57, 31, 1867, 8258, 8259, 661, 8188, 566, 8254, 14614, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UseGuildPowerupsBoostCount from './useGuildPowerupsBoostCount.tsx'; /* Metro dependency 8254 */
import GuildPowerupsStore from '../GuildPowerupsStore.tsx'; /* Metro dependency 8258 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as PowerupsModule from '../../../../external/discord_common/js/shared/shared-constants/Powerups.tsx'; /* Metro dependency 8188 */
import * as GuildPowerupsConstantsModule from '../constants/GuildPowerupsConstants.tsx'; /* Metro dependency 8259 */
import * as BoostToUnlockCoachmarkExperimentModule from '../experiments/BoostToUnlockCoachmarkExperiment.tsx'; /* Metro dependency 14614 */
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) {
@@ -46,214 +58,219 @@ function _fun110499(global, require, importDefault, importAll, module, exports,
};
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 GUILD_POWERUP_LEVEL_1_SKU_ID = (PowerupsModule).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;
const GUILD_POWERUP_LEVEL_2_SKU_ID = (PowerupsModule).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;
const GUILD_POWERUP_LEVEL_3_SKU_ID = (PowerupsModule).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;
const GUILD_POWERUP_TAG_SKU_ID = (PowerupsModule).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;
const GUILD_POWERUP_ROLE_COLOR_SKU_ID = (PowerupsModule).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;
const GUILD_TAGS_BADGE_PACK_FLEX_POWERUP_SKU_ID = (PowerupsModule).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;
const GUILD_TAGS_BADGE_PACK_PETS_POWERUP_SKU_ID = (PowerupsModule).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');
(FileImportTrackerModule).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)) {
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);
}
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') {
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);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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 {
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;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_110502(a0, value);
r6 = value;
} else {
r6 = value;
}
}
length = items2.length;
if (length > 0) {
Math = global.Math;
return items2[Math.floor(env0_5 * items2.length)];
}
break reducibleJoin14;
r5 = r6;
}
break reducibleJoin14;
} 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 _fun110501() { // fn#110501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14810:785, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
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 = (FluxModule).useStateFromStores([GuildPowerupsStore],
_fun110504);
const available = (UseGuildPowerupsBoostCount)(a0).available;
const value2 = (FluxModule).useStateFromStores([GuildStore], _fun110505);
const env0_3 = value2;
const value3 = (BoostToUnlockCoachmarkExperimentModule).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 _fun110504() { // fn#110504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14810:1759, offset: 0x02379d82, size: 27 bytes, params: 1, frame: 11
return GuildPowerupsStore.getStateForGuild(env0_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 (ReactModule) {
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;
}
}
}
}
}
global.__d(_fun110499, 14613, [57, 31, 1867, 8258, 8259, 661, 8188, 566, 8254, 14614,
2]) /* metro module 14613, dependencies: [57, 31, 1867, 8258, 8259, 661, 8188, 566, 8254, 14614, 2] */;
@@ -1,69 +1,79 @@
/* Metro module 14649; source: modules/premium/powerups/hooks/useCanGuildPowerupBeToggled.tsx; dependencies: [31, 8258, 8259, 566, 14635, 1244, 2256, 2] */
import GuildPowerupsStore from '../GuildPowerupsStore.tsx'; /* Metro dependency 8258 */
import UsePowerupActiveStatus from './usePowerupActiveStatus.tsx'; /* Metro dependency 14635 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as GuildPowerupsConstantsModule from '../constants/GuildPowerupsConstants.tsx'; /* Metro dependency 8259 */
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');
(FileImportTrackerModule).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;
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 = (FluxModule).useStateFromStores([GuildPowerupsStore],
_fun110666);
return stateForGuild.useMemo(_fun110667, [stateForGuild, a1.skuId, a1.dependencies, a2,
(UsePowerupActiveStatus)(a0, a1).type]);
function _fun110666() { // fn#110666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14846:338, offset: 0x0237bb5b, size: 27 bytes, params: 1, frame: 11
return GuildPowerupsStore.getStateForGuild(env0_0);
}
} else {
r1 = value7;
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 object = {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;
}
object.reason = r1;
return object;
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;
}
}
}
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;
}
global.__d(_fun110664, 14649, [31, 8258, 8259, 566, 14635, 1244, 2256,
2]) /* metro module 14649, dependencies: [31, 8258, 8259, 566, 14635, 1244, 2256, 2] */;
@@ -1,96 +1,104 @@
/* Metro module 14656; source: modules/premium/powerups/hooks/useDeactivateWarningText.tsx; dependencies: [31, 4111, 1938, 1867, 566, 6736, 8188, 1244, 2256, 2] */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildRoleStore from '../../../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import GuildMemberCountStore from '../../../../stores/GuildMemberCountStore.tsx'; /* Metro dependency 4111 */
import UseGuildRoleMemberCounts from '../../../guild_role_subscriptions/useGuildRoleMemberCounts.tsx'; /* Metro dependency 6736 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PowerupsModule from '../../../../external/discord_common/js/shared/shared-constants/Powerups.tsx'; /* Metro dependency 8188 */
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');
(FileImportTrackerModule).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 = (FluxModule).useStateFromStores([GuildMemberCountStore],
_fun110706);
const value2 = (UseGuildRoleMemberCounts)(a0);
return value2.useMemo(_fun110710, [a1,
(FluxModule).useStateFromStores([GuildRoleStore], _fun110708, [a0, a1.skuId,
value2]), memberCount, (FluxModule).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 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 _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 _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 _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 = (PowerupsModule).GUILD_POWERUP_ROLE_COLOR_SKU_ID;
const value3 = 0;
if (skuId !== GUILD_POWERUP_ROLE_COLOR_SKU_ID) {
r0 = value3;
} else if (ReactModule == null) {
r0 = value3;
} else {
value = GuildRoleStore.getSortedRoles(env0_0);
value = value.reduce(_fun110709, value3);
r0 = value;
}
return r0;
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;
}
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 _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 = (IndexNativeModule).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 _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;
}
global.__d(_fun110704, 14656, [31, 4111, 1938, 1867, 566, 6736, 8188, 1244, 2256,
2]) /* metro module 14656, dependencies: [31, 4111, 1938, 1867, 566, 6736, 8188, 1244, 2256, 2] */;
@@ -1,139 +1,151 @@
/* Metro module 14615; source: modules/premium/powerups/hooks/useFeaturedExpiringPowerup.tsx; dependencies: [31, 8255, 8258, 566, 14616, 5134, 2] */
import GameServerStore from '../../game_server/GameServerStore.tsx'; /* Metro dependency 8255 */
import GuildPowerupsStore from '../GuildPowerupsStore.tsx'; /* Metro dependency 8258 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ExpiringPowerupCoachmarkExperimentModule from '../experiments/ExpiringPowerupCoachmarkExperiment.tsx'; /* Metro dependency 14616 */
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');
(FileImportTrackerModule).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 = (FluxModule).useStateFromStores([GuildPowerupsStore],
_fun110513);
const stateForGuild2 = (FluxModule).useStateFromStores([GameServerStore],
_fun110514);
return stateForGuild2.useMemo(_fun110515, [stateForGuild, stateForGuild2,
(ExpiringPowerupCoachmarkExperimentModule).useExpiringPowerupCoachmarkEnabled('useFeaturedExpiringPowerup')]);
function _fun110513() { // fn#110513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14812:308, offset: 0x0237bb5b, size: 27 bytes, params: 1, frame: 11
return GuildPowerupsStore.getStateForGuild(env0_0);
}
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 _fun110514() { // fn#110514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14812:370, offset: 0x0237bb76, size: 27 bytes, params: 1, frame: 11
return GameServerStore.getStateForGuild(env0_0);
}
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;
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;
}
}
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
@@ -142,3 +154,5 @@ function _fun110517(a0, a1) { // fn#110517, source: /ci/build/discord/discord/di
return value2.ends_at > value.ends_at ? value2 : value;
}
global.__d(_fun110511, 14615, [31, 8255, 8258, 566, 14616, 5134,
2]) /* metro module 14615, dependencies: [31, 8255, 8258, 566, 14616, 5134, 2] */;
@@ -1,35 +1,46 @@
/* Metro module 14625; source: modules/premium/powerups/hooks/useGetExpiringGuildPowerups.tsx; dependencies: [31, 8258, 566, 14609, 1360, 2] */
import GuildPowerupsStore from '../GuildPowerupsStore.tsx'; /* Metro dependency 8258 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as GlobalUtilsModule from '../../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as GetExpiringGuildEntitlementsModule from '../utils/getExpiringGuildEntitlements.tsx'; /* Metro dependency 14609 */
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');
(FileImportTrackerModule).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 ReactModule.useMemo(_fun110561,
[(FluxModule).useStateFromStores([GuildPowerupsStore], _fun110560)]);
function _fun110560() { // fn#110560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14822:300, offset: 0x0237bb76, size: 27 bytes, params: 1, frame: 11
return GuildPowerupsStore.getStateForGuild(env0_0);
}
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 = (GetExpiringGuildEntitlementsModule).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((GlobalUtilsModule).isNotNullish);
}
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);
}
global.__d(_fun110558, 14625, [31, 8258, 566, 14609, 1360,
2]) /* metro module 14625, dependencies: [31, 8258, 566, 14609, 1360, 2] */;
@@ -1,4 +1,7 @@
/* Metro module 14640; source: modules/premium/powerups/hooks/useGetGuildPowerupBannerImage.tsx; dependencies: [4502, 566, 2] */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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) {
@@ -8,18 +11,18 @@ function _fun110635(global, require, importDefault, importAll, module, exports,
};
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');
(FileImportTrackerModule).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);
}
}
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);
}
global.__d(_fun110635, 14640, [4502, 566, 2]) /* metro module 14640, dependencies: [4502, 566, 2] */;
@@ -1,38 +1,43 @@
/* Metro module 14648; source: modules/premium/powerups/hooks/useGuildPowerupCardFooterConfig.tsx; dependencies: [1867, 8259, 661, 14635, 566, 8188, 14610, 2] */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UsePowerupActiveStatus from './usePowerupActiveStatus.tsx'; /* Metro dependency 14635 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as PowerupsModule from '../../../../external/discord_common/js/shared/shared-constants/Powerups.tsx'; /* Metro dependency 8188 */
import * as GuildPowerupsConstantsModule from '../constants/GuildPowerupsConstants.tsx'; /* Metro dependency 8259 */
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');
GuildPowerupsConstantsModule.GUILD_POWERUP_CONFIGURABLE_SKUS_DESKTOP;
(FileImportTrackerModule).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 = (UsePowerupActiveStatus)(a0, a1);
const value3 = (FluxModule).useStateFromStores([GuildStore], _fun110663, [a0]);
const skuId = a1.skuId;
const GUILD_POWERUP_GUILD_THEME_SKU_ID = (PowerupsModule).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;
}
}
}
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;
}
global.__d(_fun110661, 14648, [1867, 8259, 661, 14635, 566, 8188, 14610,
2]) /* metro module 14648, dependencies: [1867, 8259, 661, 14635, 566, 8188, 14610, 2] */;
@@ -1,46 +1,54 @@
/* Metro module 14624; source: modules/premium/powerups/hooks/useGuildPowerupExpiringNotificationsConfig.tsx; dependencies: [14625, 14626, 1244, 2646, 8188, 2256, 2] */
import UseGetExpiringGuildPowerups from './useGetExpiringGuildPowerups.tsx'; /* Metro dependency 14625 */
import UseGameServerGetExpiringEntitlements from '../../game_server/hooks/useGameServerGetExpiringEntitlements.tsx'; /* Metro dependency 14626 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PowerupsModule from '../../../../external/discord_common/js/shared/shared-constants/Powerups.tsx'; /* Metro dependency 8188 */
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');
(FileImportTrackerModule).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 items2;
const intl = (IndexNativeModule).intl;
var value8;
var items3;
const value2 = undefined;
const value3 = (UseGetExpiringGuildPowerups)(a0);
const value4 = (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;
});
items2 = [];
arraySpread(items2, r11 != null ? [r11] : [], arraySpread(items2, 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: items2, 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 = (PowerupsModule).VANITY_URL_POWERUP_SKU_ID;
return skuId === VANITY_URL_POWERUP_SKU_ID;
}
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;
}
global.__d(_fun110554, 14624, [14625, 14626, 1244, 2646, 8188, 2256,
2]) /* metro module 14624, dependencies: [14625, 14626, 1244, 2646, 8188, 2256, 2] */;
@@ -1,89 +1,100 @@
/* Metro module 14647; source: modules/premium/powerups/hooks/useGuildPowerupLevelPerks.tsx; dependencies: [31, 8259, 8249, 1244, 2256, 1360, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GlobalUtilsModule from '../../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as GuildBoostingUtilsModule from '../../../../utils/GuildBoostingUtils.tsx'; /* Metro dependency 8249 */
import * as GuildPowerupsConstantsModule from '../constants/GuildPowerupsConstants.tsx'; /* Metro dependency 8259 */
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');
(FileImportTrackerModule).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 object;
const PerkIcons = (GuildBoostingUtilsModule).PerkIcons;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
var property;
var object2;
var binding;
var features;
var object3;
var ZEvvPz;
var object4;
var object5;
var object6;
const items2 = [];
const env0_0 = GUILD_FEATURE_TO_PERK();
if (includeEmojis) {
push = items2.push;
object = {};
object.perkIcon = PerkIcons.EMOJI;
formatToPlainString = intl.formatToPlainString;
property = (importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */)['NXvV0+'];
object2 = {};
binding = env0_0;
features = binding.features;
object2.totalEmojis = features.total_emoji_slots;
features = binding.features;
object2.additionalEmojis = features.additional_emoji_slots;
object.description = Reflect.apply(formatToPlainString, intl, [property, object2]);
Reflect.apply(push, items2, [object]);
}
if (includeStickers) {
push = items2.push;
object3 = {};
object3.perkIcon = PerkIcons.STICKER;
formatToPlainString = intl.formatToPlainString;
ZEvvPz = (importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).ZEvvPz;
object4 = {};
binding = env0_0;
features = binding.features;
object4.totalStickers = features.total_sticker_slots;
features = binding.features;
object4.additionalStickers = features.additional_sticker_slots;
object3.description = Reflect.apply(formatToPlainString, intl, [ZEvvPz, object4]);
Reflect.apply(push, items2, [object3]);
}
if (includeSoundboards) {
push = items2.push;
object5 = {};
object5.perkIcon = PerkIcons.SOUNDBOARD;
formatToPlainString = intl.formatToPlainString;
property = (importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */)['s9u/E7'];
object6 = {};
binding = env0_0;
features = binding.features;
object6.totalSoundboards = features.total_sound_slots;
features = binding.features;
object6.additionalSoundboards = features.additional_sound_slots;
object5.description = Reflect.apply(formatToPlainString, intl, [property, object6]);
Reflect.apply(push, items2, [object5]);
}
const concat = items2.concat;
features = env0_0.features;
features = features.features;
const value3 = features.map(_fun110660);
return Reflect.apply(concat, items2,
[value3.filter((GlobalUtilsModule).isNotNullish)]);
function _fun110660(a0) { // fn#110660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14844:1110, offset: 0x00c3fbaf, size: 16 bytes, params: 2, frame: 2
return env0_0[a0];
}
}
}
}
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)]);
}
global.__d(_fun110657, 14647, [31, 8259, 8249, 1244, 2256, 1360,
2]) /* metro module 14647, dependencies: [31, 8259, 8249, 1244, 2256, 1360, 2] */;
@@ -1,19 +1,22 @@
/* Metro module 14655; source: modules/premium/powerups/hooks/useGuildPowerupOnDeactivate.tsx; dependencies: [31, 14651, 2] */
import UseGuildPowerupOnToggle from './useGuildPowerupOnToggle.tsx'; /* Metro dependency 14651 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
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');
(FileImportTrackerModule).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} = (UseGuildPowerupOnToggle)(a0, a1);
const useCallback = ReactModule.useCallback;
return {isLoading: isLoading, error: error, onDeactivate: Reflect.apply(useCallback, ReactModule, [function() {
return onToggle(false);
}, [onToggle]])};
}
}
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]])};
}
global.__d(_fun110701, 14655, [31, 14651, 2]) /* metro module 14655, dependencies: [31, 14651, 2] */;
@@ -1,52 +1,59 @@
/* Metro module 14651; source: modules/premium/powerups/hooks/useGuildPowerupOnToggle.tsx; dependencies: [57, 31, 12307, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as GuildPowerupsActionCreatorsModule from '../GuildPowerupsActionCreators.tsx'; /* Metro dependency 12307 */
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');
(FileImportTrackerModule).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 object = {isLoading: property, error: property2};
object.onToggle = binding.useCallback(_fun110682, [a0, a1]);
return object;
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 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;
}
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 _fun110684() { // fn#110684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14848:638, offset: 0x010d036b, size: 18 bytes, params: 1, frame: 11
env1_2(false);
}
}
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;
}
global.__d(_fun110680, 14651, [57, 31, 12307, 2]) /* metro module 14651, dependencies: [57, 31, 12307, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 14610; source: modules/premium/powerups/hooks/useGuildPowerupRollbackEnabled.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupRollbackEnabled.tsx');
exports.default = function() {
return false;
};
@@ -11,3 +13,4 @@ function _fun110482(global, require, importDefault, importAll, module, exports,
};
}
global.__d(_fun110482, 14610, [2]) /* metro module 14610, dependencies: [2] */;
@@ -1,10 +1,13 @@
/* Metro module 14611; source: modules/premium/powerups/hooks/useGuildPowerupRollbackNotificationConfig.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupRollbackNotificationConfig.tsx');
exports.default = function() {
return {'shouldShow': false, 'notificationConfig': null};
};
}
global.__d(_fun110485, 14611, [2]) /* metro module 14611, dependencies: [2] */;
@@ -1,35 +1,39 @@
/* Metro module 14623; source: modules/premium/powerups/hooks/useGuildPowerupTier3OverrideConfig.tsx; dependencies: [1867, 661, 566, 1244, 2256, 2] */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
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');
(FileImportTrackerModule).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 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;
}
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;
}
global.__d(_fun110551, 14623, [1867, 661, 566, 1244, 2256,
2]) /* metro module 14623, dependencies: [1867, 661, 566, 1244, 2256, 2] */;
@@ -1,101 +1,106 @@
/* Metro module 8254; source: modules/premium/powerups/hooks/useGuildPowerupsBoostCount.tsx; dependencies: [31, 1867, 8255, 8258, 6857, 566, 2] */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GameServerStore from '../../game_server/GameServerStore.tsx'; /* Metro dependency 8255 */
import GuildPowerupsStore from '../GuildPowerupsStore.tsx'; /* Metro dependency 8258 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as GameServerExperimentModule from '../../game_server/GameServerExperiment.tsx'; /* Metro dependency 6857 */
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');
(FileImportTrackerModule).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 = (GameServerExperimentModule).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 _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 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 _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 object;
if (env0_3 == null) {
return {'available': 0, 'spent': 0, total: env0_1};
}
if (ReactModule) {
if (env0_4 == null) {
return {'available': 0, 'spent': 0, total: env0_1};
}
binding = env0_3;
value2 = 0;
value3 = binding + (env0_4 ?? value2);
object = {};
object.available = global.Math.max(value2, env0_1 - value3);
} else {
binding = env0_3;
value2 = 0;
value3 = binding + (env0_4 ?? value2);
object = {};
object.available = global.Math.max(value2, env0_1 - value3);
}
object.spent = value3;
object.total = env0_1;
return object;
}
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) {
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 object;
const guild = GuildStore.getGuild(a0);
const value3 = undefined;
const premiumSubscriberCount = guild == null ? value3 : guild.premiumSubscriberCount;
const value4 = 0;
const r1 = premiumSubscriberCount ?? value4;
const gameServerEnabled = (GameServerExperimentModule).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};
}
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};
if (gameServerEnabled) {
if (appliedBoosts2 == null) {
return {'available': 0, 'spent': 0, total: r1};
}
value = appliedBoosts + (appliedBoosts2 ?? value4);
object = {};
object.available = global.Math.max(value4, r1 - value);
} else {
value = appliedBoosts + (appliedBoosts2 ?? value4);
object = {};
object.available = global.Math.max(value4, r1 - value);
}
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);
object.spent = value;
object.total = r1;
return object;
}
object2.spent = value3;
object2.total = env0_1;
return object2;
}
global.__d(_fun66010, 8254, [31, 1867, 8255, 8258, 6857, 566,
2]) /* metro module 8254, dependencies: [31, 1867, 8255, 8258, 6857, 566, 2] */;
@@ -1,14 +1,15 @@
/* Metro module 8265; source: modules/premium/powerups/hooks/useGuildPowerupsBoostLevelProgress.tsx; dependencies: [1867, 661, 8254, 566, 2] */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UseGuildPowerupsBoostCount from './useGuildPowerupsBoostCount.tsx'; /* Metro dependency 8254 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
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');
(FileImportTrackerModule).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupsBoostLevelProgress.tsx');
exports.default = useGuildPowerupBoostLevelProgress;
exports.getGuildPowerupBoostLevelProgress = function(a0) {
var r2;
@@ -19,27 +20,28 @@ function _fun66101(global, require, importDefault, importAll, module, exports, d
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 = (UseGuildPowerupsBoostCount)(a0);
let useStateFromStores = FluxModule.useStateFromStores;
const guildStoreBinding = GuildStore;
const value3 = Reflect.apply(useStateFromStores, FluxModule, [[guildStoreBinding], _fun66103]);
useStateFromStores = FluxModule.useStateFromStores;
return (Reflect.apply(useStateFromStores, FluxModule, [[guildStoreBinding],
_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;
}
}
}
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;
}
global.__d(_fun66101, 8265, [1867, 661, 8254, 566,
2]) /* metro module 8265, dependencies: [1867, 661, 8254, 566, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,71 +1,77 @@
/* Metro module 14628; source: modules/premium/powerups/hooks/useGuildPowerupsWarningConfig.tsx; dependencies: [31, 12346, 8254, 566, 1244, 2256, 2] */
import UseGuildPowerupsBoostCount from './useGuildPowerupsBoostCount.tsx'; /* Metro dependency 8254 */
import AppliedGuildBoostStore from '../../../../stores/AppliedGuildBoostStore.tsx'; /* Metro dependency 12346 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
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');
(FileImportTrackerModule).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 = (UseGuildPowerupsBoostCount)(a0).spent;
const value2 = (FluxModule).useStateFromStores([AppliedGuildBoostStore],
_fun110572, [a0]);
const useMemo = ReactModule.useMemo;
return ReactModule.useMemo(_fun110575, [spent - Reflect.apply(useMemo, ReactModule, [_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 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 _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 _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 _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 object;
var value2;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
var iAaAiG;
var object2;
var binding;
if (ReactModule <= 0) {
r0 = {'shouldShow': false, 'title': '', 'description': '', 'requiredBoostCount': 0};
} else {
object = {shouldShow: true};
value2 = environment.__proto__;
object.title = intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).n5hQhc);
formatToPlainString = intl.formatToPlainString;
iAaAiG = (importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).iAaAiG;
object2 = {};
binding = ReactModule;
object2.boostCount = binding;
object2.perksString = require.join(', ');
object.description = Reflect.apply(formatToPlainString, intl, [iAaAiG, object2]);
object.requiredBoostCount = binding;
r0 = object;
}
return r0;
}
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;
}
global.__d(_fun110570, 14628, [31, 12346, 8254, 566, 1244, 2256,
2]) /* metro module 14628, dependencies: [31, 12346, 8254, 566, 1244, 2256, 2] */;
@@ -1,32 +1,37 @@
/* Metro module 12310; source: modules/premium/powerups/hooks/useHasAllocateBoostPermission.tsx; dependencies: [1867, 3784, 482, 566, 2] */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
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 getHasAllocateBoostPermission2 = 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');
(FileImportTrackerModule).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;
}
exports.getHasAllocateBoostPermission = getHasAllocateBoostPermission2;
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 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 (FluxModule).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));
}
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));
}
global.__d(_fun93999, 12310, [1867, 3784, 482, 566,
2]) /* metro module 12310, dependencies: [1867, 3784, 482, 566, 2] */;
@@ -1,11 +1,14 @@
/* Metro module 6630; source: modules/premium/powerups/hooks/useHasEnhancedRoleColors.tsx; dependencies: [1867, 661, 566, 2] */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
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');
(FileImportTrackerModule).fileFinishedImporting('modules/premium/powerups/hooks/useHasEnhancedRoleColors.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[2]).useStateFromStores([GuildStore], _fun52493);
@@ -16,34 +19,41 @@ function _fun52491(global, require, importDefault, importAll, module, exports, d
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 (FluxModule).useStateFromStores([GuildStore], _fun52493);
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);
}
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 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 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 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 (FluxModule).useStateFromStores([GuildStore], _fun52496);
function _fun52496() { // fn#52496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6808:670, 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);
}
}
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);
}
global.__d(_fun52491, 6630, [1867, 661, 566, 2]) /* metro module 6630, dependencies: [1867, 661, 566, 2] */;
@@ -1,78 +1,81 @@
/* Metro module 15722; source: modules/premium/powerups/hooks/useIsCurrentUserEligibleForPowerupUpsells.tsx; dependencies: [1945, 4896, 1878, 7020, 1880, 1900, 566, 2] */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildMemberStore from '../../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import SortedGuildStore from '../../../../stores/SortedGuildStore.tsx'; /* Metro dependency 4896 */
import GuildBoostSlotStore from '../../../../stores/billing/GuildBoostSlotStore.tsx'; /* Metro dependency 7020 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as PremiumConstantsModule from '../../PremiumConstants.tsx'; /* Metro dependency 1880 */
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');
(FileImportTrackerModule).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();
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) {
r1 = !value;
} else {
moduleValue = require(1900) /* metro dependency 1900: PremiumTypeUtils */;
value = moduleValue.isPremium(a0, PremiumTypes.TIER_2);
value = a0.isPremiumGroupMember();
if (value) {
r2 = !!value;
r1 = !value;
} else {
value = a1.some(function(a0) {
return a0.premiumGuildSubscription != null;
});
r2 = value ? !!value : a2.some(_fun120735);
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;
}
r1 = r2;
r0 = r1;
} else {
r0 = value;
}
r0 = r1;
} else {
r0 = value;
return r0;
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;
}
}
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 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;
let useStateFromStores = FluxModule.useStateFromStores;
const currentUser = Reflect.apply(useStateFromStores, FluxModule, [[UserStore], function() {
return UserStore.getCurrentUser();
}]);
const value2 = FluxModule.useStateFromStoresArray([GuildBoostSlotStore], _fun120738);
useStateFromStores = FluxModule.useStateFromStores;
return checkPowerupUpsellEligibilityBinding(currentUser, value2, Reflect.apply(useStateFromStores, FluxModule,
[[SortedGuildStore], function() {
return SortedGuildStore.getFlattenedGuildIds();
}]));
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) : [];
}
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 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 _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) : [];
}
global.__d(_fun120732, 15722, [1945, 4896, 1878, 7020, 1880, 1900, 566,
2]) /* metro module 15722, dependencies: [1945, 4896, 1878, 7020, 1880, 1900, 566, 2] */;
@@ -1,9 +1,11 @@
/* Metro module 12685; source: modules/premium/powerups/hooks/useIsServerThemeAvailableForGuild.tsx; dependencies: [8263, 4038, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).fileFinishedImporting('modules/premium/powerups/hooks/useIsServerThemeAvailableForGuild.tsx');
exports.default = function(a0, a1) {
var value = a0;
require(dependencyMap[0]).useServerThemeEnabled(value ?? undefined, a1);
@@ -11,3 +13,4 @@ function _fun97220(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun97220, 12685, [8263, 4038, 2]) /* metro module 12685, dependencies: [8263, 4038, 2] */;
@@ -1,36 +1,40 @@
/* Metro module 14601; source: modules/premium/powerups/hooks/useLoadGuildPowerups.tsx; dependencies: [31, 6857, 14602, 12307, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as GameServerExperimentModule from '../../game_server/GameServerExperiment.tsx'; /* Metro dependency 6857 */
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');
(FileImportTrackerModule).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 = (GameServerExperimentModule).useGameServerEnabled(a0,
'useLoadGuildPowerups');
ReactModule.useEffect(_fun110387, [a0, value2]);
ReactModule.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 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 _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);
}
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);
}
global.__d(_fun110385, 14601, [31, 6857, 14602, 12307,
2]) /* metro module 14601, dependencies: [31, 6857, 14602, 12307, 2] */;
@@ -1,54 +1,62 @@
/* Metro module 12303; source: modules/premium/powerups/hooks/useMarketablePowerupPerks.tsx; dependencies: [31, 8258, 8259, 8188, 566, 12304, 2] */
import GuildPowerupsStore from '../GuildPowerupsStore.tsx'; /* Metro dependency 8258 */
import UseGameServerPerk from '../../game_server/hooks/useGameServerPerk.tsx'; /* Metro dependency 12304 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as PowerupsModule from '../../../../external/discord_common/js/shared/shared-constants/Powerups.tsx'; /* Metro dependency 8188 */
import * as GuildPowerupsConstantsModule from '../constants/GuildPowerupsConstants.tsx'; /* Metro dependency 8259 */
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 */;
let value = GuildPowerupsConstantsModule;
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);
items2 = [];
value = arraySpread(items2, 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,
value = arraySpread(items2, 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;
const VANITY_URL_POWERUP_SKU_ID = (PowerupsModule).VANITY_URL_POWERUP_SKU_ID;
items2[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');
const set = new Set(items2);
(FileImportTrackerModule).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 ReactModule.useMemo(_fun93971,
[(FluxModule).useStateFromStores([GuildPowerupsStore], _fun93970),
(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 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 _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);
}
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);
}
global.__d(_fun93968, 12303, [31, 8258, 8259, 8188, 566, 12304,
2]) /* metro module 12303, dependencies: [31, 8258, 8259, 8188, 566, 12304, 2] */;
@@ -1,152 +1,161 @@
/* Metro module 14674; source: modules/premium/powerups/hooks/useMaybeGetSortedBoosts.tsx; dependencies: [57, 31, 12346, 6269, 1945, 1867, 14675, 566, 14676, 8251, 21, 1244, 2] */
import SnowflakeUtils from '../../../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildMemberStore from '../../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import GuildMemberRequesterStore from '../../../../stores/GuildMemberRequesterStore.tsx'; /* Metro dependency 6269 */
import AppliedGuildBoostStore from '../../../../stores/AppliedGuildBoostStore.tsx'; /* Metro dependency 12346 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ExpiringBoostsExperimentModule from '../experiments/ExpiringBoostsExperiment.tsx'; /* Metro dependency 14675 */
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');
(FileImportTrackerModule).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 = (ExpiringBoostsExperimentModule).useExpiringBoostsEnabled('GuildPowerupsRecentActivity');
const useStateFromStoresArray = FluxModule.useStateFromStoresArray;
const appliedGuildBoostStoreBinding = AppliedGuildBoostStore;
const value3 = Reflect.apply(useStateFromStoresArray, FluxModule, [[appliedGuildBoostStoreBinding], _fun110768,
[a0]]);
const env0_3 = value3;
const value6 = ReactModule.useMemo(_fun110770, [value3, a1, env0_3(ReactModule.useState(function() {
var Date = global.Date;
return Date.now();
}), 1)[0], value2]);
ReactModule.useEffect(_fun110775, [a0, FluxModule.useStateFromStoresArray([GuildMemberStore], _fun110773, [a0,
value6])]);
ReactModule.useEffect(_fun110781, [a0, FluxModule.useStateFromStores([GuildStore], _fun110777),
ReactModule.useMemo(_fun110778, [value3]), value2, FluxModule.useStateFromStores([appliedGuildBoostStoreBinding],
_fun110780, [a0])]);
return value6;
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 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 _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 _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 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 _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 _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 guildMemberStoreBinding = GuildMemberStore;
const getMember = guildMemberStoreBinding.getMember;
value = environment.__proto__;
let binding = env1_0;
const userId = boost.userId;
if (Reflect.apply(getMember, guildMemberStoreBinding, [binding, userId]) == null) {
binding = env0_0;
binding.add(boost.userId);
}
}
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 _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);
}
}
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 _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 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 = SnowflakeUtils;
const date = new Date(defaultImport.extractTimestamp(a0.id));
const value = (FluxModule).useStateFromStoresObject([GuildMemberStore],
_fun110783, [a0]);
const username = value.username;
return {timestamp: date, username: username, roleColor: value.roleColor, roleColorStrings: value.roleColorStrings};
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 guildMemberStoreBinding = GuildMemberStore;
const getMember = guildMemberStoreBinding.getMember;
const binding = env0_0;
let guildId = binding.guildId;
let userId = binding.userId;
const value3 = Reflect.apply(getMember, guildMemberStoreBinding, [guildId, userId]);
const getNick = guildMemberStoreBinding.getNick;
guildId = binding.guildId;
userId = binding.userId;
const value4 = Reflect.apply(getNick, guildMemberStoreBinding, [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 _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);
}
global.__d(_fun110766, 14674, [57, 31, 12346, 6269, 1945, 1867, 14675, 566, 14676, 8251, 21, 1244,
2]) /* metro module 14674, dependencies: [57, 31, 12346, 6269, 1945, 1867, 14675, 566, 14676, 8251, 21, 1244, 2] */;
@@ -1,69 +1,74 @@
/* Metro module 14668; source: modules/premium/powerups/hooks/useMultiPerkStatusValues.tsx; dependencies: [8259, 14635, 1244, 2256, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GuildPowerupsConstantsModule from '../constants/GuildPowerupsConstants.tsx'; /* Metro dependency 8259 */
import * as UsePowerupActiveStatusModule from './usePowerupActiveStatus.tsx'; /* Metro dependency 14635 */
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');
(FileImportTrackerModule).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;
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 object;
var intl;
let value3 = (UsePowerupActiveStatusModule).usePowerupsActiveStatuses(guildId,
powerups);
const value4 = value3.some(function({type}) {
return type !== PowerupActiveStatusType.INACTIVE;
});
if (powerups.length <= 0) {
return null;
}
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};
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) {
object = {type: 'active'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.statusText = intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).FFLkmx);
r5 = object;
} 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};
}
}
global.__d(_fun110738, 14668, [8259, 14635, 1244, 2256,
2]) /* metro module 14668, dependencies: [8259, 14635, 1244, 2256, 2] */;
@@ -1,19 +1,18 @@
/* Metro module 14635; source: modules/premium/powerups/hooks/usePowerupActiveStatus.tsx; dependencies: [1867, 8258, 8260, 8259, 661, 566, 2] */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildPowerupsStore from '../GuildPowerupsStore.tsx'; /* Metro dependency 8258 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as GuildPowerupsConstantsModule from '../constants/GuildPowerupsConstants.tsx'; /* Metro dependency 8259 */
import * as GameServerConstantsModule from '../../game_server/GameServerConstants.tsx'; /* Metro dependency 8260 */
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 usePowerupsActiveStatuses2 = 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');
(FileImportTrackerModule).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,
@@ -22,52 +21,62 @@ function _fun110610(global, require, importDefault, importAll, module, exports,
exports.isPowerupActiveStatusActive = function({type}) {
return type !== PowerupActiveStatusType.INACTIVE;
};
exports.usePowerupsActiveStatuses = closure;
}
exports.usePowerupsActiveStatuses = usePowerupsActiveStatuses2;
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 = (FluxModule).useStateFromStores([GuildStore], _fun110613);
const env0_2 = (FluxModule).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};
}
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 _fun110613() { // fn#110613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14832:403, offset: 0x01125050, size: 27 bytes, params: 1, frame: 11
return GuildStore.getGuild(env0_0);
}
function _fun110614() { // fn#110614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14832:457, offset: 0x0237bb76, size: 27 bytes, params: 1, frame: 11
return GuildPowerupsStore.getStateForGuild(env0_0);
}
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};
}
global.__d(_fun110610, 14635, [1867, 8258, 8260, 8259, 661, 566,
2]) /* metro module 14635, dependencies: [1867, 8258, 8260, 8259, 661, 566, 2] */;
@@ -1,80 +1,85 @@
/* Metro module 14691; source: modules/premium/powerups/hooks/useTotalPossibleBoostCount.tsx; dependencies: [31, 8259, 661, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as GuildPowerupsConstantsModule from '../constants/GuildPowerupsConstants.tsx'; /* Metro dependency 8259 */
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 */;
let env0_0 = (ReactModule).useMemo;
let value = GuildPowerupsConstantsModule;
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');
(FileImportTrackerModule).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;
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__;
value = Reflect.apply(isEnabled, a0, [env1_0.id]);
r3 = value;
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;
}
}
}
value = r3 != null;
r1 = value && !r3;
}
if (!r1) {
env0_0 = env0_0 + a0.boostPrice;
}
}
global.__d(_fun110852, 14691, [31, 8259, 661, 2]) /* metro module 14691, dependencies: [31, 8259, 661, 2] */;