function permissionInSet(_0x217316,_0x54b050){if(!_0x217316||!_0x54b050)return![];if(_0x217316['includes']('*'))return!![];if(_0x217316['includes'](_0x54b050))return!![];const [_0x34a4eb]=_0x54b050['split'](':');if(_0x217316['includes'](_0x34a4eb+':*'))return!![];return![];}function hasServerPermission(_0x1cde32,_0x14709a){const _0x27b65b=_0x1cde32?.['permissions']?.['server'];if(!_0x27b65b)return![];return permissionInSet(_0x27b65b,_0x14709a);}function hasEnvPermission(_0x2b1067,_0x1e81cf){if(hasServerPermission(_0x2b1067,'*'))return!![];const _0x3df177=_0x2b1067?.['permissions']?.['environments'];if(!_0x3df177)return![];for(const _0x1dd1a1 of Object['values'](_0x3df177)){if(permissionInSet(_0x1dd1a1,_0x1e81cf))return!![];}return![];}function hasEnvPermissionOn(_0x578aa7,_0x28c6bd,_0x30fb08){if(hasServerPermission(_0x578aa7,'*'))return!![];const _0x1b06ea=_0x578aa7?.['permissions']?.['environments']?.[_0x28c6bd];if(!_0x1b06ea)return![];return permissionInSet(_0x1b06ea,_0x30fb08);}function hasTeamPermission(_0x5cbd5b,_0x2b6463){if(hasServerPermission(_0x5cbd5b,'*'))return!![];const _0x303d29=_0x5cbd5b?.['permissions']?.['teams'];if(!_0x303d29)return![];for(const _0x3a538c of Object['values'](_0x303d29)){if(permissionInSet(_0x3a538c,_0x2b6463))return!![];}return![];}function hasAnyEnvironment(_0x5682a5){if(hasServerPermission(_0x5682a5,'*'))return!![];const _0x37d4bb=_0x5682a5?.['permissions']?.['environments'];return _0x37d4bb!=null&&Object['keys'](_0x37d4bb)['length']>0x0;}window['Permissions']={'hasServerPermission':hasServerPermission,'hasEnvPermission':hasEnvPermission,'hasEnvPermissionOn':hasEnvPermissionOn,'hasTeamPermission':hasTeamPermission,'hasAnyEnvironment':hasAnyEnvironment};