const _0xf02087=_0x5e7c;function _0x5e7c(_0x23d6ae,_0x47ddc8){const _0xa7dd56=_0xa7dd();return _0x5e7c=function(_0x5e7cf4,_0x2ce2e){_0x5e7cf4=_0x5e7cf4-0xa8;let _0xabc032=_0xa7dd56[_0x5e7cf4];return _0xabc032;},_0x5e7c(_0x23d6ae,_0x47ddc8);}(function(_0x51cb12,_0x50d3ac){const _0x48b087=_0x5e7c,_0x12c032=_0x51cb12();while(!![]){try{const _0x3c4534=parseInt(_0x48b087(0xa9))/0x1*(-parseInt(_0x48b087(0xb1))/0x2)+-parseInt(_0x48b087(0xb8))/0x3+parseInt(_0x48b087(0xb7))/0x4*(parseInt(_0x48b087(0xb2))/0x5)+-parseInt(_0x48b087(0xb4))/0x6*(parseInt(_0x48b087(0xb3))/0x7)+-parseInt(_0x48b087(0xae))/0x8+-parseInt(_0x48b087(0xb6))/0x9+parseInt(_0x48b087(0xaf))/0xa;if(_0x3c4534===_0x50d3ac)break;else _0x12c032['push'](_0x12c032['shift']());}catch(_0x39a804){_0x12c032['push'](_0x12c032['shift']());}}}(_0xa7dd,0x90e99));function _0xa7dd(){const _0x358eed=['isValid','7545618XFBbXj','12nDrHsD','1321404EYTzpm','cooldownHook_','42894cZpmYu','add','setRuntimeVar','call','__generic:','7973544IQHJNE','27985150Vtzzim','delete','24EPrNfx','1764450IzuVbZ','7bSIpKL','2839998psejXS'];_0xa7dd=function(){return _0x358eed;};return _0xa7dd();}let i=0x0;export default function (ticks,category=_0xf02087(0xad)+ ++i+'__'){const _0x28e7fe=_0xf02087,runtimeVar=_0x28e7fe(0xa8)+category,entities=new Set();return[function trigger(entity,customTick){const _0x208f96=_0x28e7fe;entity['setRuntimeVar'](runtimeVar,customTick!==null&&customTick!==void 0x0?customTick:ticks),entities[_0x208f96(0xaa)](entity);},function onCooldown(entity){const _0x40d158=_0x28e7fe;var ref;return!!((ref=entity['getRuntimeVar'])===null||ref===void 0x0?void 0x0:ref[_0x40d158(0xac)](entity,runtimeVar));},function update(){const _0x18cf2c=_0x28e7fe;for(const entity of entities){let cooldown=entity['getRuntimeVar'](runtimeVar);cooldown!==undefined&&entity[_0x18cf2c(0xb5)]()?(entity[_0x18cf2c(0xab)](runtimeVar,--cooldown),cooldown<=0x0&&(entity[_0x18cf2c(0xab)](runtimeVar,undefined),entities['delete'](entity))):entities[_0x18cf2c(0xb0)](entity);}}];}