2026-07-25 08:10:48 +00:00
// Module ID: 13484
// Function ID: 103681
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-25 08:10:48 +00:00
// Dependencies: [5, 653, 686, 10582, 6244, 2]
2026-07-20 16:05:17 +00:00
// Exports: dismissApplicationSubscriptionExpirationNotice, fetchAllSubscriptionListingsDataForApplication, fetchEntitlementsForGuild
2026-07-25 08:10:48 +00:00
// Module 13484 (_createForOfIteratorHelperLoose)
2026-07-23 10:11:24 +00:00
import set from "set" ;
import ME from "ME" ;
let closure_4 ;
let closure_5 ;
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 transformSubscriptionListingToSku ( id ) {
return { id : id.id , type : constants2 . SUBSCRIPTION , application_id : id.application_id , product_line : constants.APPLICATION , name : id.name , summary : "" , description : id.description , flags : id.sku_flags , manifests : [ ] , available_regions : [ ] , legal_notice : "" , deleted : id.soft_deleted , price_tier : 0 , show_age_gate : false , restricted : false } ;
}
function transformSubscriptionListingToStoreListing ( id ) {
const obj = { id : id.id , sku : transformSubscriptionListingToSku ( id ) , summary : id.description , description : id.description } ;
let prop = id . store_listing_benefits ;
if ( null == prop ) {
prop = [ ] ;
}
obj . benefits = prop ;
( { image_asset : obj.thumbnail , published : obj.published } = id ) ;
return obj ;
}
function dispatchCompat ( arr ) {
let done ;
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "SKUS_FETCH_SUCCESS" , skus : arr.map ( transformSubscriptionListingToSku ) } ;
obj . dispatch ( obj ) ;
obj = { type : "STORE_LISTINGS_FETCH_SUCCESS" , storeListings : arr.map ( transformSubscriptionListingToStoreListing ) } ;
2026-07-23 10:11:24 +00:00
importDefault ( 686 ) . dispatch ( obj ) ;
2026-07-20 16:05:17 +00:00
const tmp3 = _createForOfIteratorHelperLoose ( arr ) ;
let iter = tmp3 ( ) ;
if ( ! iter . done ) {
do {
let value = iter . value ;
2026-07-23 10:11:24 +00:00
let tmp4 = importDefault ;
let tmp5 = dependencyMap ;
let obj5 = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
let obj1 = { type : "SUBSCRIPTION_PLANS_FETCH_SUCCESS" , skuId : value.id , subscriptionPlans : value.subscription_plans } ;
let dispatchResult2 = obj5 . dispatch ( obj1 ) ;
let iter2 = tmp3 ( ) ;
iter = iter2 ;
done = iter2 . done ;
} while ( ! done ) ;
}
}
function _fetchAllSubscriptionListingsDataForApplication() {
// CreateGeneratorClosureLongIndex (0x67)
const obj = callback ( tmp ) ;
return obj ( . . . arguments ) ;
}
function _fetchEntitlementsForGuild() {
// CreateGeneratorClosureLongIndex (0x67)
const obj = callback ( tmp ) ;
return obj ( . . . arguments ) ;
}
function fetchSubscriptionListingForPlan() {
return _fetchSubscriptionListingForPlan ( . . . arguments ) ;
}
function _fetchSubscriptionListingForPlan() {
// CreateGeneratorClosureLongIndex (0x67)
const obj = callback ( tmp ) ;
return obj ( . . . arguments ) ;
}
2026-07-23 10:11:24 +00:00
( { SKUProductLines : closure_4 , SKUTypes : closure_5 } = ME ) ;
const result = require ( "dispatcher" ) . fileFinishedImporting ( "modules/premium_apps/ApplicationSubscriptionsActionCreators.tsx" ) ;
2026-07-20 16:05:17 +00:00
export const fetchAllSubscriptionListingsDataForApplication = function fetchAllSubscriptionListingsDataForApplication ( arg0 , id ) {
return _fetchAllSubscriptionListingsDataForApplication ( . . . arguments ) ;
} ;
export const fetchEntitlementsForGuild = function fetchEntitlementsForGuild() {
return _fetchEntitlementsForGuild ( . . . arguments ) ;
} ;
export const dismissApplicationSubscriptionExpirationNotice = function dismissApplicationSubscriptionExpirationNotice ( guildId ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "APPLICATION_SUBSCRIPTIONS_CHANNEL_NOTICE_DISMISSED" , guildId } ;
obj . dispatch ( obj ) ;
} ;
export { fetchSubscriptionListingForPlan } ;