2026-07-23 10:11:24 +00:00
// Module ID: 14101
// Function ID: 108422
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-23 10:11:24 +00:00
// Dependencies: [5, 57, 31, 4808, 3752, 566, 5636, 5122, 14102, 14103, 11323, 1327, 2]
2026-07-20 16:05:17 +00:00
// Exports: useArchiveSubscriptionListing, useCreateSubscriptionGroupListing, useDeleteSubscriptionGroupListing, useDeleteSubscriptionListing, useFetchListingsForSubscriptions, useFetchSubscriptionsSettings, useGroupListingsForGuild, usePublishSubscriptionListing, useSubscriptionGroupListing, useSubscriptionListing, useSubscriptionTrial, useSubscriptionTrialsForGroup, useSubscriptionTrialsForGuild, useSubscriptionsSettings, useUpdateSubscriptionGroupListing, useUpdateSubscriptionsSettings, useUpdateSubscriptionsTrial
2026-07-23 10:11:24 +00:00
// Module 14101 (_createForOfIteratorHelperLoose)
import initialize from "initialize" ;
import _slicedToArray from "_slicedToArray" ;
import result from "result" ;
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import closure_8 from "_isNativeReflectConstruct" ;
import { FetchState } from "_isNativeReflectConstruct" ;
let 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 useFetchListingsForGuild ( guildId ) {
let obj = arg1 ;
2026-07-23 10:11:24 +00:00
const _require = guildId ;
2026-07-20 16:05:17 +00:00
if ( arg1 === undefined ) {
obj = { } ;
}
let flag = obj . refetchOnMount ;
if ( flag === undefined ) {
flag = false ;
}
let flag2 = obj . includeSoftDeleted ;
if ( flag2 === undefined ) {
flag2 = true ;
}
const countryCode = obj . countryCode ;
const dontFetchWhileTrue = obj . dontFetchWhileTrue ;
2026-07-23 10:11:24 +00:00
let stateFromStores ;
let ref ;
const items = [ _isNativeReflectConstruct ] ;
stateFromStores = _require ( countryCode [ 5 ] ) . useStateFromStores ( items , ( ) = > outer1_7 . isConnected ( ) ) ;
const obj2 = _require ( countryCode [ 5 ] ) ;
2026-07-20 16:05:17 +00:00
const items1 = [ closure_8 ] ;
2026-07-23 10:11:24 +00:00
const stateFromStores1 = _require ( countryCode [ 5 ] ) . useStateFromStores ( items1 , ( ) = > {
if ( null != closure_0 ) {
let FETCHED = outer1_8 . getSubscriptionGroupListingsForGuildFetchState ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
FETCHED = outer1_9 . FETCHED ;
2026-07-20 16:05:17 +00:00
}
return FETCHED ;
} ) ;
2026-07-23 10:11:24 +00:00
ref = ref . useRef ( flag ) ;
2026-07-20 16:05:17 +00:00
const items2 = [ stateFromStores , guildId , flag2 , flag , countryCode , dontFetchWhileTrue ] ;
2026-07-23 10:11:24 +00:00
const effect = ref . useEffect ( ( ) = > {
if ( null != closure_0 ) {
2026-07-20 16:05:17 +00:00
if ( stateFromStores ) {
if ( true !== dontFetchWhileTrue ) {
let tmp5 = flag ;
if ( ! flag ) {
2026-07-23 10:11:24 +00:00
tmp5 = tmp4 === outer1_9 . NOT_FETCHED ;
2026-07-20 16:05:17 +00:00
}
if ( tmp5 ) {
ref . current = false ;
let obj = flag2 ( countryCode [ 6 ] ) ;
obj = { includeSoftDeleted : false , countryCode } ;
2026-07-23 10:11:24 +00:00
const allSubscriptionListingsDataForGuild = obj . fetchAllSubscriptionListingsDataForGuild ( closure_0 , obj ) ;
2026-07-20 16:05:17 +00:00
}
}
}
}
} , items2 ) ;
obj = { } ;
let tmp6 = stateFromStores1 === FetchState . FETCHED ;
if ( tmp6 ) {
tmp6 = true !== tmp5 ;
}
obj . listingsLoaded = tmp6 ;
return obj ;
}
function useSubscriptionListingsForGroup ( id , arg1 ) {
let obj = arg1 ;
2026-07-23 10:11:24 +00:00
const _require = id ;
2026-07-20 16:05:17 +00:00
if ( arg1 === undefined ) {
obj = { } ;
}
let flag = obj . includeSoftDeleted ;
if ( flag === undefined ) {
flag = false ;
}
let flag2 = obj . includeUnpublished ;
if ( flag2 === undefined ) {
flag2 = true ;
}
2026-07-23 10:11:24 +00:00
let items = [ closure_8 ] ;
2026-07-20 16:05:17 +00:00
const items1 = [ id , flag , flag2 ] ;
2026-07-23 10:11:24 +00:00
return _require ( 566 ) . useStateFromStoresArray ( items , ( ) = > {
2026-07-20 16:05:17 +00:00
let iter2 ;
2026-07-23 10:11:24 +00:00
if ( null == closure_0 ) {
2026-07-20 16:05:17 +00:00
return [ ] ;
} else {
2026-07-23 10:11:24 +00:00
const subscriptionGroupListing = outer1_8 . getSubscriptionGroupListing ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
if ( null == subscriptionGroupListing ) {
return [ ] ;
} else {
const items = [ ] ;
2026-07-23 10:11:24 +00:00
const tmp2 = outer1_11 ( subscriptionGroupListing . subscription_listings_ids ) ;
2026-07-20 16:05:17 +00:00
let iter = tmp2 ( ) ;
if ( ! iter . done ) {
do {
2026-07-23 10:11:24 +00:00
let tmp3 = outer1_8 ;
let subscriptionListing = outer1_8 . getSubscriptionListing ( iter . value ) ;
2026-07-20 16:05:17 +00:00
if ( null != subscriptionListing ) {
let soft_deleted = subscriptionListing . soft_deleted ;
if ( soft_deleted ) {
2026-07-23 10:11:24 +00:00
let tmp5 = flag ;
soft_deleted = ! flag ;
2026-07-20 16:05:17 +00:00
}
if ( ! soft_deleted ) {
2026-07-23 10:11:24 +00:00
let tmp6 = subscriptionListing . published || flag2 ;
2026-07-20 16:05:17 +00:00
if ( tmp6 ) {
let arr = items . push ( subscriptionListing ) ;
}
}
}
iter2 = tmp2 ( ) ;
iter = iter2 ;
} while ( ! iter2 . done ) ;
}
return items ;
}
}
} , items1 ) ;
}
function useSubscriptionListingsForGuild ( guildId , arg1 ) {
let obj = arg1 ;
2026-07-23 10:11:24 +00:00
const _require = guildId ;
2026-07-20 16:05:17 +00:00
if ( arg1 === undefined ) {
2026-07-23 10:11:24 +00:00
obj = { includeSoftDeleted : false , sortDeletedListingsLast : false } ;
2026-07-20 16:05:17 +00:00
}
useFetchListingsForGuild ( guildId ) ;
2026-07-23 10:11:24 +00:00
let items = [ closure_8 ] ;
return _require ( 566 ) . useStateFromStoresArray ( items , ( ) = > {
2026-07-20 16:05:17 +00:00
let iter5 ;
const items = [ ] ;
2026-07-23 10:11:24 +00:00
if ( null != closure_0 ) {
let subscriptionGroupListingsForGuild = outer1_8 . getSubscriptionGroupListingsForGuild ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
subscriptionGroupListingsForGuild = outer1_10 ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const tmpResult = outer1_11 ( subscriptionGroupListingsForGuild ) ;
2026-07-20 16:05:17 +00:00
const iter = tmpResult ( ) ;
let iter2 = iter ;
if ( ! iter . done ) {
do {
2026-07-23 10:11:24 +00:00
let tmp6 = outer1_11 ;
let tmp7 = outer1_11 ( iter2 . value . subscription_listings_ids ) ;
2026-07-20 16:05:17 +00:00
let iter3 = tmp7 ( ) ;
if ( ! iter3 . done ) {
do {
2026-07-23 10:11:24 +00:00
let tmp8 = outer1_8 ;
let subscriptionListing = outer1_8 . getSubscriptionListing ( iter3 . value ) ;
2026-07-20 16:05:17 +00:00
let tmp10 = null == subscriptionListing ;
if ( ! tmp10 ) {
2026-07-23 10:11:24 +00:00
let tmp11 = obj ;
let tmp12 = ! obj . includeSoftDeleted && subscriptionListing . soft_deleted ;
2026-07-20 16:05:17 +00:00
tmp10 = tmp12 ;
}
if ( ! tmp10 ) {
let arr = items . push ( subscriptionListing ) ;
}
2026-07-23 10:11:24 +00:00
iter4 = tmp7 ( ) ;
2026-07-20 16:05:17 +00:00
iter3 = iter4 ;
let tmp14 = subscriptionListing ;
} while ( ! iter4 . done ) ;
}
iter5 = tmpResult ( ) ;
iter2 = iter5 ;
} while ( ! iter5 . done ) ;
}
let tmp15 = items ;
if ( obj . includeSoftDeleted ) {
tmp15 = items ;
if ( obj . sortDeletedListingsLast ) {
const items1 = [ ] ;
let arraySpreadResult = HermesBuiltin . arraySpread ( items . filter ( ( soft_deleted ) = > ! soft_deleted . soft_deleted ) , 0 ) ;
arraySpreadResult = HermesBuiltin . arraySpread ( items . filter ( ( soft_deleted ) = > soft_deleted . soft_deleted ) , arraySpreadResult ) ;
tmp15 = items1 ;
}
}
return tmp15 ;
} ) ;
}
let closure_10 = [ ] ;
2026-07-23 10:11:24 +00:00
const result = require ( "result" ) . fileFinishedImporting ( "modules/guild_role_subscriptions/GuildRoleSubscriptionsHooks.tsx" ) ;
2026-07-20 16:05:17 +00:00
export { useFetchListingsForGuild } ;
export const useCreateSubscriptionGroupListing = function useCreateSubscriptionGroupListing() {
function _createSubscriptionGroupListing() {
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
const obj = outer1_4 ( tmp ) ;
2026-07-20 16:05:17 +00:00
return obj ( . . . arguments ) ;
}
const tmp = callback ( React . useState ( false ) , 2 ) ;
let closure_0 = tmp [ 1 ] ;
const tmp2 = callback ( React . useState ( null ) , 2 ) ;
let closure_1 = tmp2 [ 1 ] ;
return {
loading : tmp [ 0 ] ,
createSubscriptionGroupListing ( arg0 , arg1 ) {
return _createSubscriptionGroupListing ( . . . arguments ) ;
} ,
error : tmp2 [ 0 ]
} ;
} ;
export const useUpdateSubscriptionGroupListing = function useUpdateSubscriptionGroupListing() {
const tmp = callback ( React . useState ( false ) , 2 ) ;
let closure_0 = tmp [ 1 ] ;
const tmp2 = callback ( React . useState ( null ) , 2 ) ;
let closure_1 = tmp2 [ 1 ] ;
return {
loading : tmp [ 0 ] ,
2026-07-23 10:11:24 +00:00
updateSubscriptionGroupListing : React.useCallback ( ( ( ) = > {
2026-07-20 16:05:17 +00:00
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
let closure_0 = outer1_4 ( tmp ) ;
2026-07-20 16:05:17 +00:00
return function ( arg0 , arg1 , arg2 ) {
return callback ( . . . arguments ) ;
} ;
2026-07-23 10:11:24 +00:00
} ) ( ) , [ ] ) ,
2026-07-20 16:05:17 +00:00
error : tmp2 [ 0 ]
} ;
} ;
export { useSubscriptionListingsForGroup } ;
export const useSubscriptionListing = function useSubscriptionListing ( editStateId ) {
2026-07-23 10:11:24 +00:00
const _require = editStateId ;
2026-07-20 16:05:17 +00:00
const items = [ closure_8 ] ;
2026-07-23 10:11:24 +00:00
return _require ( 566 ) . useStateFromStores ( items , ( ) = > {
2026-07-20 16:05:17 +00:00
let subscriptionListing = null ;
2026-07-23 10:11:24 +00:00
if ( null != closure_0 ) {
subscriptionListing = outer1_8 . getSubscriptionListing ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
}
return subscriptionListing ;
} ) ;
} ;
export const useSubscriptionGroupListing = function useSubscriptionGroupListing ( arg0 ) {
2026-07-23 10:11:24 +00:00
const _require = arg0 ;
2026-07-20 16:05:17 +00:00
const items = [ closure_8 ] ;
2026-07-23 10:11:24 +00:00
return _require ( 566 ) . useStateFromStores ( items , ( ) = > {
2026-07-20 16:05:17 +00:00
let subscriptionGroupListing = null ;
2026-07-23 10:11:24 +00:00
if ( null != closure_0 ) {
subscriptionGroupListing = outer1_8 . getSubscriptionGroupListing ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
}
return subscriptionGroupListing ;
} ) ;
} ;
export const useGroupListingsForGuild = function useGroupListingsForGuild ( guildId ) {
2026-07-23 10:11:24 +00:00
const _require = guildId ;
let closure_1 = _require ( 14102 ) . useGroupListingsFetchContext ( "useGroupListingsForGuild" ) ;
const obj = _require ( 14102 ) ;
2026-07-20 16:05:17 +00:00
const items = [ closure_8 ] ;
2026-07-23 10:11:24 +00:00
return _require ( 566 ) . useStateFromStores ( items , ( ) = > {
if ( null != closure_0 ) {
2026-07-20 16:05:17 +00:00
if ( closure_1 ) {
2026-07-23 10:11:24 +00:00
let subscriptionGroupListingsForGuild = outer1_8 . getSubscriptionGroupListingsForGuild ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
}
return subscriptionGroupListingsForGuild ;
}
2026-07-23 10:11:24 +00:00
subscriptionGroupListingsForGuild = outer1_10 ;
2026-07-20 16:05:17 +00:00
} ) ;
} ;
export { useSubscriptionListingsForGuild } ;
export const useFetchListingsForSubscriptions = ( arg0 ) = > {
2026-07-23 10:11:24 +00:00
const _require = arg0 ;
let tmp = callback ( React . useState ( false ) , 2 ) ;
2026-07-20 16:05:17 +00:00
const loading = tmp [ 0 ] ;
let closure_2 = tmp [ 1 ] ;
const items = [ arg0 ] ;
2026-07-23 10:11:24 +00:00
const memo = React . useMemo ( ( ) = > lib . map ( lib ( memo [ 9 ] ) . getRoleSubscriptionPlanId ) , items ) ;
2026-07-20 16:05:17 +00:00
const items1 = [ closure_8 ] ;
const items2 = [ memo ] ;
2026-07-23 10:11:24 +00:00
const stateFromStoresArray = _require ( memo [ 5 ] ) . useStateFromStoresArray ( items1 , ( ) = > memo . filter ( ( arg0 ) = > ! outer2_8 . getDidFetchListingForSubscriptionPlanId ( arg0 ) ) , items2 ) ;
2026-07-20 16:05:17 +00:00
const items3 = [ loading , stateFromStoresArray ] ;
const effect = React . useEffect ( ( ) = > {
let tmp = ! loading ;
if ( tmp ) {
tmp = stateFromStoresArray . length > 0 ;
}
if ( tmp ) {
callback ( true ) ;
2026-07-23 10:11:24 +00:00
const allPromises = Promise . all ( stateFromStoresArray . map ( ( arg0 ) = > callback ( memo [ 6 ] ) . fetchSubscriptionListingForPlan ( arg0 ) ) ) ;
Promise . all ( stateFromStoresArray . map ( ( arg0 ) = > callback ( memo [ 6 ] ) . fetchSubscriptionListingForPlan ( arg0 ) ) ) . catch ( ( ) = > {
2026-07-20 16:05:17 +00:00
} ) . then ( ( ) = > {
2026-07-23 10:11:24 +00:00
outer1_2 ( false ) ;
2026-07-20 16:05:17 +00:00
} ) ;
2026-07-23 10:11:24 +00:00
const catchPromise = Promise . all ( stateFromStoresArray . map ( ( arg0 ) = > callback ( memo [ 6 ] ) . fetchSubscriptionListingForPlan ( arg0 ) ) ) . catch ( ( ) = > {
2026-07-20 16:05:17 +00:00
} ) ;
}
} , items3 ) ;
return { loading } ;
} ;
export const useDeleteSubscriptionListing = function useDeleteSubscriptionListing() {
function _deleteSubscriptionListing() {
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
const obj = outer1_4 ( tmp ) ;
2026-07-20 16:05:17 +00:00
return obj ( . . . arguments ) ;
}
const tmp = callback ( React . useState ( false ) , 2 ) ;
let closure_0 = tmp [ 1 ] ;
const tmp2 = callback ( React . useState ( null ) , 2 ) ;
let closure_1 = tmp2 [ 1 ] ;
return {
error : tmp2 [ 0 ] ,
submitting : tmp [ 0 ] ,
deleteSubscriptionListing ( arg0 , arg1 , arg2 ) {
return _deleteSubscriptionListing ( . . . arguments ) ;
}
} ;
} ;
export const useArchiveSubscriptionListing = function useArchiveSubscriptionListing() {
2026-07-23 10:11:24 +00:00
const tmp2 = callback ( importDefault ( 11323 ) ( importAll ( 5636 ) . archiveSubscriptionListing ) , 2 ) ;
2026-07-20 16:05:17 +00:00
return { error : tmp2 [ 1 ] . error , submitting : tmp2 [ 1 ] . loading , archiveSubscriptionListing : tmp2 [ 0 ] } ;
} ;
export const usePublishSubscriptionListing = function usePublishSubscriptionListing() {
function _publishSubscriptionListing() {
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
const obj = outer1_4 ( tmp ) ;
2026-07-20 16:05:17 +00:00
return obj ( . . . arguments ) ;
}
const tmp = callback ( React . useState ( false ) , 2 ) ;
let closure_0 = tmp [ 1 ] ;
const tmp2 = callback ( React . useState ( null ) , 2 ) ;
let closure_1 = tmp2 [ 1 ] ;
return {
error : tmp2 [ 0 ] ,
submitting : tmp [ 0 ] ,
publishSubscriptionListing ( arg0 ) {
return _publishSubscriptionListing ( . . . arguments ) ;
} ,
clearError() {
return callback ( null ) ;
}
} ;
} ;
export const useSubscriptionsSettings = function useSubscriptionsSettings ( guildId ) {
2026-07-23 10:11:24 +00:00
const _require = guildId ;
2026-07-20 16:05:17 +00:00
const items = [ closure_8 ] ;
2026-07-23 10:11:24 +00:00
return _require ( 566 ) . useStateFromStores ( items , ( ) = > {
2026-07-20 16:05:17 +00:00
let subscriptionSettings ;
2026-07-23 10:11:24 +00:00
if ( null != closure_0 ) {
subscriptionSettings = outer1_8 . getSubscriptionSettings ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
}
return subscriptionSettings ;
} ) ;
} ;
export const useUpdateSubscriptionsSettings = function useUpdateSubscriptionsSettings() {
const tmp = callback ( React . useState ( false ) , 2 ) ;
let closure_0 = tmp [ 1 ] ;
const tmp2 = callback ( React . useState ( null ) , 2 ) ;
let closure_1 = tmp2 [ 1 ] ;
return {
loading : tmp [ 0 ] ,
2026-07-23 10:11:24 +00:00
updateSubscriptionsSettings : React.useCallback ( ( ( ) = > {
2026-07-20 16:05:17 +00:00
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
let closure_0 = outer1_4 ( tmp ) ;
2026-07-20 16:05:17 +00:00
return function ( arg0 , arg1 ) {
return callback ( . . . arguments ) ;
} ;
2026-07-23 10:11:24 +00:00
} ) ( ) , [ ] ) ,
2026-07-20 16:05:17 +00:00
error : tmp2 [ 0 ]
} ;
} ;
export const useDeleteSubscriptionGroupListing = function useDeleteSubscriptionGroupListing() {
function _deleteSubscriptionGroupListing() {
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
const obj = outer1_4 ( tmp ) ;
2026-07-20 16:05:17 +00:00
return obj ( . . . arguments ) ;
}
const tmp = callback ( React . useState ( false ) , 2 ) ;
let closure_0 = tmp [ 1 ] ;
const tmp2 = callback ( React . useState ( null ) , 2 ) ;
let closure_1 = tmp2 [ 1 ] ;
return {
error : tmp2 [ 0 ] ,
submitting : tmp [ 0 ] ,
deleteSubscriptionGroupListing ( arg0 , arg1 ) {
return _deleteSubscriptionGroupListing ( . . . arguments ) ;
}
} ;
} ;
export const useFetchSubscriptionsSettings = function useFetchSubscriptionsSettings() {
const tmp = callback ( React . useState ( false ) , 2 ) ;
let closure_0 = tmp [ 1 ] ;
const tmp2 = callback ( React . useState ( null ) , 2 ) ;
let closure_1 = tmp2 [ 1 ] ;
return {
loading : tmp [ 0 ] ,
2026-07-23 10:11:24 +00:00
fetchSubscriptionsSettings : React.useCallback ( ( ( ) = > {
2026-07-20 16:05:17 +00:00
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
let closure_0 = outer1_4 ( tmp ) ;
2026-07-20 16:05:17 +00:00
return function ( arg0 ) {
return callback ( . . . arguments ) ;
} ;
2026-07-23 10:11:24 +00:00
} ) ( ) , [ ] ) ,
2026-07-20 16:05:17 +00:00
error : tmp2 [ 0 ]
} ;
} ;
export const useUpdateSubscriptionsTrial = function useUpdateSubscriptionsTrial() {
const tmp = callback ( React . useState ( false ) , 2 ) ;
let closure_0 = tmp [ 1 ] ;
const tmp2 = callback ( React . useState ( null ) , 2 ) ;
let closure_1 = tmp2 [ 1 ] ;
return {
loading : tmp [ 0 ] ,
2026-07-23 10:11:24 +00:00
updateSubscriptionTrial : React.useCallback ( ( ( ) = > {
2026-07-20 16:05:17 +00:00
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
let closure_0 = outer1_4 ( tmp ) ;
2026-07-20 16:05:17 +00:00
return function ( arg0 , arg1 , arg2 ) {
return callback ( . . . arguments ) ;
} ;
2026-07-23 10:11:24 +00:00
} ) ( ) , [ ] ) ,
2026-07-20 16:05:17 +00:00
error : tmp2 [ 0 ]
} ;
} ;
export const useSubscriptionTrial = function useSubscriptionTrial ( editStateId ) {
2026-07-23 10:11:24 +00:00
const _require = editStateId ;
2026-07-20 16:05:17 +00:00
const items = [ closure_8 ] ;
2026-07-23 10:11:24 +00:00
return _require ( 566 ) . useStateFromStores ( items , ( ) = > {
2026-07-20 16:05:17 +00:00
let subscriptionTrial = null ;
2026-07-23 10:11:24 +00:00
if ( null != closure_0 ) {
subscriptionTrial = outer1_8 . getSubscriptionTrial ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
}
return subscriptionTrial ;
} ) ;
} ;
export const useSubscriptionTrialsForGroup = function useSubscriptionTrialsForGroup ( id ) {
const tmp = useSubscriptionListingsForGroup ( id ) ;
2026-07-23 10:11:24 +00:00
const require = tmp ;
2026-07-20 16:05:17 +00:00
const items = [ closure_8 ] ;
const items1 = [ tmp ] ;
2026-07-23 10:11:24 +00:00
return require ( 566 ) /* initialize */ . useStateFromStoresArray ( items , ( ) = > {
const mapped = tmp . map ( ( id ) = > outer2_8 . getSubscriptionTrial ( id . id ) ) ;
return mapped . filter ( tmp ( outer1_3 [ 11 ] ) . isNotNullish ) ;
2026-07-20 16:05:17 +00:00
} , items1 ) ;
} ;
export const useSubscriptionTrialsForGuild = function useSubscriptionTrialsForGuild ( guildId ) {
const tmp = useSubscriptionListingsForGuild ( guildId ) ;
2026-07-23 10:11:24 +00:00
const require = tmp ;
2026-07-20 16:05:17 +00:00
const items = [ closure_8 ] ;
const items1 = [ tmp ] ;
2026-07-23 10:11:24 +00:00
return require ( 566 ) /* initialize */ . useStateFromStoresArray ( items , ( ) = > {
const mapped = tmp . map ( ( id ) = > outer2_8 . getSubscriptionTrial ( id . id ) ) ;
return mapped . filter ( tmp ( outer1_3 [ 11 ] ) . isNotNullish ) ;
2026-07-20 16:05:17 +00:00
} , items1 ) ;
} ;