2026-07-27 11:26:19 +00:00
// Module ID: 14881
// Function ID: 113560
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-27 11:26:19 +00:00
// Dependencies: [31, 5868, 1838, 3948, 4971, 14871, 14877, 14872, 33, 4131, 689, 3835, 566, 5513, 1324, 4543, 3975, 665, 7620, 3992, 4477, 4597, 7844, 5085, 14882, 14884, 11649, 14892, 4100, 5049, 5515, 14874, 14893, 2]
2026-07-20 16:05:17 +00:00
2026-07-27 11:26:19 +00:00
// Module 14881 (_createForOfIteratorHelperLoose)
2026-07-23 10:11:24 +00:00
import importAllResult from "getGuildFolderMenuItems" ;
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import closure_5 from "_createForOfIteratorHelperLoose" ;
import closure_6 from "_isNativeReflectConstruct" ;
import closure_7 from "_isNativeReflectConstruct" ;
import { GuildsNodeType } from "_isNativeReflectConstruct" ;
import withEqualityFn from "withEqualityFn" ;
import { DEFAULT_FOLDER_COLOR } from "DEFAULT_FOLDER_COLOR" ;
import GUILD_ITEM_SIZE from "GUILD_ITEM_SIZE" ;
import jsxProd from "set" ;
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose" ;
let closure_10 ;
let closure_12 ;
let closure_13 ;
let closure_14 ;
let closure_15 ;
let closure_9 ;
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 MiniGuildIcon ( arg0 ) {
let position ;
2026-07-23 10:11:24 +00:00
let require ;
2026-07-20 16:05:17 +00:00
let selected ;
2026-07-23 10:11:24 +00:00
( { guildId : require , position , selected } = arg0 ) ;
2026-07-25 08:10:48 +00:00
let obj = require ( 3835 ) /* map */ ;
2026-07-23 10:11:24 +00:00
const tmp3 = callback3 ( false , obj . useToken ( importDefault ( 689 ) . modules . mobile . GUILD_BAR_ITEM_SIZE ) ) ;
2026-07-20 16:05:17 +00:00
const items = [ closure_5 ] ;
2026-07-23 10:11:24 +00:00
const stateFromStores = require ( 566 ) /* initialize */ . useStateFromStores ( items , ( ) = > outer1_5 . getGuild ( closure_0 ) ) ;
2026-07-20 16:05:17 +00:00
if ( 0 === position ) {
let guildPreview3 = tmp3 . guildPreview0 ;
} else if ( 1 === position ) {
guildPreview3 = tmp3 . guildPreview1 ;
} else if ( 2 === position ) {
guildPreview3 = tmp3 . guildPreview2 ;
} else if ( 3 === position ) {
guildPreview3 = tmp3 . guildPreview3 ;
}
obj = { } ;
const items1 = [ tmp3 . guildPreviewIcon , , ] ;
let prop ;
2026-07-23 10:11:24 +00:00
const obj2 = require ( 566 ) /* initialize */ ;
2026-07-20 16:05:17 +00:00
const tmp2 = importDefault ;
const tmp5 = closure_14 ;
if ( ! selected ) {
prop = tmp3 . guildPreviewIconUnselected ;
}
items1 [ 1 ] = prop ;
items1 [ 2 ] = guildPreview3 ;
obj . style = items1 ;
obj . guild = stateFromStores ;
2026-07-24 07:16:23 +00:00
obj . size = require ( 5513 ) /* makeSizeStyle */ . GuildIconSizes . XXSMALL ;
2026-07-20 16:05:17 +00:00
obj . selected = selected ;
2026-07-24 07:16:23 +00:00
return tmp5 ( importDefault ( 5513 ) , obj , "" + selected ) ;
2026-07-20 16:05:17 +00:00
}
function TransitionWrapper ( children ) {
let flag = children . fromTop ;
if ( flag === undefined ) {
flag = false ;
}
const cleanUp = children . cleanUp ;
const state = children . state ;
2026-07-23 10:11:24 +00:00
let token ;
let sharedValue ;
let obj = flag ( state [ 11 ] ) ;
token = obj . useToken ( cleanUp ( state [ 10 ] ) . modules . mobile . GUILD_BAR_ITEM_SIZE ) ;
let tmp = cleanUp ( state [ 14 ] ) ( "GuildsBarGuildFolder" ) ;
const tmp3 = callback3 ( cleanUp ( state [ 14 ] ) ( "GuildsBarGuildFolder" ) , token ) ;
2026-07-20 16:05:17 +00:00
let num = 0 ;
2026-07-23 10:11:24 +00:00
if ( state === flag ( state [ 20 ] ) . TransitionStates . MOUNTED ) {
2026-07-20 16:05:17 +00:00
num = 1 ;
}
2026-07-23 10:11:24 +00:00
sharedValue = flag ( state [ 19 ] ) . useSharedValue ( num ) ;
const obj2 = flag ( state [ 19 ] ) ;
let fn = function a() {
2026-07-20 16:05:17 +00:00
let obj = { } ;
let obj1 = flag ( state [ 15 ] ) ;
const value = sharedValue . get ( ) ;
const fn = function e ( arg0 ) {
let tmp = arg0 ;
if ( arg0 ) {
2026-07-23 10:11:24 +00:00
tmp = outer1_2 === flag ( state [ 20 ] ) . TransitionStates . YEETED ;
2026-07-20 16:05:17 +00:00
}
if ( tmp ) {
2026-07-23 10:11:24 +00:00
flag ( state [ 19 ] ) . runOnJS ( outer1_1 ) ( ) ;
const obj = flag ( state [ 19 ] ) ;
2026-07-20 16:05:17 +00:00
}
} ;
obj = { state , TransitionStates : flag ( state [ 20 ] ) . TransitionStates , runOnJS : flag ( state [ 19 ] ) . runOnJS , cleanUp } ;
fn . __closure = obj ;
fn . __workletHash = 47605595424 ;
2026-07-23 10:11:24 +00:00
fn . __initData = outer1_20 ;
obj . opacity = obj1 . withSpring ( value , outer1_13 , undefined , fn ) ;
2026-07-20 16:05:17 +00:00
obj = { } ;
let num = 1 ;
if ( 1 === sharedValue . get ( ) ) {
2026-07-23 10:11:24 +00:00
obj . translateY = obj5 . withSpring ( 0 , outer1_13 ) ;
2026-07-20 16:05:17 +00:00
const items = [ obj , ] ;
obj1 = { } ;
if ( num !== sharedValue . get ( ) ) {
let num2 = 1.3 ;
if ( flag ) {
num2 = 0.3 ;
}
num = num2 ;
}
2026-07-23 10:11:24 +00:00
obj1 . scale = flag ( state [ 15 ] ) . withSpring ( num , outer1_13 ) ;
2026-07-20 16:05:17 +00:00
items [ 1 ] = obj1 ;
obj . transform = items ;
return obj ;
}
} ;
2026-07-23 10:11:24 +00:00
obj = { withSpring : flag ( state [ 15 ] ) . withSpring , visible : sharedValue , FOLDER_SPRING_PHYSICS : closure_13 , state , TransitionStates : flag ( state [ 20 ] ) . TransitionStates , runOnJS : flag ( state [ 19 ] ) . runOnJS , cleanUp , fromTop : flag , guildItemSize : token } ;
2026-07-20 16:05:17 +00:00
fn . __closure = obj ;
fn . __workletHash = 14426547532118 ;
fn . __initData = closure_19 ;
2026-07-23 10:11:24 +00:00
let items = [ state , sharedValue ] ;
const animatedStyle = flag ( state [ 19 ] ) . useAnimatedStyle ( fn ) ;
const effect = token . useEffect ( ( ) = > {
2026-07-20 16:05:17 +00:00
let num = 1 ;
if ( state === flag ( state [ 20 ] ) . TransitionStates . YEETED ) {
num = 0 ;
}
const result = sharedValue . set ( num ) ;
} , items ) ;
const style = [ animatedStyle , tmp3 . folderScaleContainer ] ;
2026-07-23 10:11:24 +00:00
return callback2 ( cleanUp ( state [ 18 ] ) , { style , children : children.children } ) ;
2026-07-20 16:05:17 +00:00
}
function getItemKey ( type ) {
return type . type ;
}
function GuildFolderIcon ( item ) {
item = item . item ;
let tmp4 = null ;
if ( "icon" === item . type ) {
const obj = { source : tmp3 , style : item.tintStyle } ;
2026-07-23 10:11:24 +00:00
tmp4 = callback2 ( importDefault ( 5085 ) , obj ) ;
2026-07-20 16:05:17 +00:00
}
return tmp4 ;
}
function renderGuildFolderContent ( arg0 , type , state , cleanUp ) {
2026-07-23 10:11:24 +00:00
let closure_0 = type ;
2026-07-20 16:05:17 +00:00
type = type . type ;
if ( "icon" === type ) {
let obj = { fromTop : true , cleanUp , state } ;
obj = { item : type } ;
obj . children = callback2 ( GuildFolderIcon , obj ) ;
return callback2 ( TransitionWrapper , obj , arg0 ) ;
} else if ( "preview" === type ) {
obj = { cleanUp , state } ;
const guilds = type . guilds ;
obj . children = guilds . map ( ( guildId ) = > {
let tmp = arg1 ;
if ( 0 !== arg1 ) {
tmp = arg1 ;
if ( 1 !== arg1 ) {
tmp = arg1 ;
if ( 2 !== arg1 ) {
tmp = arg1 ;
}
}
}
let tmp2 = null ;
if ( null != guildId ) {
tmp2 = null ;
if ( null != tmp ) {
2026-07-23 10:11:24 +00:00
const obj = { guildId , selected : guildId === type . selectedGuildId , position : tmp } ;
tmp2 = outer1_14 ( outer1_24 , obj , guildId ) ;
2026-07-20 16:05:17 +00:00
}
}
return tmp2 ;
} ) ;
return callback2 ( TransitionWrapper , obj , arg0 ) ;
}
}
2026-07-23 10:11:24 +00:00
( { useItemDragState : closure_9 , useFolderBGHeightOffset : closure_10 } = withEqualityFn ) ;
( { TRANSITION_PHYSICS : closure_12 , FOLDER_SPRING_PHYSICS : closure_13 } = GUILD_ITEM_SIZE ) ;
( { jsx : closure_14 , jsxs : closure_15 } = jsxProd ) ;
let closure_16 = _createForOfIteratorHelperLoose . createStyles ( ( ) = > {
2026-07-20 16:05:17 +00:00
let num = arg1 ;
let num2 = arg2 ;
if ( arg1 === undefined ) {
num = 48 ;
}
if ( num2 === undefined ) {
num2 = 0 ;
}
let obj = { } ;
2026-07-23 10:11:24 +00:00
obj = { position : "absolute" , top : importDefault ( 689 ) . modules . mobile . GUILD_BAR_ITEM_MARGIN , left : importDefault ( 689 ) . modules . mobile . GUILD_FOLDER_BACKGROUND_LEFT , backgroundColor : importDefault ( 689 ) . colors . GUILD_FOLDER_BACKGROUND , borderTopLeftRadius : importDefault ( 689 ) . modules . mobile . GUILD_FOLDER_BACKGROUND_RADIUS , borderTopRightRadius : importDefault ( 689 ) . modules . mobile . GUILD_FOLDER_BACKGROUND_RADIUS , borderBottomLeftRadius : importDefault ( 689 ) . modules . mobile . GUILD_FOLDER_BACKGROUND_RADIUS , borderBottomRightRadius : importDefault ( 689 ) . modules . mobile . GUILD_FOLDER_BACKGROUND_RADIUS , width : num + num2 } ;
2026-07-20 16:05:17 +00:00
obj . folderBackground = obj ;
2026-07-23 10:11:24 +00:00
obj = { position : "absolute" , top : 0 , left : 0 , width : num , height : num , justifyContent : "center" , alignItems : "center" } ;
2026-07-20 16:05:17 +00:00
obj . folderScaleContainer = obj ;
2026-07-23 10:11:24 +00:00
obj . guildPreviewIcon = { position : "absolute" , margin : importDefault ( 689 ) . modules . mobile . GUILD_FOLDER_PREVIEW_ICON_MARGIN } ;
const obj1 = { position : "absolute" , margin : importDefault ( 689 ) . modules . mobile . GUILD_FOLDER_PREVIEW_ICON_MARGIN } ;
obj . guildPreviewIconUnselected = { borderRadius : importDefault ( 689 ) . radii . sm } ;
obj . guildPreview0 = { top : 0 , left : 0 } ;
obj . guildPreview1 = { top : 0 , right : 0 } ;
obj . guildPreview2 = { bottom : 0 , left : 0 } ;
obj . guildPreview3 = { bottom : 0 , right : 0 } ;
const obj3 = { position : "absolute" , width : num , height : num , opacity : importDefault ( 689 ) . modules . mobile . GUILD_FOLDER_PREVIEW_OPACITY } ;
2026-07-20 16:05:17 +00:00
obj . guildPreviewWrapper = obj3 ;
return obj ;
} ) ;
let closure_17 = { code : "function GuildsBarGuildFolderTsx1(values){const{withSpring,TRANSITION_PHYSICS}=this.__closure;return{animations:{height:withSpring(values.targetHeight,TRANSITION_PHYSICS,'animate-always')},initialValues:{height:values.currentHeight}};}" } ;
const memoResult = importAllResult . memo ( function FolderBGInner ( color ) {
let folderId ;
let totalItems ;
color = color . color ;
2026-07-23 10:11:24 +00:00
let token2 ;
2026-07-20 16:05:17 +00:00
( { folderId , totalItems } = color ) ;
2026-07-23 10:11:24 +00:00
const tmp = importDefault ( token2 [ 14 ] ) ( "GuildsBarGuildFolder" ) ;
importDefault = tmp ;
let obj = color ( token2 [ 11 ] ) ;
const token = obj . useToken ( importDefault ( token2 [ 10 ] ) . modules . mobile . GUILD_BAR_ITEM_SIZE ) ;
const token1 = color ( token2 [ 11 ] ) . useToken ( importDefault ( token2 [ 10 ] ) . modules . mobile . GUILD_BAR_ITEM_MARGIN ) ;
let obj2 = color ( token2 [ 11 ] ) ;
const obj3 = color ( token2 [ 11 ] ) ;
2026-07-20 16:05:17 +00:00
let num = 0 ;
2026-07-23 10:11:24 +00:00
const tmp4 = callback3 ( tmp , token , color ( token2 [ 11 ] ) . useToken ( importDefault ( token2 [ 10 ] ) . modules . mobile . GUILD_FOLDER_BACKGROUND_WIDTH_OFFSET ) ) ;
2026-07-20 16:05:17 +00:00
if ( tmp ) {
num = token1 ;
}
const fn = function o ( height ) {
let obj = { } ;
2026-07-23 10:11:24 +00:00
obj = { height : color ( token2 [ 15 ] ) . withSpring ( height . targetHeight , outer1_12 , "animate-always" ) } ;
2026-07-20 16:05:17 +00:00
obj . animations = obj ;
obj . initialValues = { height : height.currentHeight } ;
return obj ;
} ;
2026-07-23 10:11:24 +00:00
obj = { withSpring : color ( token2 [ 15 ] ) . withSpring , TRANSITION_PHYSICS : closure_12 } ;
2026-07-20 16:05:17 +00:00
const sum = token + num + ( token + 2 * token1 ) * totalItems + callback ( folderId ) ;
fn . __closure = obj ;
fn . __workletHash = 2519256682742 ;
fn . __initData = closure_17 ;
2026-07-23 10:11:24 +00:00
callback = importAllResult . useCallback ( fn , [ ] ) ;
2026-07-20 16:05:17 +00:00
const tmp5 = callback ( folderId ) ;
2026-07-23 10:11:24 +00:00
token2 = color ( token2 [ 11 ] ) . useToken ( importDefault ( token2 [ 10 ] ) . modules . mobile . GUILD_FOLDER_COLOR_OPACITY ) ;
2026-07-20 16:05:17 +00:00
const items = [ tmp , color , token2 ] ;
const memo = importAllResult . useMemo ( ( ) = > {
2026-07-23 10:11:24 +00:00
if ( closure_1 ) {
2026-07-20 16:05:17 +00:00
if ( null != color ) {
2026-07-23 10:11:24 +00:00
if ( color !== outer1_11 ) {
2026-07-20 16:05:17 +00:00
const obj = { } ;
const obj2 = color ( token2 [ 16 ] ) ;
obj . backgroundColor = obj2 . hexWithOpacity ( color ( token2 [ 17 ] ) . int2hex ( color ) , token2 ) ;
return obj ;
}
}
}
} , items ) ;
2026-07-23 10:11:24 +00:00
obj = { pointerEvents : "none" , collapsable : false , layout : callback } ;
const items1 = [ tmp4 . folderBackground , memo , { height : sum } ] ;
obj . style = items1 ;
return callback2 ( importDefault ( token2 [ 18 ] ) , obj ) ;
2026-07-20 16:05:17 +00:00
} ) ;
let closure_19 = { code : "function GuildsBarGuildFolderTsx2(){const{withSpring,visible,FOLDER_SPRING_PHYSICS,state,TransitionStates,runOnJS,cleanUp,fromTop,guildItemSize}=this.__closure;return{opacity:withSpring(visible.get(),FOLDER_SPRING_PHYSICS,undefined,function(finished){if(finished&&state===TransitionStates.YEETED)runOnJS(cleanUp)();}),transform:[{translateY:withSpring(visible.get()===1?0:fromTop?-guildItemSize:guildItemSize,FOLDER_SPRING_PHYSICS)},{scale:withSpring(visible.get()===1?1:fromTop?0.3:1.3,FOLDER_SPRING_PHYSICS)}]};}" } ;
let closure_20 = { code : "function GuildsBarGuildFolderTsx3(finished){const{state,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&state===TransitionStates.YEETED)runOnJS(cleanUp)();}" } ;
let closure_21 = { code : "function GuildsBarGuildFolderTsx4(values){const{dragDropInProgress,sharedId,id,isDragTarget,withSpring,TRANSITION_PHYSICS}=this.__closure;var _id;const shouldAnimate=dragDropInProgress.get()&&sharedId.get()===\"\"+id&&!isDragTarget;sharedId.set(\"\"+((_id=id)!==null&&_id!==void 0?_id:null));return{animations:{originY:shouldAnimate?withSpring(values.targetOriginY,TRANSITION_PHYSICS,'animate-always'):values.targetOriginY,height:shouldAnimate?withSpring(values.targetHeight,TRANSITION_PHYSICS,'animate-always'):values.targetHeight},initialValues:{originY:values.currentOriginY,height:values.currentHeight}};}" } ;
const memoResult1 = importAllResult . memo ( function GuildsBarGuildFolder ( id ) {
let accessibilityActions ;
let badge ;
let cutouts ;
let dragState ;
let isMentionLowImportance ;
let itemSize ;
let mentionCount ;
let onAccessibilityAction ;
let overState ;
let unread ;
id = id . id ;
const expanded = id . expanded ;
const name = id . name ;
const color = id . color ;
const childNodes = id . childNodes ;
let flag = id . isDragPreview ;
if ( flag === undefined ) {
flag = false ;
}
let flag2 = id . hideExpandedChildren ;
if ( flag2 === undefined ) {
flag2 = false ;
}
const foldersChanged = id . foldersChanged ;
2026-07-23 10:11:24 +00:00
let c6 ;
let selectedPreviewId ;
let tintStyle ;
2026-07-20 16:05:17 +00:00
let folderPreviewStyle ;
let isDragTarget ;
2026-07-23 10:11:24 +00:00
let dragDropInProgress ;
2026-07-20 16:05:17 +00:00
let sharedValue ;
2026-07-23 10:11:24 +00:00
let tmp = expanded ( name [ 14 ] ) ( "GuildsBarGuildFolder" ) ;
let obj = id ( name [ 11 ] ) ;
let tmp2 = callback3 ( tmp , obj . useToken ( expanded ( name [ 10 ] ) . modules . mobile . GUILD_BAR_ITEM_SIZE ) ) ;
c6 = tmp2 ;
let obj1 = id ( name [ 24 ] ) ;
let obj2 = id ( name [ 12 ] ) ;
let items = [ childNodes ] ;
2026-07-20 16:05:17 +00:00
const stateFromStoresObject = obj2 . useStateFromStoresObject ( items , ( ) = > {
if ( expanded ) {
2026-07-23 10:11:24 +00:00
return { unread : false , mentionCount : 0 , isMentionLowImportance : false } ;
2026-07-20 16:05:17 +00:00
} else {
const mutableGuildStates = childNodes . getMutableGuildStates ( ) ;
return childNodes . reduce ( ( mentionCount , id ) = > {
if ( null != id . id ) {
let prop ;
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap [ id . id ] ) {
2026-07-20 16:05:17 +00:00
prop = tmp9 . highImportanceMentionCount ;
}
let num2 = 0 ;
if ( null != prop ) {
num2 = prop ;
}
let prop1 ;
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap [ id . id ] ) {
2026-07-20 16:05:17 +00:00
prop1 = tmp3 . lowImportanceMentionCount ;
}
let num3 = 0 ;
if ( null != prop1 ) {
num3 = prop1 ;
}
mentionCount . mentionCount = mentionCount . mentionCount + num2 + num3 ;
let unread = mentionCount . unread ;
if ( ! unread ) {
unread = undefined ;
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap [ id . id ] ) {
2026-07-20 16:05:17 +00:00
unread = tmp6 . unread ;
}
}
mentionCount . unread = null != unread && unread ;
mentionCount . isMentionLowImportance = mentionCount . isMentionLowImportance && 0 === num2 ;
}
return mentionCount ;
2026-07-23 10:11:24 +00:00
} , { unread : false , mentionCount : 0 , isMentionLowImportance : true } ) ;
2026-07-20 16:05:17 +00:00
}
} ) ;
( { unread , mentionCount , isMentionLowImportance } = stateFromStoresObject ) ;
2026-07-23 10:11:24 +00:00
let obj3 = id ( name [ 12 ] ) ;
let items1 = [ c6 , selectedPreviewId ] ;
let items2 = [ expanded , id , childNodes ] ;
2026-07-20 16:05:17 +00:00
const stateFromStoresObject1 = obj3 . useStateFromStoresObject ( items1 , ( ) = > {
2026-07-23 10:11:24 +00:00
const guildId = _undefined . getGuildId ( ) ;
const tmp2 = outer1_22 ( childNodes ) ;
2026-07-20 16:05:17 +00:00
const iter = tmp2 ( ) ;
let iter2 = iter ;
let num = 0 ;
let tmp3 ;
if ( ! iter . done ) {
tmp3 = guildId ;
while ( iter2 . value . id !== guildId ) {
num = num + 1 ;
if ( num >= 4 ) {
break ;
} else {
let iter3 = tmp2 ( ) ;
iter2 = iter3 ;
if ( iter3 . done ) {
break ;
}
}
}
}
let flag = false ;
if ( ! expanded ) {
flag = false ;
if ( null != guildId ) {
const guildsTree = selectedPreviewId . getGuildsTree ( ) ;
const node = guildsTree . getNode ( guildId ) ;
let parentId ;
if ( null != node ) {
parentId = node . parentId ;
}
flag = parentId === id ;
}
}
const obj = { selectedPreviewId : tmp3 , hasGuildSelected : flag } ;
return obj ;
} , items2 ) ;
2026-07-23 10:11:24 +00:00
selectedPreviewId = stateFromStoresObject1 . selectedPreviewId ;
2026-07-20 16:05:17 +00:00
const guildsBarAnimatedWrapperStyles = obj1 . useGuildsBarAnimatedWrapperStyles ( { disableSelectedColor : true , disableBGColor : tmp } ) ;
2026-07-23 10:11:24 +00:00
( { badge , cutouts } = expanded ( name [ 25 ] ) ( { mentionCount , isMentionLowImportance } ) ) ;
const tmp6 = expanded ( name [ 25 ] ) ( { mentionCount , isMentionLowImportance } ) ;
const items3 = [ foldersChanged ] ;
2026-07-20 16:05:17 +00:00
const items4 = [ name , childNodes ] ;
const items5 = [ color ] ;
2026-07-23 10:11:24 +00:00
const memo = color . useMemo ( ( ) = > {
2026-07-20 16:05:17 +00:00
const tintColor = id ( name [ 17 ] ) . int2hex ( null != color ? color : dragDropInProgress ) ;
return { tintStyle : { tintColor } , folderPreviewStyle : { backgroundColor : tintColor } } ;
} , items5 ) ;
2026-07-23 10:11:24 +00:00
tintStyle = memo . tintStyle ;
2026-07-20 16:05:17 +00:00
folderPreviewStyle = memo . folderPreviewStyle ;
const items6 = [ id , foldersChanged ] ;
const items7 = [ expanded , childNodes , tintStyle , selectedPreviewId ] ;
2026-07-23 10:11:24 +00:00
const memo1 = color . useMemo ( ( ) = > ( {
2026-07-20 16:05:17 +00:00
onPress() {
2026-07-23 10:11:24 +00:00
if ( null != outer1_5 ) {
const value = outer1_5 . get ( ) ;
2026-07-20 16:05:17 +00:00
const _HermesInternal2 = HermesInternal ;
2026-07-23 10:11:24 +00:00
if ( value . has ( "" + outer1_0 ) ) {
2026-07-20 16:05:17 +00:00
const _Set = Set ;
2026-07-23 10:11:24 +00:00
const set = new Set ( outer1_5 . get ( ) ) ;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal ;
2026-07-23 10:11:24 +00:00
set . add ( "" + outer1_0 ) ;
const result = outer1_5 . set ( set ) ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
const result1 = id ( name [ 28 ] ) . triggerHapticFeedback ( id ( name [ 28 ] ) . HapticFeedbackTypes . IMPACT_LIGHT ) ;
const obj2 = id ( name [ 28 ] ) ;
const result2 = expanded ( name [ 29 ] ) . toggleGuildFolderExpand ( outer1_0 ) ;
2026-07-20 16:05:17 +00:00
}
} ) , items6 ) ;
const items8 = [ expanded , tmp2 . guildPreviewWrapper , folderPreviewStyle ] ;
2026-07-23 10:11:24 +00:00
const memo2 = color . useMemo ( ( ) = > {
2026-07-20 16:05:17 +00:00
if ( expanded ) {
let obj = { type : "icon" , tintStyle } ;
const items = [ obj ] ;
return items ;
} else {
const items1 = [ ] ;
2026-07-23 10:11:24 +00:00
const tmp3 = outer1_22 ( childNodes ) ;
2026-07-20 16:05:17 +00:00
let iter = tmp3 ( ) ;
if ( ! iter . done ) {
while ( true ) {
let value = iter . value ;
let tmp4 = tintStyle ;
if ( value . type !== tintStyle . GUILD ) {
let iter2 = tmp3 ( ) ;
iter = iter2 ;
if ( iter2 . done ) {
break ;
}
} else {
let arr = items1 . push ( value . id ) ;
if ( items1 . length >= 4 ) {
break ;
}
}
break ;
}
}
obj = { type : "preview" , guilds : items1 , selectedGuildId : selectedPreviewId } ;
const items2 = [ obj ] ;
return items2 ;
}
} , items7 ) ;
2026-07-23 10:11:24 +00:00
const callback = color . useCallback ( ( arg0 ) = > {
2026-07-20 16:05:17 +00:00
let obj = { } ;
obj = { } ;
2026-07-23 10:11:24 +00:00
const items = [ _undefined . guildPreviewWrapper , ] ;
2026-07-20 16:05:17 +00:00
let tmp4 ;
if ( ! expanded ) {
tmp4 = folderPreviewStyle ;
}
items [ 1 ] = tmp4 ;
obj . style = items ;
2026-07-23 10:11:24 +00:00
const items1 = [ outer1_14 ( expanded ( name [ 30 ] ) , obj ) , arg0 ] ;
2026-07-20 16:05:17 +00:00
obj . children = items1 ;
2026-07-23 10:11:24 +00:00
return outer1_15 ( color . Fragment , obj , "wrapper" ) ;
2026-07-20 16:05:17 +00:00
} , items8 ) ;
const tmp11 = folderPreviewStyle ( id , flag ) ;
isDragTarget = tmp11 . isDragTarget ;
2026-07-23 10:11:24 +00:00
dragDropInProgress = tmp11 . dragDropInProgress ;
2026-07-20 16:05:17 +00:00
const items9 = [ id ] ;
( { dragState , overState , itemSize } = tmp11 ) ;
2026-07-23 10:11:24 +00:00
const memo3 = color . useMemo ( ( ) = > {
2026-07-20 16:05:17 +00:00
let obj = id ( name [ 31 ] ) ;
2026-07-23 10:11:24 +00:00
guildFolderMenuItems = obj . getGuildFolderMenuItems ( guildFolderMenuItems ) ;
2026-07-20 16:05:17 +00:00
obj = {
accessibilityActions : guildFolderMenuItems.map ( ( label ) = > ( { name : label.label , label : label.label } ) ) ,
onAccessibilityAction ( arg0 ) {
const guildFolderMenuItems = arg0 ;
2026-07-23 10:11:24 +00:00
const found = guildFolderMenuItems . find ( ( label ) = > label . label === nativeEvent . nativeEvent . actionName ) ;
2026-07-20 16:05:17 +00:00
if ( ! tmp ) {
found . action ( ) ;
}
}
} ;
return obj ;
} , items9 ) ;
( { accessibilityActions , onAccessibilityAction } = memo3 ) ;
2026-07-23 10:11:24 +00:00
const obj5 = id ( name [ 12 ] ) ;
sharedValue = id ( name [ 19 ] ) . useSharedValue ( "" + id ) ;
2026-07-20 16:05:17 +00:00
const fn = function y ( originY ) {
let value = dragDropInProgress . get ( ) ;
if ( value ) {
const _HermesInternal = HermesInternal ;
value = sharedValue . get ( ) ;
value = value === "" + id ;
}
if ( value ) {
value = ! isDragTarget ;
}
let tmp8 = null ;
if ( null != id ) {
tmp8 = id ;
}
const result = sharedValue . set ( "" + tmp8 ) ;
let obj = { } ;
obj = { } ;
if ( value ) {
let targetOriginY = id ( name [ 15 ] ) . withSpring ( originY . targetOriginY , sharedValue , "animate-always" ) ;
const obj3 = id ( name [ 15 ] ) ;
} else {
targetOriginY = originY . targetOriginY ;
}
obj . originY = targetOriginY ;
if ( value ) {
let targetHeight = id ( name [ 15 ] ) . withSpring ( originY . targetHeight , sharedValue , "animate-always" ) ;
const obj4 = id ( name [ 15 ] ) ;
} else {
targetHeight = originY . targetHeight ;
}
obj . height = targetHeight ;
obj . animations = obj ;
obj . initialValues = { originY : originY.currentOriginY , height : originY.currentHeight } ;
return obj ;
} ;
2026-07-23 10:11:24 +00:00
obj = { dragDropInProgress , sharedId : sharedValue , id , isDragTarget , withSpring : id ( name [ 15 ] ) . withSpring , TRANSITION_PHYSICS : sharedValue } ;
2026-07-20 16:05:17 +00:00
fn . __closure = obj ;
fn . __workletHash = 11967845900199 ;
fn . __initData = closure_21 ;
const items10 = [ id , sharedValue , isDragTarget , dragDropInProgress ] ;
2026-07-23 10:11:24 +00:00
const callback1 = color . useCallback ( fn , items10 ) ;
2026-07-20 16:05:17 +00:00
obj = { } ;
2026-07-23 10:11:24 +00:00
const obj6 = id ( name [ 19 ] ) ;
2026-07-20 16:05:17 +00:00
const tmp15 = callback2 ;
obj . id = "" + id ;
obj . draggedItemSize = itemSize ;
obj . accessibilityActions = accessibilityActions ;
obj . onAccessibilityAction = onAccessibilityAction ;
obj . selected = stateFromStoresObject1 . hasGuildSelected ;
obj . unread = ! expanded && unread ;
obj . circle = false ;
obj . styles = guildsBarAnimatedWrapperStyles ;
obj . label = obj5 . useStateFromStores ( items3 , ( ) = > {
if ( null != name ) {
let obj = { count : 1 } ;
const items = [ name ] ;
obj . names = items ;
obj . label = name ;
return obj ;
} else {
const items1 = [ ] ;
2026-07-23 10:11:24 +00:00
const tmp10 = outer1_22 ( childNodes ) ;
2026-07-20 16:05:17 +00:00
let iter2 = tmp10 ( ) ;
let num = 0 ;
if ( ! iter2 . done ) {
while ( true ) {
let tmp = foldersChanged ;
let guild = foldersChanged . getGuild ( iter2 . value . id ) ;
if ( null != guild ) {
let arr = items1 . push ( guild . name ) ;
}
num = num + 1 ;
if ( num >= 3 ) {
break ;
} else {
let iter = tmp10 ( ) ;
iter2 = iter ;
if ( iter . done ) {
break ;
}
}
}
}
obj = { names : items1 , count : childNodes.length , label : id ( name [ 26 ] ) . getListSummaryLabel ( items1 , childNodes . length ) } ;
return obj ;
}
2026-07-23 10:11:24 +00:00
} , items4 , expanded ( name [ 27 ] ) ) . label ;
2026-07-20 16:05:17 +00:00
obj . isDragTarget = isDragTarget ;
obj . dragState = dragState ;
obj . sharedId = sharedValue ;
obj . cutouts = cutouts ;
obj . config = memo1 ;
obj . isDragPreview = flag ;
obj . overState = overState ;
obj . preventClipping = true ;
obj . expanded = expanded ;
obj . layout = callback1 ;
let tmp17 = badge ;
if ( expanded ) {
tmp17 = badge ;
if ( ! flag ) {
obj1 = { color , folderId : id , totalItems : childNodes.length } ;
2026-07-23 10:11:24 +00:00
tmp17 = callback2 ( closure_18 , obj1 ) ;
2026-07-20 16:05:17 +00:00
}
}
obj . externalChildren = tmp17 ;
let tmp20 ;
if ( ! flag2 ) {
obj2 = { folderId : id , expanded } ;
2026-07-23 10:11:24 +00:00
tmp20 = callback2 ( expanded ( name [ 32 ] ) , obj2 ) ;
2026-07-20 16:05:17 +00:00
}
obj . expandedChildren = tmp20 ;
obj3 = { renderItem : renderGuildFolderContent , getItemKey , items : memo2 , wrapChildren : callback } ;
2026-07-23 10:11:24 +00:00
obj . children = callback2 ( id ( name [ 20 ] ) . TransitionGroup , obj3 ) ;
return tmp15 ( expanded ( name [ 24 ] ) , obj ) ;
2026-07-20 16:05:17 +00:00
} ) ;
2026-07-23 10:11:24 +00:00
let result = require ( "_createForOfIteratorHelperLoose" ) . fileFinishedImporting ( "modules/guilds_bar/native/GuildsBarGuildFolder.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default memoResult1 ;
export const GuildsBarGuildFolderBG = memoResult ;