!function(t,e){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=e():"function"==typeofdefine&&define.amd?define(e):(t=t||self).Shuffle=e()}(this,(function(){"use strict";functiont(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functione(t,e){for(vari=0;i<e.length;i++){varn=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}functioni(t,i,n){returni&&e(t.prototype,i),n&&e(t,n),t}functionn(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){returnt.__proto__||Object.getPrototypeOf(t)})(t)}functions(t,e){return(s=Object.setPrototypeOf||function(t,e){returnt.__proto__=e,t})(t,e)}functiono(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnDate.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}functionr(t,e){return!e||"object"!=typeofe&&"function"!=typeofe?function(t){if(void0===t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returnt}(t):e}functionl(){}l.prototype={on:function(t,e,i){varn=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:i}),this},once:function(t,e,i){varn=this;functions(){n.off(t,s),e.apply(i,arguments)}returns._=e,this.on(t,s,i)},emit:function(t){for(vare=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),n=0,s=i.length;n<s;n++)i[n].fn.apply(i[n].ctx,e);returnthis},off:function(t,e){vari=this.e||(this.e={}),n=i[t],s=[];if(n&&e)for(varo=0,r=n.length;o<r;o++)n[o].fn!==e&&n[o].fn._!==e&&s.push(n[o]);returns.length?i[t]=s:deletei[t],this}};vara=l,u=l;a.TinyEmitter=u;varh="undefined"!=typeofElement?Element.prototype:{},f=h.matches||h.matchesSelector||h.webkitMatchesSelector||h.mozMatchesSelector||h.msMatchesSelector||h.oMatchesSelector,c=function(t,e){if(!t||1!==t.nodeType)return!1;if(f)returnf.call(t,e);for(vari=t.parentNode.querySelectorAll(e),n=0;n<i.length;n++)if(i[n]==t)return!0;return!1};vard=function(t,e){vari,n,s,o,r=0;returnfunction(){i=this,n=arguments;vart=newDate-r;returno||(t>=e?l():o=setTimeout(l,e-t)),s};functionl(){o=0,r=+newDate,s=t.apply(i,n),i=null,n=null}};functionp(){}functionm(t){returnparseFloat(t)||0}varv=function(){functione(i,n){t(this,e),this.x=m(i),this.y=m(n)}returni(e,null,[{key:"equals",value:function(t,e){returnt.x===e.x&&t.y===e.y}}]),e}(),y=function(){functione(i,n,s,o,r){t(this,e),this.id=r,this.left=i,this.top=n,this.width=s,this.height=o}returni(e,null,[{key:"intersects",value:function(t,e){returnt.left<e.left+e.width&&e.left<t.left+t.width&&t.top<e.top+e.height&&e.top<t.top+t.height}}]),e}(),g={BASE:"shuffle",SHUFFLE_ITEM:"shuffle-item",VISIBLE:"shuffle-item--visible",HIDDEN:"shuffle-item--hidden"},_=0,E=function(){functione(i){t(this,e),_+=1,this.id=_,this.element=i,this.isVisible=!0,this.isHidden=!1}returni(e,[{key:"show",value:function(){this.isVisible=!0,this.element.classList.remove(g.HIDDEN),this.element.classList.add(g.VISIBLE),this.element.removeAttribute("aria-hidden")}},{key:"hide",value:function(){this.isVisible=!1,this.element.classList.remove(g.VISIBLE),this.element.classList.add(g.HIDDEN),this.element.setAttribute("aria-hidden",!0)}},{key:"init",value:function(){this.addClasses([g.SHUFFLE_ITEM,g.VISIBLE]),this.applyCss(e.Css.INITIAL),this.scale=e.Scale.VISIBLE,this.point=newv}},{key:"addClasses",value:function(t){vare=this;t.forEach((function(t){e.element.classList.add(t)}))}},{key:"removeClasses",value:function(t){vare=this;t.forEach((function(t){e.element.classList.remove(t)}))}},{key:"applyCss",value:function(t){vare=this;Object.keys(t).forEach((function(i){e.element.style[i]=t[i]}))}},{key:"dispose",value:function(){this.removeClasses([g.HIDDEN,g.VISIBLE,g.SHUFFLE_ITEM]),this.element.removeAttribute("style"),this.element=null}}]),e}();E.Css={INITIAL:{position:"absolute",top:0,left:0,visibility:"visible",willChange:"transform"},VISIBLE:{before:{opacity:1,visibility:"visible