constanimateCSS= (element, animation, prefix ='animate__') =>// We create a Promise and return itnewPromise((resolve, reject) => {constanimationName=`${prefix}${animation}`;constnode=document.querySelector(element);node.classList.add(`${prefix}animated`, animationName);// When the animation ends, we clean the classes and resolve the PromisefunctionhandleAnimationEnd(event) {event.stopPropagation();node.classList.remove(`${prefix}animated`, animationName);resolve('Animation ended'); }node.addEventListener('animationend', handleAnimationEnd, {once:true}); });