diff --git a/gulpfile.js b/gulpfile.js
index b6d8714..a17a4d0 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -72,20 +72,17 @@ gulp.task('server', function () {
gulp.watch(['docs/images/**/*'], server.notify);
});
+gulp.task('serve', [
+ 'watch',
+ 'server'
+]);
+
// Watch Task
gulp.task('watch', () => {
livereload({ start: true });
- gulp.watch('src/*.js', ['default']);
+ gulp.watch('src/*.js', ['md-docs', 'html-docs', 'default']);
});
-gulp.task('serve', [
- 'default',
- 'md-docs',
- 'html-docs',
- 'server',
- 'watch'
-]);
-
gulp.task('default', [
'lint',
'build',
diff --git a/lib/typed.js b/lib/typed.js
index ffca0d2..8c14c59 100644
--- a/lib/typed.js
+++ b/lib/typed.js
@@ -79,7 +79,7 @@ return /******/ (function(modules) { // webpackBootstrap
/**
* Welcome to Typed.js!
- * @param {string} elementId HTML element ID
+ * @param {string} elementId HTML element ID _OR_ HTML element
* @param {object} options options object
* @returns {object} a new Typed object
*/
@@ -579,13 +579,17 @@ return /******/ (function(modules) { // webpackBootstrap
* Load up defaults & options on the Typed instance
* @param {Typed} self instance of Typed
* @param {object} options options object
- * @param {string} elementId HTML element ID
+ * @param {string} elementId HTML element ID _OR_ instance of HTML element
* @private
*/
value: function load(self, options, elementId) {
// chosen element to manipulate text
- self.el = document.querySelector(elementId);
+ if (typeof elementId === 'string') {
+ self.el = document.querySelector(elementId);
+ } else {
+ self.el = elementId;
+ }
self.options = {};
Object.assign(self.options, _defaultsJs2['default'], options);
@@ -639,7 +643,11 @@ return /******/ (function(modules) { // webpackBootstrap
});
// div containing strings
- self.stringsElement = document.querySelector(self.options.stringsElement);
+ if (typeof self.options.stringsElement === 'string') {
+ self.stringsElement = document.querySelector(self.options.stringsElement);
+ } else {
+ self.stringsElement = self.options.stringsElement;
+ }
if (self.stringsElement) {
self.strings = [];
diff --git a/lib/typed.min.js b/lib/typed.min.js
index 0d73f46..680cceb 100644
--- a/lib/typed.min.js
+++ b/lib/typed.min.js
@@ -7,5 +7,5 @@
* License(s): MIT
*
*/
-(function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Typed=e():t.Typed=e()})(this,function(){return function(t){function e(n){if(s[n])return s[n].exports;var i=s[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var s={};return e.m=t,e.c=s,e.p="",e(0)}([function(t,e,s){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var s=0;s
s.stopNum?(e--,s.backspace(t,e)):e<=s.stopNum&&(s.arrayPos++,s.arrayPos===s.strings.length?(s.arrayPos=0,s.options.onLastStringBackspaced(),s.shuffleStringsIfNeeded(),s.begin()):s.typewrite(s.strings[s.sequence[s.arrayPos]],e))},n)}},{key:"complete",value:function(){this.options.onComplete(this),this.loop?this.curLoop++:this.typingComplete=!0}},{key:"setPauseStatus",value:function(t,e,s){this.pause.typewrite=s,this.pause.curString=t,this.pause.curStrPos=e}},{key:"toggleBlinking",value:function(t){if(this.cursor&&!this.pause.status&&this.cursorBlinking!==t){this.cursorBlinking=t;var e=t?"infinite":0;this.cursor.style.animationIterationCount=e}}},{key:"humanizer",value:function(t){return Math.round(Math.random()*t/2)+t}},{key:"shuffleStringsIfNeeded",value:function(){this.shuffle&&(this.sequence=this.sequence.sort(function(){return Math.random()-.5}))}},{key:"initFadeOut",value:function(){var t=this;return this.el.className+=" "+this.fadeOutClass,this.cursor.className+=" "+this.fadeOutClass,setTimeout(function(){t.arrayPos++,t.replaceText(""),t.strings.length>t.arrayPos?t.typewrite(t.strings[t.sequence[t.arrayPos]],0):(t.typewrite(t.strings[0],0),t.arrayPos=0)},this.fadeOutDelay)}},{key:"replaceText",value:function(t){this.attr?this.el.setAttribute(this.attr,t):this.isInput?this.el.value=t:"html"===this.contentType?this.el.innerHTML=t:this.el.textContent=t}},{key:"bindFocusEvents",value:function(){var t=this;this.isInput&&(this.el.addEventListener("focus",function(e){t.stop()}),this.el.addEventListener("blur",function(e){t.el.value&&0!==t.el.value.length||t.start()}))}},{key:"insertCursor",value:function(){this.showCursor&&(this.cursor||(this.cursor=document.createElement("span"),this.cursor.className="typed-cursor",this.cursor.innerHTML=this.cursorChar,this.el.parentNode&&this.el.parentNode.insertBefore(this.cursor,this.el.nextSibling)))}}]),t}();e["default"]=a,t.exports=e["default"]},function(t,e,s){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var s=0;s":";";t.substr(e+1).charAt(0)!==i&&(e++,!(e+1>t.length)););e++}return e}},{key:"backSpaceHtmlChars",value:function(t,e,s){if("html"!==s.contentType)return e;var n=t.substr(e).charAt(0);if(">"===n||";"===n){var i="";for(i=">"===n?"<":"&";t.substr(e-1).charAt(0)!==i&&(e--,!(e<0)););e--}return e}}]),t}();e["default"]=i;var r=new i;e.htmlParser=r}])});
+(function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Typed=e():t.Typed=e()})(this,function(){return function(t){function e(n){if(s[n])return s[n].exports;var i=s[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var s={};return e.m=t,e.c=s,e.p="",e(0)}([function(t,e,s){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var s=0;ss.stopNum?(e--,s.backspace(t,e)):e<=s.stopNum&&(s.arrayPos++,s.arrayPos===s.strings.length?(s.arrayPos=0,s.options.onLastStringBackspaced(),s.shuffleStringsIfNeeded(),s.begin()):s.typewrite(s.strings[s.sequence[s.arrayPos]],e))},n)}},{key:"complete",value:function(){this.options.onComplete(this),this.loop?this.curLoop++:this.typingComplete=!0}},{key:"setPauseStatus",value:function(t,e,s){this.pause.typewrite=s,this.pause.curString=t,this.pause.curStrPos=e}},{key:"toggleBlinking",value:function(t){if(this.cursor&&!this.pause.status&&this.cursorBlinking!==t){this.cursorBlinking=t;var e=t?"infinite":0;this.cursor.style.animationIterationCount=e}}},{key:"humanizer",value:function(t){return Math.round(Math.random()*t/2)+t}},{key:"shuffleStringsIfNeeded",value:function(){this.shuffle&&(this.sequence=this.sequence.sort(function(){return Math.random()-.5}))}},{key:"initFadeOut",value:function(){var t=this;return this.el.className+=" "+this.fadeOutClass,this.cursor.className+=" "+this.fadeOutClass,setTimeout(function(){t.arrayPos++,t.replaceText(""),t.strings.length>t.arrayPos?t.typewrite(t.strings[t.sequence[t.arrayPos]],0):(t.typewrite(t.strings[0],0),t.arrayPos=0)},this.fadeOutDelay)}},{key:"replaceText",value:function(t){this.attr?this.el.setAttribute(this.attr,t):this.isInput?this.el.value=t:"html"===this.contentType?this.el.innerHTML=t:this.el.textContent=t}},{key:"bindFocusEvents",value:function(){var t=this;this.isInput&&(this.el.addEventListener("focus",function(e){t.stop()}),this.el.addEventListener("blur",function(e){t.el.value&&0!==t.el.value.length||t.start()}))}},{key:"insertCursor",value:function(){this.showCursor&&(this.cursor||(this.cursor=document.createElement("span"),this.cursor.className="typed-cursor",this.cursor.innerHTML=this.cursorChar,this.el.parentNode&&this.el.parentNode.insertBefore(this.cursor,this.el.nextSibling)))}}]),t}();e["default"]=a,t.exports=e["default"]},function(t,e,s){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var s=0;s":";";t.substr(e+1).charAt(0)!==i&&(e++,!(e+1>t.length)););e++}return e}},{key:"backSpaceHtmlChars",value:function(t,e,s){if("html"!==s.contentType)return e;var n=t.substr(e).charAt(0);if(">"===n||";"===n){var i="";for(i=">"===n?"<":"&";t.substr(e-1).charAt(0)!==i&&(e--,!(e<0)););e--}return e}}]),t}();e["default"]=i;var r=new i;e.htmlParser=r}])});
//# sourceMappingURL=typed.min.js.map
diff --git a/lib/typed.min.js.map b/lib/typed.min.js.map
index e229eff..06c3d9e 100644
--- a/lib/typed.min.js.map
+++ b/lib/typed.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["typed.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_classCallCheck","instance","Constructor","TypeError","Object","defineProperty","value","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","_initializerJs","_htmlParserJs","Typed","elementId","options","initializer","load","begin","pause","status","start","stop","typingComplete","toggleBlinking","onStop","arrayPos","typewrite","curString","curStrPos","backspace","onStart","reset","onDestroy","restart","arguments","undefined","clearInterval","timeout","replaceText","cursor","parentNode","removeChild","strPos","curLoop","insertCursor","onReset","_this","shuffleStringsIfNeeded","bindInputFocusEvents","bindFocusEvents","setTimeout","currentElContent","strings","sequence","startDelay","_this2","fadeOut","el","classList","contains","fadeOutClass","remove","humanize","humanizer","typeSpeed","setPauseStatus","pauseTime","substr","charAt","skip","test","exec","parseInt","temporaryPause","onTypingPaused","substring","htmlParser","typeHtmlChars","doneTyping","keepTyping","onTypingResumed","preStringTyped","nextString","_this3","onStringTyped","complete","loop","loopCount","backDelay","_this4","initFadeOut","backSpeed","backSpaceHtmlChars","curStringAtPosition","smartBackspace","stopNum","onLastStringBackspaced","onComplete","isTyping","isBlinking","cursorBlinking","style","animationIterationCount","speed","Math","round","random","shuffle","sort","_this5","className","fadeOutDelay","str","attr","setAttribute","isInput","contentType","innerHTML","textContent","_this6","addEventListener","e","showCursor","document","createElement","cursorChar","insertBefore","nextSibling","_interopRequireDefault","obj","__esModule","default","_defaultsJs","_defaultsJs2","Initializer","self","querySelector","assign","tagName","toLowerCase","elContent","getAttribute","isPaused","map","s","trim","stringsElement","display","Array","slice","apply","children","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","Symbol","iterator","next","done","push","err","getCurrentElContent","autoInsertCss","appendAnimationCss","css","type","innerCss","head","appendChild","defaults","Infinity","HTMLParser","curChar","endTag"],"mappings":";;;;;;;;;CASA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,IACQ,kBAAXG,SAAyBA,OAAOC,IAC9CD,UAAWH,GACe,gBAAZC,SACdA,QAAe,MAAID,IAEnBD,EAAY,MAAIC,MACfK,KAAM,WACT,MAAgB,UAAUC,GAKhB,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUP,OAGnC,IAAIC,GAASO,EAAiBD,IAC7BP,WACAS,GAAIF,EACJG,QAAQ,EAUT,OANAL,GAAQE,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOS,QAAS,EAGTT,EAAOD,QAvBf,GAAIQ,KAqCJ,OATAF,GAAoBM,EAAIP,EAGxBC,EAAoBO,EAAIL,EAGxBF,EAAoBQ,EAAI,GAGjBR,EAAoB,KAK/B,SAAUL,EAAQD,EAASM,GAEhC,YAQA,SAASS,GAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCANhHC,OAAOC,eAAepB,EAAS,cAC7BqB,OAAO,GAGT,IAAIC,GAAe,WAAe,QAASC,GAAiBC,EAAQC,GAAS,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,GAAIE,GAAaH,EAAMC,EAAIE,GAAWC,WAAaD,EAAWC,aAAc,EAAOD,EAAWE,cAAe,EAAU,SAAWF,KAAYA,EAAWG,UAAW,GAAMZ,OAAOC,eAAeI,EAAQI,EAAWI,IAAKJ,IAAiB,MAAO,UAAUX,EAAagB,EAAYC,GAAiJ,MAA9HD,IAAYV,EAAiBN,EAAY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L,IACXvK,IAAK,gBAWLX,MAAO,SAAuBgC,EAAWC,EAAW2G,GAClD,GAAyB,SAArBA,EAAKnB,YAAwB,MAAOxF,EACxC,IAAIkJ,GAAUnJ,EAAUwC,OAAOvC,GAAWwC,OAAO,EACjD,IAAgB,MAAZ0G,GAA+B,MAAZA,EAAiB,CACtC,GAAIC,GAAS,EAMb,KAJEA,EADc,MAAZD,EACO,IAEA,IAEJnJ,EAAUwC,OAAOvC,EAAY,GAAGwC,OAAO,KAAO2G,IACnDnJ,MACIA,EAAY,EAAID,EAAU1B,WAIhC2B,IAEF,MAAOA,MAYTtB,IAAK,qBACLX,MAAO,SAA4BgC,EAAWC,EAAW2G,GACvD,GAAyB,SAArBA,EAAKnB,YAAwB,MAAOxF,EACxC,IAAIkJ,GAAUnJ,EAAUwC,OAAOvC,GAAWwC,OAAO,EACjD,IAAgB,MAAZ0G,GAA+B,MAAZA,EAAiB,CACtC,GAAIC,GAAS,EAMb,KAJEA,EADc,MAAZD,EACO,IAEA,IAEJnJ,EAAUwC,OAAOvC,EAAY,GAAGwC,OAAO,KAAO2G,IACnDnJ,MACIA,EAAY,MAIlBA,IAEF,MAAOA,OAIJiJ,IAGTvM,GAAQ,WAAauM,CACrB,IAAIjG,GAAa,GAAIiG,EACrBvM,GAAQsG,WAAaA","file":"typed.min.js","sourcesContent":["/*!\n * \n * typed.js - A JavaScript Typing Animation Library\n * Author: Matt Boldt \n * Version: v2.0.1\n * Url: https://github.com/mattboldt/typed.js\n * License(s): MIT\n * \n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Typed\"] = factory();\n\telse\n\t\troot[\"Typed\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\t\n\tvar _initializerJs = __webpack_require__(1);\n\t\n\tvar _htmlParserJs = __webpack_require__(3);\n\t\n\t/**\n\t * Welcome to Typed.js!\n\t * @param {string} elementId HTML element ID\n\t * @param {object} options options object\n\t * @returns {object} a new Typed object\n\t */\n\t\n\tvar Typed = (function () {\n\t function Typed(elementId, options) {\n\t _classCallCheck(this, Typed);\n\t\n\t // Initialize it up\n\t _initializerJs.initializer.load(this, options, elementId);\n\t // All systems go!\n\t this.begin();\n\t }\n\t\n\t /**\n\t * Toggle start() and stop() of the Typed instance\n\t * @public\n\t */\n\t\n\t _createClass(Typed, [{\n\t key: 'toggle',\n\t value: function toggle() {\n\t this.pause.status ? this.start() : this.stop();\n\t }\n\t\n\t /**\n\t * Stop typing / backspacing and enable cursor blinking\n\t * @public\n\t */\n\t }, {\n\t key: 'stop',\n\t value: function stop() {\n\t if (this.typingComplete) return;\n\t if (this.pause.status) return;\n\t this.toggleBlinking(true);\n\t this.pause.status = true;\n\t this.options.onStop(this.arrayPos, this);\n\t }\n\t\n\t /**\n\t * Start typing / backspacing after being stopped\n\t * @public\n\t */\n\t }, {\n\t key: 'start',\n\t value: function start() {\n\t if (this.typingComplete) return;\n\t if (!this.pause.status) return;\n\t this.pause.status = false;\n\t if (this.pause.typewrite) {\n\t this.typewrite(this.pause.curString, this.pause.curStrPos);\n\t } else {\n\t this.backspace(this.pause.curString, this.pause.curStrPos);\n\t }\n\t this.options.onStart(this.arrayPos, this);\n\t }\n\t\n\t /**\n\t * Destroy this instance of Typed\n\t * @public\n\t */\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t this.reset(false);\n\t this.options.onDestroy(this);\n\t }\n\t\n\t /**\n\t * Reset Typed and optionally restarts\n\t * @param {boolean} restart\n\t * @public\n\t */\n\t }, {\n\t key: 'reset',\n\t value: function reset() {\n\t var restart = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];\n\t\n\t clearInterval(this.timeout);\n\t this.replaceText('');\n\t if (this.cursor && this.cursor.parentNode) {\n\t this.cursor.parentNode.removeChild(this.cursor);\n\t this.cursor = null;\n\t }\n\t this.strPos = 0;\n\t this.arrayPos = 0;\n\t this.curLoop = 0;\n\t if (restart) {\n\t this.insertCursor();\n\t this.options.onReset(this);\n\t this.begin();\n\t }\n\t }\n\t\n\t /**\n\t * Begins the typing animation\n\t * @private\n\t */\n\t }, {\n\t key: 'begin',\n\t value: function begin() {\n\t var _this = this;\n\t\n\t this.typingComplete = false;\n\t this.shuffleStringsIfNeeded(this);\n\t this.insertCursor();\n\t if (this.bindInputFocusEvents) this.bindFocusEvents();\n\t this.timeout = setTimeout(function () {\n\t // Check if there is some text in the element, if yes start by backspacing the default message\n\t if (!_this.currentElContent || _this.currentElContent.length === 0) {\n\t _this.typewrite(_this.strings[_this.sequence[_this.arrayPos]], _this.strPos);\n\t } else {\n\t // Start typing\n\t _this.backspace(_this.currentElContent, _this.currentElContent.length);\n\t }\n\t }, this.startDelay);\n\t }\n\t\n\t /**\n\t * Called for each character typed\n\t * @param {string} curString the current string in the strings array\n\t * @param {number} curStrPos the current position in the curString\n\t * @private\n\t */\n\t }, {\n\t key: 'typewrite',\n\t value: function typewrite(curString, curStrPos) {\n\t var _this2 = this;\n\t\n\t if (this.fadeOut && this.el.classList.contains(this.fadeOutClass)) {\n\t this.el.classList.remove(this.fadeOutClass);\n\t this.cursor.classList.remove(this.fadeOutClass);\n\t }\n\t\n\t var humanize = this.humanizer(this.typeSpeed);\n\t\n\t if (this.pause.status === true) {\n\t this.setPauseStatus(curString, curStrPos, true);\n\t return;\n\t }\n\t\n\t // contain typing function in a timeout humanize'd delay\n\t this.timeout = setTimeout(function () {\n\t // check for an escape character before a pause value\n\t // format: \\^\\d+ .. eg: ^1000 .. should be able to print the ^ too using ^^\n\t // single ^ are removed from string\n\t var pauseTime = 0;\n\t var substr = curString.substr(curStrPos);\n\t if (substr.charAt(0) === '^') {\n\t var skip = 1; // skip atleast 1\n\t if (/^\\^\\d+/.test(substr)) {\n\t substr = /\\d+/.exec(substr)[0];\n\t skip += substr.length;\n\t pauseTime = parseInt(substr);\n\t _this2.temporaryPause = true;\n\t _this2.options.onTypingPaused(_this2.arrayPos, _this2);\n\t }\n\t _this2.toggleBlinking(true);\n\t\n\t // strip out the escape character and pause value so they're not printed\n\t curString = curString.substring(0, curStrPos) + curString.substring(curStrPos + skip);\n\t }\n\t\n\t curStrPos = _htmlParserJs.htmlParser.typeHtmlChars(curString, curStrPos, _this2);\n\t\n\t // timeout for any pause after a character\n\t _this2.timeout = setTimeout(function () {\n\t // Accounts for blinking while paused\n\t _this2.toggleBlinking(false);\n\t\n\t // We're done with this sentence!\n\t if (curStrPos === curString.length) {\n\t _this2.doneTyping(curString, curStrPos);\n\t } else {\n\t _this2.keepTyping(curString, curStrPos);\n\t }\n\t // end of character pause\n\t if (_this2.temporaryPause) {\n\t _this2.temporaryPause = false;\n\t _this2.options.onTypingResumed(_this2.arrayPos, _this2);\n\t }\n\t }, pauseTime);\n\t\n\t // humanized value for typing\n\t }, humanize);\n\t }\n\t\n\t /**\n\t * Continue to the next string & begin typing\n\t * @param {string} curString the current string in the strings array\n\t * @param {number} curStrPos the current position in the curString\n\t * @private\n\t */\n\t }, {\n\t key: 'keepTyping',\n\t value: function keepTyping(curString, curStrPos) {\n\t // call before functions if applicable\n\t if (curStrPos === 0) {\n\t this.toggleBlinking(false);\n\t this.options.preStringTyped(this.arrayPos, this);\n\t }\n\t // start typing each new char into existing string\n\t // curString: arg, this.el.html: original text inside element\n\t var nextString = curString.substr(0, curStrPos + 1);\n\t this.replaceText(nextString);\n\t // add characters one by one\n\t curStrPos++;\n\t // loop the function\n\t this.typewrite(curString, curStrPos);\n\t }\n\t\n\t /**\n\t * We're done typing all strings\n\t * @param {string} curString the current string in the strings array\n\t * @param {number} curStrPos the current position in the curString\n\t * @private\n\t */\n\t }, {\n\t key: 'doneTyping',\n\t value: function doneTyping(curString, curStrPos) {\n\t var _this3 = this;\n\t\n\t // fires callback function\n\t this.options.onStringTyped(this.arrayPos, this);\n\t this.toggleBlinking(true);\n\t // is this the final string\n\t if (this.arrayPos === this.strings.length - 1) {\n\t // callback that occurs on the last typed string\n\t this.complete();\n\t // quit if we wont loop back\n\t if (this.loop === false || this.curLoop === this.loopCount) {\n\t return;\n\t }\n\t }\n\t this.timeout = setTimeout(function () {\n\t _this3.backspace(curString, curStrPos);\n\t }, this.backDelay);\n\t }\n\t\n\t /**\n\t * Backspaces 1 character at a time\n\t * @param {string} curString the current string in the strings array\n\t * @param {number} curStrPos the current position in the curString\n\t * @private\n\t */\n\t }, {\n\t key: 'backspace',\n\t value: function backspace(curString, curStrPos) {\n\t var _this4 = this;\n\t\n\t if (this.pause.status === true) {\n\t this.setPauseStatus(curString, curStrPos, true);\n\t return;\n\t }\n\t if (this.fadeOut) return this.initFadeOut();\n\t\n\t this.toggleBlinking(false);\n\t var humanize = this.humanizer(this.backSpeed);\n\t\n\t this.timeout = setTimeout(function () {\n\t curStrPos = _htmlParserJs.htmlParser.backSpaceHtmlChars(curString, curStrPos, _this4);\n\t // replace text with base text + typed characters\n\t var curStringAtPosition = curString.substr(0, curStrPos);\n\t _this4.replaceText(curStringAtPosition);\n\t\n\t // if smartBack is enabled\n\t if (_this4.smartBackspace) {\n\t // the remaining part of the current string is equal of the same part of the new string\n\t var nextString = _this4.strings[_this4.arrayPos + 1];\n\t if (nextString && curStringAtPosition === nextString.substr(0, curStrPos)) {\n\t _this4.stopNum = curStrPos;\n\t } else {\n\t _this4.stopNum = 0;\n\t }\n\t }\n\t\n\t // if the number (id of character in current string) is\n\t // less than the stop number, keep going\n\t if (curStrPos > _this4.stopNum) {\n\t // subtract characters one by one\n\t curStrPos--;\n\t // loop the function\n\t _this4.backspace(curString, curStrPos);\n\t } else if (curStrPos <= _this4.stopNum) {\n\t // if the stop number has been reached, increase\n\t // array position to next string\n\t _this4.arrayPos++;\n\t // When looping, begin at the beginning after backspace complete\n\t if (_this4.arrayPos === _this4.strings.length) {\n\t _this4.arrayPos = 0;\n\t _this4.options.onLastStringBackspaced();\n\t _this4.shuffleStringsIfNeeded();\n\t _this4.begin();\n\t } else {\n\t _this4.typewrite(_this4.strings[_this4.sequence[_this4.arrayPos]], curStrPos);\n\t }\n\t }\n\t // humanized value for typing\n\t }, humanize);\n\t }\n\t\n\t /**\n\t * Full animation is complete\n\t * @private\n\t */\n\t }, {\n\t key: 'complete',\n\t value: function complete() {\n\t this.options.onComplete(this);\n\t if (this.loop) {\n\t this.curLoop++;\n\t } else {\n\t this.typingComplete = true;\n\t }\n\t }\n\t\n\t /**\n\t * Has the typing been stopped\n\t * @param {string} curString the current string in the strings array\n\t * @param {number} curStrPos the current position in the curString\n\t * @param {boolean} isTyping\n\t * @private\n\t */\n\t }, {\n\t key: 'setPauseStatus',\n\t value: function setPauseStatus(curString, curStrPos, isTyping) {\n\t this.pause.typewrite = isTyping;\n\t this.pause.curString = curString;\n\t this.pause.curStrPos = curStrPos;\n\t }\n\t\n\t /**\n\t * Toggle the blinking cursor\n\t * @param {boolean} isBlinking\n\t * @private\n\t */\n\t }, {\n\t key: 'toggleBlinking',\n\t value: function toggleBlinking(isBlinking) {\n\t if (!this.cursor) return;\n\t // if in paused state, don't toggle blinking a 2nd time\n\t if (this.pause.status) return;\n\t if (this.cursorBlinking === isBlinking) return;\n\t this.cursorBlinking = isBlinking;\n\t var status = isBlinking ? 'infinite' : 0;\n\t this.cursor.style.animationIterationCount = status;\n\t }\n\t\n\t /**\n\t * Speed in MS to type\n\t * @param {number} speed\n\t * @private\n\t */\n\t }, {\n\t key: 'humanizer',\n\t value: function humanizer(speed) {\n\t return Math.round(Math.random() * speed / 2) + speed;\n\t }\n\t\n\t /**\n\t * Shuffle the sequence of the strings array\n\t * @private\n\t */\n\t }, {\n\t key: 'shuffleStringsIfNeeded',\n\t value: function shuffleStringsIfNeeded() {\n\t if (!this.shuffle) return;\n\t this.sequence = this.sequence.sort(function () {\n\t return Math.random() - 0.5;\n\t });\n\t }\n\t\n\t /**\n\t * Adds a CSS class to fade out current string\n\t * @private\n\t */\n\t }, {\n\t key: 'initFadeOut',\n\t value: function initFadeOut() {\n\t var _this5 = this;\n\t\n\t this.el.className += ' ' + this.fadeOutClass;\n\t this.cursor.className += ' ' + this.fadeOutClass;\n\t return setTimeout(function () {\n\t _this5.arrayPos++;\n\t _this5.replaceText('');\n\t\n\t // Resets current string if end of loop reached\n\t if (_this5.strings.length > _this5.arrayPos) {\n\t _this5.typewrite(_this5.strings[_this5.sequence[_this5.arrayPos]], 0);\n\t } else {\n\t _this5.typewrite(_this5.strings[0], 0);\n\t _this5.arrayPos = 0;\n\t }\n\t }, this.fadeOutDelay);\n\t }\n\t\n\t /**\n\t * Replaces current text in the HTML element\n\t * depending on element type\n\t * @param {string} str\n\t * @private\n\t */\n\t }, {\n\t key: 'replaceText',\n\t value: function replaceText(str) {\n\t if (this.attr) {\n\t this.el.setAttribute(this.attr, str);\n\t } else {\n\t if (this.isInput) {\n\t this.el.value = str;\n\t } else if (this.contentType === 'html') {\n\t this.el.innerHTML = str;\n\t } else {\n\t this.el.textContent = str;\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * If using input elements, bind focus in order to\n\t * start and stop the animation\n\t * @private\n\t */\n\t }, {\n\t key: 'bindFocusEvents',\n\t value: function bindFocusEvents() {\n\t var _this6 = this;\n\t\n\t if (!this.isInput) return;\n\t this.el.addEventListener('focus', function (e) {\n\t _this6.stop();\n\t });\n\t this.el.addEventListener('blur', function (e) {\n\t if (_this6.el.value && _this6.el.value.length !== 0) {\n\t return;\n\t }\n\t _this6.start();\n\t });\n\t }\n\t\n\t /**\n\t * On init, insert the cursor element\n\t * @private\n\t */\n\t }, {\n\t key: 'insertCursor',\n\t value: function insertCursor() {\n\t if (!this.showCursor) return;\n\t if (this.cursor) return;\n\t this.cursor = document.createElement('span');\n\t this.cursor.className = 'typed-cursor';\n\t this.cursor.innerHTML = this.cursorChar;\n\t this.el.parentNode && this.el.parentNode.insertBefore(this.cursor, this.el.nextSibling);\n\t }\n\t }]);\n\t\n\t return Typed;\n\t})();\n\t\n\texports['default'] = Typed;\n\tmodule.exports = exports['default'];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\t\n\tvar _defaultsJs = __webpack_require__(2);\n\t\n\tvar _defaultsJs2 = _interopRequireDefault(_defaultsJs);\n\t\n\t/**\n\t * Initialize the Typed object\n\t */\n\t\n\tvar Initializer = (function () {\n\t function Initializer() {\n\t _classCallCheck(this, Initializer);\n\t }\n\t\n\t _createClass(Initializer, [{\n\t key: 'load',\n\t\n\t /**\n\t * Load up defaults & options on the Typed instance\n\t * @param {Typed} self instance of Typed\n\t * @param {object} options options object\n\t * @param {string} elementId HTML element ID\n\t * @private\n\t */\n\t\n\t value: function load(self, options, elementId) {\n\t // chosen element to manipulate text\n\t self.el = document.querySelector(elementId);\n\t\n\t self.options = {};\n\t Object.assign(self.options, _defaultsJs2['default'], options);\n\t\n\t // attribute to type into\n\t self.isInput = self.el.tagName.toLowerCase() === 'input';\n\t self.attr = self.options.attr;\n\t self.bindInputFocusEvents = self.options.bindInputFocusEvents;\n\t\n\t // show cursor\n\t self.showCursor = self.isInput ? false : self.options.showCursor;\n\t\n\t // custom cursor\n\t self.cursorChar = self.options.cursorChar;\n\t\n\t // Is the cursor blinking\n\t self.cursorBlinking = true;\n\t\n\t // text content of element\n\t self.elContent = self.attr ? self.el.getAttribute(self.attr) : self.el.textContent;\n\t\n\t // html or plain text\n\t self.contentType = self.options.contentType;\n\t\n\t // typing speed\n\t self.typeSpeed = self.options.typeSpeed;\n\t\n\t // add a delay before typing starts\n\t self.startDelay = self.options.startDelay;\n\t\n\t // backspacing speed\n\t self.backSpeed = self.options.backSpeed;\n\t\n\t // only backspace what doesn't match the previous string\n\t self.smartBackspace = self.options.smartBackspace;\n\t\n\t // amount of time to wait before backspacing\n\t self.backDelay = self.options.backDelay;\n\t\n\t // Fade out instead of backspace\n\t self.fadeOut = self.options.fadeOut;\n\t self.fadeOutClass = self.options.fadeOutClass;\n\t self.fadeOutDelay = self.options.fadeOutDelay;\n\t\n\t // variable to check whether typing is currently paused\n\t self.isPaused = false;\n\t\n\t // input strings of text\n\t self.strings = self.options.strings.map(function (s) {\n\t return s.trim();\n\t });\n\t\n\t // div containing strings\n\t self.stringsElement = document.querySelector(self.options.stringsElement);\n\t\n\t if (self.stringsElement) {\n\t self.strings = [];\n\t self.stringsElement.style.display = 'none';\n\t var strings = Array.prototype.slice.apply(self.stringsElement.children);\n\t var _iteratorNormalCompletion = true;\n\t var _didIteratorError = false;\n\t var _iteratorError = undefined;\n\t\n\t try {\n\t for (var _iterator = strings[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t var s = _step.value;\n\t\n\t self.strings.push(s.innerHTML.trim());\n\t }\n\t } catch (err) {\n\t _didIteratorError = true;\n\t _iteratorError = err;\n\t } finally {\n\t try {\n\t if (!_iteratorNormalCompletion && _iterator['return']) {\n\t _iterator['return']();\n\t }\n\t } finally {\n\t if (_didIteratorError) {\n\t throw _iteratorError;\n\t }\n\t }\n\t }\n\t }\n\t\n\t // character number position of current string\n\t self.strPos = 0;\n\t\n\t // current array position\n\t self.arrayPos = 0;\n\t\n\t // index of string to stop backspacing on\n\t self.stopNum = 0;\n\t\n\t // Looping logic\n\t self.loop = self.options.loop;\n\t self.loopCount = self.options.loopCount;\n\t self.curLoop = 0;\n\t\n\t // shuffle the strings\n\t self.shuffle = self.options.shuffle;\n\t // the order of strings\n\t self.sequence = [];\n\t\n\t self.pause = {\n\t status: false,\n\t typewrite: true,\n\t curString: '',\n\t curStrPos: 0\n\t };\n\t\n\t // When the typing is complete (when not looped)\n\t self.typingComplete = false;\n\t\n\t // Set the order in which the strings are typed\n\t for (var i in self.strings) {\n\t self.sequence[i] = i;\n\t }\n\t\n\t // If there is some text in the element\n\t self.currentElContent = this.getCurrentElContent(self);\n\t\n\t self.autoInsertCss = self.options.autoInsertCss;\n\t\n\t this.appendAnimationCss(self);\n\t }\n\t }, {\n\t key: 'getCurrentElContent',\n\t value: function getCurrentElContent(self) {\n\t var elContent = '';\n\t if (self.attr) {\n\t elContent = self.el.getAttribute(self.attr);\n\t } else if (self.isInput) {\n\t elContent = self.el.value;\n\t } else if (self.contentType === 'html') {\n\t elContent = self.el.innerHTML;\n\t } else {\n\t elContent = self.el.textContent;\n\t }\n\t return elContent;\n\t }\n\t }, {\n\t key: 'appendAnimationCss',\n\t value: function appendAnimationCss(self) {\n\t if (!self.autoInsertCss) {\n\t return;\n\t }\n\t if (!self.showCursor || !self.fadeOut) {\n\t return;\n\t }\n\t\n\t var css = document.createElement('style');\n\t css.type = 'text/css';\n\t var innerCss = '';\n\t if (self.showCursor) {\n\t innerCss += '\\n .typed-cursor{\\n opacity: 1;\\n animation: typedjsBlink 0.7s infinite;\\n -webkit-animation: typedjsBlink 0.7s infinite;\\n animation: typedjsBlink 0.7s infinite;\\n }\\n @keyframes typedjsBlink{\\n 50% { opacity: 0.0; }\\n }\\n @-webkit-keyframes typedjsBlink{\\n 0% { opacity: 1; }\\n 50% { opacity: 0.0; }\\n 100% { opacity: 1; }\\n }\\n ';\n\t }\n\t if (self.fadeOut) {\n\t innerCss += '\\n .typed-fade-out{\\n opacity: 0;\\n transition: opacity .25s;\\n -webkit-animation: 0;\\n animation: 0;\\n }\\n ';\n\t }\n\t if (css.length === 0) {\n\t return;\n\t }\n\t css.innerHTML = innerCss;\n\t document.head.appendChild(css);\n\t }\n\t }]);\n\t\n\t return Initializer;\n\t})();\n\t\n\texports['default'] = Initializer;\n\tvar initializer = new Initializer();\n\texports.initializer = initializer;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\t/**\n\t * Defaults & options\n\t * @returns {object} Typed defaults & options\n\t * @public\n\t */\n\t\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\tvar defaults = {\n\t /**\n\t * @property {array} strings strings to be typed\n\t * @property {string} stringsElement ID of element containing string children\n\t */\n\t strings: ['These are the default values...', 'You know what you should do?', 'Use your own!', 'Have a great day!'],\n\t stringsElement: null,\n\t\n\t /**\n\t * @property {number} typeSpeed type speed in milliseconds\n\t */\n\t typeSpeed: 0,\n\t\n\t /**\n\t * @property {number} startDelay time before typing starts in milliseconds\n\t */\n\t startDelay: 0,\n\t\n\t /**\n\t * @property {number} backSpeed backspacing speed in milliseconds\n\t */\n\t backSpeed: 0,\n\t\n\t /**\n\t * @property {boolean} smartBackspace only backspace what doesn't match the previous string\n\t */\n\t smartBackspace: true,\n\t\n\t /**\n\t * @property {boolean} shuffle shuffle the strings\n\t */\n\t shuffle: false,\n\t\n\t /**\n\t * @property {number} backDelay time before backspacing in milliseconds\n\t */\n\t backDelay: 700,\n\t\n\t /**\n\t * @property {boolean} fadeOut Fade out instead of backspace\n\t * @property {string} fadeOutClass css class for fade animation\n\t * @property {boolean} fadeOutDelay Fade out delay in milliseconds\n\t */\n\t fadeOut: false,\n\t fadeOutClass: 'typed-fade-out',\n\t fadeOutDelay: 500,\n\t\n\t /**\n\t * @property {boolean} loop loop strings\n\t * @property {number} loopCount amount of loops\n\t */\n\t loop: false,\n\t loopCount: Infinity,\n\t\n\t /**\n\t * @property {boolean} showCursor show cursor\n\t * @property {string} cursorChar character for cursor\n\t * @property {boolean} autoInsertCss insert CSS for cursor and fadeOut into HTML \n\t */\n\t showCursor: true,\n\t cursorChar: '|',\n\t autoInsertCss: true,\n\t\n\t /**\n\t * @property {string} attr attribute for typing\n\t * Ex: input placeholder, value, or just HTML text\n\t */\n\t attr: null,\n\t\n\t /**\n\t * @property {boolean} bindInputFocusEvents bind to focus and blur if el is text input\n\t */\n\t bindInputFocusEvents: false,\n\t\n\t /**\n\t * @property {string} contentType 'html' or 'null' for plaintext\n\t */\n\t contentType: 'html',\n\t\n\t /**\n\t * All typing is complete\n\t * @param {Typed} self\n\t */\n\t onComplete: function onComplete(self) {},\n\t\n\t /**\n\t * Before each string is typed\n\t * @param {number} arrayPos\n\t * @param {Typed} self\n\t */\n\t preStringTyped: function preStringTyped(arrayPos, self) {},\n\t\n\t /**\n\t * After each string is typed\n\t * @param {number} arrayPos\n\t * @param {Typed} self\n\t */\n\t onStringTyped: function onStringTyped(arrayPos, self) {},\n\t\n\t /**\n\t * During looping, after last string is typed\n\t * @param {Typed} self\n\t */\n\t onLastStringBackspaced: function onLastStringBackspaced(self) {},\n\t\n\t /**\n\t * Typing has been stopped\n\t * @param {number} arrayPos\n\t * @param {Typed} self\n\t */\n\t onTypingPaused: function onTypingPaused(arrayPos, self) {},\n\t\n\t /**\n\t * Typing has been started after being stopped\n\t * @param {number} arrayPos\n\t * @param {Typed} self\n\t */\n\t onTypingResumed: function onTypingResumed(arrayPos, self) {},\n\t\n\t /**\n\t * After reset\n\t * @param {Typed} self\n\t */\n\t onReset: function onReset(self) {},\n\t\n\t /**\n\t * After stop\n\t * @param {number} arrayPos\n\t * @param {Typed} self\n\t */\n\t onStop: function onStop(arrayPos, self) {},\n\t\n\t /**\n\t * After start\n\t * @param {number} arrayPos\n\t * @param {Typed} self\n\t */\n\t onStart: function onStart(arrayPos, self) {},\n\t\n\t /**\n\t * After destroy\n\t * @param {Typed} self\n\t */\n\t onDestroy: function onDestroy(self) {}\n\t};\n\t\n\texports['default'] = defaults;\n\tmodule.exports = exports['default'];\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t\n\t/**\n\t * TODO: These methods can probably be combined somehow\n\t * Parse HTML tags & HTML Characters\n\t */\n\t\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\t\n\tvar HTMLParser = (function () {\n\t function HTMLParser() {\n\t _classCallCheck(this, HTMLParser);\n\t }\n\t\n\t _createClass(HTMLParser, [{\n\t key: 'typeHtmlChars',\n\t\n\t /**\n\t * Type HTML tags & HTML Characters\n\t * @param {string} curString Current string\n\t * @param {number} curStrPos Position in current string\n\t * @param {Typed} self instance of Typed\n\t * @returns {number} a new string position\n\t * @private\n\t */\n\t\n\t value: function typeHtmlChars(curString, curStrPos, self) {\n\t if (self.contentType !== 'html') return curStrPos;\n\t var curChar = curString.substr(curStrPos).charAt(0);\n\t if (curChar === '<' || curChar === '&') {\n\t var endTag = '';\n\t if (curChar === '<') {\n\t endTag = '>';\n\t } else {\n\t endTag = ';';\n\t }\n\t while (curString.substr(curStrPos + 1).charAt(0) !== endTag) {\n\t curStrPos++;\n\t if (curStrPos + 1 > curString.length) {\n\t break;\n\t }\n\t }\n\t curStrPos++;\n\t }\n\t return curStrPos;\n\t }\n\t\n\t /**\n\t * Backspace HTML tags and HTML Characters\n\t * @param {string} curString Current string\n\t * @param {number} curStrPos Position in current string\n\t * @param {Typed} self instance of Typed\n\t * @returns {number} a new string position\n\t * @private\n\t */\n\t }, {\n\t key: 'backSpaceHtmlChars',\n\t value: function backSpaceHtmlChars(curString, curStrPos, self) {\n\t if (self.contentType !== 'html') return curStrPos;\n\t var curChar = curString.substr(curStrPos).charAt(0);\n\t if (curChar === '>' || curChar === ';') {\n\t var endTag = '';\n\t if (curChar === '>') {\n\t endTag = '<';\n\t } else {\n\t endTag = '&';\n\t }\n\t while (curString.substr(curStrPos - 1).charAt(0) !== endTag) {\n\t curStrPos--;\n\t if (curStrPos < 0) {\n\t break;\n\t }\n\t }\n\t curStrPos--;\n\t }\n\t return curStrPos;\n\t }\n\t }]);\n\t\n\t return HTMLParser;\n\t})();\n\t\n\texports['default'] = HTMLParser;\n\tvar htmlParser = new HTMLParser();\n\texports.htmlParser = htmlParser;\n\n/***/ })\n/******/ ])\n});\n;"]}
\ No newline at end of file
+{"version":3,"sources":["typed.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_classCallCheck","instance","Constructor","TypeError","Object","defineProperty","value","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","_initializerJs","_htmlParserJs","Typed","elementId","options","initializer","load","begin","pause","status","start","stop","typingComplete","toggleBlinking","onStop","arrayPos","typewrite","curString","curStrPos","backspace","onStart","reset","onDestroy","restart","arguments","undefined","clearInterval","timeout","replaceText","cursor","parentNode","removeChild","strPos","curLoop","insertCursor","onReset","_this","shuffleStringsIfNeeded","bindInputFocusEvents","bindFocusEvents","setTimeout","currentElContent","strings","sequence","startDelay","_this2","fadeOut","el","classList","contains","fadeOutClass","remove","humanize","humanizer","typeSpeed","setPauseStatus","pauseTime","substr","charAt","skip","test","exec","parseInt","temporaryPause","onTypingPaused","substring","htmlParser","typeHtmlChars","doneTyping","keepTyping","onTypingResumed","preStringTyped","nextString","_this3","onStringTyped","complete","loop","loopCount","backDelay","_this4","initFadeOut","backSpeed","backSpaceHtmlChars","curStringAtPosition","smartBackspace","stopNum","onLastStringBackspaced","onComplete","isTyping","isBlinking","cursorBlinking","style","animationIterationCount","speed","Math","round","random","shuffle","sort","_this5","className","fadeOutDelay","str","attr","setAttribute","isInput","contentType","innerHTML","textContent","_this6","addEventListener","e","showCursor","document","createElement","cursorChar","insertBefore","nextSibling","_interopRequireDefault","obj","__esModule","default","_defaultsJs","_defaultsJs2","Initializer","self","querySelector","assign","tagName","toLowerCase","elContent","getAttribute","isPaused","map","s","trim","stringsElement","display","Array","slice","apply","children","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","Symbol","iterator","next","done","push","err","getCurrentElContent","autoInsertCss","appendAnimationCss","css","type","innerCss","head","appendChild","defaults","Infinity","HTMLParser","curChar","endTag"],"mappings":";;;;;;;;;CASA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,IACQ,kBAAXG,SAAyBA,OAAOC,IAC9CD,UAAWH,GACe,gBAAZC,SACdA,QAAe,MAAID,IAEnBD,EAAY,MAAIC,MACfK,KAAM,WACT,MAAgB,UAAUC,GAKhB,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUP,OAGnC,IAAIC,GAASO,EAAiBD,IAC7BP,WACAS,GAAIF,EACJG,QAAQ,EAUT,OANAL,GAAQE,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOS,QAAS,EAGTT,EAAOD,QAvBf,GAAIQ,KAqCJ,OATAF,GAAoBM,EAAIP,EAGxBC,EAAoBO,EAAIL,EAGxBF,EAAoBQ,EAAI,GAGjBR,EAAoB,KAK/B,SAAUL,EAAQD,EAASM,GAEhC,YAQA,SAASS,GAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCANhHC,OAAOC,eAAepB,EAAS,cAC7BqB,OAAO,GAGT,IAAIC,GAAe,WAAe,QAASC,GAAiBC,EAAQC,GAAS,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME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author: Matt Boldt \n * Version: v2.0.1\n * Url: https://github.com/mattboldt/typed.js\n * License(s): MIT\n * \n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Typed\"] = factory();\n\telse\n\t\troot[\"Typed\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\t\n\tvar _initializerJs = __webpack_require__(1);\n\t\n\tvar _htmlParserJs = __webpack_require__(3);\n\t\n\t/**\n\t * Welcome to Typed.js!\n\t * @param {string} elementId HTML element ID _OR_ HTML element\n\t * @param {object} options options object\n\t * @returns {object} a new Typed object\n\t */\n\t\n\tvar Typed = (function () {\n\t function Typed(elementId, options) {\n\t _classCallCheck(this, Typed);\n\t\n\t // Initialize it up\n\t _initializerJs.initializer.load(this, options, elementId);\n\t // All systems go!\n\t this.begin();\n\t }\n\t\n\t /**\n\t * Toggle start() and stop() of the Typed instance\n\t * @public\n\t */\n\t\n\t _createClass(Typed, [{\n\t key: 'toggle',\n\t value: function toggle() {\n\t this.pause.status ? this.start() : this.stop();\n\t }\n\t\n\t /**\n\t * Stop typing / backspacing and enable cursor blinking\n\t * @public\n\t */\n\t }, {\n\t key: 'stop',\n\t value: function stop() {\n\t if (this.typingComplete) return;\n\t if (this.pause.status) return;\n\t this.toggleBlinking(true);\n\t this.pause.status = true;\n\t this.options.onStop(this.arrayPos, this);\n\t }\n\t\n\t /**\n\t * Start typing / backspacing after being stopped\n\t * @public\n\t */\n\t }, {\n\t key: 'start',\n\t value: function start() {\n\t if (this.typingComplete) return;\n\t if (!this.pause.status) return;\n\t this.pause.status = false;\n\t if (this.pause.typewrite) {\n\t this.typewrite(this.pause.curString, this.pause.curStrPos);\n\t } else {\n\t this.backspace(this.pause.curString, this.pause.curStrPos);\n\t }\n\t this.options.onStart(this.arrayPos, this);\n\t }\n\t\n\t /**\n\t * Destroy this instance of Typed\n\t * @public\n\t */\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t this.reset(false);\n\t this.options.onDestroy(this);\n\t }\n\t\n\t /**\n\t * Reset Typed and optionally restarts\n\t * @param {boolean} restart\n\t * @public\n\t */\n\t }, {\n\t key: 'reset',\n\t value: function reset() {\n\t var restart = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];\n\t\n\t clearInterval(this.timeout);\n\t this.replaceText('');\n\t if (this.cursor && this.cursor.parentNode) {\n\t this.cursor.parentNode.removeChild(this.cursor);\n\t this.cursor = null;\n\t }\n\t this.strPos = 0;\n\t this.arrayPos = 0;\n\t this.curLoop = 0;\n\t if (restart) {\n\t this.insertCursor();\n\t this.options.onReset(this);\n\t this.begin();\n\t }\n\t }\n\t\n\t /**\n\t * Begins the typing animation\n\t * @private\n\t */\n\t }, {\n\t key: 'begin',\n\t value: function begin() {\n\t var _this = this;\n\t\n\t this.typingComplete = false;\n\t this.shuffleStringsIfNeeded(this);\n\t this.insertCursor();\n\t if (this.bindInputFocusEvents) this.bindFocusEvents();\n\t this.timeout = setTimeout(function () {\n\t // Check if there is some text in the element, if yes start by backspacing the default message\n\t if (!_this.currentElContent || _this.currentElContent.length === 0) {\n\t _this.typewrite(_this.strings[_this.sequence[_this.arrayPos]], _this.strPos);\n\t } else {\n\t // Start typing\n\t _this.backspace(_this.currentElContent, _this.currentElContent.length);\n\t }\n\t }, this.startDelay);\n\t }\n\t\n\t /**\n\t * Called for each character typed\n\t * @param {string} curString the current string in the strings array\n\t * @param {number} curStrPos the current position in the curString\n\t * @private\n\t */\n\t }, {\n\t key: 'typewrite',\n\t value: function typewrite(curString, curStrPos) {\n\t var _this2 = this;\n\t\n\t if (this.fadeOut && this.el.classList.contains(this.fadeOutClass)) {\n\t this.el.classList.remove(this.fadeOutClass);\n\t this.cursor.classList.remove(this.fadeOutClass);\n\t }\n\t\n\t var humanize = this.humanizer(this.typeSpeed);\n\t\n\t if (this.pause.status === true) {\n\t this.setPauseStatus(curString, curStrPos, true);\n\t return;\n\t }\n\t\n\t // contain typing function in a timeout humanize'd delay\n\t this.timeout = setTimeout(function () {\n\t // check for an escape character before a pause value\n\t // format: \\^\\d+ .. eg: ^1000 .. should be able to print the ^ too using ^^\n\t // single ^ are removed from string\n\t var pauseTime = 0;\n\t var substr = curString.substr(curStrPos);\n\t if (substr.charAt(0) === '^') {\n\t var skip = 1; // skip atleast 1\n\t if (/^\\^\\d+/.test(substr)) {\n\t substr = /\\d+/.exec(substr)[0];\n\t skip += substr.length;\n\t pauseTime = parseInt(substr);\n\t _this2.temporaryPause = true;\n\t _this2.options.onTypingPaused(_this2.arrayPos, _this2);\n\t }\n\t _this2.toggleBlinking(true);\n\t\n\t // strip out the escape character and pause value so they're not printed\n\t curString = curString.substring(0, curStrPos) + curString.substring(curStrPos + skip);\n\t }\n\t\n\t curStrPos = _htmlParserJs.htmlParser.typeHtmlChars(curString, curStrPos, _this2);\n\t\n\t // timeout for any pause after a character\n\t _this2.timeout = setTimeout(function () {\n\t // Accounts for blinking while paused\n\t _this2.toggleBlinking(false);\n\t\n\t // We're done with this sentence!\n\t if (curStrPos === curString.length) {\n\t _this2.doneTyping(curString, curStrPos);\n\t } else {\n\t _this2.keepTyping(curString, curStrPos);\n\t }\n\t // end of character pause\n\t if (_this2.temporaryPause) {\n\t _this2.temporaryPause = false;\n\t _this2.options.onTypingResumed(_this2.arrayPos, _this2);\n\t }\n\t }, pauseTime);\n\t\n\t // humanized value for typing\n\t }, humanize);\n\t }\n\t\n\t /**\n\t * Continue to the next string & begin typing\n\t * @param {string} curString the current string in the strings array\n\t * @param {number} curStrPos the current position in the curString\n\t * @private\n\t */\n\t }, {\n\t key: 'keepTyping',\n\t value: function keepTyping(curString, curStrPos) {\n\t // call before functions if applicable\n\t if (curStrPos === 0) {\n\t this.toggleBlinking(false);\n\t this.options.preStringTyped(this.arrayPos, this);\n\t }\n\t // start typing each new char into existing string\n\t // curString: arg, this.el.html: original text inside element\n\t var nextString = curString.substr(0, curStrPos + 1);\n\t this.replaceText(nextString);\n\t // add characters one by one\n\t curStrPos++;\n\t // loop the function\n\t this.typewrite(curString, curStrPos);\n\t }\n\t\n\t /**\n\t * We're done typing all strings\n\t * @param {string} curString the current string in the strings array\n\t * @param {number} curStrPos the current position in the curString\n\t * @private\n\t */\n\t }, {\n\t key: 'doneTyping',\n\t value: function doneTyping(curString, curStrPos) {\n\t var _this3 = this;\n\t\n\t // fires callback function\n\t this.options.onStringTyped(this.arrayPos, this);\n\t this.toggleBlinking(true);\n\t // is this the final string\n\t if (this.arrayPos === this.strings.length - 1) {\n\t // callback that occurs on the last typed string\n\t this.complete();\n\t // quit if we wont loop back\n\t if (this.loop === false || this.curLoop === this.loopCount) {\n\t return;\n\t }\n\t }\n\t this.timeout = setTimeout(function () {\n\t _this3.backspace(curString, curStrPos);\n\t }, this.backDelay);\n\t }\n\t\n\t /**\n\t * Backspaces 1 character at a time\n\t * @param {string} curString the current string in the strings array\n\t * @param {number} curStrPos the current position in the curString\n\t * @private\n\t */\n\t }, {\n\t key: 'backspace',\n\t value: function backspace(curString, curStrPos) {\n\t var _this4 = this;\n\t\n\t if (this.pause.status === true) {\n\t this.setPauseStatus(curString, curStrPos, true);\n\t return;\n\t }\n\t if (this.fadeOut) return this.initFadeOut();\n\t\n\t this.toggleBlinking(false);\n\t var humanize = this.humanizer(this.backSpeed);\n\t\n\t this.timeout = setTimeout(function () {\n\t curStrPos = _htmlParserJs.htmlParser.backSpaceHtmlChars(curString, curStrPos, _this4);\n\t // replace text with base text + typed characters\n\t var curStringAtPosition = curString.substr(0, curStrPos);\n\t _this4.replaceText(curStringAtPosition);\n\t\n\t // if smartBack is enabled\n\t if (_this4.smartBackspace) {\n\t // the remaining part of the current string is equal of the same part of the new string\n\t var nextString = _this4.strings[_this4.arrayPos + 1];\n\t if (nextString && curStringAtPosition === nextString.substr(0, curStrPos)) {\n\t _this4.stopNum = curStrPos;\n\t } else {\n\t _this4.stopNum = 0;\n\t }\n\t }\n\t\n\t // if the number (id of character in current string) is\n\t // less than the stop number, keep going\n\t if (curStrPos > _this4.stopNum) {\n\t // subtract characters one by one\n\t curStrPos--;\n\t // loop the function\n\t _this4.backspace(curString, curStrPos);\n\t } else if (curStrPos <= _this4.stopNum) {\n\t // if the stop number has been reached, increase\n\t // array position to next string\n\t _this4.arrayPos++;\n\t // When looping, begin at the beginning after backspace complete\n\t if (_this4.arrayPos === _this4.strings.length) {\n\t _this4.arrayPos = 0;\n\t _this4.options.onLastStringBackspaced();\n\t _this4.shuffleStringsIfNeeded();\n\t _this4.begin();\n\t } else {\n\t _this4.typewrite(_this4.strings[_this4.sequence[_this4.arrayPos]], curStrPos);\n\t }\n\t }\n\t // humanized value for typing\n\t }, humanize);\n\t }\n\t\n\t /**\n\t * Full animation is complete\n\t * @private\n\t */\n\t }, {\n\t key: 'complete',\n\t value: function complete() {\n\t this.options.onComplete(this);\n\t if (this.loop) {\n\t this.curLoop++;\n\t } else {\n\t this.typingComplete = true;\n\t }\n\t }\n\t\n\t /**\n\t * Has the typing been stopped\n\t * @param {string} curString the current string in the strings array\n\t * @param {number} curStrPos the current position in the curString\n\t * @param {boolean} isTyping\n\t * @private\n\t */\n\t }, {\n\t key: 'setPauseStatus',\n\t value: function setPauseStatus(curString, curStrPos, isTyping) {\n\t this.pause.typewrite = isTyping;\n\t this.pause.curString = curString;\n\t this.pause.curStrPos = curStrPos;\n\t }\n\t\n\t /**\n\t * Toggle the blinking cursor\n\t * @param {boolean} isBlinking\n\t * @private\n\t */\n\t }, {\n\t key: 'toggleBlinking',\n\t value: function toggleBlinking(isBlinking) {\n\t if (!this.cursor) return;\n\t // if in paused state, don't toggle blinking a 2nd time\n\t if (this.pause.status) return;\n\t if (this.cursorBlinking === isBlinking) return;\n\t this.cursorBlinking = isBlinking;\n\t var status = isBlinking ? 'infinite' : 0;\n\t this.cursor.style.animationIterationCount = status;\n\t }\n\t\n\t /**\n\t * Speed in MS to type\n\t * @param {number} speed\n\t * @private\n\t */\n\t }, {\n\t key: 'humanizer',\n\t value: function humanizer(speed) {\n\t return Math.round(Math.random() * speed / 2) + speed;\n\t }\n\t\n\t /**\n\t * Shuffle the sequence of the strings array\n\t * @private\n\t */\n\t }, {\n\t key: 'shuffleStringsIfNeeded',\n\t value: function shuffleStringsIfNeeded() {\n\t if (!this.shuffle) return;\n\t this.sequence = this.sequence.sort(function () {\n\t return Math.random() - 0.5;\n\t });\n\t }\n\t\n\t /**\n\t * Adds a CSS class to fade out current string\n\t * @private\n\t */\n\t }, {\n\t key: 'initFadeOut',\n\t value: function initFadeOut() {\n\t var _this5 = this;\n\t\n\t this.el.className += ' ' + this.fadeOutClass;\n\t this.cursor.className += ' ' + this.fadeOutClass;\n\t return setTimeout(function () {\n\t _this5.arrayPos++;\n\t _this5.replaceText('');\n\t\n\t // Resets current string if end of loop reached\n\t if (_this5.strings.length > _this5.arrayPos) {\n\t _this5.typewrite(_this5.strings[_this5.sequence[_this5.arrayPos]], 0);\n\t } else {\n\t _this5.typewrite(_this5.strings[0], 0);\n\t _this5.arrayPos = 0;\n\t }\n\t }, this.fadeOutDelay);\n\t }\n\t\n\t /**\n\t * Replaces current text in the HTML element\n\t * depending on element type\n\t * @param {string} str\n\t * @private\n\t */\n\t }, {\n\t key: 'replaceText',\n\t value: function replaceText(str) {\n\t if (this.attr) {\n\t this.el.setAttribute(this.attr, str);\n\t } else {\n\t if (this.isInput) {\n\t this.el.value = str;\n\t } else if (this.contentType === 'html') {\n\t this.el.innerHTML = str;\n\t } else {\n\t this.el.textContent = str;\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * If using input elements, bind focus in order to\n\t * start and stop the animation\n\t * @private\n\t */\n\t }, {\n\t key: 'bindFocusEvents',\n\t value: function bindFocusEvents() {\n\t var _this6 = this;\n\t\n\t if (!this.isInput) return;\n\t this.el.addEventListener('focus', function (e) {\n\t _this6.stop();\n\t });\n\t this.el.addEventListener('blur', function (e) {\n\t if (_this6.el.value && _this6.el.value.length !== 0) {\n\t return;\n\t }\n\t _this6.start();\n\t });\n\t }\n\t\n\t /**\n\t * On init, insert the cursor element\n\t * @private\n\t */\n\t }, {\n\t key: 'insertCursor',\n\t value: function insertCursor() {\n\t if (!this.showCursor) return;\n\t if (this.cursor) return;\n\t this.cursor = document.createElement('span');\n\t this.cursor.className = 'typed-cursor';\n\t this.cursor.innerHTML = this.cursorChar;\n\t this.el.parentNode && this.el.parentNode.insertBefore(this.cursor, this.el.nextSibling);\n\t }\n\t }]);\n\t\n\t return Typed;\n\t})();\n\t\n\texports['default'] = Typed;\n\tmodule.exports = exports['default'];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\t\n\tvar _defaultsJs = __webpack_require__(2);\n\t\n\tvar _defaultsJs2 = _interopRequireDefault(_defaultsJs);\n\t\n\t/**\n\t * Initialize the Typed object\n\t */\n\t\n\tvar Initializer = (function () {\n\t function Initializer() {\n\t _classCallCheck(this, Initializer);\n\t }\n\t\n\t _createClass(Initializer, [{\n\t key: 'load',\n\t\n\t /**\n\t * Load up defaults & options on the Typed instance\n\t * @param {Typed} self instance of Typed\n\t * @param {object} options options object\n\t * @param {string} elementId HTML element ID _OR_ instance of HTML element\n\t * @private\n\t */\n\t\n\t value: function load(self, options, elementId) {\n\t // chosen element to manipulate text\n\t if (typeof elementId === 'string') {\n\t self.el = document.querySelector(elementId);\n\t } else {\n\t self.el = elementId;\n\t }\n\t\n\t self.options = {};\n\t Object.assign(self.options, _defaultsJs2['default'], options);\n\t\n\t // attribute to type into\n\t self.isInput = self.el.tagName.toLowerCase() === 'input';\n\t self.attr = self.options.attr;\n\t self.bindInputFocusEvents = self.options.bindInputFocusEvents;\n\t\n\t // show cursor\n\t self.showCursor = self.isInput ? false : self.options.showCursor;\n\t\n\t // custom cursor\n\t self.cursorChar = self.options.cursorChar;\n\t\n\t // Is the cursor blinking\n\t self.cursorBlinking = true;\n\t\n\t // text content of element\n\t self.elContent = self.attr ? self.el.getAttribute(self.attr) : self.el.textContent;\n\t\n\t // html or plain text\n\t self.contentType = self.options.contentType;\n\t\n\t // typing speed\n\t self.typeSpeed = self.options.typeSpeed;\n\t\n\t // add a delay before typing starts\n\t self.startDelay = self.options.startDelay;\n\t\n\t // backspacing speed\n\t self.backSpeed = self.options.backSpeed;\n\t\n\t // only backspace what doesn't match the previous string\n\t self.smartBackspace = self.options.smartBackspace;\n\t\n\t // amount of time to wait before backspacing\n\t self.backDelay = self.options.backDelay;\n\t\n\t // Fade out instead of backspace\n\t self.fadeOut = self.options.fadeOut;\n\t self.fadeOutClass = self.options.fadeOutClass;\n\t self.fadeOutDelay = self.options.fadeOutDelay;\n\t\n\t // variable to check whether typing is currently paused\n\t self.isPaused = false;\n\t\n\t // input strings of text\n\t self.strings = self.options.strings.map(function (s) {\n\t return s.trim();\n\t });\n\t\n\t // div containing strings\n\t if (typeof self.options.stringsElement === 'string') {\n\t self.stringsElement = document.querySelector(self.options.stringsElement);\n\t } else {\n\t self.stringsElement = self.options.stringsElement;\n\t }\n\t\n\t if (self.stringsElement) {\n\t self.strings = [];\n\t self.stringsElement.style.display = 'none';\n\t var strings = Array.prototype.slice.apply(self.stringsElement.children);\n\t var _iteratorNormalCompletion = true;\n\t var _didIteratorError = false;\n\t var _iteratorError = undefined;\n\t\n\t try {\n\t for (var _iterator = strings[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t var s = _step.value;\n\t\n\t self.strings.push(s.innerHTML.trim());\n\t }\n\t } catch (err) {\n\t _didIteratorError = true;\n\t _iteratorError = err;\n\t } finally {\n\t try {\n\t if (!_iteratorNormalCompletion && _iterator['return']) {\n\t _iterator['return']();\n\t }\n\t } finally {\n\t if (_didIteratorError) {\n\t throw _iteratorError;\n\t }\n\t }\n\t }\n\t }\n\t\n\t // character number position of current string\n\t self.strPos = 0;\n\t\n\t // current array position\n\t self.arrayPos = 0;\n\t\n\t // index of string to stop backspacing on\n\t self.stopNum = 0;\n\t\n\t // Looping logic\n\t self.loop = self.options.loop;\n\t self.loopCount = self.options.loopCount;\n\t self.curLoop = 0;\n\t\n\t // shuffle the strings\n\t self.shuffle = self.options.shuffle;\n\t // the order of strings\n\t self.sequence = [];\n\t\n\t self.pause = {\n\t status: false,\n\t typewrite: true,\n\t curString: '',\n\t curStrPos: 0\n\t };\n\t\n\t // When the typing is complete (when not looped)\n\t self.typingComplete = false;\n\t\n\t // Set the order in which the strings are typed\n\t for (var i in self.strings) {\n\t self.sequence[i] = i;\n\t }\n\t\n\t // If there is some text in the element\n\t self.currentElContent = this.getCurrentElContent(self);\n\t\n\t self.autoInsertCss = self.options.autoInsertCss;\n\t\n\t this.appendAnimationCss(self);\n\t }\n\t }, {\n\t key: 'getCurrentElContent',\n\t value: function getCurrentElContent(self) {\n\t var elContent = '';\n\t if (self.attr) {\n\t elContent = self.el.getAttribute(self.attr);\n\t } else if (self.isInput) {\n\t elContent = self.el.value;\n\t } else if (self.contentType === 'html') {\n\t elContent = self.el.innerHTML;\n\t } else {\n\t elContent = self.el.textContent;\n\t }\n\t return elContent;\n\t }\n\t }, {\n\t key: 'appendAnimationCss',\n\t value: function appendAnimationCss(self) {\n\t if (!self.autoInsertCss) {\n\t return;\n\t }\n\t if (!self.showCursor || !self.fadeOut) {\n\t return;\n\t }\n\t\n\t var css = document.createElement('style');\n\t css.type = 'text/css';\n\t var innerCss = '';\n\t if (self.showCursor) {\n\t innerCss += '\\n .typed-cursor{\\n opacity: 1;\\n animation: typedjsBlink 0.7s infinite;\\n -webkit-animation: typedjsBlink 0.7s infinite;\\n animation: typedjsBlink 0.7s infinite;\\n }\\n @keyframes typedjsBlink{\\n 50% { opacity: 0.0; }\\n }\\n @-webkit-keyframes typedjsBlink{\\n 0% { opacity: 1; }\\n 50% { opacity: 0.0; }\\n 100% { opacity: 1; }\\n }\\n ';\n\t }\n\t if (self.fadeOut) {\n\t innerCss += '\\n .typed-fade-out{\\n opacity: 0;\\n transition: opacity .25s;\\n -webkit-animation: 0;\\n animation: 0;\\n }\\n ';\n\t }\n\t if (css.length === 0) {\n\t return;\n\t }\n\t css.innerHTML = innerCss;\n\t document.head.appendChild(css);\n\t }\n\t }]);\n\t\n\t return Initializer;\n\t})();\n\t\n\texports['default'] = Initializer;\n\tvar initializer = new Initializer();\n\texports.initializer = initializer;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\t/**\n\t * Defaults & options\n\t * @returns {object} Typed defaults & options\n\t * @public\n\t */\n\t\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\tvar defaults = {\n\t /**\n\t * @property {array} strings strings to be typed\n\t * @property {string} stringsElement ID of element containing string children\n\t */\n\t strings: ['These are the default values...', 'You know what you should do?', 'Use your own!', 'Have a great day!'],\n\t stringsElement: null,\n\t\n\t /**\n\t * @property {number} typeSpeed type speed in milliseconds\n\t */\n\t typeSpeed: 0,\n\t\n\t /**\n\t * @property {number} startDelay time before typing starts in milliseconds\n\t */\n\t startDelay: 0,\n\t\n\t /**\n\t * @property {number} backSpeed backspacing speed in milliseconds\n\t */\n\t backSpeed: 0,\n\t\n\t /**\n\t * @property {boolean} smartBackspace only backspace what doesn't match the previous string\n\t */\n\t smartBackspace: true,\n\t\n\t /**\n\t * @property {boolean} shuffle shuffle the strings\n\t */\n\t shuffle: false,\n\t\n\t /**\n\t * @property {number} backDelay time before backspacing in milliseconds\n\t */\n\t backDelay: 700,\n\t\n\t /**\n\t * @property {boolean} fadeOut Fade out instead of backspace\n\t * @property {string} fadeOutClass css class for fade animation\n\t * @property {boolean} fadeOutDelay Fade out delay in milliseconds\n\t */\n\t fadeOut: false,\n\t fadeOutClass: 'typed-fade-out',\n\t fadeOutDelay: 500,\n\t\n\t /**\n\t * @property {boolean} loop loop strings\n\t * @property {number} loopCount amount of loops\n\t */\n\t loop: false,\n\t loopCount: Infinity,\n\t\n\t /**\n\t * @property {boolean} showCursor show cursor\n\t * @property {string} cursorChar character for cursor\n\t * @property {boolean} autoInsertCss insert CSS for cursor and fadeOut into HTML \n\t */\n\t showCursor: true,\n\t cursorChar: '|',\n\t autoInsertCss: true,\n\t\n\t /**\n\t * @property {string} attr attribute for typing\n\t * Ex: input placeholder, value, or just HTML text\n\t */\n\t attr: null,\n\t\n\t /**\n\t * @property {boolean} bindInputFocusEvents bind to focus and blur if el is text input\n\t */\n\t bindInputFocusEvents: false,\n\t\n\t /**\n\t * @property {string} contentType 'html' or 'null' for plaintext\n\t */\n\t contentType: 'html',\n\t\n\t /**\n\t * All typing is complete\n\t * @param {Typed} self\n\t */\n\t onComplete: function onComplete(self) {},\n\t\n\t /**\n\t * Before each string is typed\n\t * @param {number} arrayPos\n\t * @param {Typed} self\n\t */\n\t preStringTyped: function preStringTyped(arrayPos, self) {},\n\t\n\t /**\n\t * After each string is typed\n\t * @param {number} arrayPos\n\t * @param {Typed} self\n\t */\n\t onStringTyped: function onStringTyped(arrayPos, self) {},\n\t\n\t /**\n\t * During looping, after last string is typed\n\t * @param {Typed} self\n\t */\n\t onLastStringBackspaced: function onLastStringBackspaced(self) {},\n\t\n\t /**\n\t * Typing has been stopped\n\t * @param {number} arrayPos\n\t * @param {Typed} self\n\t */\n\t onTypingPaused: function onTypingPaused(arrayPos, self) {},\n\t\n\t /**\n\t * Typing has been started after being stopped\n\t * @param {number} arrayPos\n\t * @param {Typed} self\n\t */\n\t onTypingResumed: function onTypingResumed(arrayPos, self) {},\n\t\n\t /**\n\t * After reset\n\t * @param {Typed} self\n\t */\n\t onReset: function onReset(self) {},\n\t\n\t /**\n\t * After stop\n\t * @param {number} arrayPos\n\t * @param {Typed} self\n\t */\n\t onStop: function onStop(arrayPos, self) {},\n\t\n\t /**\n\t * After start\n\t * @param {number} arrayPos\n\t * @param {Typed} self\n\t */\n\t onStart: function onStart(arrayPos, self) {},\n\t\n\t /**\n\t * After destroy\n\t * @param {Typed} self\n\t */\n\t onDestroy: function onDestroy(self) {}\n\t};\n\t\n\texports['default'] = defaults;\n\tmodule.exports = exports['default'];\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t\n\t/**\n\t * TODO: These methods can probably be combined somehow\n\t * Parse HTML tags & HTML Characters\n\t */\n\t\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\t\n\tvar HTMLParser = (function () {\n\t function HTMLParser() {\n\t _classCallCheck(this, HTMLParser);\n\t }\n\t\n\t _createClass(HTMLParser, [{\n\t key: 'typeHtmlChars',\n\t\n\t /**\n\t * Type HTML tags & HTML Characters\n\t * @param {string} curString Current string\n\t * @param {number} curStrPos Position in current string\n\t * @param {Typed} self instance of Typed\n\t * @returns {number} a new string position\n\t * @private\n\t */\n\t\n\t value: function typeHtmlChars(curString, curStrPos, self) {\n\t if (self.contentType !== 'html') return curStrPos;\n\t var curChar = curString.substr(curStrPos).charAt(0);\n\t if (curChar === '<' || curChar === '&') {\n\t var endTag = '';\n\t if (curChar === '<') {\n\t endTag = '>';\n\t } else {\n\t endTag = ';';\n\t }\n\t while (curString.substr(curStrPos + 1).charAt(0) !== endTag) {\n\t curStrPos++;\n\t if (curStrPos + 1 > curString.length) {\n\t break;\n\t }\n\t }\n\t curStrPos++;\n\t }\n\t return curStrPos;\n\t }\n\t\n\t /**\n\t * Backspace HTML tags and HTML Characters\n\t * @param {string} curString Current string\n\t * @param {number} curStrPos Position in current string\n\t * @param {Typed} self instance of Typed\n\t * @returns {number} a new string position\n\t * @private\n\t */\n\t }, {\n\t key: 'backSpaceHtmlChars',\n\t value: function backSpaceHtmlChars(curString, curStrPos, self) {\n\t if (self.contentType !== 'html') return curStrPos;\n\t var curChar = curString.substr(curStrPos).charAt(0);\n\t if (curChar === '>' || curChar === ';') {\n\t var endTag = '';\n\t if (curChar === '>') {\n\t endTag = '<';\n\t } else {\n\t endTag = '&';\n\t }\n\t while (curString.substr(curStrPos - 1).charAt(0) !== endTag) {\n\t curStrPos--;\n\t if (curStrPos < 0) {\n\t break;\n\t }\n\t }\n\t curStrPos--;\n\t }\n\t return curStrPos;\n\t }\n\t }]);\n\t\n\t return HTMLParser;\n\t})();\n\t\n\texports['default'] = HTMLParser;\n\tvar htmlParser = new HTMLParser();\n\texports.htmlParser = htmlParser;\n\n/***/ })\n/******/ ])\n});\n;"]}
\ No newline at end of file
diff --git a/src/initializer.js b/src/initializer.js
index bf5f8ed..983cc07 100644
--- a/src/initializer.js
+++ b/src/initializer.js
@@ -8,13 +8,17 @@ export default class Initializer {
* Load up defaults & options on the Typed instance
* @param {Typed} self instance of Typed
* @param {object} options options object
- * @param {string} elementId HTML element ID
+ * @param {string} elementId HTML element ID _OR_ instance of HTML element
* @private
*/
load(self, options, elementId) {
// chosen element to manipulate text
- self.el = document.querySelector(elementId);
+ if (typeof elementId === 'string') {
+ self.el = document.querySelector(elementId);
+ } else {
+ self.el = elementId;
+ }
self.options = {};
Object.assign(self.options, defaults, options);
@@ -66,7 +70,11 @@ export default class Initializer {
self.strings = self.options.strings.map((s) => s.trim());
// div containing strings
- self.stringsElement = document.querySelector(self.options.stringsElement);
+ if (typeof self.options.stringsElement === 'string') {
+ self.stringsElement = document.querySelector(self.options.stringsElement);
+ } else {
+ self.stringsElement = self.options.stringsElement;
+ }
if (self.stringsElement) {
self.strings = [];
diff --git a/src/typed.js b/src/typed.js
index d63fdd5..a284ba3 100644
--- a/src/typed.js
+++ b/src/typed.js
@@ -3,7 +3,7 @@ import { htmlParser } from './html-parser.js';
/**
* Welcome to Typed.js!
- * @param {string} elementId HTML element ID
+ * @param {string} elementId HTML element ID _OR_ HTML element
* @param {object} options options object
* @returns {object} a new Typed object
*/