export const USER_FILTER_MIN_USERS=0x6;function normalizeText(_0x2643bc){return String(_0x2643bc??'')['trim']()['toLowerCase']();}function normalizeAccessFilter(_0x34e5fe){const _0x214eda=normalizeText(_0x34e5fe);return _0x214eda||'all';}export function canFilterUsers(_0x52f05f){return Array['isArray'](_0x52f05f)&&_0x52f05f['length']>=USER_FILTER_MIN_USERS;}export function hasActiveUserFilters(_0x26c640={}){return Boolean(normalizeText(_0x26c640['search']))||normalizeAccessFilter(_0x26c640['access'])!=='all';}export function userMatchesAccessFilter(_0x140c43,_0x422584='all'){switch(normalizeAccessFilter(_0x422584)){case'server-admin':return Boolean(_0x140c43?.['isServerAdmin']);case'user-binding':return Boolean(_0x140c43?.['hasUserBinding']);case'team-binding':return Boolean(_0x140c43?.['hasTeamBinding']);case'no-access':return!_0x140c43?.['isServerAdmin']&&!_0x140c43?.['hasUserBinding']&&!_0x140c43?.['hasTeamBinding'];case'all':default:return!![];}}export function userMatchesSearch(_0x5d8130,_0x334162=''){const _0x49b809=normalizeText(_0x334162)['split'](/\s+/)['filter'](Boolean);if(_0x49b809['length']===0x0)return!![];const _0x126e08=[_0x5d8130?.['username'],_0x5d8130?.['name'],_0x5d8130?.['email']]['map'](normalizeText)['join']('\x20');return _0x49b809['every'](_0x126f86=>_0x126e08['includes'](_0x126f86));}export function filterUsers(_0x1c486e,_0x5a1c4b={},_0xe9d70e={}){const _0x108b7a=Array['isArray'](_0x1c486e)?_0x1c486e:[],_0x7a469=_0xe9d70e['requireThreshold']!==![];if(_0x7a469&&!canFilterUsers(_0x108b7a))return _0x108b7a;return _0x108b7a['filter'](_0x3b89e1=>userMatchesSearch(_0x3b89e1,_0x5a1c4b['search'])&&userMatchesAccessFilter(_0x3b89e1,_0x5a1c4b['access']));}