function typeWrite(a,b={}){a=document.querySelector(a),this.element=a,this.text=a.textContent,this.options=b,this.options={speed:b.speed?b.speed:100,separator:b.separator?b.separator:" ",texts:b.texts?this.options.texts:[this.text],loop:!!b.loop&&this.options.loop,reverseDelay:b.reverseDelay?this.options.reverseDelay:100,cursor:b.cursor?this.options.cursor:"|"};var c=document.createElement("style");c.type="text/css";var d=Math.floor(9999*Math.random()+1);return c.innerHTML=".typewriter-"+d+":after{content:'"+this.options.cursor+"';display: inline-block;animation-name:typewrite;animation-duration:.5s;animation-timing-function:ease;animation-iteration-count:infinite}@keyframes typewrite{0%{opacity:0}100%{opacity:1}}",document.body.appendChild(c),this.typewriteAddClass("typewriter-"+d),this.text}typeWrite.prototype.start=function(){var j,a=this.options.speed,b=0,d=this.element,g=(this.text,this.options,this.options.texts),h=this,i=this.options.loop;d.innerText="",d.textContent="";var m,k=0,n=new CustomEvent("typeDone"),o=function(){d.innerText||d.textContent;if("undefined"!=typeof g[k][b])d.textContent+=g[k].charAt(b);else{clearInterval(m);var e=k;i?h.reverse(function(){b=0,"undefined"!=typeof g[e++]&&k