2026-07-25 08:10:48 +00:00
// Module ID: 4023
2026-07-27 11:26:19 +00:00
// Function ID: 33459
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-25 08:10:48 +00:00
// Dependencies: [1838, 1850, 4024, 3783, 653, 1853, 1852, 3791, 4025, 1212, 1327, 4026, 1921, 22, 3713, 4027, 2781, 3777, 1184, 4038, 4057, 2]
2026-07-20 16:05:17 +00:00
// Exports: boostedGuildTierToAnalyticsObjectType, generateBlockGuildSubscriptionPurchasesNode, getAppliedGuildBoostMonths, getAvailableSoundboardSoundCount, getAvailableStickerSlotCount, getGracePeriodEndingDate, getGuildBoostingProgressBarFillFactor, getMaxEmojiSlots, getNextGuildTierFromGuild, getNextTier, getNumberOfAppliedBoostsNeededForTier, getShortenedTierName, getTierName, getTiers, getUserLevel, isAppliedGuildBoostActive, isInGracePeriod, isTierUnlocked
2026-07-25 08:10:48 +00:00
// Module 4023 (_createForOfIteratorHelperLoose)
2026-07-23 10:11:24 +00:00
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose" ;
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import closure_6 from "_isNativeReflectConstruct" ;
import closure_7 from "_isNativeReflectConstruct" ;
import ME from "ME" ;
import set from "set" ;
import GuildFeatures from "GuildFeatures" ;
import { getPremiumGroupProductName as closure_25 } from "TOTAL_PREMIUM_GROUP_MEMBER_SEATS" ;
import importDefaultResult from "apply" ;
import set from "_isNativeReflectConstruct" ;
2026-07-20 16:05:17 +00:00
let AppliedGuildBoostsRequiredForBoostedGuildTier ;
2026-07-23 10:11:24 +00:00
let closure_11 ;
let closure_12 ;
let closure_13 ;
let closure_14 ;
let closure_15 ;
let closure_16 ;
let closure_17 ;
let closure_18 ;
let closure_19 ;
let closure_20 ;
let closure_21 ;
let closure_22 ;
let closure_23 ;
let closure_24 ;
let closure_8 ;
const require = arg1 ;
function _createForOfIteratorHelperLoose ( iterable ) {
let closure_0 = iterable ;
iterable = "undefined" !== typeof Symbol ;
if ( iterable ) {
2026-07-20 16:05:17 +00:00
const _Symbol = Symbol ;
2026-07-23 10:11:24 +00:00
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( ! iterable ) {
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( iterable ) {
const iter = iterable . call ( iterable ) ;
2026-07-20 16:05:17 +00:00
const next = iter . next ;
return next . bind ( iter ) ;
} else {
const _Array = Array ;
2026-07-23 10:11:24 +00:00
let tmp = iterable ;
if ( ! Array . isArray ( iterable ) ) {
2026-07-20 16:05:17 +00:00
let tmp2 ;
2026-07-23 10:11:24 +00:00
if ( iterable ) {
if ( "string" === typeof iterable ) {
tmp2 = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
const toString = { } . toString ;
2026-07-23 10:11:24 +00:00
const substr = toString . call ( iterable ) . slice ( 8 , - 1 ) ;
2026-07-20 16:05:17 +00:00
let name = substr ;
if ( tmp3 ) {
2026-07-23 10:11:24 +00:00
name = iterable . constructor . name ;
2026-07-20 16:05:17 +00:00
}
if ( "Map" !== name ) {
if ( "Set" !== name ) {
if ( "Arguments" === name ) {
2026-07-23 10:11:24 +00:00
let arr = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let obj = /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ ;
2026-07-20 16:05:17 +00:00
}
}
tmp2 = arr ;
}
const _Array2 = Array ;
2026-07-23 10:11:24 +00:00
arr = Array . from ( iterable ) ;
const callResult = toString . call ( iterable ) ;
tmp3 = "Object" === substr && iterable . constructor ;
2026-07-20 16:05:17 +00:00
}
}
tmp = tmp2 ;
if ( ! tmp2 ) {
const _TypeError = TypeError ;
const typeError = new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
throw typeError ;
}
}
if ( tmp ) {
2026-07-23 10:11:24 +00:00
closure_0 = tmp ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let c1 = 0 ;
2026-07-20 16:05:17 +00:00
return ( ) = > {
2026-07-23 10:11:24 +00:00
if ( closure_1 >= length . length ) {
2026-07-20 16:05:17 +00:00
let obj = { done : true } ;
} else {
obj = { done : false } ;
closure_1 = tmp3 + 1 ;
2026-07-23 10:11:24 +00:00
obj . value = length [ + closure_1 ] ;
2026-07-20 16:05:17 +00:00
}
return obj ;
} ;
}
}
function _arrayLikeToArray ( arg0 , arg1 ) {
let length ;
if ( tmp ) {
length = arg0 . length ;
}
const ArrayResult = Array ( length ) ;
for ( let num = 0 ; num < length ; num = num + 1 ) {
ArrayResult [ num ] = arg0 [ num ] ;
}
return ArrayResult ;
}
function getTotalStickerCountForTier ( TIER_1 , guild ) {
if ( null != guild ) {
const features = guild . features ;
if ( features . has ( closure_11 . MORE_STICKERS ) ) {
if ( TIER_1 === BoostedGuildTiers . TIER_3 ) {
2026-07-25 08:10:48 +00:00
let MAX_STICKER_SLOTS = require ( 4025 ) /* PremiumGuildOverrides */ . PremiumGuildOverrides . MAX_STICKER_SLOTS ;
2026-07-20 16:05:17 +00:00
}
return MAX_STICKER_SLOTS ;
}
}
2026-07-23 10:11:24 +00:00
MAX_STICKER_SLOTS = table2 [ TIER_1 ] ;
2026-07-20 16:05:17 +00:00
}
function getIncrementalStickerCountForTier ( TIER_1 ) {
2026-07-23 10:11:24 +00:00
return table [ TIER_1 ] ;
2026-07-20 16:05:17 +00:00
}
function getTotalSoundboardSoundCountForTier ( TIER_1 ) {
if ( null != arg1 ) {
const features = arg1 . features ;
if ( features . has ( closure_11 . MORE_SOUNDBOARD ) ) {
let tmp2 = closure_20 ;
}
return tmp2 ;
}
2026-07-23 10:11:24 +00:00
tmp2 = dependencyMap2 [ TIER_1 ] ;
2026-07-20 16:05:17 +00:00
}
function getIncrementalSoundboardSoundCountForTier ( TIER_1 ) {
if ( TIER_1 === BoostedGuildTiers . NONE ) {
2026-07-23 10:11:24 +00:00
return dependencyMap2 [ TIER_1 ] ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
return dependencyMap2 [ TIER_1 ] - dependencyMap2 [ items [ items . indexOf ( items , TIER_1 ) - 1 ] ] ;
2026-07-20 16:05:17 +00:00
}
}
function getGuildTierFromGuild ( id ) {
const guild = store . getGuild ( id ) ;
let premiumTier ;
if ( null != guild ) {
premiumTier = guild . premiumTier ;
}
if ( null == premiumTier ) {
premiumTier = BoostedGuildTiers . NONE ;
}
return premiumTier ;
}
function isGuildBoostedAtLeast ( premiumTier , guildPremiumTier ) {
let tmp = null == guildPremiumTier ;
if ( ! tmp ) {
tmp = null != premiumTier && premiumTier >= guildPremiumTier ;
const tmp2 = null != premiumTier && premiumTier >= guildPremiumTier ;
}
return tmp ;
}
function getAvailableGuildBoostSlots ( boostSlots ) {
2026-07-23 10:11:24 +00:00
const values = importDefault ( 22 ) . values ( boostSlots ) ;
2026-07-20 16:05:17 +00:00
return values . filter ( ( isAvailable ) = > isAvailable . isAvailable ( ) ) ;
}
function appliedGuildBoostsRequiredForPerks ( arr , guildId ) {
const guild = store . getGuild ( guildId ) ;
let hasItem ;
if ( null != guild ) {
const features = guild . features ;
hasItem = features . has ( closure_11 . PREMIUM_TIER_3_OVERRIDE ) ;
}
if ( true === hasItem ) {
return 0 ;
} else {
2026-07-23 10:11:24 +00:00
return AppliedGuildBoostsRequiredForBoostedGuildTier [ getGuildTierFromGuild ( undefined , guildId ) ] - ( arr . length - arr . filter ( ( endsAt ) = > null != endsAt . endsAt ) . length ) ;
2026-07-20 16:05:17 +00:00
}
}
function getMaxSoundboardSlots ( premiumFeatures ) {
premiumFeatures = premiumFeatures . premiumFeatures ;
let additionalSoundSlots ;
if ( null != premiumFeatures ) {
additionalSoundSlots = premiumFeatures . additionalSoundSlots ;
}
let num = 0 ;
if ( null != additionalSoundSlots ) {
num = additionalSoundSlots ;
}
const features = premiumFeatures . features ;
const sum = closure_19 + num ;
return Math . max ( features . has ( closure_11 . MORE_SOUNDBOARD ) ? closure_20 : closure_19 , sum ) ;
}
function isGuildBoostSlotCanceled ( subscription ) {
subscription = subscription . subscription ;
let status ;
if ( null != subscription ) {
status = subscription . status ;
}
return status === constants2 . CANCELED || subscription . canceled ;
}
function getTheoreticalPremiumTierForSubscriberCount ( guildPowerupBoostLevelProgress ) {
2026-07-23 10:11:24 +00:00
let closure_0 = guildPowerupBoostLevelProgress ;
let NONE = reversed . find ( ( arg0 ) = > closure_0 >= outer1_9 [ arg0 ] ) ;
2026-07-20 16:05:17 +00:00
if ( null == NONE ) {
NONE = BoostedGuildTiers . NONE ;
}
return NONE ;
}
function getNextPremiumTierForSubscriberCount ( guildPowerupBoostLevelProgress ) {
2026-07-23 10:11:24 +00:00
let closure_0 = guildPowerupBoostLevelProgress ;
let TIER_3 = items . find ( ( arg0 ) = > closure_0 < outer1_9 [ arg0 ] ) ;
2026-07-20 16:05:17 +00:00
if ( null == TIER_3 ) {
TIER_3 = BoostedGuildTiers . TIER_3 ;
}
return TIER_3 ;
}
2026-07-23 10:11:24 +00:00
( { AnalyticsObjectTypes : closure_8 , AppliedGuildBoostsRequiredForBoostedGuildTier } = ME ) ;
const BoostedGuildTiers = ME . BoostedGuildTiers ;
( { GuildFeatures : closure_11 , HelpdeskArticles : closure_12 , MAX_STAGE_VIDEO_USER_LIMIT_TIER2 : closure_13 , MAX_STAGE_VIDEO_USER_LIMIT_TIER3 : closure_14 , SubscriptionStatusTypes : closure_15 } = ME ) ;
( { DEFAULT_EMOJI_SLOTS : closure_16 , EMOJI_MAX_SLOTS_MORE : closure_17 } = set ) ;
( { BoostedGuildFeatures : closure_18 , DEFAULT_SOUND_SLOTS : closure_19 , MORE_SOUNDBOARD_SOUNDS : closure_20 , FractionalPremiumStates : closure_21 , IncrementalStickerCountsByTier : closure_22 , TotalSoundboardSoundCountsByTier : closure_23 , TotalStickerCountsByTier : closure_24 } = GuildFeatures ) ;
2026-07-20 16:05:17 +00:00
let obj = { LEVEL_1 : 1 , [ 1 ] : "LEVEL_1" , LEVEL_2 : 2 , [ 2 ] : "LEVEL_2" , LEVEL_3 : 3 , [ 3 ] : "LEVEL_3" , LEVEL_4 : 4 , [ 4 ] : "LEVEL_4" , LEVEL_5 : 5 , [ 5 ] : "LEVEL_5" , LEVEL_6 : 6 , [ 6 ] : "LEVEL_6" , LEVEL_7 : 7 , [ 7 ] : "LEVEL_7" , LEVEL_8 : 8 , [ 8 ] : "LEVEL_8" , LEVEL_9 : 9 , [ 9 ] : "LEVEL_9" } ;
let closure_26 = Object . freeze ( { [ obj . LEVEL_1 ] : 1 , [ obj . LEVEL_2 ] : 2 , [ obj . LEVEL_3 ] : 3 , [ obj . LEVEL_4 ] : 6 , [ obj . LEVEL_5 ] : 9 , [ obj . LEVEL_6 ] : 12 , [ obj . LEVEL_7 ] : 15 , [ obj . LEVEL_8 ] : 18 , [ obj . LEVEL_9 ] : 24 } ) ;
obj = { EMOJI : 1 , [ 1 ] : "EMOJI" , AUDIO : 2 , [ 2 ] : "AUDIO" , ANIMATED : 3 , [ 3 ] : "ANIMATED" , CUSTOMIZATION : 4 , [ 4 ] : "CUSTOMIZATION" , UPLOAD : 5 , [ 5 ] : "UPLOAD" , VANITY : 6 , [ 6 ] : "VANITY" , STREAM : 7 , [ 7 ] : "STREAM" , STICKER : 8 , [ 8 ] : "STICKER" , CUSTOM_ROLE_ICON : 11 , [ 11 ] : "CUSTOM_ROLE_ICON" , STAGE_VIDEO : 12 , [ 12 ] : "STAGE_VIDEO" , SOUNDBOARD : 13 , [ 13 ] : "SOUNDBOARD" } ;
2026-07-23 10:11:24 +00:00
let items = [ , , , ] ;
2026-07-20 16:05:17 +00:00
( { NONE : arr [ 0 ] , TIER_1 : arr [ 1 ] , TIER_2 : arr [ 2 ] , TIER_3 : arr [ 3 ] } = BoostedGuildTiers ) ;
2026-07-23 10:11:24 +00:00
let substr = items . slice ( ) ;
2026-07-20 16:05:17 +00:00
const reversed = substr . reverse ( ) ;
obj = { tier : BoostedGuildTiers.TIER_3 , amount : AppliedGuildBoostsRequiredForBoostedGuildTier [ BoostedGuildTiers . TIER_3 ] , nextTier : null } ;
2026-07-23 10:11:24 +00:00
let items1 = [ obj , { tier : BoostedGuildTiers.TIER_2 , amount : AppliedGuildBoostsRequiredForBoostedGuildTier [ BoostedGuildTiers . TIER_2 ] , nextTier : BoostedGuildTiers.TIER_3 } , { tier : BoostedGuildTiers.TIER_1 , amount : AppliedGuildBoostsRequiredForBoostedGuildTier [ BoostedGuildTiers . TIER_1 ] , nextTier : BoostedGuildTiers.TIER_2 } ] ;
let obj1 = { [ BoostedGuildTiers . NONE ] : 0 , [ BoostedGuildTiers . TIER_1 ] : 0.3333333333333333 , [ BoostedGuildTiers . TIER_2 ] : 0.6666666666666666 , [ BoostedGuildTiers . TIER_3 ] : 1 } ;
const result = set . fileFinishedImporting ( "utils/GuildBoostingUtils.tsx" ) ;
2026-07-20 16:05:17 +00:00
export const PerkIcons = obj ;
export const OrderedTiers = items ;
export const ReverseOrderedTiers = reversed ;
export const getNextTier = function getNextTier ( GIFTING , arg1 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = GIFTING ;
2026-07-20 16:05:17 +00:00
if ( GIFTING === BoostedGuildTiers . NONE ) {
let nextTier = BoostedGuildTiers . TIER_1 ;
} else {
2026-07-23 10:11:24 +00:00
const found = items1 . find ( ( tier ) = > tier . tier === closure_0 ) ;
2026-07-20 16:05:17 +00:00
if ( null != found ) {
nextTier = found . nextTier ;
}
}
return nextTier ;
} ;
export { getTotalStickerCountForTier } ;
export { getIncrementalStickerCountForTier } ;
export { getTotalSoundboardSoundCountForTier } ;
export { getIncrementalSoundboardSoundCountForTier } ;
export const getTiers = ( arg0 ) = > {
let obj = { tier : BoostedGuildTiers.TIER_1 } ;
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
obj . title = intl . string ( require ( 1212 ) /* getSystemLocale */ . t [ "lK+WOT" ] ) ;
2026-07-20 16:05:17 +00:00
obj = { } ;
2026-07-23 10:11:24 +00:00
const intl2 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj = { adding : dependencyMap [ BoostedGuildTiers . TIER_1 ] . limits . emoji - dependencyMap [ BoostedGuildTiers . NONE ] . limits . emoji , total : dependencyMap [ BoostedGuildTiers . TIER_1 ] . limits . emoji } ;
obj . title = intl2 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . dnLAwl , obj ) ;
const intl3 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj . description = intl3 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "/Guvxs" ] ) ;
2026-07-20 16:05:17 +00:00
obj . icon = obj . EMOJI ;
const items = [ obj , , , , , , ] ;
const obj1 = { } ;
2026-07-23 10:11:24 +00:00
const intl4 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj2 = { adding : getIncrementalStickerCountForTier ( BoostedGuildTiers . TIER_1 ) , total : getTotalStickerCountForTier ( BoostedGuildTiers . TIER_1 ) } ;
2026-07-23 10:11:24 +00:00
obj1 . title = intl4 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t [ "/9p2/g" ] , obj2 ) ;
const intl5 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj1 . description = intl5 . string ( require ( 1212 ) /* getSystemLocale */ . t . JfsnDQ ) ;
2026-07-20 16:05:17 +00:00
obj1 . icon = obj . STICKER ;
items [ 1 ] = obj1 ;
const obj3 = { } ;
2026-07-23 10:11:24 +00:00
const intl6 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj4 = { soundCount : getIncrementalSoundboardSoundCountForTier ( BoostedGuildTiers . TIER_1 ) , totalSoundCount : getTotalSoundboardSoundCountForTier ( BoostedGuildTiers . TIER_1 ) } ;
2026-07-23 10:11:24 +00:00
obj3 . title = intl6 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . NRuk5m , obj4 ) ;
const intl7 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj3 . description = intl7 . string ( require ( 1212 ) /* getSystemLocale */ . t . Oq7OVl ) ;
2026-07-20 16:05:17 +00:00
obj3 . icon = obj . SOUNDBOARD ;
items [ 2 ] = obj3 ;
const obj5 = { } ;
2026-07-23 10:11:24 +00:00
const intl8 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj5 . title = intl8 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . zoT1ZE , { bitrate : dependencyMap [ BoostedGuildTiers . TIER_1 ] . limits . bitrate / 1000 } ) ;
const intl9 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj5 . description = intl9 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "8a03jk" ] ) ;
2026-07-20 16:05:17 +00:00
obj5 . icon = obj . AUDIO ;
items [ 3 ] = obj5 ;
const obj7 = { } ;
2026-07-23 10:11:24 +00:00
const intl10 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj7 . title = intl10 . string ( require ( 1212 ) /* getSystemLocale */ . t . h0s84V ) ;
const intl11 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj7 . description = intl11 . format ( require ( 1212 ) /* getSystemLocale */ . t [ "t+0cbk" ] , { } ) ;
2026-07-20 16:05:17 +00:00
obj7 . icon = obj . ANIMATED ;
items [ 4 ] = obj7 ;
const obj8 = { } ;
2026-07-23 10:11:24 +00:00
const intl12 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj8 . title = intl12 . string ( require ( 1212 ) /* getSystemLocale */ . t . vjPGPp ) ;
const intl13 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj8 . description = intl13 . string ( require ( 1212 ) /* getSystemLocale */ . t . tG4MMU ) ;
2026-07-20 16:05:17 +00:00
obj8 . icon = obj . CUSTOMIZATION ;
items [ 5 ] = obj8 ;
const obj9 = { } ;
2026-07-23 10:11:24 +00:00
const intl14 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj9 . title = intl14 . string ( require ( 1212 ) /* getSystemLocale */ . t . cObMZD ) ;
const intl15 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj9 . description = intl15 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "puH/9R" ] ) ;
2026-07-20 16:05:17 +00:00
obj9 . icon = obj . STREAM ;
items [ 6 ] = obj9 ;
2026-07-23 10:11:24 +00:00
obj . perks = items . filter ( require ( 1327 ) /* isDiscordFrontendDevelopment */ . isNotNullish ) ;
2026-07-20 16:05:17 +00:00
const items1 = [ obj , , ] ;
const obj10 = { tier : BoostedGuildTiers.TIER_2 } ;
2026-07-23 10:11:24 +00:00
const intl16 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj10 . title = intl16 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "34GpBc" ] ) ;
2026-07-20 16:05:17 +00:00
const obj11 = { } ;
2026-07-23 10:11:24 +00:00
const intl17 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj11 . title = intl17 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . dnLAwl , { adding : dependencyMap [ BoostedGuildTiers . TIER_2 ] . limits . emoji - dependencyMap [ BoostedGuildTiers . TIER_1 ] . limits . emoji , total : dependencyMap [ BoostedGuildTiers . TIER_2 ] . limits . emoji } ) ;
const intl18 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj11 . description = intl18 . string ( require ( 1212 ) /* getSystemLocale */ . t . fRiNhw ) ;
2026-07-20 16:05:17 +00:00
obj11 . icon = obj . EMOJI ;
const items2 = [ obj11 , , , , , , , , ] ;
const obj13 = { } ;
2026-07-23 10:11:24 +00:00
const intl19 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj14 = { adding : getIncrementalStickerCountForTier ( BoostedGuildTiers . TIER_2 ) , total : getTotalStickerCountForTier ( BoostedGuildTiers . TIER_2 ) } ;
2026-07-23 10:11:24 +00:00
obj13 . title = intl19 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t [ "/9p2/g" ] , obj14 ) ;
const intl20 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj13 . description = intl20 . string ( require ( 1212 ) /* getSystemLocale */ . t . t4TM28 ) ;
2026-07-20 16:05:17 +00:00
obj13 . icon = obj . STICKER ;
items2 [ 1 ] = obj13 ;
const obj15 = { } ;
2026-07-23 10:11:24 +00:00
const intl21 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj16 = { soundCount : getIncrementalSoundboardSoundCountForTier ( BoostedGuildTiers . TIER_2 ) , totalSoundCount : getTotalSoundboardSoundCountForTier ( BoostedGuildTiers . TIER_2 ) } ;
2026-07-23 10:11:24 +00:00
obj15 . title = intl21 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . NRuk5m , obj16 ) ;
const intl22 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj15 . description = intl22 . string ( require ( 1212 ) /* getSystemLocale */ . t . pEYlPZ ) ;
2026-07-20 16:05:17 +00:00
obj15 . icon = obj . SOUNDBOARD ;
items2 [ 2 ] = obj15 ;
const obj17 = { } ;
2026-07-23 10:11:24 +00:00
const intl23 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj17 . title = intl23 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . zoT1ZE , { bitrate : dependencyMap [ BoostedGuildTiers . TIER_2 ] . limits . bitrate / 1000 } ) ;
const intl24 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj17 . description = intl24 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "nzRo/I" ] ) ;
2026-07-20 16:05:17 +00:00
obj17 . icon = obj . AUDIO ;
items2 [ 3 ] = obj17 ;
const obj19 = { } ;
2026-07-23 10:11:24 +00:00
const intl25 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj19 . title = intl25 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "+KhQKM" ] ) ;
const intl26 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj19 . description = intl26 . string ( require ( 1212 ) /* getSystemLocale */ . t . ZWf10P ) ;
2026-07-20 16:05:17 +00:00
obj19 . icon = obj . CUSTOMIZATION ;
items2 [ 4 ] = obj19 ;
const obj20 = { } ;
2026-07-23 10:11:24 +00:00
const intl27 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj21 = { } ;
2026-07-25 08:10:48 +00:00
let obj24 = require ( 4026 ) /* formatSize */ ;
2026-07-23 10:11:24 +00:00
obj21 . fileSize = obj24 . formatSize ( dependencyMap [ BoostedGuildTiers . TIER_2 ] . limits . fileSize / 1024 , { useKibibytes : true } ) ;
obj20 . title = intl27 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . t95LnM , obj21 ) ;
const intl28 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj20 . description = intl28 . format ( require ( 1212 ) /* getSystemLocale */ . t . yvht65 , { } ) ;
2026-07-20 16:05:17 +00:00
obj20 . icon = obj . UPLOAD ;
items2 [ 5 ] = obj20 ;
const obj22 = { } ;
2026-07-23 10:11:24 +00:00
const intl29 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj22 . title = intl29 . string ( require ( 1212 ) /* getSystemLocale */ . t . bmaoNI ) ;
const intl30 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj22 . description = intl30 . string ( require ( 1212 ) /* getSystemLocale */ . t . WZW2Bj ) ;
2026-07-20 16:05:17 +00:00
obj22 . icon = obj . STREAM ;
items2 [ 6 ] = obj22 ;
const obj23 = { } ;
2026-07-23 10:11:24 +00:00
const intl31 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj23 . title = intl31 . string ( require ( 1212 ) /* getSystemLocale */ . t . BHtqcV ) ;
const intl32 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj23 . description = intl32 . string ( require ( 1212 ) /* getSystemLocale */ . t . ukVcEe ) ;
2026-07-20 16:05:17 +00:00
obj23 . icon = obj . CUSTOM_ROLE_ICON ;
items2 [ 7 ] = obj23 ;
let tmp = null ;
if ( arg0 ) {
obj24 = { } ;
2026-07-23 10:11:24 +00:00
const intl33 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj25 = { limit : closure_13 } ;
2026-07-23 10:11:24 +00:00
obj24 . title = intl33 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . T8P3TH , obj25 ) ;
const intl34 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj26 = { limit : closure_13 } ;
2026-07-23 10:11:24 +00:00
obj24 . description = intl34 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . T8P3TH , obj26 ) ;
2026-07-20 16:05:17 +00:00
obj24 . icon = obj . STAGE_VIDEO ;
tmp = obj24 ;
}
items2 [ 8 ] = tmp ;
2026-07-23 10:11:24 +00:00
obj10 . perks = items2 . filter ( require ( 1327 ) /* isDiscordFrontendDevelopment */ . isNotNullish ) ;
2026-07-20 16:05:17 +00:00
items1 [ 1 ] = obj10 ;
const obj27 = { tier : BoostedGuildTiers.TIER_3 } ;
2026-07-23 10:11:24 +00:00
const intl35 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj27 . title = intl35 . string ( require ( 1212 ) /* getSystemLocale */ . t . P7LdcQ ) ;
2026-07-20 16:05:17 +00:00
const obj28 = { } ;
2026-07-23 10:11:24 +00:00
const intl36 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj28 . title = intl36 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . dnLAwl , { adding : dependencyMap [ BoostedGuildTiers . TIER_3 ] . limits . emoji - dependencyMap [ BoostedGuildTiers . TIER_2 ] . limits . emoji , total : dependencyMap [ BoostedGuildTiers . TIER_3 ] . limits . emoji } ) ;
const intl37 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj28 . description = intl37 . string ( require ( 1212 ) /* getSystemLocale */ . t . AfJxnV ) ;
2026-07-20 16:05:17 +00:00
obj28 . icon = obj . EMOJI ;
const items3 = [ obj28 , , , , , , , ] ;
const obj30 = { } ;
2026-07-23 10:11:24 +00:00
const intl38 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj31 = { adding : getIncrementalStickerCountForTier ( BoostedGuildTiers . TIER_3 ) , total : getTotalStickerCountForTier ( BoostedGuildTiers . TIER_3 ) } ;
2026-07-23 10:11:24 +00:00
obj30 . title = intl38 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t [ "/9p2/g" ] , obj31 ) ;
const intl39 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj30 . description = intl39 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "+ZI4QZ" ] ) ;
2026-07-20 16:05:17 +00:00
obj30 . icon = obj . STICKER ;
items3 [ 1 ] = obj30 ;
const obj32 = { } ;
2026-07-23 10:11:24 +00:00
const intl40 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj33 = { soundCount : getIncrementalSoundboardSoundCountForTier ( BoostedGuildTiers . TIER_3 ) , totalSoundCount : getTotalSoundboardSoundCountForTier ( BoostedGuildTiers . TIER_3 ) } ;
2026-07-23 10:11:24 +00:00
obj32 . title = intl40 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . NRuk5m , obj33 ) ;
const intl41 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj32 . description = intl41 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "8omJSY" ] ) ;
2026-07-20 16:05:17 +00:00
obj32 . icon = obj . SOUNDBOARD ;
items3 [ 2 ] = obj32 ;
const obj34 = { } ;
2026-07-23 10:11:24 +00:00
const intl42 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj34 . title = intl42 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . zoT1ZE , { bitrate : dependencyMap [ BoostedGuildTiers . TIER_3 ] . limits . bitrate / 1000 } ) ;
const intl43 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj34 . description = intl43 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "cOkbp/" ] ) ;
2026-07-20 16:05:17 +00:00
obj34 . icon = obj . AUDIO ;
items3 [ 3 ] = obj34 ;
const obj36 = { } ;
2026-07-23 10:11:24 +00:00
const intl44 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj36 . title = intl44 . string ( require ( 1212 ) /* getSystemLocale */ . t . C2w2cM ) ;
const intl45 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj37 = { } ;
2026-07-25 08:10:48 +00:00
let obj41 = importDefault ( 1921 ) ;
2026-07-20 16:05:17 +00:00
obj37 . helpdeskArticle = obj41 . getArticleURL ( constants . GUILD_VANITY_URL ) ;
2026-07-23 10:11:24 +00:00
obj36 . description = intl45 . format ( require ( 1212 ) /* getSystemLocale */ . t [ "3Reosx" ] , obj37 ) ;
2026-07-20 16:05:17 +00:00
obj36 . icon = obj . VANITY ;
items3 [ 4 ] = obj36 ;
const obj38 = { } ;
2026-07-23 10:11:24 +00:00
const intl46 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-25 08:10:48 +00:00
const obj39 = { fileSize : require ( 4026 ) /* formatSize */ . formatSize ( dependencyMap [ BoostedGuildTiers . TIER_3 ] . limits . fileSize / 1024 , { useKibibytes : true } ) } ;
2026-07-23 10:11:24 +00:00
obj38 . title = intl46 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . t95LnM , obj39 ) ;
const intl47 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj38 . description = intl47 . format ( require ( 1212 ) /* getSystemLocale */ . t . IwDqSL , { } ) ;
2026-07-20 16:05:17 +00:00
obj38 . icon = obj . UPLOAD ;
items3 [ 5 ] = obj38 ;
const obj40 = { } ;
2026-07-23 10:11:24 +00:00
const intl48 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj40 . title = intl48 . string ( require ( 1212 ) /* getSystemLocale */ . t . z0GtBG ) ;
const intl49 = require ( 1212 ) /* getSystemLocale */ . intl ;
obj40 . description = intl49 . string ( require ( 1212 ) /* getSystemLocale */ . t . v92GNV ) ;
2026-07-20 16:05:17 +00:00
obj40 . icon = obj . ANIMATED ;
items3 [ 6 ] = obj40 ;
let tmp6 = null ;
if ( arg0 ) {
obj41 = { } ;
2026-07-23 10:11:24 +00:00
const intl50 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj42 = { limit : closure_14 } ;
2026-07-23 10:11:24 +00:00
obj41 . title = intl50 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . T8P3TH , obj42 ) ;
const intl51 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj43 = { limit : closure_14 } ;
2026-07-23 10:11:24 +00:00
obj41 . description = intl51 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . T8P3TH , obj43 ) ;
2026-07-20 16:05:17 +00:00
obj41 . icon = obj . STAGE_VIDEO ;
tmp6 = obj41 ;
}
items3 [ 7 ] = tmp6 ;
2026-07-23 10:11:24 +00:00
obj27 . perks = items3 . filter ( require ( 1327 ) /* isDiscordFrontendDevelopment */ . isNotNullish ) ;
2026-07-20 16:05:17 +00:00
items1 [ 2 ] = obj27 ;
return items1 ;
} ;
export const getTierName = function getTierName ( tier , arg1 ) {
let obj = arg1 ;
if ( arg1 === undefined ) {
obj = { } ;
}
const useLevels = obj . useLevels ;
if ( BoostedGuildTiers . NONE === tier ) {
2026-07-23 10:11:24 +00:00
const intl4 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const string = intl4 . string ;
2026-07-23 10:11:24 +00:00
const t = require ( 1212 ) /* getSystemLocale */ . t ;
2026-07-20 16:05:17 +00:00
if ( tmp ) {
let stringResult = string ( t . LcKgJd ) ;
} else {
stringResult = string ( t . mx8j2m ) ;
}
return stringResult ;
} else if ( BoostedGuildTiers . TIER_1 === tier ) {
2026-07-23 10:11:24 +00:00
const intl3 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl3 . string ( require ( 1212 ) /* getSystemLocale */ . t . nzXtaS ) ;
2026-07-20 16:05:17 +00:00
} else if ( BoostedGuildTiers . TIER_2 === tier ) {
2026-07-23 10:11:24 +00:00
const intl2 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl2 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "h33/uW" ] ) ;
2026-07-20 16:05:17 +00:00
} else if ( BoostedGuildTiers . TIER_3 === tier ) {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t . BfF6ED ) ;
2026-07-20 16:05:17 +00:00
} else {
const _Error = Error ;
const error = new Error ( "Not a valid tier type" ) ;
throw error ;
}
2026-07-23 10:11:24 +00:00
tmp = undefined === useLevels || useLevels ;
2026-07-20 16:05:17 +00:00
} ;
export const getShortenedTierName = function getShortenedTierName ( arg0 ) {
if ( BoostedGuildTiers . NONE === arg0 ) {
2026-07-23 10:11:24 +00:00
const intl4 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl4 . string ( require ( 1212 ) /* getSystemLocale */ . t . LcKgJd ) ;
2026-07-20 16:05:17 +00:00
} else if ( BoostedGuildTiers . TIER_1 === arg0 ) {
2026-07-23 10:11:24 +00:00
const intl3 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl3 . string ( require ( 1212 ) /* getSystemLocale */ . t . xRjU1V ) ;
2026-07-20 16:05:17 +00:00
} else if ( BoostedGuildTiers . TIER_2 === arg0 ) {
2026-07-23 10:11:24 +00:00
const intl2 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl2 . string ( require ( 1212 ) /* getSystemLocale */ . t . C7e2Bo ) ;
2026-07-20 16:05:17 +00:00
} else if ( BoostedGuildTiers . TIER_3 === arg0 ) {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t . avGxmk ) ;
2026-07-20 16:05:17 +00:00
} else {
const _Error = Error ;
const error = new Error ( "Not a valid tier type" ) ;
throw error ;
}
} ;
2026-07-23 10:11:24 +00:00
export const minimumRequiredTierForGuildFeature = require ( "apply" ) . memoize ( ( arg0 ) = > {
const features = dependencyMap [ BoostedGuildTiers . TIER_1 ] . features ;
if ( features . includes ( arg0 ) ) {
let TIER_1 = BoostedGuildTiers . TIER_1 ;
} else {
const features2 = dependencyMap [ BoostedGuildTiers . TIER_2 ] . features ;
if ( features2 . includes ( arg0 ) ) {
TIER_1 = BoostedGuildTiers . TIER_2 ;
} else {
const features3 = dependencyMap [ BoostedGuildTiers . TIER_3 ] . features ;
TIER_1 = null ;
if ( features3 . includes ( arg0 ) ) {
TIER_1 = BoostedGuildTiers . TIER_3 ;
}
}
}
return TIER_1 ;
} ) ;
2026-07-20 16:05:17 +00:00
export const boostedGuildTierToAnalyticsObjectType = function boostedGuildTierToAnalyticsObjectType ( arg0 ) {
if ( BoostedGuildTiers . NONE === arg0 ) {
return closure_8 . NONE ;
} else if ( BoostedGuildTiers . TIER_1 === arg0 ) {
return closure_8 . TIER_1 ;
} else if ( BoostedGuildTiers . TIER_2 === arg0 ) {
return closure_8 . TIER_2 ;
} else if ( BoostedGuildTiers . TIER_3 === arg0 ) {
return closure_8 . TIER_3 ;
} else {
return null ;
}
} ;
export { getGuildTierFromGuild } ;
export const getNextGuildTierFromGuild = function getNextGuildTierFromGuild ( id ) {
const tmp2 = _createForOfIteratorHelperLoose ( items1 ) ;
const iter = tmp2 ( ) ;
let iter2 = iter ;
if ( ! iter . done ) {
const value = iter2 . value ;
while ( tmp !== value . tier ) {
let iter3 = tmp2 ( ) ;
iter2 = iter3 ;
}
return value . nextTier ;
}
return BoostedGuildTiers . TIER_1 ;
} ;
export const getAppliedGuildBoostMonths = function getAppliedGuildBoostMonths ( arg0 ) {
2026-07-25 08:10:48 +00:00
const diffResult = importDefault ( 3713 ) ( ) . diff ( importDefault ( 3713 ) ( arg0 ) , "months" ) ;
2026-07-20 16:05:17 +00:00
let num = 1 ;
if ( null != diffResult ) {
num = diffResult ;
}
return num ;
} ;
export const getUserLevel = function getUserLevel ( arg0 ) {
2026-07-25 08:10:48 +00:00
const obj = importDefault ( 3713 ) ( ) ;
2026-07-23 10:11:24 +00:00
const keys = Object . keys ( table3 ) ;
2026-07-20 16:05:17 +00:00
let num = 0 ;
let num2 = 1 ;
let num3 = 1 ;
if ( 0 < keys . length ) {
do {
let tmp2 = keys [ num ] ;
2026-07-23 10:11:24 +00:00
let tmp3 = table3 ;
if ( diffResult >= table3 [ tmp2 ] ) {
2026-07-20 16:05:17 +00:00
num2 = + tmp2 ;
}
num = num + 1 ;
num3 = num2 ;
} while ( num < keys . length ) ;
}
return num3 ;
} ;
export { isGuildBoostedAtLeast } ;
export const isTierUnlocked = function isTierUnlocked ( premiumTier , guildPremiumTier ) {
return isGuildBoostedAtLeast ( premiumTier . premiumTier , guildPremiumTier ) ;
} ;
export { getAvailableGuildBoostSlots } ;
export const generateBlockGuildSubscriptionPurchasesNode = function generateBlockGuildSubscriptionPurchasesNode ( fractionalState ) {
2026-07-23 10:11:24 +00:00
premiumTypeSubscription = premiumTypeSubscription . getPremiumTypeSubscription ( ) ;
currentUser = currentUser . getCurrentUser ( ) ;
2026-07-20 16:05:17 +00:00
let isFetching = closure_6 . hasFetched ;
if ( ! isFetching ) {
isFetching = closure_6 . isFetching ;
}
if ( ! isFetching ) {
2026-07-25 08:10:48 +00:00
const guildBoostSlots = require ( 4027 ) /* _fetchAppliedGuildBoostsForGuild */ . fetchGuildBoostSlots ( ) ;
const obj2 = require ( 4027 ) /* _fetchAppliedGuildBoostsForGuild */ ;
2026-07-20 16:05:17 +00:00
}
let prop ;
getAvailableGuildBoostSlots ( closure_6 . boostSlots ) ;
if ( null != premiumTypeSubscription ) {
prop = premiumTypeSubscription . isPausedOrPausePending ;
}
if ( prop ) {
if ( fractionalState . fractionalState === constants3 . NONE ) {
if ( ! tmp8 ) {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t . mOWsF1 ) ;
2026-07-20 16:05:17 +00:00
}
}
}
if ( null != currentUser ) {
if ( currentUser . isPremiumGroupMember ( ) ) {
2026-07-23 10:11:24 +00:00
const intl7 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj = { premiumGroupProductName : callback ( ) } ;
2026-07-25 08:10:48 +00:00
return intl7 . formatToPlainString ( importDefault ( 2781 ) [ "5xN/C1" ] , obj ) ;
2026-07-20 16:05:17 +00:00
}
}
const values = Object . values ( closure_6 . boostSlots ) ;
const reduced = values . reduce ( ( numCanceledGuildBoostSlots , isAvailable ) = > {
2026-07-23 10:11:24 +00:00
if ( outer1_43 ( isAvailable ) ) {
2026-07-20 16:05:17 +00:00
numCanceledGuildBoostSlots . numCanceledGuildBoostSlots = numCanceledGuildBoostSlots . numCanceledGuildBoostSlots + 1 ;
}
if ( isAvailable . isAvailable ( ) ) {
numCanceledGuildBoostSlots . numAvailableGuildBoostSlots = numCanceledGuildBoostSlots . numAvailableGuildBoostSlots + 1 ;
}
return numCanceledGuildBoostSlots ;
2026-07-23 10:11:24 +00:00
} , { numAvailableGuildBoostSlots : 0 , numCanceledGuildBoostSlots : 0 } ) ;
2026-07-20 16:05:17 +00:00
if ( null != premiumTypeSubscription ) {
if ( reduced . numAvailableGuildBoostSlots <= 0 ) {
if ( premiumTypeSubscription . status === constants2 . PAST_DUE ) {
2026-07-23 10:11:24 +00:00
const intl6 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl6 . string ( require ( 1212 ) /* getSystemLocale */ . t . De4Vm6 ) ;
2026-07-20 16:05:17 +00:00
} else if ( premiumTypeSubscription . status === constants2 . ACCOUNT_HOLD ) {
2026-07-23 10:11:24 +00:00
const intl5 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl5 . string ( require ( 1212 ) /* getSystemLocale */ . t . JakNQ8 ) ;
2026-07-20 16:05:17 +00:00
} else if ( tmp13 > 0 ) {
2026-07-23 10:11:24 +00:00
const intl4 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl4 . string ( require ( 1212 ) /* getSystemLocale */ . t . x25mZR ) ;
2026-07-20 16:05:17 +00:00
} else if ( null == premiumTypeSubscription . renewalMutations ) {
return null ;
} else {
2026-07-25 08:10:48 +00:00
const numPremiumGuildSubscriptions = importAll ( 3777 ) . getNumPremiumGuildSubscriptions ( premiumTypeSubscription . renewalMutations . additionalPlans ) ;
const obj4 = importAll ( 3777 ) ;
2026-07-20 16:05:17 +00:00
if ( obj5 . getNumPremiumGuildSubscriptions ( premiumTypeSubscription . additionalPlans ) > numPremiumGuildSubscriptions ) {
2026-07-23 10:11:24 +00:00
const intl3 = require ( 1212 ) /* getSystemLocale */ . intl ;
let stringResult = intl3 . string ( require ( 1212 ) /* getSystemLocale */ . t . x25mZR ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
const intl2 = require ( 1212 ) /* getSystemLocale */ . intl ;
stringResult = intl2 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "W/bb8f" ] ) ;
2026-07-20 16:05:17 +00:00
}
return stringResult ;
}
}
}
return null ;
} ;
export const isAppliedGuildBoostActive = function isAppliedGuildBoostActive ( ended ) {
let tmp = ! ended . ended ;
if ( tmp ) {
let tmp3 = null == ended . endsAt ;
if ( ! tmp3 ) {
const endsAt = ended . endsAt ;
const _Date = Date ;
const time = endsAt . getTime ( ) ;
tmp3 = time > Date . now ( ) ;
}
tmp = tmp3 ;
}
return tmp ;
} ;
export const isInGracePeriod = function isInGracePeriod ( arr , guildId ) {
return appliedGuildBoostsRequiredForPerks ( arr , guildId ) > 0 ;
} ;
export { appliedGuildBoostsRequiredForPerks } ;
export const GuildTierSubscriptionsOrdered = items1 ;
2026-07-23 10:11:24 +00:00
export const getGracePeriodEndingDate = function getGracePeriodEndingDate ( arr , id ) {
const tmp = appliedGuildBoostsRequiredForPerks ( arr , id ) ;
2026-07-20 16:05:17 +00:00
if ( tmp > 0 ) {
2026-07-23 10:11:24 +00:00
const found = ( function sortAppliedGuildBoostsByEndsAt ( arr ) {
2026-07-20 16:05:17 +00:00
return arr . sort ( ( endsAt , endsAt2 ) = > {
let num = - 1 ;
if ( null != endsAt . endsAt ) {
num = - 1 ;
if ( null != endsAt2 . endsAt ) {
endsAt = endsAt . endsAt ;
endsAt2 = endsAt2 . endsAt ;
const time = endsAt . getTime ( ) ;
num = time - endsAt2 . getTime ( ) ;
}
}
return num ;
} ) ;
2026-07-23 10:11:24 +00:00
} ) ( arr ) . filter ( ( endsAt ) = > null != endsAt . endsAt ) ;
2026-07-20 16:05:17 +00:00
const diff = found . length - tmp ;
if ( diff < 0 ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 1184 ) ;
obj = { category : "premium" , message : "Negative index while checking grace period ending date." } ;
obj = { subscriptionLength : arr.length , subscriptionsNeededForPremiumTier : AppliedGuildBoostsRequiredForBoostedGuildTier [ getGuildTierFromGuild ( undefined , id ) ] , endingSubscriptionLength : found.length } ;
2026-07-20 16:05:17 +00:00
obj . data = obj ;
obj . addBreadcrumb ( obj ) ;
}
const _Math = Math ;
2026-07-23 10:11:24 +00:00
const tmp10 = found [ Math . max ( Math , diff , 0 ) ] ;
2026-07-20 16:05:17 +00:00
let endsAt ;
2026-07-23 10:11:24 +00:00
if ( null != tmp10 ) {
2026-07-20 16:05:17 +00:00
endsAt = tmp10 . endsAt ;
}
return endsAt ;
} else {
return null ;
}
} ;
export const getAvailableStickerSlotCount = function getAvailableStickerSlotCount ( stickers , tier ) {
const index = items . indexOf ( tier ) ;
if ( - 1 === index ) {
return 0 ;
} else {
let num3 = 0 ;
if ( null != items [ index - 1 ] ) {
num3 = getTotalStickerCountForTier ( tmp4 ) ;
}
const _Math = Math ;
return Math . max ( 0 , tmp - stickers . slice ( num3 , getTotalStickerCountForTier ( tier ) ) . length ) ;
}
2026-07-23 10:11:24 +00:00
tmp = getIncrementalStickerCountForTier ( tier ) ;
2026-07-20 16:05:17 +00:00
} ;
export const getAvailableSoundboardSoundCount = function getAvailableSoundboardSoundCount ( premiumFeatures ) {
if ( - 1 === items . indexOf ( arg2 ) ) {
return 0 ;
} else {
const _Math = Math ;
return Math . max ( 0 , getMaxSoundboardSlots ( premiumFeatures ) - arg1 . length ) ;
}
} ;
export { getMaxSoundboardSlots } ;
export const getMaxEmojiSlots = function getMaxEmojiSlots ( stateFromStores ) {
const premiumFeatures = stateFromStores . premiumFeatures ;
let additionalEmojiSlots ;
if ( null != premiumFeatures ) {
additionalEmojiSlots = premiumFeatures . additionalEmojiSlots ;
}
let num = 0 ;
if ( null != additionalEmojiSlots ) {
num = additionalEmojiSlots ;
}
const features = stateFromStores . features ;
const sum = closure_16 + num ;
return Math . max ( features . has ( closure_11 . MORE_EMOJI ) ? closure_17 : closure_16 , sum ) ;
} ;
export const getNumberOfAppliedBoostsNeededForTier = function getNumberOfAppliedBoostsNeededForTier ( id ) {
2026-07-25 08:10:48 +00:00
return Math . max ( 0 , AppliedGuildBoostsRequiredForBoostedGuildTier [ arg1 ] - require ( 4038 ) /* useGuildAppliedBoostCount */ . getGuildPowerupsBoostCount ( id . id ) . available ) ;
2026-07-20 16:05:17 +00:00
} ;
export { isGuildBoostSlotCanceled } ;
export { getTheoreticalPremiumTierForSubscriberCount } ;
export { getNextPremiumTierForSubscriberCount } ;
export const TierMarkerPositions = obj1 ;
export const getGuildBoostingProgressBarFillFactor = function getGuildBoostingProgressBarFillFactor ( guild ) {
2026-07-25 08:10:48 +00:00
let obj = require ( 4057 ) /* useGuildPowerupBoostLevelProgress */ ;
2026-07-20 16:05:17 +00:00
const guildPowerupBoostLevelProgress = obj . getGuildPowerupBoostLevelProgress ( guild . id ) ;
const tmp2 = getTheoreticalPremiumTierForSubscriberCount ( guildPowerupBoostLevelProgress ) ;
getNextPremiumTierForSubscriberCount ( guildPowerupBoostLevelProgress ) ;
obj = { } ;
let num = 1 ;
if ( tmp2 !== BoostedGuildTiers . TIER_3 ) {
num = ( guildPowerupBoostLevelProgress - tmp4 ) / ( tmp5 - tmp4 ) * ( tmp7 - tmp6 ) + tmp6 ;
}
obj . fillFactor = num ;
obj . totalAvailableBoostsCount = guildPowerupBoostLevelProgress ;
return obj ;
} ;