function permissionInSet(_0x263dd1,_0x2555db){if(!_0x263dd1||!_0x2555db)return![];if(_0x263dd1['includes']('*'))return!![];if(_0x263dd1['includes'](_0x2555db))return!![];const [_0x50a161]=_0x2555db['split'](':');if(_0x263dd1['includes'](_0x50a161+':*'))return!![];return![];}function hasServerPermission(_0x58481a,_0x125727){const _0x20e0c9=_0x58481a?.['permissions']?.['server'];if(!_0x20e0c9)return![];return permissionInSet(_0x20e0c9,_0x125727);}function hasEnvPermission(_0x2b2a9d,_0x547956){if(hasServerPermission(_0x2b2a9d,'*'))return!![];const _0x4db7d9=_0x2b2a9d?.['permissions']?.['environments'];if(!_0x4db7d9)return![];for(const _0x274988 of Object['values'](_0x4db7d9)){if(permissionInSet(_0x274988,_0x547956))return!![];}return![];}function hasEnvPermissionOn(_0x56a4af,_0x2de1ce,_0x1a9acf){if(hasServerPermission(_0x56a4af,'*'))return!![];const _0x5749ce=_0x56a4af?.['permissions']?.['environments']?.[_0x2de1ce];if(!_0x5749ce)return![];return permissionInSet(_0x5749ce,_0x1a9acf);}function hasTeamPermission(_0x3a1c7b,_0xea4526){if(hasServerPermission(_0x3a1c7b,'*'))return!![];const _0xbaf9d7=_0x3a1c7b?.['permissions']?.['teams'];if(!_0xbaf9d7)return![];for(const _0xfcc6be of Object['values'](_0xbaf9d7)){if(permissionInSet(_0xfcc6be,_0xea4526))return!![];}return![];}function hasAnyEnvironment(_0x1ff068){if(hasServerPermission(_0x1ff068,'*'))return!![];const _0xe92a34=_0x1ff068?.['permissions']?.['environments'];return _0xe92a34!=null&&Object['keys'](_0xe92a34)['length']>0x0;}window['Permissions']={'hasServerPermission':hasServerPermission,'hasEnvPermission':hasEnvPermission,'hasEnvPermissionOn':hasEnvPermissionOn,'hasTeamPermission':hasTeamPermission,'hasAnyEnvironment':hasAnyEnvironment};