'use strict';
import { first } from '../server/collections/single-funcs.js';

var __defProp=Object['defineProperty'],__name=(_0x315e0b,_0x5da30d)=>__defProp(_0x315e0b,'name',{'value':_0x5da30d,'configurable':!![]});function getFlagsEnumNumber(_0x33390e){let _0x2f1fb9=first(_0x33390e);if(_0x33390e['length']>-0x1006+-0xf42*0x1+0x1f49*0x1)for(let _0x2fa5b6=-0x3b*0x6f+0x1a*-0x1f+-0x994*-0x3;_0x2fa5b6<_0x33390e['length'];_0x2fa5b6++){_0x2f1fb9=_0x2f1fb9|_0x33390e[_0x2fa5b6];}return _0x2f1fb9;}__name(getFlagsEnumNumber,'getFlagsEnumNumber');function getFlagArrayForNumberValueByMaxFlagValue(_0x3ed233,_0x5d137c){if(_0x3ed233===0x3f*-0x63+0x1ef9*-0x1+0x3756)return [_0x3ed233];return getFlagArrayForFlagNumberByMaxFlagValue(_0x3ed233,_0x5d137c);}__name(getFlagArrayForNumberValueByMaxFlagValue,'getFlagArrayForNumberValueByMaxFlagValue');function getFlagArrayForFlagNumberFomEnum(_0x196006,_0x206a39){if(_0x196006===0xf12*-0x2+-0x860+0x2684)return [_0x196006];let _0x1ad0fc=sumEnumFlagValuesFunc(_0x206a39);return getFlagArrayForFlagNumberByMaxFlagValue(_0x196006,_0x1ad0fc);}__name(getFlagArrayForFlagNumberFomEnum,'getFlagArrayForFlagNumberFomEnum');function getFlagString(_0x577c8e,_0x336c8c){const _0x29ace1=Array['from'](_0x577c8e['entries']())['map'](([_0x529646,_0x12261d])=>({'key':_0x529646,'value':_0x12261d}));if(_0x336c8c===0x708*0x1+0x190f+0x1*-0x2017&&_0x29ace1['length']>0x20b8+-0xfff+-0x10b9)return first(_0x29ace1)['value'];const _0x34bbe5=_0x29ace1['filter'](_0x18c6e0=>_0x18c6e0['key']!==0x1*0x129d+0x7*-0x1df+-0x584&&(_0x336c8c&_0x18c6e0['key'])===_0x18c6e0['key']);return _0x34bbe5['map'](_0x21733a=>_0x21733a['value'])['join'](',\x20');}__name(getFlagString,'getFlagString');function getFlagArrayForFlagNumberByMaxFlagValue(_0x1bcf41,_0x56508e){let _0x2e9f35=[];const _0x418b7e=Math['ceil'](Math['log2'](_0x56508e+(0x15c*-0x13+0xde*0x15+0x79f*0x1)));for(let _0x2c09b7=-0xe1f+0x1c3f+0x71*-0x20;_0x2c09b7<_0x418b7e;_0x2c09b7++){const _0x376942=-0x1230+-0x236c+-0x1*-0x359d<<_0x2c09b7;(_0x1bcf41&_0x376942)===_0x376942&&_0x2e9f35['push'](_0x376942);}return _0x2e9f35;}__name(getFlagArrayForFlagNumberByMaxFlagValue,'getFlagArrayForFlagNumberByMaxFlagValue');function sumEnumFlagValuesFunc(_0x490101){return Object['keys'](_0x490101)['filter'](_0x20fc5d=>isNaN(Number(_0x20fc5d)))['map'](_0x3d65b8=>_0x490101[_0x3d65b8])['reduce']((_0x5256fa,_0x1411ac)=>_0x5256fa+_0x1411ac,-0x22b5+-0xbbd+0x2e72);}__name(sumEnumFlagValuesFunc,'sumEnumFlagValuesFunc');

export { getFlagArrayForFlagNumberFomEnum, getFlagArrayForNumberValueByMaxFlagValue, getFlagString, getFlagsEnumNumber };
