Initial commit

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

No files matched your search

@@ -0,0 +1,11 @@
/* Metro module 14645; source: modules/premium/powerups/utils/entitlementExpirationDateToString.tsx; dependencies: [1949, 2] */
function _fun110653(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14842:6, offset: 0x02381976, size: 106 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/utils/entitlementExpirationDateToString.tsx');
exports.default = function(a0) {
return new global.Date(a0).toLocaleDateString(LocaleStore.locale, {'month': '2-digit', 'day': '2-digit'});
};
}
@@ -0,0 +1,42 @@
/* Metro module 14676; source: modules/premium/powerups/utils/getBoostLifecyclePhase.tsx; dependencies: [21, 2] */
function _fun110786(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14873:6, offset: 0x023870a1, size: 135 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/utils/getBoostLifecyclePhase.tsx');
exports.BOOST_EXPIRING_DISPLAY_WINDOW_DAYS = 3;
exports.BOOST_EXPIRING_DISPLAY_WINDOW_MS = 259200000;
exports.getBoostLifecycleInfo = getBoostLifecycleInfo;
exports.getBoostLifecycleTimestamp = getBoostLifecycleTimestamp;
}
function getBoostLifecycleInfo(a0, a1) { // fn#110787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14873:296, offset: 0x02387128, size: 149 bytes, params: 3, frame: 12
return a0.ended ? {phase: 'expired'} : a0.endsAt == null ? a0.endsAt == null ? {phase: 'gave'} : a0.endsAt.getTime() - a1 <= 259200000 ? {phase: 'expiring',
endsAt: a0.endsAt} : {phase: 'gave'} : a0.endsAt.getTime() <= a1 ? {phase: 'expired'} : a0.endsAt == null ? {phase: 'gave'} : a0.endsAt.getTime() - a1 <= 259200000 ? {phase: 'expiring',
endsAt: a0.endsAt} : {phase: 'gave'};
}
function getBoostLifecycleTimestamp(a0, a1) { // fn#110788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14873:524, offset: 0x023871bd, size: 192 bytes, params: 3, frame: 15
var r2;
var endsAt;
var value;
const phase = a1.phase;
if (phase === 'gave') {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
return value.extractTimestamp(a0.id);
}
if (phase === 'expiring') {
return a1.endsAt.getTime() - 259200000;
}
if (phase === 'expired') {
endsAt = a0.endsAt;
value = undefined;
r2 = endsAt == null ? value : endsAt.getTime();
if (r2 == null) {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.extractTimestamp(a0.id);
r2 = value;
}
return r2;
}
}
@@ -0,0 +1,39 @@
/* Metro module 14679; source: modules/premium/powerups/utils/getBoostRowMessageText.tsx; dependencies: [1244, 2256, 14676, 2] */
function _fun110792(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14876:6, offset: 0x0238734d, 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/utils/getBoostRowMessageText.tsx');
exports.default = getBoostRowMessageText;
}
function getBoostRowMessageText(a0) { // fn#110793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14876:193, offset: 0x023873b4, size: 331 bytes, params: 2, frame: 20
var r4;
var value;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var vct4l8;
var endsAt;
var Date;
const phase = a0.phase;
if (phase === 'gave') {
return intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).plwH8d);
}
if (phase === 'expiring') {
formatToPlainString = intl.formatToPlainString;
vct4l8 = (importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).vct4l8;
endsAt = a0.boost.endsAt;
if (endsAt != null) {
r4 = endsAt;
} else {
Date = global.Date;
value = a0.sortKey + (require(14676) /* metro dependency 14676: getBoostLifecyclePhase */).BOOST_EXPIRING_DISPLAY_WINDOW_MS;
r4 = new Date();
}
return Reflect.apply(formatToPlainString, intl, [vct4l8, {date: r4}]);
}
if (phase === 'expired') {
return intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).hSXjlI);
}
}
@@ -0,0 +1,18 @@
/* Metro module 14609; source: modules/premium/powerups/utils/getExpiringGuildEntitlements.tsx; dependencies: [2] */
function _fun110478(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14806:6, offset: 0x0237affb, 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/utils/getExpiringGuildEntitlements.tsx');
exports.getExpiringGuildEntitlements = function(a0) {
return a0.filter(_fun110480).sort(_fun110481);
};
}
function getExpiringGuildEntitlements(a0) { // fn#110479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14806:221, offset: 0x0237b052, size: 42 bytes, params: 2, frame: 12
return a0.filter(function(a0) {
return a0.ends_at != null;
}).sort(function({ends_at}, a1) {
return ends_at < a1.ends_at ? -1 : 1;
});
}
@@ -0,0 +1,15 @@
/* Metro module 14646; source: modules/premium/powerups/utils/getGuildPowerupFormattedDateString.tsx; dependencies: [1949, 2] */
function _fun110655(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14843:6, offset: 0x02381a28, size: 106 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/utils/getGuildPowerupFormattedDateString.tsx');
exports.default = function(a0) {
var r3;
var value = a1;
r3 = value !== undefined ? value : {'month': 'numeric', 'day': 'numeric'};
var Date = global.Date;
return new Date(a0).toLocaleDateString(LocaleStore.locale, r3);
};
}
@@ -0,0 +1,28 @@
/* Metro module 14621; source: modules/premium/powerups/utils/getGuildPowerupsBoostInfoText.tsx; dependencies: [8259, 1244, 2256, 2] */
function _fun110546(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14818:6, offset: 0x0237cb40, 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 */).BoostInfoType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/utils/getGuildPowerupsBoostInfoText.tsx');
exports.getGuildPowerupsBoostInfoText = getGuildPowerupsBoostInfoText;
}
function getGuildPowerupsBoostInfoText(a0, a1) { // fn#110547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14818:250, offset: 0x0237cbbc, size: 263 bytes, params: 3, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const AVAILABLE = BoostInfoType.AVAILABLE;
if (AVAILABLE === a1) {
return intl.formatToPlainString((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).BdRXZA,
{boostCount: a0});
}
const SPENT = BoostInfoType.SPENT;
if (SPENT === a1) {
return intl.formatToPlainString((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).xvgIVG,
{boostCount: a0});
}
const TOTAL = BoostInfoType.TOTAL;
if (TOTAL === a1) {
return intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */)['/F7Z2y']);
}
}
@@ -0,0 +1,18 @@
/* Metro module 8256; source: modules/premium/powerups/utils/getPowerupEntitlementPrice.tsx; dependencies: [2] */
function _fun66054(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8441:6, offset: 0x01be9dcd, 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/utils/getPowerupEntitlementPrice.tsx');
exports.default = getPowerupEntitlementPrice;
}
function getPowerupEntitlementPrice(a0) { // fn#66055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8441:197, offset: 0x01be9e24, size: 223 bytes, params: 2, frame: 7
const value = undefined;
const guild_monetization = a0 == null || a0.tenant_metadata == null ? value : a0.tenant_metadata.guild_monetization;
const guild_monetization2 = a0 == null || a0.sku == null || a0.sku.tenant_metadata == null ? value : a0.sku.tenant_metadata.guild_monetization;
let r0 = (guild_monetization == null || guild_monetization.game_server == null ? value : guild_monetization.game_server.boost_price) ?? (guild_monetization == null || guild_monetization.powerup == null ? value : guild_monetization.powerup.boost_price);
r0 = r0 ?? (guild_monetization2 == null || guild_monetization2.game_server == null ? value : guild_monetization2.game_server.boost_price);
r0 = r0 ?? (guild_monetization2 == null || guild_monetization2.powerup == null ? value : guild_monetization2.powerup.boost_price);
return r0;
}
@@ -0,0 +1,32 @@
/* Metro module 12311; source: modules/premium/powerups/utils/orderMarketablePerksForDisplay.tsx; dependencies: [57, 8260, 8188, 2] */
function _fun94003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12497:6, offset: 0x020ce5fc, size: 136 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 = (require(8260) /* metro dependency 8260: GameServerConstants */).GAME_SERVER_POWERUP_SKU_ID;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/utils/orderMarketablePerksForDisplay.tsx');
exports.default = orderMarketablePerksForDisplay;
}
function orderMarketablePerksForDisplay(a0) { // fn#94004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12497:252, offset: 0x020ce684, size: 184 bytes, params: 2, frame: 17
const items2 = [];
arraySpread(items2, a0, 0, undefined);
const value = items2.reverse();
const index = value.findIndex(function({skuId}) {
return skuId === require(dependencyMap[2]).GUILD_POWERUP_GUILD_THEME_SKU_ID;
});
if (index > 0) {
value.unshift(env0_2(value.splice(index, 1), 1)[0]);
}
const index2 = value.findIndex(function({skuId}) {
return skuId === GAME_SERVER_POWERUP_SKU_ID;
});
if (index2 !== -1) {
if (index2 !== value.length - 1) {
value.push(env0_2(value.splice(index2, 1), 1)[0]);
}
}
return value;
}
@@ -0,0 +1,393 @@
/* Metro module 14619; source: modules/premium/powerups/utils/powerupListing.tsx; dependencies: [57, 31, 8258, 8259, 8188, 566, 2] */
function _fun110524(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:6, offset: 0x0237c01b, size: 407 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const _arrayLikeToArray_110527 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const orderPowerupListings = function(a0) {
return _fun110531(_fun110529(a0));
};
const closure = buildPowerupListings;
let 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 */;
const guildPowerupsStore = importDefault(8258) /* metro dependency 8258: GuildPowerupsStore */;
const guildPowerupsConstantsModule = require(8259) /* metro dependency 8259: GuildPowerupsConstants */;
const GuildPowerupType = guildPowerupsConstantsModule.GuildPowerupType;
const env0_6 = guildPowerupsConstantsModule.PERK_SKU_BADGES;
object2 = {};
const GUILD_TAGS_BADGE_PACK_CREEPY_CRAWLIES_POWERUP_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_TAGS_BADGE_PACK_CREEPY_CRAWLIES_POWERUP_SKU_ID;
const items3 = [GUILD_TAGS_BADGE_PACK_CREEPY_CRAWLIES_POWERUP_SKU_ID];
const GUILD_TAGS_BADGE_PACK_PETS_POWERUP_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_TAGS_BADGE_PACK_PETS_POWERUP_SKU_ID;
items3[1] = GUILD_TAGS_BADGE_PACK_PETS_POWERUP_SKU_ID;
const GUILD_TAGS_BADGE_PACK_PLANT_POWERUP_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_TAGS_BADGE_PACK_PLANT_POWERUP_SKU_ID;
items3[2] = GUILD_TAGS_BADGE_PACK_PLANT_POWERUP_SKU_ID;
const GUILD_TAGS_BADGE_PACK_FLEX_POWERUP_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_TAGS_BADGE_PACK_FLEX_POWERUP_SKU_ID;
items3[3] = GUILD_TAGS_BADGE_PACK_FLEX_POWERUP_SKU_ID;
object2.guildTagsBadgePacks = items3;
Object = global.Object;
const env0_8 = Object.entries(object2).reduce(function(a0, a1) {
var r1;
var r2;
var r3;
var item3;
var value3;
var value7;
var iterator = a1[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r4 = value2 ? value : item;
reducibleJoin3: while (true) {
if (value2) {
r1 = item2;
r2 = value;
r3 = value2;
break reducibleJoin3;
}
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value;
r3 = value3;
break reducibleJoin3;
}
r1 = item3;
r2 = item;
r3 = value3;
break reducibleJoin3;
}
reducibleJoin5: while (true) {
if (r3) {
break reducibleJoin5;
}
r1.return();
break reducibleJoin5;
}
var value5 = _createForOfIteratorHelperLoose_110525(r2);
var value6 = value5();
if (!value6.done) {
r2 = value6;
reducibleLoop6: while (true) {
a0[r2.value] = r4;
value7 = value5();
if (value7.done) {
break reducibleLoop6;
}
r2 = value7;
continue reducibleLoop6;
}
}
return a0;
}, {});
const LEVEL = GuildPowerupType.LEVEL;
const items2 = [LEVEL];
const PERK = GuildPowerupType.PERK;
items2[1] = PERK;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/utils/powerupListing.tsx');
exports.POWERUP_GROUP_TO_SKU_IDS = object2;
exports.buildPowerupListings = closure;
exports.useBuildGuildPowerupsSections = useBuildGuildPowerupsSections;
}
function _createForOfIteratorHelperLoose_110525(a0, a1) { // fn#110525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:183, offset: 0x0237c1b2, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun110526;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_110527(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_110527(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_110527(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun110526;
}
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 orderPowerupListings(a0) { // fn#110528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:1470, offset: 0x0237c326, size: 33 bytes, params: 2, frame: 12
return moveBadgePacksAfterServerTags(moveServerThemeToFront(a0));
}
function buildPowerupListings(a0, a1, a2) { // fn#110535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:2161, offset: 0x0237c4f0, size: 156 bytes, params: 4, frame: 19
var r5;
var r3;
var value5;
var value6;
var PERK;
var push;
let value = a2;
const items2 = [];
let closure = _fun110536;
const env0_1 = a1.reduce(closure, {});
closure = buildPowerupListings_loop;
const value3 = _createForOfIteratorHelperLoose_110525(a1);
const value4 = value3();
let done = value4.done;
if (!done) {
r5 = value4;
reducibleLoop1: while (true) {
value5 = r5.value;
var env0_2 = value5;
closure();
value6 = value3();
done = value6.done;
if (done) {
break reducibleLoop1;
}
r5 = value6;
continue reducibleLoop1;
}
}
reducibleJoin4: while (true) {
if (value) {
PERK = GuildPowerupType.PERK;
value = a0 === PERK;
r3 = value;
break reducibleJoin4;
}
r3 = value;
break reducibleJoin4;
}
reducibleJoin6: while (true) {
if (r3) {
push = items2.push;
Reflect.apply(push, items2, [{type: 'gameServer'}]);
break reducibleJoin6;
}
break reducibleJoin6;
}
return orderPowerupListings(items2);
}
function useBuildGuildPowerupsSections(a0, a1) { // fn#110540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:3020, offset: 0x0237c781, size: 126 bytes, params: 3, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const value2 = undefined;
const stateForGuild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildPowerupsStore],
_fun110541);
return env0_3.useMemo(_fun110542, [stateForGuild == null ? value2 : stateForGuild.powerupCatalog, a1]);
}
function moveServerThemeToFront(a0) { // fn#110529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:1509, owner: orderPowerupListings.moveServerThemeToFront, offset: 0x0237c347, size: 94 bytes, params: 2, frame: 17
let value = a0.findIndex(_fun110530);
if (value <= 0) {
return a0;
}
const items2 = [];
arraySpread(items2, a0, 0, undefined);
value = items2.splice(value, 1);
items2.unshift(env1_2(value, 1)[0]);
return items2;
}
function moveBadgePacksAfterServerTags(a0) { // fn#110531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:1742, owner: orderPowerupListings.moveBadgePacksAfterServerTags, offset: 0x0237c3ea, size: 154 bytes, params: 2, frame: 17
var environment;
var items2;
var value2;
var property;
let value = a0.findIndex(_fun110532);
const index = a0.findIndex(function(a0) {
return a0.type === 'multiPerk' && a0.group === 'guildTagsBadgePacks';
});
if (value !== -1) {
if (index === -1) {
return a0;
}
if (index !== value + 1) {
items2 = [];
arraySpread(items2, a0, 0, undefined);
value = items2.splice(index, 1);
value2 = environment.__proto__;
property = env1_2(value, 1)[0];
value = items2.findIndex(_fun110534);
items2.splice(value + 1, 0, property);
return items2;
}
}
return a0;
}
function _fun110536(a0, a1) { // fn#110536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:2225, offset: 0x0237c58c, size: 81 bytes, params: 3, frame: 13
const type = a1.type;
const PERK = GuildPowerupType.PERK;
if (type === PERK) {
var property = env1_8[a1.skuId];
if (property != null) {
if (a0[property] == null) {
a0[property] = [];
}
property = a0[property];
property.push(a1);
}
}
return a0;
}
function buildPowerupListings_loop() { // fn#110537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:2333, owner: buildPowerupListings._loop, offset: 0x0237c5dd, size: 249 bytes, params: 1, frame: 17
var binding;
var property2;
const type = value.type;
const LEVEL = GuildPowerupType.LEVEL;
if (type === LEVEL) {
env0_0.push({type: 'singleLevel', powerup: value});
return 0;
}
const property = env1_8[value.skuId];
if (property != null) {
property2 = env0_1[property];
if (property2 !== undefined) {
var env0_0 = env1_7[property];
property2.sort(_fun110538);
binding = env0_0;
binding.push({type: 'multiPerk', group: property, powerups: property2});
env0_1[property] = undefined;
}
return 0;
}
env0_0.push({type: 'singlePerk', powerup: value, badge: PERK_SKU_BADGES[value.skuId]});
}
function _fun110542() { // fn#110542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:3149, offset: 0x0237c7ff, size: 34 bytes, params: 1, frame: 13
return env1_9.reduce(_fun110543, []);
}
function _fun110530(a0) { // fn#110530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:1563, offset: 0x0237c3a5, size: 69 bytes, params: 2, frame: 13
var r0;
var skuId;
let value = a0.type === 'singlePerk';
if (value) {
skuId = a0.powerup.skuId;
value = environment.__proto__.__proto__;
value = skuId === (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_GUILD_THEME_SKU_ID;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun110532(a0) { // fn#110532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:1803, offset: 0x0237c484, size: 69 bytes, params: 2, frame: 13
var r0;
var skuId;
let value = a0.type === 'singlePerk';
if (value) {
skuId = a0.powerup.skuId;
value = environment.__proto__.__proto__;
value = skuId === (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_TAG_SKU_ID;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun110538({skuId}, {skuId}) { // fn#110538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:2486, offset: 0x0237c6d6, size: 55 bytes, params: 3, frame: 12
let binding = env0_0;
const value2 = binding.indexOf(skuId);
binding = env0_0;
return value2 - binding.indexOf(skuId);
}
function _fun110543(a0, a1) { // fn#110543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14816:3163, offset: 0x0237c821, size: 87 bytes, params: 3, frame: 17
const value = environment.__proto__;
const r3 = stateForGuild == null ? undefined : stateForGuild.powerupCatalog[a1];
if (r3 != null) {
a0.push({type: a1, listings: buildPowerupListings(a1, r3, require)});
}
return a0;
}
@@ -0,0 +1,223 @@
/* Metro module 12309; source: modules/premium/powerups/utils/storeListingToGuildPowerup.tsx; dependencies: [1880, 8259, 1881, 2] */
function _fun93996(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12495:6, offset: 0x020ce063, size: 163 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_0 = premiumConstantsModule.DEFAULT_SOUND_SLOTS;
const env0_1 = premiumConstantsModule.DEFAULT_STICKER_SLOTS;
const env0_2 = (require(8259) /* metro dependency 8259: GuildPowerupsConstants */).GuildPowerupType;
const env0_3 = (require(1881) /* metro dependency 1881: EmojiConstants */).DEFAULT_EMOJI_SLOTS;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/utils/storeListingToGuildPowerup.tsx');
exports.default = storeListingToGuildPowerup;
}
function storeListingToGuildPowerup(a0, a1) { // fn#93997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12495:318, offset: 0x020ce106, size: 893 bytes, params: 3, frame: 32
var r22;
var r5;
var guild_features;
var r11;
var r12;
var r13;
var additional_emoji_slots;
var r1;
var additional_sound_slots;
var additional_sticker_slots;
var r6;
var r7;
var object5;
var value3;
var value4;
var value5;
var value6;
var guild_features2;
var value7;
var value8;
var guild_features3;
var value9;
var guild_features4;
var value10;
var value11;
var object6;
var object7;
let powerup_metadata = a1.powerup_metadata;
const value = undefined;
const category_type = powerup_metadata == null ? value : powerup_metadata.category_type;
if (category_type != null) {
var sku = a1.sku;
powerup_metadata = sku == null ? value : sku.powerup_metadata;
if (powerup_metadata == null) {
return value;
}
var object8 = {};
object8.title = a1.summary;
object8.skuId = a1.sku.id;
object8.cost = powerup_metadata.boost_price;
var dependent_sku_id = a1.sku.dependent_sku_id;
object8.dependencies = dependent_sku_id != null ? [a1.sku.dependent_sku_id] : [];
var powerup_metadata2 = a1.powerup_metadata;
var animated_image_url = powerup_metadata2 == null ? value : powerup_metadata2.animated_image_url;
animated_image_url = animated_image_url ?? powerup_metadata.animated_image_url;
object8.animatedImageUrl = animated_image_url;
var powerup_metadata3 = a1.powerup_metadata;
var static_image_url = powerup_metadata3 == null ? value : powerup_metadata3.static_image_url;
static_image_url = static_image_url ?? powerup_metadata.static_image_url;
object8.staticImageUrl = static_image_url;
powerup_metadata = a1.powerup_metadata;
object8.storeRemovalDate = powerup_metadata == null ? value : powerup_metadata.store_removal_date;
powerup_metadata = a1.powerup_metadata;
object8.deactivationCooldownPeriodDays = powerup_metadata == null ? value : powerup_metadata.deactivation_cooldown_period_days;
var LEVEL = GuildPowerupType.LEVEL;
if (LEVEL === category_type) {
sku = a1.sku;
powerup_metadata = sku.powerup_metadata;
guild_features = powerup_metadata == null ? value : powerup_metadata.guild_features;
if (guild_features == null) {
return value;
}
additional_emoji_slots = guild_features.additional_emoji_slots;
value3 = DEFAULT_EMOJI_SLOTS + additional_emoji_slots;
additional_sound_slots = guild_features.additional_sound_slots;
value4 = DEFAULT_SOUND_SLOTS + additional_sound_slots;
additional_sticker_slots = guild_features.additional_sticker_slots;
value5 = DEFAULT_STICKER_SLOTS + additional_sticker_slots;
sku = a1.sku;
dependent_sku_id = sku.dependent_sku_id;
var env0_0;
if (dependent_sku_id != null) {
r11 = value5;
r12 = value4;
r13 = value3;
while (true) {
value6 = a0.find(function(a0) {
return dependent_sku_id === a0.sku.id;
});
if (value6 != null) {
sku = value6.sku;
if (sku == null) {
additional_emoji_slots = value;
break;
}
powerup_metadata = sku.powerup_metadata;
if (powerup_metadata == null) {
additional_emoji_slots = value;
break;
}
guild_features2 = powerup_metadata.guild_features;
if (guild_features2 == null) {
additional_emoji_slots = value;
break;
}
additional_emoji_slots = guild_features2.additional_emoji_slots;
break;
}
additional_emoji_slots = value;
value7 = 0;
if (additional_emoji_slots != null) {
r1 = additional_emoji_slots;
continue;
}
r1 = value7;
continue;
value8 = r13 + r1;
if (value6 == null) {
additional_sound_slots = value;
continue;
}
sku = value6.sku;
if (sku == null) {
additional_sound_slots = value;
continue;
}
powerup_metadata = sku.powerup_metadata;
if (powerup_metadata == null) {
additional_sound_slots = value;
continue;
}
guild_features3 = powerup_metadata.guild_features;
if (guild_features3 == null) {
additional_sound_slots = value;
continue;
}
additional_sound_slots = guild_features3.additional_sound_slots;
if (additional_sound_slots != null) {
r1 = additional_sound_slots;
continue;
}
r1 = value7;
continue;
value9 = r12 + r1;
if (value6 == null) {
additional_sticker_slots = value;
continue;
}
sku = value6.sku;
if (sku == null) {
additional_sticker_slots = value;
continue;
}
powerup_metadata = sku.powerup_metadata;
if (powerup_metadata == null) {
additional_sticker_slots = value;
continue;
}
guild_features4 = powerup_metadata.guild_features;
if (guild_features4 == null) {
additional_sticker_slots = value;
continue;
}
additional_sticker_slots = guild_features4.additional_sticker_slots;
if (additional_sticker_slots != null) {
r1 = additional_sticker_slots;
continue;
}
r1 = value7;
continue;
value10 = r11 + r1;
value11 = value6 == null;
if (value11) {
dependent_sku_id = value;
continue;
}
sku = value6.sku;
dependent_sku_id = sku.dependent_sku_id;
env0_0 = dependent_sku_id;
if (dependent_sku_id != null) {
r11 = value10;
r12 = value9;
r13 = value8;
continue;
}
r5 = value10;
r6 = value9;
r7 = value8;
r22 = value11;
break;
}
} else {
r5 = value5;
r6 = value4;
r7 = value3;
}
object6 = {};
object6.type = GuildPowerupType.LEVEL;
object7 = {};
copyDataProperties(object7, guild_features, r22);
object7['total_emoji_slots'] = r7;
object7['total_sound_slots'] = r6;
object7['total_sticker_slots'] = r5;
object6.features = object7;
copyDataProperties(object6, object8, r22);
return object6;
}
var PERK = GuildPowerupType.PERK;
if (PERK === category_type) {
object5 = {};
object5.type = GuildPowerupType.PERK;
object5.description = a1.description ?? '';
copyDataProperties(object5, object8, r22);
return object5;
}
}
return value;
}
@@ -0,0 +1,73 @@
/* Metro module 14636; source: modules/premium/powerups/utils/useCalculatePowerupCardStatus.tsx; dependencies: [31, 8259, 1244, 2256, 2] */
function _fun110618(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14833:6, offset: 0x0237fc9a, 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 */).PowerupActiveStatusType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/utils/useCalculatePowerupCardStatus.tsx');
exports.useCalculatePowerupCardStatus = useCalculatePowerupCardStatus;
}
function useCalculatePowerupCardStatus(a0, a1, a2) { // fn#110619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14833:270, offset: 0x0237fd29, size: 66 bytes, params: 4, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
return env0_3.useMemo(_fun110620, [a1, a2, a0]);
}
function _fun110620() { // fn#110620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14833:334, offset: 0x0237fd6b, size: 431 bytes, params: 1, frame: 23
var r0;
var type;
var value3;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var WRRYUT;
var sourcePowerup;
const intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const sourceEntitlement = require.sourceEntitlement;
const value2 = undefined;
if ((sourceEntitlement == null ? value2 : sourceEntitlement.ends_at) != null) {
r0 = {type: 'expiring', expiringAt: require.sourceEntitlement.ends_at};
} else if (importDefault) {
if (env0_0.storeRemovalDate != null) {
r0 = {type: 'removing', removingAt: env0_0.storeRemovalDate};
} else {
type = require.type;
value3 = environment.__proto__;
if (type === PowerupActiveStatusType.LEVEL_ACTIVATED) {
formatToPlainString = intl.formatToPlainString;
WRRYUT = (importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).WRRYUT;
sourcePowerup = require.sourcePowerup;
r0 = {type: 'active', statusText: Reflect.apply(formatToPlainString, intl, [WRRYUT,
{perkName: (sourcePowerup == null ? value2 : sourcePowerup.title) ?? intl2.string(t.BfF6ED)}])};
} else if (require.type === PowerupActiveStatusType.INACTIVE) {
r0 = value2;
} else {
object2 = {type: 'active'};
object2.statusText = intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).FFLkmx);
r0 = object2;
}
}
} else {
type = require.type;
value3 = environment.__proto__;
if (type === PowerupActiveStatusType.LEVEL_ACTIVATED) {
formatToPlainString = intl.formatToPlainString;
WRRYUT = (importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).WRRYUT;
sourcePowerup = require.sourcePowerup;
r0 = {type: 'active', statusText: Reflect.apply(formatToPlainString, intl, [WRRYUT,
{perkName: (sourcePowerup == null ? value2 : sourcePowerup.title) ?? intl2.string(t.BfF6ED)}])};
} else if (require.type === PowerupActiveStatusType.INACTIVE) {
r0 = value2;
} else {
object2 = {type: 'active'};
object2.statusText = intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).FFLkmx);
r0 = object2;
}
}
return r0;
}