function permissionInSet(_0x2d3f16,_0x381f0b){if(!_0x2d3f16||!_0x381f0b)return![];if(_0x2d3f16['includes']('*'))return!![];if(_0x2d3f16['includes'](_0x381f0b))return!![];const [_0x59f3de]=_0x381f0b['split'](':');if(_0x2d3f16['includes'](_0x59f3de+':*'))return!![];return![];}function hasServerPermission(_0x15ff80,_0x3c1133){const _0x1e11f7=_0x15ff80?.['permissions']?.['server'];if(!_0x1e11f7)return![];return permissionInSet(_0x1e11f7,_0x3c1133);}function hasEnvPermission(_0x3aa7cc,_0x2541cf){if(hasServerPermission(_0x3aa7cc,'*'))return!![];const _0x5696af=_0x3aa7cc?.['permissions']?.['environments'];if(!_0x5696af)return![];for(const _0x37dd5f of Object['values'](_0x5696af)){if(permissionInSet(_0x37dd5f,_0x2541cf))return!![];}return![];}function hasEnvPermissionOn(_0x3c352b,_0x38c7e2,_0x56475b){if(hasServerPermission(_0x3c352b,'*'))return!![];const _0x2dbab3=_0x3c352b?.['permissions']?.['environments']?.[_0x38c7e2];if(!_0x2dbab3)return![];return permissionInSet(_0x2dbab3,_0x56475b);}function hasTeamPermission(_0x2d0e04,_0x8d7c2e){if(hasServerPermission(_0x2d0e04,'*'))return!![];const _0x2fa261=_0x2d0e04?.['permissions']?.['teams'];if(!_0x2fa261)return![];for(const _0x465cf9 of Object['values'](_0x2fa261)){if(permissionInSet(_0x465cf9,_0x8d7c2e))return!![];}return![];}function hasAnyEnvironment(_0x2daae3){if(hasServerPermission(_0x2daae3,'*'))return!![];const _0x381256=_0x2daae3?.['permissions']?.['environments'];return _0x381256!=null&&Object['keys'](_0x381256)['length']>0x0;}window['Permissions']={'hasServerPermission':hasServerPermission,'hasEnvPermission':hasEnvPermission,'hasEnvPermissionOn':hasEnvPermissionOn,'hasTeamPermission':hasTeamPermission,'hasAnyEnvironment':hasAnyEnvironment};