export const USER_FILTER_MIN_USERS=0x6;function normalizeText(_0x378dec){return String(_0x378dec??'')['trim']()['toLowerCase']();}function normalizeAccessFilter(_0x48e756){const _0x53acb2=normalizeText(_0x48e756);return _0x53acb2||'all';}export function canFilterUsers(_0x1cca78){return Array['isArray'](_0x1cca78)&&_0x1cca78['length']>=USER_FILTER_MIN_USERS;}export function hasActiveUserFilters(_0x3d094d={}){return Boolean(normalizeText(_0x3d094d['search']))||normalizeAccessFilter(_0x3d094d['access'])!=='all';}export function userMatchesAccessFilter(_0x5cfdaa,_0x5877f1='all'){switch(normalizeAccessFilter(_0x5877f1)){case'server-admin':return Boolean(_0x5cfdaa?.['isServerAdmin']);case'user-binding':return Boolean(_0x5cfdaa?.['hasUserBinding']);case'team-binding':return Boolean(_0x5cfdaa?.['hasTeamBinding']);case'no-access':return!_0x5cfdaa?.['isServerAdmin']&&!_0x5cfdaa?.['hasUserBinding']&&!_0x5cfdaa?.['hasTeamBinding'];case'all':default:return!![];}}export function userMatchesSearch(_0x2ac9a0,_0x5136af=''){const _0x569a95=normalizeText(_0x5136af)['split'](/\s+/)['filter'](Boolean);if(_0x569a95['length']===0x0)return!![];const _0x2a436a=[_0x2ac9a0?.['username'],_0x2ac9a0?.['name'],_0x2ac9a0?.['email']]['map'](normalizeText)['join']('\x20');return _0x569a95['every'](_0x397494=>_0x2a436a['includes'](_0x397494));}export function filterUsers(_0x1dd21e,_0x4a14c5={},_0x339ad6={}){const _0x5bd394=Array['isArray'](_0x1dd21e)?_0x1dd21e:[],_0xfee4f=_0x339ad6['requireThreshold']!==![];if(_0xfee4f&&!canFilterUsers(_0x5bd394))return _0x5bd394;return _0x5bd394['filter'](_0xd69eb=>userMatchesSearch(_0xd69eb,_0x4a14c5['search'])&&userMatchesAccessFilter(_0xd69eb,_0x4a14c5['access']));}