/* * Title: Typewriter JS * Descritpion: A native javascript plugin that can be used to create an elegent automatic typewriter animation effect on websites. * Author: Tameem Safi * Website: https://safi.me.uk * Version: 1.0.0 */ (function(){(function(){for(var a=0,c=["ms","moz","webkit","o"],b=0;b=this._settings.eventQue.length){var c= this;c._stopEventLoop();setTimeout(function(){c.options.loop&&(c.eventLoopRerun++,c.options.devMode&&console.log("Before Loop State",c._settings),4=this._settings.currentOpacity&&(this._settings.opacityIncreasing=!0,this._settings.currentOpacity=0),this._settings.currentOpacity-=a);c.style.opacity=this._settings.currentOpacity;this._cursorAnimation=window.requestAnimationFrame(this._cursorAnimationFrame.bind(this))}};b._startCursorAnimation=function(){var a=this.options.cursor, c=this.options.cursorClassName,b=document.createElement("span");b.className=c;b.innerHTML=a;this.el.appendChild(b);this.options.animateCursor&&(this._cursorAnimation=window.requestAnimationFrame(this._cursorAnimationFrame.bind(this)))};b._pauseCursorAnimation=function(){this._settings.cursorAnimationPaused||(window.cancelAnimationFrame(this._cursorAnimation),this._settings.cursorAnimationPaused=!0)};b._restartCursorAnimation=function(){if(!this._settings.cursorAnimationPaused)return console.error("Cursor animation is already running."); this._settings.cursorAnimationPaused=!1;this._cursorAnimation=window.requestAnimationFrame(this._cursorAnimationFrame.bind(this))};b._randomInteger=function(a,b){return Math.floor(Math.random()*(b-a+1))+a};b._randomID=function(){for(var a="",b=0;b