class gspbTextType{constructor(el,toRotate,period){this.toRotate=toRotate,this.el=el,this.loopNum=0,this.period=parseInt(period,10)||2e3,this.txt="",this.tick(),this.isDeleting=!1}tick(){var i=this.loopNum%this.toRotate.length,fullTxt=this.toRotate[i];this.isDeleting?this.txt=fullTxt.substring(0,this.txt.length-1):this.txt=fullTxt.substring(0,this.txt.length+1),this.el.innerHTML='<span class="gstypewrap">'+this.txt+"</span>";var that=this,delta=200-100*Math.random();this.isDeleting&&(delta/=2),this.isDeleting||this.txt!==fullTxt?this.isDeleting&&""===this.txt&&(this.isDeleting=!1,this.loopNum++,delta=500):(delta=this.period,this.isDeleting=!0),setTimeout((function(){that.tick()}),delta)}}let gstypewriterelements=document.getElementsByClassName("gstypewrite");gstypewriterelements.length>0&&Array.from(gstypewriterelements).forEach(el=>{let toRotate=el.getAttribute("data-type"),period=el.getAttribute("data-period");toRotate&&new gspbTextType(el,JSON.parse(toRotate),period)});