Changeset 219903 in webkit


Ignore:
Timestamp:
Jul 25, 2017 9:42:19 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Speedometer 2.0: Document es2015-babel-webpack build process
https://bugs.webkit.org/show_bug.cgi?id=174252

Patch by Mathias Bynens <mathias@qiwi.be> on 2017-07-25
Reviewed by Ryosuke Niwa.

  • Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/README.md: Added build docs.
  • Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/*: Update generated build files.
  • Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/package.json: Remove unused items.
  • Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/package-lock.json: Added lockfile.
  • Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/index.html: Make title consistent.
Location:
trunk/PerformanceTests
Files:
3 added
1 deleted
4 edited
9 moved

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r219640 r219903  
     12017-07-25  Mathias Bynens  <mathias@qiwi.be>
     2
     3        Speedometer 2.0: Document es2015-babel-webpack build process
     4        https://bugs.webkit.org/show_bug.cgi?id=174252
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/README.md: Added build docs.
     9        * Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/*: Update generated build files.
     10        * Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/package.json: Remove unused items.
     11        * Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/package-lock.json: Added lockfile.
     12        * Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/index.html: Make title consistent.
     13
    1142017-07-18  Matt Kotsenas  <mattkot@microsoft.com>
    215
  • trunk/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.app.9debb1b0a94f14d0ebe9.js

    r219902 r219903  
    11webpackJsonp([0,2],[function(t,e,i){"use strict";function o(t,e){return(e||document).querySelector(t)}function n(t,e){return(e||document).querySelectorAll(t)}function r(t,e,i,o){t.addEventListener(e,i,!!o)}function c(t,e,i,o){function c(i){var r=i.target,c=n(e,t),l=Array.prototype.indexOf.call(c,r)>=0;l&&o.call(r,i)}var l="blur"===i||"focus"===i;r(t,i,c,l)}function l(t,e){if(t.parentNode)return t.parentNode.tagName.toLowerCase()===e.toLowerCase()?t.parentNode:l(t.parentNode,e)}function a(t,e){var i=t.indexOf(e);return i===-1?t:void t.splice(i,1)}i.d(e,"a",function(){return o}),i.d(e,"b",function(){return n}),i.d(e,"d",function(){return r}),i.d(e,"c",function(){return c}),i.d(e,"e",function(){return l}),i.d(e,"f",function(){return a}),NodeList.prototype.forEach=Array.prototype.forEach},,function(t,e,i){"use strict";function o(){i.i(c.a)()}var n=i(1),r=(i.n(n),i(10)),c=(i.n(r),i(0),i(8));e.a=o},function(t,e,i){"use strict";function o(t,e){var i=this;i.model=t,i.view=e,i.view.bind("newTodo",function(t){i.addItem(t)}),i.view.bind("itemEdit",function(t){i.editItem(t.id)}),i.view.bind("itemEditDone",function(t){i.editItemSave(t.id,t.title)}),i.view.bind("itemEditCancel",function(t){i.editItemCancel(t.id)}),i.view.bind("itemRemove",function(t){i.removeItem(t.id)}),i.view.bind("itemToggle",function(t){i.toggleComplete(t.id,t.completed)}),i.view.bind("removeCompleted",function(){i.removeCompletedItems()}),i.view.bind("toggleAll",function(t){i.toggleAll(t.completed)})}e.a=o,o.prototype.setView=function(t){var e=t.split("/")[1],i=e||"";this._updateFilterState(i)},o.prototype.showAll=function(){var t=this;t.model.read(function(e){t.view.render("showEntries",e)})},o.prototype.showActive=function(){var t=this;t.model.read({completed:!1},function(e){t.view.render("showEntries",e)})},o.prototype.showCompleted=function(){var t=this;t.model.read({completed:!0},function(e){t.view.render("showEntries",e)})},o.prototype.addItem=function(t){var e=this;""!==t.trim()&&e.model.create(t,function(){e.view.render("clearNewTodo"),e._filter(!0)})},o.prototype.editItem=function(t){var e=this;e.model.read(t,function(i){e.view.render("editItem",{id:t,title:i[0].title})})},o.prototype.editItemSave=function(t,e){var i=this;e.trim()?i.model.update(t,{title:e},function(){i.view.render("editItemDone",{id:t,title:e})}):i.removeItem(t)},o.prototype.editItemCancel=function(t){var e=this;e.model.read(t,function(i){e.view.render("editItemDone",{id:t,title:i[0].title})})},o.prototype.removeItem=function(t){var e=this;e.model.remove(t,function(){e.view.render("removeItem",t)}),e._filter()},o.prototype.removeCompletedItems=function(){var t=this;t.model.read({completed:!0},function(e){e.forEach(function(e){t.removeItem(e.id)})}),t._filter()},o.prototype.toggleComplete=function(t,e,i){var o=this;o.model.update(t,{completed:e},function(){o.view.render("elementComplete",{id:t,completed:e})}),i||o._filter()},o.prototype.toggleAll=function(t){var e=this;e.model.read({completed:!t},function(i){i.forEach(function(i){e.toggleComplete(i.id,t,!0)})}),e._filter()},o.prototype._updateCount=function(){var t=this;t.model.getCount(function(e){t.view.render("updateElementCount",e.active),t.view.render("clearCompletedButton",{completed:e.completed,visible:e.completed>0}),t.view.render("toggleAll",{checked:e.completed===e.total}),t.view.render("contentBlockVisibility",{visible:e.total>0})})},o.prototype._filter=function(t){var e=this._activeRoute.charAt(0).toUpperCase()+this._activeRoute.substr(1);this._updateCount(),(t||"All"!==this._lastActiveRoute||this._lastActiveRoute!==e)&&this["show"+e](),this._lastActiveRoute=e},o.prototype._updateFilterState=function(t){t=t.split("?")[0],this._activeRoute=t,""===t&&(this._activeRoute="All"),this._filter(),this.view.render("setFilter",t)}},function(t,e,i){var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(i){var n={},r={};n.length=0,n.getItem=function(t){return r[t]||null},n.setItem=function(t,e){"undefined"==typeof e?n.removeItem(t):(r.hasOwnProperty(t)||n.length++,r[t]=""+e)},n.removeItem=function(t){r.hasOwnProperty(t)&&(delete r[t],n.length--)},n.key=function(t){return Object.keys(r)[t]||null},n.clear=function(){r={},n.length=0},"object"===o(e)?t.exports=n:i.localStorageMemory=n}(this)},function(t,e,i){"use strict";function o(t){this.storage=t}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.a=o,o.prototype.create=function(t,e){t=t||"",e=e||function(){};var i={title:t.trim(),completed:!1};this.storage.save(i,e)},o.prototype.read=function(t,e){var i="undefined"==typeof t?"undefined":n(t);return e=e||function(){},"function"===i?(e=t,this.storage.findAll(e)):void("string"===i||"number"===i?(t=parseInt(t,10),this.storage.find({id:t},e)):this.storage.find(t,e))},o.prototype.update=function(t,e,i){this.storage.save(e,i,t)},o.prototype.remove=function(t,e){this.storage.remove(t,e)},o.prototype.removeAll=function(t){this.storage.drop(t)},o.prototype.getCount=function(t){var e={active:0,completed:0,total:0};this.storage.findAll(function(i){i.forEach(function(t){t.completed?e.completed++:e.active++,e.total++}),t(e)})}},function(t,e,i){"use strict";function o(t,e){if(e=e||function(){},this._dbName=t,!r[t]){var i={todos:[]};r[t]=JSON.stringify(i)}e.call(this,JSON.parse(r[t])),this.subscribers=[]}var n=i(0),r=i(4);i.n(r);e.a=o,o.prototype.subscribe=function(t){var e=this;return this.subscribers.push(t),function(){return i.i(n.f)(e.subscribers,t)}},o.prototype._notify=function(){this.subscribers.forEach(function(t){return t()})},o.prototype.find=function(t,e){if(e){var i=JSON.parse(r[this._dbName]).todos;e.call(this,i.filter(function(e){for(var i in t)if(t[i]!==e[i])return!1;return!0}))}},o.prototype.findAll=function(t){t=t||function(){},t.call(this,JSON.parse(r[this._dbName]).todos)},o.prototype.save=function(t,e,i){var o=JSON.parse(r[this._dbName]),n=o.todos;if(e=e||function(){},i){for(var c=0;c<n.length;c++)if(n[c].id===i){for(var l in t)n[c][l]=t[l];break}r[this._dbName]=JSON.stringify(o),e.call(this,JSON.parse(r[this._dbName]).todos)}else t.id=(new Date).getTime(),n.push(t),r[this._dbName]=JSON.stringify(o),e.call(this,[t]);this._notify()},o.prototype.remove=function(t,e){for(var i=JSON.parse(r[this._dbName]),o=i.todos,n=0;n<o.length;n++)if(o[n].id===t){o.splice(n,1);break}r[this._dbName]=JSON.stringify(i),e.call(this,JSON.parse(r[this._dbName]).todos),this._notify()},o.prototype.drop=function(t){r[this._dbName]=JSON.stringify({todos:[]}),t.call(this,JSON.parse(r[this._dbName]).todos),this._notify()}},function(t,e,i){"use strict";function o(){this.defaultTemplate='\n    <li data-id="{{id}}" class="{{completed}}">\n      <div class="view">\n        <input class="toggle" type="checkbox" {{checked}} />\n        <label>{{title}}</label>\n        <button class="destroy"></button>\n      </div>\n    </li>\n  '}e.a=o;var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r=function(t){return n[t]},c=/[&<>"'`]/g,l=new RegExp(c.source),a=function(t){return t&&l.test(t)?t.replace(c,r):t};o.prototype.show=function(t){var e,i,o="";for(e=0,i=t.length;e<i;e++){var n=this.defaultTemplate,r="",c="";t[e].completed&&(r="completed",c="checked"),n=n.replace("{{id}}",t[e].id),n=n.replace("{{title}}",a(t[e].title)),n=n.replace("{{completed}}",r),n=n.replace("{{checked}}",c),o+=n}return o},o.prototype.itemCounter=function(t){var e=1===t?"":"s";return"<strong>"+t+"</strong> item"+e+" left"},o.prototype.clearCompletedButton=function(t){return t>0?"Clear completed":""}},function(t,e,i){"use strict";function o(t){this.storage=new a.a(t),this.model=new l.a(this.storage),this.template=new d.a,this.view=new r.a(this.template),this.controller=new c.a(this.model,this.view)}function n(){s=new o("todos-vanillajs"),s.controller.setView(document.location.hash),u.forEach(function(t){return t()})}var r=i(9),c=i(3),l=i(5),a=i(6),d=i(7);i(0);i.d(e,"a",function(){return n});var s=void 0,u=[]},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t){i.i(a.a)(".filters .selected").className="",i.i(a.a)('.filters [href="#/'+t+'"]').className="selected"}function r(t,e){var o=i.i(a.a)('[data-id="'+t+'"]');o&&(o.className=e?"completed":"",i.i(a.a)("input",o).checked=e)}function c(t,e){var o=i.i(a.a)('[data-id="'+t+'"]');if(o){o.className=o.className+" editing";var n=document.createElement("input");n.className="edit",o.appendChild(n),n.focus(),n.value=e}}function l(t){var e=i.i(a.e)(t,"li");return parseInt(e.dataset.id,10)}var a=i(0),d=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}(),s=function(){function t(e){o(this,t),this.template=e,this.ENTER_KEY=13,this.ESCAPE_KEY=27,this.$todoList=i.i(a.a)(".todo-list"),this.$todoItemCounter=i.i(a.a)(".todo-count"),this.$clearCompleted=i.i(a.a)(".clear-completed"),this.$main=i.i(a.a)(".main"),this.$footer=i.i(a.a)(".footer"),this.$toggleAll=i.i(a.a)(".toggle-all"),this.$newTodo=i.i(a.a)(".new-todo")}return d(t,[{key:"_removeItem",value:function(t){var e=i.i(a.a)('[data-id="'+t+'"]');e&&this.$todoList.removeChild(e)}},{key:"_clearCompletedButton",value:function(t,e){this.$clearCompleted.innerHTML=this.template.clearCompletedButton(t),this.$clearCompleted.style.display=e?"block":"none"}},{key:"_editItemDone",value:function(t,e){var o=i.i(a.a)('[data-id="'+t+'"]');if(o){var n=i.i(a.a)("input.edit",o);o.removeChild(n),o.className=o.className.replace("editing",""),i.i(a.b)("label",o).forEach(function(t){t.textContent=e})}}},{key:"render",value:function(t,e){var i=this,o={showEntries:function(){i.$todoList.innerHTML=i.template.show(e)},removeItem:function(){i._removeItem(e)},updateElementCount:function(){i.$todoItemCounter.innerHTML=i.template.itemCounter(e)},clearCompletedButton:function(){i._clearCompletedButton(e.completed,e.visible)},contentBlockVisibility:function(){i.$main.style.display=i.$footer.style.display=e.visible?"block":"none"},toggleAll:function(){i.$toggleAll.checked=e.checked},setFilter:function(){n(e)},clearNewTodo:function(){i.$newTodo.value=""},elementComplete:function(){r(e.id,e.completed)},editItem:function(){c(e.id,e.title)},editItemDone:function(){i._editItemDone(e.id,e.title)}};o[t]()}},{key:"_bindItemEditDone",value:function(t){var e=this;i.i(a.c)(e.$todoList,"li .edit","blur",function(){this.dataset.iscanceled||t({id:l(this),title:this.value})}),i.i(a.c)(e.$todoList,"li .edit","keypress",function(t){t.keyCode===e.ENTER_KEY&&this.blur()})}},{key:"_bindItemEditCancel",value:function(t){var e=this;i.i(a.c)(e.$todoList,"li .edit","keyup",function(i){i.keyCode===e.ESCAPE_KEY&&(this.dataset.iscanceled=!0,this.blur(),t({id:l(this)}))})}},{key:"bind",value:function(t,e){var o=this;"newTodo"===t?i.i(a.d)(o.$newTodo,"change",function(){e(o.$newTodo.value)}):"removeCompleted"===t?i.i(a.d)(o.$clearCompleted,"click",function(){e()}):"toggleAll"===t?i.i(a.d)(o.$toggleAll,"click",function(){e({completed:this.checked})}):"itemEdit"===t?i.i(a.c)(o.$todoList,"li label","dblclick",function(){e({id:l(this)})}):"itemRemove"===t?i.i(a.c)(o.$todoList,".destroy","click",function(){e({id:l(this)})}):"itemToggle"===t?i.i(a.c)(o.$todoList,".toggle","click",function(){e({id:l(this),completed:this.checked})}):"itemEditDone"===t?o._bindItemEditDone(e):"itemEditCancel"===t&&o._bindItemEditCancel(e)}}]),t}();e.a=s},function(t,e){},function(t,e,i){"use strict";function o(){i.i(r.d)(window,"load",n.a),i.i(r.d)(window,"hashchange",n.a)}var n=i(2),r=i(0);"complete"===document.readyState;o()}],[11]);
    2 //# sourceMappingURL=bundle.app.73bcc5d3c1d07180f0e3.js.map
     2//# sourceMappingURL=bundle.app.9debb1b0a94f14d0ebe9.js.map
  • trunk/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.app.9debb1b0a94f14d0ebe9.js.map

    r219902 r219903  
    1 {"version":3,"sources":["webpack:///bundle.app.73bcc5d3c1d07180f0e3.js","webpack:///./helpers.js","webpack:///./app.js","webpack:///./controller.js","webpack:///./memory.js","webpack:///./model.js","webpack:///./store.js","webpack:///./template.js","webpack:///./todo.js","webpack:///./view.js","webpack:///./bootstrap.js"],"names":["webpackJsonp","module","exports","__webpack_require__","qs","selector","scope","document","querySelector","qsa","querySelectorAll","$on","target","type","callback","useCapture","addEventListener","$delegate","handler","dispatchEvent","event","targetElement","potentialElements","hasMatch","Array","prototype","indexOf","call","$parent","element","tagName","parentNode","toLowerCase","remove","array","thing","index","splice","d","NodeList","forEach","onLoad","i","__WEBPACK_IMPORTED_MODULE_3__todo__","__WEBPACK_IMPORTED_MODULE_0_todomvc_app_css_index_css__","__WEBPACK_IMPORTED_MODULE_1__app_css__","n","Controller","model","view","that","this","bind","title","addItem","item","editItem","id","editItemSave","editItemCancel","removeItem","toggleComplete","completed","removeCompletedItems","status","toggleAll","setView","locationHash","route","split","page","_updateFilterState","showAll","read","data","render","showActive","showCompleted","trim","create","_filter","update","silent","_updateCount","getCount","todos","active","visible","checked","total","force","activeRoute","_activeRoute","charAt","toUpperCase","substr","_lastActiveRoute","currentPage","_typeof","Symbol","iterator","obj","constructor","root","localStorageMemory","cache","length","getItem","key","setItem","value","hasOwnProperty","Object","keys","clear","Model","storage","newItem","save","query","queryType","findAll","parseInt","find","removeAll","drop","todo","Store","name","_dbName","__WEBPACK_IMPORTED_MODULE_1__memory__","JSON","stringify","parse","subscribers","__WEBPACK_IMPORTED_MODULE_0__helpers__","subscribe","subscriber","_this","push","_notify","s","filter","q","updateData","Date","getTime","Template","defaultTemplate","htmlEscapes","&","<",">","\"","'","`","escapeHtmlChar","chr","reUnescapedHtml","reHasUnescapedHtml","RegExp","source","escape","string","test","replace","show","l","template","itemCounter","activeTodos","plural","clearCompletedButton","completedTodos","Todo","__WEBPACK_IMPORTED_MODULE_3__store__","__WEBPACK_IMPORTED_MODULE_2__model__","__WEBPACK_IMPORTED_MODULE_4__template__","__WEBPACK_IMPORTED_MODULE_0__view__","controller","__WEBPACK_IMPORTED_MODULE_1__controller__","updateTodo","location","hash","_classCallCheck","instance","Constructor","TypeError","_setFilter","className","_elementComplete","listItem","_editItem","input","createElement","appendChild","focus","_itemId","li","dataset","_createClass","defineProperties","props","descriptor","enumerable","configurable","writable","defineProperty","protoProps","staticProps","View","ENTER_KEY","ESCAPE_KEY","$todoList","$todoItemCounter","$clearCompleted","$main","$footer","$toggleAll","$newTodo","elem","removeChild","completedCount","innerHTML","style","display","label","textContent","viewCmd","parameter","viewCommands","showEntries","_removeItem","updateElementCount","_clearCompletedButton","contentBlockVisibility","setFilter","clearNewTodo","elementComplete","editItemDone","_editItemDone","iscanceled","keyCode","blur","_bindItemEditDone","_bindItemEditCancel","bootstrap","__WEBPACK_IMPORTED_MODULE_1__helpers__","window","__WEBPACK_IMPORTED_MODULE_0__app__","readyState"],"mappings":"AAAAA,cAAc,EAAE,IAEV,SAASC,EAAQC,EAASC,GAEhC,YCDA,SAASC,GAAGC,EAAUC,GACpB,OAAQA,GAASC,UAAUC,cAAcH,GAG3C,QAASI,GAAIJ,EAAUC,GACrB,OAAQA,GAASC,UAAUG,iBAAiBL,GAI9C,QAASM,GAAIC,EAAQC,EAAMC,EAAUC,GACnCH,EAAOI,iBAAiBH,EAAMC,IAAYC,GAK5C,QAASE,GAAUL,EAAQP,EAAUQ,EAAMK,GAKzC,QAASC,GAAcC,GACrB,GAAIC,GAAgBD,EAAMR,OACtBU,EAAoBb,EAAIJ,EAAUO,GAClCW,EAAWC,MAAMC,UAAUC,QAAQC,KAAKL,EAAmBD,IAAkB,CAE7EE,IACFL,EAAQS,KAAKN,EAAeD,GAThC,GAAIL,GAAsB,SAATF,GAA4B,UAATA,CACpCF,GAAIC,EAAQC,EAAMM,EAAeJ,GAenC,QAASa,GAAQC,EAASC,GACxB,GAAKD,EAAQE,WAGb,MAAIF,GAAQE,WAAWD,QAAQE,gBAAkB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lJ,UAGJ,eAAV/B,EACTjB,EAAAuC,EAAA6F,EAAA,GAAUrF,EAAKmK,UAAW,UAAW,QAAS,WAC5CnM,GACEuC,GAAI4I,EAAQlJ,MACZW,UAAWX,KAAKqC,YAID,iBAAVpE,EACT8B,EAAKkM,kBAAkBlO,GAEJ,mBAAVE,GACT8B,EAAKmM,oBAAoBnO,OT25BtBgM,IAGoBhN,GAAW,ES5jCnBgN,GTymCf,SAASjN,EAAQC,KAMjB,SAASD,EAAQC,EAASC,GAEhC,YU1mCA,SAASmP,KACPnP,EAAAuC,EAAA6M,EAAA,GAAIC,OAAQ,OAAQC,EAAA,GACpBtP,EAAAuC,EAAA6M,EAAA,GAAIC,OAAQ,aAAcC,EAAA,GVymCP,GAAIA,GAAqCtP,EAAoB,GU9nClFoP,EAAApP,EAAA,EAM0C,cAAxBI,SAASmP,UAUzBJ,QVwoCC","file":"bundle.app.73bcc5d3c1d07180f0e3.js","sourcesContent":["webpackJsonp([0,2],[\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* harmony export */ __webpack_require__.d(exports, \"a\", function() { return qs; });\n/* harmony export */ __webpack_require__.d(exports, \"b\", function() { return qsa; });\n/* harmony export */ __webpack_require__.d(exports, \"d\", function() { return $on; });\n/* harmony export */ __webpack_require__.d(exports, \"c\", function() { return $delegate; });\n/* harmony export */ __webpack_require__.d(exports, \"e\", function() { return $parent; });\n/* harmony export */ __webpack_require__.d(exports, \"f\", function() { return remove; });\n\n// Get element(s) by CSS selector:\nfunction qs(selector, scope) {\n  return (scope || document).querySelector(selector);\n}\n\nfunction qsa(selector, scope) {\n  return (scope || document).querySelectorAll(selector);\n}\n\n// addEventListener wrapper:\nfunction $on(target, type, callback, useCapture) {\n  target.addEventListener(type, callback, !!useCapture);\n}\n\n// Attach a handler to event for all elements that match the selector,\n// now or in the future, based on a root element\nfunction $delegate(target, selector, type, handler) {\n  // https://developer.mozilla.org/en-US/docs/Web/Events/blur\n  var useCapture = type === 'blur' || type === 'focus';\n  $on(target, type, dispatchEvent, useCapture);\n\n  function dispatchEvent(event) {\n    var targetElement = event.target;\n    var potentialElements = qsa(selector, target);\n    var hasMatch = Array.prototype.indexOf.call(potentialElements, targetElement) >= 0;\n\n    if (hasMatch) {\n      handler.call(targetElement, event);\n    }\n  }\n}\n\n// Find the element's parent with the given tag name:\n// $parent(qs('a'), 'div');\nfunction $parent(element, tagName) {\n  if (!element.parentNode) {\n    return undefined;\n  }\n  if (element.parentNode.tagName.toLowerCase() === tagName.toLowerCase()) {\n    return element.parentNode;\n  }\n  return $parent(element.parentNode, tagName);\n}\n\n// removes an element from an array\n// const x = [1,2,3]\n// remove(x, 2)\n// x ~== [1,3]\nfunction remove(array, thing) {\n  var index = array.indexOf(thing);\n  if (index === -1) {\n    return array;\n  }\n  array.splice(index, 1);\n}\n\n// Allow for looping on nodes by chaining:\n// qsa('.foo').forEach(function () {})\nNodeList.prototype.forEach = Array.prototype.forEach;\n\n/***/ },\n/* 1 */,\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_todomvc_app_css_index_css__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_todomvc_app_css_index_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_todomvc_app_css_index_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_css__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__app_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__helpers__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__todo__ = __webpack_require__(8);\n/* harmony export */ exports[\"a\"] = onLoad;\n\n\n\n\n\nfunction onLoad() {\n  // eslint-disable-line import/prefer-default-export\n  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__todo__[\"a\" /* updateTodo */])();\n}\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ exports[\"a\"] = Controller;\n\n/**\n* Takes a model and view and acts as the controller between them\n*\n* @constructor\n* @param {object} model The model instance\n* @param {object} view The view instance\n*/\nfunction Controller(model, view) {\n  var that = this;\n  that.model = model;\n  that.view = view;\n\n  that.view.bind('newTodo', function (title) {\n    that.addItem(title);\n  });\n\n  that.view.bind('itemEdit', function (item) {\n    that.editItem(item.id);\n  });\n\n  that.view.bind('itemEditDone', function (item) {\n    that.editItemSave(item.id, item.title);\n  });\n\n  that.view.bind('itemEditCancel', function (item) {\n    that.editItemCancel(item.id);\n  });\n\n  that.view.bind('itemRemove', function (item) {\n    that.removeItem(item.id);\n  });\n\n  that.view.bind('itemToggle', function (item) {\n    that.toggleComplete(item.id, item.completed);\n  });\n\n  that.view.bind('removeCompleted', function () {\n    that.removeCompletedItems();\n  });\n\n  that.view.bind('toggleAll', function (status) {\n    that.toggleAll(status.completed);\n  });\n}\n\n/**\n* Loads and initialises the view\n*\n* @param {string} '' | 'active' | 'completed'\n*/\nController.prototype.setView = function (locationHash) {\n  var route = locationHash.split('/')[1];\n  var page = route || '';\n  this._updateFilterState(page);\n};\n\n/**\n* An event to fire on load. Will get all items and display them in the\n* todo-list\n*/\nController.prototype.showAll = function () {\n  var that = this;\n  that.model.read(function (data) {\n    that.view.render('showEntries', data);\n  });\n};\n\n/**\n* Renders all active tasks\n*/\nController.prototype.showActive = function () {\n  var that = this;\n  that.model.read({ completed: false }, function (data) {\n    that.view.render('showEntries', data);\n  });\n};\n\n/**\n* Renders all completed tasks\n*/\nController.prototype.showCompleted = function () {\n  var that = this;\n  that.model.read({ completed: true }, function (data) {\n    that.view.render('showEntries', data);\n  });\n};\n\n/**\n* An event to fire whenever you want to add an item. Simply pass in the event\n* object and it'll handle the DOM insertion and saving of the new item.\n*/\nController.prototype.addItem = function (title) {\n  var that = this;\n\n  if (title.trim() === '') {\n    return;\n  }\n\n  that.model.create(title, function () {\n    that.view.render('clearNewTodo');\n    that._filter(true);\n  });\n};\n\n/*\n* Triggers the item editing mode.\n*/\nController.prototype.editItem = function (id) {\n  var that = this;\n  that.model.read(id, function (data) {\n    that.view.render('editItem', { id: id, title: data[0].title });\n  });\n};\n\n/*\n* Finishes the item editing mode successfully.\n*/\nController.prototype.editItemSave = function (id, title) {\n  var that = this;\n  if (title.trim()) {\n    that.model.update(id, { title: title }, function () {\n      that.view.render('editItemDone', { id: id, title: title });\n    });\n  } else {\n    that.removeItem(id);\n  }\n};\n\n/*\n* Cancels the item editing mode.\n*/\nController.prototype.editItemCancel = function (id) {\n  var that = this;\n  that.model.read(id, function (data) {\n    that.view.render('editItemDone', { id: id, title: data[0].title });\n  });\n};\n\n/**\n* By giving it an ID it'll find the DOM element matching that ID,\n* remove it from the DOM and also remove it from storage.\n*\n* @param {number} id The ID of the item to remove from the DOM and\n* storage\n*/\nController.prototype.removeItem = function (id) {\n  var that = this;\n  that.model.remove(id, function () {\n    that.view.render('removeItem', id);\n  });\n\n  that._filter();\n};\n\n/**\n* Will remove all completed items from the DOM and storage.\n*/\nController.prototype.removeCompletedItems = function () {\n  var that = this;\n  that.model.read({ completed: true }, function (data) {\n    data.forEach(function (item) {\n      that.removeItem(item.id);\n    });\n  });\n\n  that._filter();\n};\n\n/**\n* Give it an ID of a model and a checkbox and it will update the item\n* in storage based on the checkbox's state.\n*\n* @param {number} id The ID of the element to complete or uncomplete\n* @param {object} checkbox The checkbox to check the state of complete\n*                          or not\n* @param {boolean|undefined} silent Prevent re-filtering the todo items\n*/\nController.prototype.toggleComplete = function (id, completed, silent) {\n  var that = this;\n  that.model.update(id, { completed: completed }, function () {\n    that.view.render('elementComplete', {\n      id: id,\n      completed: completed\n    });\n  });\n\n  if (!silent) {\n    that._filter();\n  }\n};\n\n/**\n* Will toggle ALL checkboxes' on/off state and completeness of models.\n* Just pass in the event object.\n*/\nController.prototype.toggleAll = function (completed) {\n  var that = this;\n  that.model.read({ completed: !completed }, function (data) {\n    data.forEach(function (item) {\n      that.toggleComplete(item.id, completed, true);\n    });\n  });\n\n  that._filter();\n};\n\n/**\n* Updates the pieces of the page which change depending on the remaining\n* number of todos.\n*/\nController.prototype._updateCount = function () {\n  var that = this;\n  that.model.getCount(function (todos) {\n    that.view.render('updateElementCount', todos.active);\n    that.view.render('clearCompletedButton', {\n      completed: todos.completed,\n      visible: todos.completed > 0\n    });\n\n    that.view.render('toggleAll', { checked: todos.completed === todos.total });\n    that.view.render('contentBlockVisibility', { visible: todos.total > 0 });\n  });\n};\n\n/**\n* Re-filters the todo items, based on the active route.\n* @param {boolean|undefined} force  forces a re-painting of todo items.\n*/\nController.prototype._filter = function (force) {\n  var activeRoute = this._activeRoute.charAt(0).toUpperCase() + this._activeRoute.substr(1);\n\n  // Update the elements on the page, which change with each completed todo\n  this._updateCount();\n\n  // If the last active route isn't \"All\", or we're switching routes, we\n  // re-create the todo item elements, calling:\n  //   this.show[All|Active|Completed]();\n  if (force || this._lastActiveRoute !== 'All' || this._lastActiveRoute !== activeRoute) {\n    this['show' + activeRoute]();\n  }\n\n  this._lastActiveRoute = activeRoute;\n};\n\n/**\n* Simply updates the filter nav's selected states\n*/\nController.prototype._updateFilterState = function (currentPage) {\n  // Store a reference to the active route, allowing us to re-filter todo\n  // items as they are marked complete or incomplete.\n  currentPage = currentPage.split('?')[0];\n  this._activeRoute = currentPage;\n\n  if (currentPage === '') {\n    this._activeRoute = 'All';\n  }\n\n  this._filter();\n\n  this.view.render('setFilter', currentPage);\n};\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n(function (root) {\n  var localStorageMemory = {};\n  var cache = {};\n\n  /**\n   * number of stored items.\n   */\n  localStorageMemory.length = 0;\n\n  /**\n   * returns item for passed key, or null\n   *\n   * @para {String} key\n   *       name of item to be returned\n   * @returns {String|null}\n   */\n  localStorageMemory.getItem = function (key) {\n    return cache[key] || null;\n  };\n\n  /**\n   * sets item for key to passed value, as String\n   *\n   * @para {String} key\n   *       name of item to be set\n   * @para {String} value\n   *       value, will always be turned into a String\n   * @returns {undefined}\n   */\n  localStorageMemory.setItem = function (key, value) {\n    if (typeof value === 'undefined') {\n      localStorageMemory.removeItem(key);\n    } else {\n      if (!cache.hasOwnProperty(key)) {\n        localStorageMemory.length++;\n      }\n\n      cache[key] = '' + value;\n    }\n  };\n\n  /**\n   * removes item for passed key\n   *\n   * @para {String} key\n   *       name of item to be removed\n   * @returns {undefined}\n   */\n  localStorageMemory.removeItem = function (key) {\n    if (cache.hasOwnProperty(key)) {\n      delete cache[key];\n      localStorageMemory.length--;\n    }\n  };\n\n  /**\n   * returns name of key at passed index\n   *\n   * @para {Number} index\n   *       Position for key to be returned (starts at 0)\n   * @returns {String|null}\n   */\n  localStorageMemory.key = function (index) {\n    return Object.keys(cache)[index] || null;\n  };\n\n  /**\n   * removes all stored items and sets length to 0\n   *\n   * @returns {undefined}\n   */\n  localStorageMemory.clear = function () {\n    cache = {};\n    localStorageMemory.length = 0;\n  };\n\n  if (( false ? 'undefined' : _typeof(exports)) === 'object') {\n    module.exports = localStorageMemory;\n  } else {\n    root.localStorageMemory = localStorageMemory;\n  }\n})(this);\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/* harmony default export */ exports[\"a\"] = Model;\n\n/**\n* Creates a new Model instance and hooks up the storage.\n*\n* @constructor\n* @param {object} storage A reference to the client side storage class\n*/\nfunction Model(storage) {\n  this.storage = storage;\n}\n\n/**\n* Creates a new todo model\n*\n* @param {string} [title] The title of the task\n* @param {function} [callback] The callback to fire after the model is created\n*/\nModel.prototype.create = function (title, callback) {\n  title = title || '';\n  callback = callback || function () {};\n\n  var newItem = {\n    title: title.trim(),\n    completed: false\n  };\n\n  this.storage.save(newItem, callback);\n};\n\n/**\n * Finds and returns a model in storage. If no query is given it'll simply\n * return everything. If you pass in a string or number it'll look that up as\n * the ID of the model to find. Lastly, you can pass it an object to match against.\n *\n * @param {string|number|object} [query] A query to match models against\n * @param {function} [callback] The callback to fire after the model is found\n *\n * @example\n * model.read(1, func); // Will find the model with an ID of 1\n * model.read('1'); // Same as above\n * //Below will find a model with foo equalling bar and hello equalling world.\n * model.read({ foo: 'bar', hello: 'world' });\n */\nModel.prototype.read = function (query, callback) {\n  var queryType = typeof query === 'undefined' ? 'undefined' : _typeof(query);\n  callback = callback || function () {};\n\n  if (queryType === 'function') {\n    callback = query;\n    return this.storage.findAll(callback);\n  } else if (queryType === 'string' || queryType === 'number') {\n    query = parseInt(query, 10);\n    this.storage.find({ id: query }, callback);\n  } else {\n    this.storage.find(query, callback);\n  }\n  return undefined;\n};\n\n/**\n* Updates a model by giving it an ID, data to update, and a callback to fire when\n* the update is complete.\n*\n* @param {number} id The id of the model to update\n* @param {object} data The properties to update and their new value\n* @param {function} callback The callback to fire when the update is complete.\n*/\nModel.prototype.update = function (id, data, callback) {\n  this.storage.save(data, callback, id);\n};\n\n/**\n* Removes a model from storage\n*\n* @param {number} id The ID of the model to remove\n* @param {function} callback The callback to fire when the removal is complete.\n*/\nModel.prototype.remove = function (id, callback) {\n  this.storage.remove(id, callback);\n};\n\n/**\n* WARNING: Will remove ALL data from storage.\n*\n* @param {function} callback The callback to fire when the storage is wiped.\n*/\nModel.prototype.removeAll = function (callback) {\n  this.storage.drop(callback);\n};\n\n/**\n* Returns a count of all todos\n*/\nModel.prototype.getCount = function (callback) {\n  var todos = {\n    active: 0,\n    completed: 0,\n    total: 0\n  };\n\n  this.storage.findAll(function (data) {\n    data.forEach(function (todo) {\n      if (todo.completed) {\n        todos.completed++;\n      } else {\n        todos.active++;\n      }\n\n      todos.total++;\n    });\n    callback(todos);\n  });\n};\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__helpers__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__memory__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__memory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__memory__);\n\n\n/* harmony default export */ exports[\"a\"] = Store;\n\n/**\n * Creates a new client side storage object and will create an empty\n * collection if no collection already exists.\n *\n * @param {string} name The name of our DB we want to use\n * @param {function} callback Our fake DB uses callbacks because in\n * real life you probably would be making AJAX calls\n */\nfunction Store(name, callback) {\n  callback = callback || function () {};\n\n  this._dbName = name;\n\n  if (!__WEBPACK_IMPORTED_MODULE_1__memory__[name]) {\n    var data = {\n      todos: []\n    };\n\n    __WEBPACK_IMPORTED_MODULE_1__memory__[name] = JSON.stringify(data);\n  }\n\n  callback.call(this, JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[name]));\n  this.subscribers = [];\n}\n\nStore.prototype.subscribe = function (subscriber) {\n  var _this = this;\n\n  this.subscribers.push(subscriber);\n  return function () {\n    return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"f\" /* remove */])(_this.subscribers, subscriber);\n  };\n};\n\nStore.prototype._notify = function () {\n  this.subscribers.forEach(function (s) {\n    return s();\n  });\n};\n\n/**\n* Finds items based on a query given as a JS object\n*\n* @param {object} query The query to match against (i.e. {foo: 'bar'})\n* @param {function} callback   The callback to fire when the query has\n* completed running\n*\n* @example\n* db.find({foo: 'bar', hello: 'world'}, function (data) {\n*   // data will return any items that have foo: bar and\n*   // hello: world in their properties\n* });\n*/\nStore.prototype.find = function (query, callback) {\n  if (!callback) {\n    return;\n  }\n\n  var todos = JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]).todos;\n\n  callback.call(this, todos.filter(function (todo) {\n    for (var q in query) {\n      if (query[q] !== todo[q]) {\n        return false;\n      }\n    }\n    return true;\n  }));\n};\n\n/**\n* Will retrieve all data from the collection\n*\n* @param {function} callback The callback to fire upon retrieving data\n*/\nStore.prototype.findAll = function (callback) {\n  callback = callback || function () {};\n  callback.call(this, JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]).todos);\n};\n\n/**\n* Will save the given data to the DB. If no item exists it will create a new\n* item, otherwise it'll simply update an existing item's properties\n*\n* @param {object} updateData The data to save back into the DB\n* @param {function} callback The callback to fire after saving\n* @param {number} id An optional param to enter an ID of an item to update\n*/\nStore.prototype.save = function (updateData, callback, id) {\n  var data = JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]);\n  var todos = data.todos;\n\n  callback = callback || function () {};\n\n  // If an ID was actually given, find the item and update each property\n  if (id) {\n    for (var i = 0; i < todos.length; i++) {\n      if (todos[i].id === id) {\n        for (var key in updateData) {\n          // eslint-disable-line guard-for-in\n          todos[i][key] = updateData[key];\n        }\n        break;\n      }\n    }\n\n    __WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName] = JSON.stringify(data);\n    callback.call(this, JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]).todos);\n  } else {\n    // Generate an ID\n    updateData.id = new Date().getTime();\n\n    todos.push(updateData);\n    __WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName] = JSON.stringify(data);\n    callback.call(this, [updateData]);\n  }\n  this._notify();\n};\n\n/**\n* Will remove an item from the Store based on its ID\n*\n* @param {number} id The ID of the item you want to remove\n* @param {function} callback The callback to fire after saving\n*/\nStore.prototype.remove = function (id, callback) {\n  var data = JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]);\n  var todos = data.todos;\n\n  for (var i = 0; i < todos.length; i++) {\n    if (todos[i].id === id) {\n      todos.splice(i, 1);\n      break;\n    }\n  }\n\n  __WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName] = JSON.stringify(data);\n  callback.call(this, JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]).todos);\n  this._notify();\n};\n\n/**\n* Will drop all storage and start fresh\n*\n* @param {function} callback The callback to fire after dropping the data\n*/\nStore.prototype.drop = function (callback) {\n  __WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName] = JSON.stringify({ todos: [] });\n  callback.call(this, JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]).todos);\n  this._notify();\n};\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ exports[\"a\"] = Template;\n\nvar htmlEscapes = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;',\n  '\\'': '&#x27;',\n  '`': '&#x60;'\n};\n\nvar escapeHtmlChar = function escapeHtmlChar(chr) {\n  return htmlEscapes[chr];\n};\n\nvar reUnescapedHtml = /[&<>\"'`]/g;\nvar reHasUnescapedHtml = new RegExp(reUnescapedHtml.source);\n\nvar escape = function escape(string) {\n  if (string && reHasUnescapedHtml.test(string)) {\n    return string.replace(reUnescapedHtml, escapeHtmlChar);\n  } else {\n    return string;\n  }\n};\n\n/**\n* Sets up defaults for all the Template methods such as a default template\n*\n* @constructor\n*/\nfunction Template() {\n  this.defaultTemplate = '\\n    <li data-id=\"{{id}}\" class=\"{{completed}}\">\\n      <div class=\"view\">\\n        <input class=\"toggle\" type=\"checkbox\" {{checked}} />\\n        <label>{{title}}</label>\\n        <button class=\"destroy\"></button>\\n      </div>\\n    </li>\\n  ';\n}\n\n/**\n * Creates an <li> HTML string and returns it for placement in your app.\n *\n * NOTE: In real life you should be using a templating engine such as Mustache\n * or Handlebars, however, this is a vanilla JS example.\n *\n * @param {object} data The object containing keys you want to find in the\n *                      template to replace.\n * @returns {string} HTML String of an <li> element\n *\n * @example\n * view.show({\n *  id: 1,\n *  title: \"Hello World\",\n *  completed: 0,\n * });\n */\nTemplate.prototype.show = function (data) {\n  var i, l;\n  var view = '';\n\n  for (i = 0, l = data.length; i < l; i++) {\n    var template = this.defaultTemplate;\n    var completed = '';\n    var checked = '';\n\n    if (data[i].completed) {\n      completed = 'completed';\n      checked = 'checked';\n    }\n\n    template = template.replace('{{id}}', data[i].id);\n    template = template.replace('{{title}}', escape(data[i].title));\n    template = template.replace('{{completed}}', completed);\n    template = template.replace('{{checked}}', checked);\n\n    view = view + template;\n  }\n\n  return view;\n};\n\n/**\n * Displays a counter of how many to dos are left to complete\n *\n * @param {number} activeTodos The number of active todos.\n * @returns {string} String containing the count\n */\nTemplate.prototype.itemCounter = function (activeTodos) {\n  var plural = activeTodos === 1 ? '' : 's';\n\n  return '<strong>' + activeTodos + '</strong> item' + plural + ' left';\n};\n\n/**\n * Updates the text within the \"Clear completed\" button\n *\n * @param  {[type]} completedTodos The number of completed todos.\n * @returns {string} String containing the count\n */\nTemplate.prototype.clearCompletedButton = function (completedTodos) {\n  if (completedTodos > 0) {\n    return 'Clear completed';\n  } else {\n    return '';\n  }\n};\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__view__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__controller__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__model__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__store__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__template__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__helpers__ = __webpack_require__(0);\n\n/* harmony export */ __webpack_require__.d(exports, \"a\", function() { return updateTodo; });/* unused harmony export getTodo *//* unused harmony export subscribe */\n\n\n\n\n\n\n\n\nvar todo = void 0;\nvar subscribers = [];\n\n/**\n * Sets up a brand new Todo list.\n *\n * @param {string} name The name of your new to do list.\n */\nfunction Todo(name) {\n  this.storage = new __WEBPACK_IMPORTED_MODULE_3__store__[\"a\" /* default */](name);\n  this.model = new __WEBPACK_IMPORTED_MODULE_2__model__[\"a\" /* default */](this.storage);\n  this.template = new __WEBPACK_IMPORTED_MODULE_4__template__[\"a\" /* default */]();\n  this.view = new __WEBPACK_IMPORTED_MODULE_0__view__[\"a\" /* default */](this.template);\n  this.controller = new __WEBPACK_IMPORTED_MODULE_1__controller__[\"a\" /* default */](this.model, this.view);\n}\n\nfunction updateTodo() {\n  todo = new Todo('todos-vanillajs');\n  todo.controller.setView(document.location.hash);\n  subscribers.forEach(function (s) {\n    return s();\n  });\n}\n\nfunction getTodo() {\n  return todo;\n}\n\nfunction subscribe(cb) {\n  subscribers.push(cb);\n  return function unsubscribe() {\n    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__helpers__[\"f\" /* remove */])(subscribers, cb);\n  };\n}\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__helpers__ = __webpack_require__(0);\nvar _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/* eslint no-invalid-this: 0, complexity:[2, 9] */\n\n\n/**\n * View that abstracts away the browser's DOM completely.\n * It has two simple entry points:\n *\n *   - bind(eventName, handler)\n *     Takes a todo application event and registers the handler\n *   - render(command, parameterObject)\n *     Renders the given command with the options\n */\n\nvar View = function () {\n  function View(template) {\n    _classCallCheck(this, View);\n\n    this.template = template;\n\n    this.ENTER_KEY = 13;\n    this.ESCAPE_KEY = 27;\n\n    this.$todoList = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.todo-list');\n    this.$todoItemCounter = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.todo-count');\n    this.$clearCompleted = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.clear-completed');\n    this.$main = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.main');\n    this.$footer = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.footer');\n    this.$toggleAll = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.toggle-all');\n    this.$newTodo = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.new-todo');\n  }\n\n  _createClass(View, [{\n    key: '_removeItem',\n    value: function _removeItem(id) {\n      var elem = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('[data-id=\"' + id + '\"]');\n\n      if (elem) {\n        this.$todoList.removeChild(elem);\n      }\n    }\n  }, {\n    key: '_clearCompletedButton',\n    value: function _clearCompletedButton(completedCount, visible) {\n      this.$clearCompleted.innerHTML = this.template.clearCompletedButton(completedCount);\n      this.$clearCompleted.style.display = visible ? 'block' : 'none';\n    }\n  }, {\n    key: '_editItemDone',\n    value: function _editItemDone(id, title) {\n      var listItem = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('[data-id=\"' + id + '\"]');\n\n      if (!listItem) {\n        return;\n      }\n\n      var input = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('input.edit', listItem);\n      listItem.removeChild(input);\n\n      listItem.className = listItem.className.replace('editing', '');\n\n      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"b\" /* qsa */])('label', listItem).forEach(function (label) {\n        label.textContent = title;\n      });\n    }\n  }, {\n    key: 'render',\n    value: function render(viewCmd, parameter) {\n      var that = this;\n      var viewCommands = {\n        showEntries: function showEntries() {\n          that.$todoList.innerHTML = that.template.show(parameter);\n        },\n        removeItem: function removeItem() {\n          that._removeItem(parameter);\n        },\n        updateElementCount: function updateElementCount() {\n          that.$todoItemCounter.innerHTML = that.template.itemCounter(parameter);\n        },\n        clearCompletedButton: function clearCompletedButton() {\n          that._clearCompletedButton(parameter.completed, parameter.visible);\n        },\n        contentBlockVisibility: function contentBlockVisibility() {\n          that.$main.style.display = that.$footer.style.display = parameter.visible ? 'block' : 'none';\n        },\n        toggleAll: function toggleAll() {\n          that.$toggleAll.checked = parameter.checked;\n        },\n        setFilter: function setFilter() {\n          _setFilter(parameter);\n        },\n        clearNewTodo: function clearNewTodo() {\n          that.$newTodo.value = '';\n        },\n        elementComplete: function elementComplete() {\n          _elementComplete(parameter.id, parameter.completed);\n        },\n        editItem: function editItem() {\n          _editItem(parameter.id, parameter.title);\n        },\n        editItemDone: function editItemDone() {\n          that._editItemDone(parameter.id, parameter.title);\n        }\n      };\n\n      viewCommands[viewCmd]();\n    }\n  }, {\n    key: '_bindItemEditDone',\n    value: function _bindItemEditDone(handler) {\n      var that = this;\n      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"c\" /* $delegate */])(that.$todoList, 'li .edit', 'blur', function () {\n        if (!this.dataset.iscanceled) {\n          handler({\n            id: _itemId(this),\n            title: this.value\n          });\n        }\n      });\n\n      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"c\" /* $delegate */])(that.$todoList, 'li .edit', 'keypress', function (event) {\n        if (event.keyCode === that.ENTER_KEY) {\n          // Remove the cursor from the input when you hit enter just like if it\n          // were a real form\n          this.blur();\n        }\n      });\n    }\n  }, {\n    key: '_bindItemEditCancel',\n    value: function _bindItemEditCancel(handler) {\n      var that = this;\n      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"c\" /* $delegate */])(that.$todoList, 'li .edit', 'keyup', function (event) {\n        if (event.keyCode === that.ESCAPE_KEY) {\n          this.dataset.iscanceled = true;\n          this.blur();\n\n          handler({ id: _itemId(this) });\n        }\n      });\n    }\n  }, {\n    key: 'bind',\n    value: function bind(event, handler) {\n      var that = this;\n      if (event === 'newTodo') {\n        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"d\" /* $on */])(that.$newTodo, 'change', function () {\n          handler(that.$newTodo.value);\n        });\n      } else if (event === 'removeCompleted') {\n        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"d\" /* $on */])(that.$clearCompleted, 'click', function () {\n          handler();\n        });\n      } else if (event === 'toggleAll') {\n        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"d\" /* $on */])(that.$toggleAll, 'click', function () {\n          handler({ completed: this.checked });\n        });\n      } else if (event === 'itemEdit') {\n        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"c\" /* $delegate */])(that.$todoList, 'li label', 'dblclick', function () {\n          handler({ id: _itemId(this) });\n        });\n      } else if (event === 'itemRemove') {\n        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"c\" /* $delegate */])(that.$todoList, '.destroy', 'click', function () {\n          handler({ id: _itemId(this) });\n        });\n      } else if (event === 'itemToggle') {\n        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"c\" /* $delegate */])(that.$todoList, '.toggle', 'click', function () {\n          handler({\n            id: _itemId(this),\n            completed: this.checked\n          });\n        });\n      } else if (event === 'itemEditDone') {\n        that._bindItemEditDone(handler);\n      } else if (event === 'itemEditCancel') {\n        that._bindItemEditCancel(handler);\n      }\n    }\n  }]);\n\n  return View;\n}();\n\n/* harmony default export */ exports[\"a\"] = View;\n\n\nfunction _setFilter(currentPage) {\n  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.filters .selected').className = '';\n  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.filters [href=\"#/' + currentPage + '\"]').className = 'selected';\n}\n\nfunction _elementComplete(id, completed) {\n  var listItem = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('[data-id=\"' + id + '\"]');\n\n  if (!listItem) {\n    return;\n  }\n\n  listItem.className = completed ? 'completed' : '';\n\n  // In case it was toggled from an event and not by clicking the checkbox\n  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('input', listItem).checked = completed;\n}\n\nfunction _editItem(id, title) {\n  var listItem = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('[data-id=\"' + id + '\"]');\n\n  if (!listItem) {\n    return;\n  }\n\n  listItem.className = listItem.className + ' editing';\n\n  var input = document.createElement('input');\n  input.className = 'edit';\n\n  listItem.appendChild(input);\n  input.focus();\n  input.value = title;\n}\n\nfunction _itemId(element) {\n  var li = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"e\" /* $parent */])(element, 'li');\n  return parseInt(li.dataset.id, 10);\n}\n\n/***/ },\n/* 10 */\n/***/ function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__app__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__helpers__ = __webpack_require__(0);\n/* eslint no-console:0 */\n\n\n\n// this is only relevant when using `hot` mode with webpack\n// special thanks to Eric Clemmons: https://github.com/ericclemmons/webpack-hot-server-example\nvar reloading = document.readyState === 'complete';\nif (false) {\n  module.hot.accept(function (err) {});\n  if (reloading) {\n    onLoad();\n  } else {\n    bootstrap();\n  }\n} else {\n  bootstrap();\n}\n\nfunction bootstrap() {\n  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__helpers__[\"d\" /* $on */])(window, 'load', __WEBPACK_IMPORTED_MODULE_0__app__[\"a\" /* onLoad */]);\n  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__helpers__[\"d\" /* $on */])(window, 'hashchange', __WEBPACK_IMPORTED_MODULE_0__app__[\"a\" /* onLoad */]);\n}\n\n/***/ }\n],[11]);\n\n\n// WEBPACK FOOTER //\n// bundle.app.73bcc5d3c1d07180f0e3.js","export {qs, qsa, $on, $delegate, $parent, remove}\n\n// Get element(s) by CSS selector:\nfunction qs(selector, scope) {\n  return (scope || document).querySelector(selector)\n}\n\nfunction qsa(selector, scope) {\n  return (scope || document).querySelectorAll(selector)\n}\n\n// addEventListener wrapper:\nfunction $on(target, type, callback, useCapture) {\n  target.addEventListener(type, callback, !!useCapture)\n}\n\n// Attach a handler to event for all elements that match the selector,\n// now or in the future, based on a root element\nfunction $delegate(target, selector, type, handler) {\n  // https://developer.mozilla.org/en-US/docs/Web/Events/blur\n  var useCapture = type === 'blur' || type === 'focus'\n  $on(target, type, dispatchEvent, useCapture)\n\n  function dispatchEvent(event) {\n    var targetElement = event.target\n    var potentialElements = qsa(selector, target)\n    var hasMatch = Array.prototype.indexOf.call(potentialElements, targetElement) >= 0\n\n    if (hasMatch) {\n      handler.call(targetElement, event)\n    }\n  }\n}\n\n// Find the element's parent with the given tag name:\n// $parent(qs('a'), 'div');\nfunction $parent(element, tagName) {\n  if (!element.parentNode) {\n    return undefined\n  }\n  if (element.parentNode.tagName.toLowerCase() === tagName.toLowerCase()) {\n    return element.parentNode\n  }\n  return $parent(element.parentNode, tagName)\n}\n\n// removes an element from an array\n// const x = [1,2,3]\n// remove(x, 2)\n// x ~== [1,3]\nfunction remove(array, thing) {\n  const index = array.indexOf(thing)\n  if (index === -1) {\n    return array\n  }\n  array.splice(index, 1)\n}\n\n// Allow for looping on nodes by chaining:\n// qsa('.foo').forEach(function () {})\nNodeList.prototype.forEach = Array.prototype.forEach\n\n\n\n// WEBPACK FOOTER //\n// ./helpers.js","import 'todomvc-app-css/index.css'\nimport './app.css'\n\nimport {$on} from './helpers'\nimport {updateTodo} from './todo'\n\nexport function onLoad() { // eslint-disable-line import/prefer-default-export\n  updateTodo()\n}\n\n\n\n// WEBPACK FOOTER //\n// ./app.js","export default Controller\n\n/**\n* Takes a model and view and acts as the controller between them\n*\n* @constructor\n* @param {object} model The model instance\n* @param {object} view The view instance\n*/\nfunction Controller(model, view) {\n  var that = this\n  that.model = model\n  that.view = view\n\n  that.view.bind('newTodo', function(title) {\n    that.addItem(title)\n  })\n\n  that.view.bind('itemEdit', function(item) {\n    that.editItem(item.id)\n  })\n\n  that.view.bind('itemEditDone', function(item) {\n    that.editItemSave(item.id, item.title)\n  })\n\n  that.view.bind('itemEditCancel', function(item) {\n    that.editItemCancel(item.id)\n  })\n\n  that.view.bind('itemRemove', function(item) {\n    that.removeItem(item.id)\n  })\n\n  that.view.bind('itemToggle', function(item) {\n    that.toggleComplete(item.id, item.completed)\n  })\n\n  that.view.bind('removeCompleted', function() {\n    that.removeCompletedItems()\n  })\n\n  that.view.bind('toggleAll', function(status) {\n    that.toggleAll(status.completed)\n  })\n}\n\n/**\n* Loads and initialises the view\n*\n* @param {string} '' | 'active' | 'completed'\n*/\nController.prototype.setView = function(locationHash) {\n  var route = locationHash.split('/')[1]\n  var page = route || ''\n  this._updateFilterState(page)\n}\n\n/**\n* An event to fire on load. Will get all items and display them in the\n* todo-list\n*/\nController.prototype.showAll = function() {\n  var that = this\n  that.model.read(function(data) {\n    that.view.render('showEntries', data)\n  })\n}\n\n/**\n* Renders all active tasks\n*/\nController.prototype.showActive = function() {\n  var that = this\n  that.model.read({completed: false}, function(data) {\n    that.view.render('showEntries', data)\n  })\n}\n\n/**\n* Renders all completed tasks\n*/\nController.prototype.showCompleted = function() {\n  var that = this\n  that.model.read({completed: true}, function(data) {\n    that.view.render('showEntries', data)\n  })\n}\n\n/**\n* An event to fire whenever you want to add an item. Simply pass in the event\n* object and it'll handle the DOM insertion and saving of the new item.\n*/\nController.prototype.addItem = function(title) {\n  var that = this\n\n  if (title.trim() === '') {\n    return\n  }\n\n  that.model.create(title, function() {\n    that.view.render('clearNewTodo')\n    that._filter(true)\n  })\n}\n\n/*\n* Triggers the item editing mode.\n*/\nController.prototype.editItem = function(id) {\n  var that = this\n  that.model.read(id, function(data) {\n    that.view.render('editItem', {id, title: data[0].title})\n  })\n}\n\n/*\n* Finishes the item editing mode successfully.\n*/\nController.prototype.editItemSave = function(id, title) {\n  var that = this\n  if (title.trim()) {\n    that.model.update(id, {title}, function() {\n      that.view.render('editItemDone', {id, title})\n    })\n  } else {\n    that.removeItem(id)\n  }\n}\n\n/*\n* Cancels the item editing mode.\n*/\nController.prototype.editItemCancel = function(id) {\n  var that = this\n  that.model.read(id, function(data) {\n    that.view.render('editItemDone', {id, title: data[0].title})\n  })\n}\n\n/**\n* By giving it an ID it'll find the DOM element matching that ID,\n* remove it from the DOM and also remove it from storage.\n*\n* @param {number} id The ID of the item to remove from the DOM and\n* storage\n*/\nController.prototype.removeItem = function(id) {\n  var that = this\n  that.model.remove(id, function() {\n    that.view.render('removeItem', id)\n  })\n\n  that._filter()\n}\n\n/**\n* Will remove all completed items from the DOM and storage.\n*/\nController.prototype.removeCompletedItems = function() {\n  var that = this\n  that.model.read({completed: true}, function(data) {\n    data.forEach(function(item) {\n      that.removeItem(item.id)\n    })\n  })\n\n  that._filter()\n}\n\n/**\n* Give it an ID of a model and a checkbox and it will update the item\n* in storage based on the checkbox's state.\n*\n* @param {number} id The ID of the element to complete or uncomplete\n* @param {object} checkbox The checkbox to check the state of complete\n*                          or not\n* @param {boolean|undefined} silent Prevent re-filtering the todo items\n*/\nController.prototype.toggleComplete = function(id, completed, silent) {\n  var that = this\n  that.model.update(id, {completed}, function() {\n    that.view.render('elementComplete', {\n      id,\n      completed,\n    })\n  })\n\n  if (!silent) {\n    that._filter()\n  }\n}\n\n/**\n* Will toggle ALL checkboxes' on/off state and completeness of models.\n* Just pass in the event object.\n*/\nController.prototype.toggleAll = function(completed) {\n  var that = this\n  that.model.read({completed: !completed}, function(data) {\n    data.forEach(function(item) {\n      that.toggleComplete(item.id, completed, true)\n    })\n  })\n\n  that._filter()\n}\n\n/**\n* Updates the pieces of the page which change depending on the remaining\n* number of todos.\n*/\nController.prototype._updateCount = function() {\n  var that = this\n  that.model.getCount(function(todos) {\n    that.view.render('updateElementCount', todos.active)\n    that.view.render('clearCompletedButton', {\n      completed: todos.completed,\n      visible: todos.completed > 0\n    })\n\n    that.view.render('toggleAll', {checked: todos.completed === todos.total})\n    that.view.render('contentBlockVisibility', {visible: todos.total > 0})\n  })\n}\n\n/**\n* Re-filters the todo items, based on the active route.\n* @param {boolean|undefined} force  forces a re-painting of todo items.\n*/\nController.prototype._filter = function(force) {\n  var activeRoute = this._activeRoute.charAt(0).toUpperCase() + this._activeRoute.substr(1)\n\n  // Update the elements on the page, which change with each completed todo\n  this._updateCount()\n\n  // If the last active route isn't \"All\", or we're switching routes, we\n  // re-create the todo item elements, calling:\n  //   this.show[All|Active|Completed]();\n  if (force || this._lastActiveRoute !== 'All' || this._lastActiveRoute !== activeRoute) {\n    this['show' + activeRoute]()\n  }\n\n  this._lastActiveRoute = activeRoute\n}\n\n/**\n* Simply updates the filter nav's selected states\n*/\nController.prototype._updateFilterState = function(currentPage) {\n  // Store a reference to the active route, allowing us to re-filter todo\n  // items as they are marked complete or incomplete.\n  currentPage = currentPage.split('?')[0]\n  this._activeRoute = currentPage\n\n  if (currentPage === '') {\n    this._activeRoute = 'All'\n  }\n\n  this._filter()\n\n  this.view.render('setFilter', currentPage)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./controller.js","(function(root) {\n  var localStorageMemory = {};\n  var cache = {};\n\n  /**\n   * number of stored items.\n   */\n  localStorageMemory.length = 0;\n\n  /**\n   * returns item for passed key, or null\n   *\n   * @para {String} key\n   *       name of item to be returned\n   * @returns {String|null}\n   */\n  localStorageMemory.getItem = function(key) {\n    return cache[key] || null;\n  };\n\n  /**\n   * sets item for key to passed value, as String\n   *\n   * @para {String} key\n   *       name of item to be set\n   * @para {String} value\n   *       value, will always be turned into a String\n   * @returns {undefined}\n   */\n  localStorageMemory.setItem = function(key, value) {\n    if (typeof value === 'undefined') {\n      localStorageMemory.removeItem(key);\n    } else {\n      if (!(cache.hasOwnProperty(key))) {\n        localStorageMemory.length++;\n      }\n\n      cache[key] = '' + value;\n    }\n  };\n\n  /**\n   * removes item for passed key\n   *\n   * @para {String} key\n   *       name of item to be removed\n   * @returns {undefined}\n   */\n  localStorageMemory.removeItem = function(key) {\n    if (cache.hasOwnProperty(key)) {\n      delete cache[key];\n      localStorageMemory.length--;\n    }\n  };\n\n  /**\n   * returns name of key at passed index\n   *\n   * @para {Number} index\n   *       Position for key to be returned (starts at 0)\n   * @returns {String|null}\n   */\n  localStorageMemory.key = function(index) {\n    return Object.keys(cache)[index] || null;\n  };\n\n  /**\n   * removes all stored items and sets length to 0\n   *\n   * @returns {undefined}\n   */\n  localStorageMemory.clear = function() {\n    cache = {};\n    localStorageMemory.length = 0;\n  };\n\n  if (typeof exports === 'object') {\n    module.exports = localStorageMemory;\n  } else {\n    root.localStorageMemory = localStorageMemory;\n  }\n})(this);\n\n\n// WEBPACK FOOTER //\n// ./memory.js","export default Model\n\n/**\n* Creates a new Model instance and hooks up the storage.\n*\n* @constructor\n* @param {object} storage A reference to the client side storage class\n*/\nfunction Model(storage) {\n  this.storage = storage\n}\n\n/**\n* Creates a new todo model\n*\n* @param {string} [title] The title of the task\n* @param {function} [callback] The callback to fire after the model is created\n*/\nModel.prototype.create = function(title, callback) {\n  title = title || ''\n  callback = callback || function() {\n  }\n\n  var newItem = {\n    title: title.trim(),\n    completed: false\n  }\n\n  this.storage.save(newItem, callback)\n}\n\n/**\n * Finds and returns a model in storage. If no query is given it'll simply\n * return everything. If you pass in a string or number it'll look that up as\n * the ID of the model to find. Lastly, you can pass it an object to match against.\n *\n * @param {string|number|object} [query] A query to match models against\n * @param {function} [callback] The callback to fire after the model is found\n *\n * @example\n * model.read(1, func); // Will find the model with an ID of 1\n * model.read('1'); // Same as above\n * //Below will find a model with foo equalling bar and hello equalling world.\n * model.read({ foo: 'bar', hello: 'world' });\n */\nModel.prototype.read = function(query, callback) {\n  var queryType = typeof query\n  callback = callback || function() {\n  }\n\n  if (queryType === 'function') {\n    callback = query\n    return this.storage.findAll(callback)\n  } else if (queryType === 'string' || queryType === 'number') {\n    query = parseInt(query, 10)\n    this.storage.find({id: query}, callback)\n  } else {\n    this.storage.find(query, callback)\n  }\n  return undefined\n}\n\n/**\n* Updates a model by giving it an ID, data to update, and a callback to fire when\n* the update is complete.\n*\n* @param {number} id The id of the model to update\n* @param {object} data The properties to update and their new value\n* @param {function} callback The callback to fire when the update is complete.\n*/\nModel.prototype.update = function(id, data, callback) {\n  this.storage.save(data, callback, id)\n}\n\n/**\n* Removes a model from storage\n*\n* @param {number} id The ID of the model to remove\n* @param {function} callback The callback to fire when the removal is complete.\n*/\nModel.prototype.remove = function(id, callback) {\n  this.storage.remove(id, callback)\n}\n\n/**\n* WARNING: Will remove ALL data from storage.\n*\n* @param {function} callback The callback to fire when the storage is wiped.\n*/\nModel.prototype.removeAll = function(callback) {\n  this.storage.drop(callback)\n}\n\n/**\n* Returns a count of all todos\n*/\nModel.prototype.getCount = function(callback) {\n  var todos = {\n    active: 0,\n    completed: 0,\n    total: 0\n  }\n\n  this.storage.findAll(function(data) {\n    data.forEach(function(todo) {\n      if (todo.completed) {\n        todos.completed++\n      } else {\n        todos.active++\n      }\n\n      todos.total++\n    })\n    callback(todos)\n  })\n}\n\n\n\n// WEBPACK FOOTER //\n// ./model.js","import {remove} from './helpers'\nimport * as localStorageMemory from './memory'\nexport default Store\n\n/**\n * Creates a new client side storage object and will create an empty\n * collection if no collection already exists.\n *\n * @param {string} name The name of our DB we want to use\n * @param {function} callback Our fake DB uses callbacks because in\n * real life you probably would be making AJAX calls\n */\nfunction Store(name, callback) {\n  callback = callback || function() {\n  }\n\n  this._dbName = name\n\n  if (!localStorageMemory[name]) {\n    var data = {\n      todos: []\n    }\n\n    localStorageMemory[name] = JSON.stringify(data)\n  }\n\n  callback.call(this, JSON.parse(localStorageMemory[name]))\n  this.subscribers = []\n}\n\nStore.prototype.subscribe = function(subscriber) {\n  this.subscribers.push(subscriber)\n  return () => remove(this.subscribers, subscriber)\n}\n\nStore.prototype._notify = function() {\n  this.subscribers.forEach(s => s())\n}\n\n/**\n* Finds items based on a query given as a JS object\n*\n* @param {object} query The query to match against (i.e. {foo: 'bar'})\n* @param {function} callback   The callback to fire when the query has\n* completed running\n*\n* @example\n* db.find({foo: 'bar', hello: 'world'}, function (data) {\n*   // data will return any items that have foo: bar and\n*   // hello: world in their properties\n* });\n*/\nStore.prototype.find = function(query, callback) {\n  if (!callback) {\n    return\n  }\n\n  var todos = JSON.parse(localStorageMemory[this._dbName]).todos\n\n  callback.call(this, todos.filter(function(todo) {\n    for (var q in query) {\n      if (query[q] !== todo[q]) {\n        return false\n      }\n    }\n    return true\n  }))\n}\n\n/**\n* Will retrieve all data from the collection\n*\n* @param {function} callback The callback to fire upon retrieving data\n*/\nStore.prototype.findAll = function(callback) {\n  callback = callback || function() {\n  }\n  callback.call(this, JSON.parse(localStorageMemory[this._dbName]).todos)\n}\n\n/**\n* Will save the given data to the DB. If no item exists it will create a new\n* item, otherwise it'll simply update an existing item's properties\n*\n* @param {object} updateData The data to save back into the DB\n* @param {function} callback The callback to fire after saving\n* @param {number} id An optional param to enter an ID of an item to update\n*/\nStore.prototype.save = function(updateData, callback, id) {\n  var data = JSON.parse(localStorageMemory[this._dbName])\n  var todos = data.todos\n\n  callback = callback || function() {\n  }\n\n  // If an ID was actually given, find the item and update each property\n  if (id) {\n    for (var i = 0; i < todos.length; i++) {\n      if (todos[i].id === id) {\n        for (var key in updateData) { // eslint-disable-line guard-for-in\n          todos[i][key] = updateData[key]\n        }\n        break\n      }\n    }\n\n    localStorageMemory[this._dbName] = JSON.stringify(data)\n    callback.call(this, JSON.parse(localStorageMemory[this._dbName]).todos)\n  } else {\n    // Generate an ID\n    updateData.id = new Date().getTime()\n\n    todos.push(updateData)\n    localStorageMemory[this._dbName] = JSON.stringify(data)\n    callback.call(this, [updateData])\n  }\n  this._notify()\n}\n\n/**\n* Will remove an item from the Store based on its ID\n*\n* @param {number} id The ID of the item you want to remove\n* @param {function} callback The callback to fire after saving\n*/\nStore.prototype.remove = function(id, callback) {\n  var data = JSON.parse(localStorageMemory[this._dbName])\n  var todos = data.todos\n\n  for (var i = 0; i < todos.length; i++) {\n    if (todos[i].id === id) {\n      todos.splice(i, 1)\n      break\n    }\n  }\n\n  localStorageMemory[this._dbName] = JSON.stringify(data)\n  callback.call(this, JSON.parse(localStorageMemory[this._dbName]).todos)\n  this._notify()\n}\n\n/**\n* Will drop all storage and start fresh\n*\n* @param {function} callback The callback to fire after dropping the data\n*/\nStore.prototype.drop = function(callback) {\n  localStorageMemory[this._dbName] = JSON.stringify({todos: []})\n  callback.call(this, JSON.parse(localStorageMemory[this._dbName]).todos)\n  this._notify()\n}\n\n\n\n// WEBPACK FOOTER //\n// ./store.js","export default Template\n\nvar htmlEscapes = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;',\n  '\\'': '&#x27;',\n  '`': '&#x60;'\n}\n\nvar escapeHtmlChar = function(chr) {\n  return htmlEscapes[chr]\n}\n\nvar reUnescapedHtml = /[&<>\"'`]/g\nvar reHasUnescapedHtml = new RegExp(reUnescapedHtml.source)\n\nvar escape = function(string) {\n  if (string && reHasUnescapedHtml.test(string)) {\n    return string.replace(reUnescapedHtml, escapeHtmlChar)\n  } else {\n    return string\n  }\n}\n\n/**\n* Sets up defaults for all the Template methods such as a default template\n*\n* @constructor\n*/\nfunction Template() {\n  this.defaultTemplate = `\n    <li data-id=\"{{id}}\" class=\"{{completed}}\">\n      <div class=\"view\">\n        <input class=\"toggle\" type=\"checkbox\" {{checked}} />\n        <label>{{title}}</label>\n        <button class=\"destroy\"></button>\n      </div>\n    </li>\n  `\n}\n\n/**\n * Creates an <li> HTML string and returns it for placement in your app.\n *\n * NOTE: In real life you should be using a templating engine such as Mustache\n * or Handlebars, however, this is a vanilla JS example.\n *\n * @param {object} data The object containing keys you want to find in the\n *                      template to replace.\n * @returns {string} HTML String of an <li> element\n *\n * @example\n * view.show({\n *  id: 1,\n *  title: \"Hello World\",\n *  completed: 0,\n * });\n */\nTemplate.prototype.show = function(data) {\n  var i, l\n  var view = ''\n\n  for (i = 0, l = data.length; i < l; i++) {\n    var template = this.defaultTemplate\n    var completed = ''\n    var checked = ''\n\n    if (data[i].completed) {\n      completed = 'completed'\n      checked = 'checked'\n    }\n\n    template = template.replace('{{id}}', data[i].id)\n    template = template.replace('{{title}}', escape(data[i].title))\n    template = template.replace('{{completed}}', completed)\n    template = template.replace('{{checked}}', checked)\n\n    view = view + template\n  }\n\n  return view\n}\n\n/**\n * Displays a counter of how many to dos are left to complete\n *\n * @param {number} activeTodos The number of active todos.\n * @returns {string} String containing the count\n */\nTemplate.prototype.itemCounter = function(activeTodos) {\n  var plural = activeTodos === 1 ? '' : 's'\n\n  return '<strong>' + activeTodos + '</strong> item' + plural + ' left'\n}\n\n/**\n * Updates the text within the \"Clear completed\" button\n *\n * @param  {[type]} completedTodos The number of completed todos.\n * @returns {string} String containing the count\n */\nTemplate.prototype.clearCompletedButton = function(completedTodos) {\n  if (completedTodos > 0) {\n    return 'Clear completed'\n  } else {\n    return ''\n  }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./template.js","import View from './view'\nimport Controller from './controller'\nimport Model from './model'\nimport Store from './store'\nimport Template from './template'\nimport {remove} from './helpers'\n\nexport {updateTodo, getTodo, subscribe}\n\nlet todo\nconst subscribers = []\n\n/**\n * Sets up a brand new Todo list.\n *\n * @param {string} name The name of your new to do list.\n */\nfunction Todo(name) {\n  this.storage = new Store(name)\n  this.model = new Model(this.storage)\n  this.template = new Template()\n  this.view = new View(this.template)\n  this.controller = new Controller(this.model, this.view)\n}\n\nfunction updateTodo() {\n  todo = new Todo('todos-vanillajs')\n  todo.controller.setView(document.location.hash)\n  subscribers.forEach(s => s())\n}\n\nfunction getTodo() {\n  return todo\n}\n\nfunction subscribe(cb) {\n  subscribers.push(cb)\n  return function unsubscribe() {\n    remove(subscribers, cb)\n  }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./todo.js","/* eslint no-invalid-this: 0, complexity:[2, 9] */\nimport {qs, qsa, $on, $parent, $delegate} from './helpers'\n\n/**\n * View that abstracts away the browser's DOM completely.\n * It has two simple entry points:\n *\n *   - bind(eventName, handler)\n *     Takes a todo application event and registers the handler\n *   - render(command, parameterObject)\n *     Renders the given command with the options\n */\nexport default class View {\n  constructor(template) {\n    this.template = template\n\n    this.ENTER_KEY = 13\n    this.ESCAPE_KEY = 27\n\n    this.$todoList = qs('.todo-list')\n    this.$todoItemCounter = qs('.todo-count')\n    this.$clearCompleted = qs('.clear-completed')\n    this.$main = qs('.main')\n    this.$footer = qs('.footer')\n    this.$toggleAll = qs('.toggle-all')\n    this.$newTodo = qs('.new-todo')\n  }\n\n  _removeItem(id) {\n    var elem = qs('[data-id=\"' + id + '\"]')\n\n    if (elem) {\n      this.$todoList.removeChild(elem)\n    }\n  }\n\n  _clearCompletedButton(completedCount, visible) {\n    this.$clearCompleted.innerHTML = this.template.clearCompletedButton(completedCount)\n    this.$clearCompleted.style.display = visible ? 'block' : 'none'\n  }\n\n  _editItemDone(id, title) {\n    var listItem = qs('[data-id=\"' + id + '\"]')\n\n    if (!listItem) {\n      return\n    }\n\n    var input = qs('input.edit', listItem)\n    listItem.removeChild(input)\n\n    listItem.className = listItem.className.replace('editing', '')\n\n    qsa('label', listItem).forEach(function(label) {\n      label.textContent = title\n    })\n  }\n\n  render(viewCmd, parameter) {\n    var that = this\n    var viewCommands = {\n      showEntries: function() {\n        that.$todoList.innerHTML = that.template.show(parameter)\n      },\n      removeItem: function() {\n        that._removeItem(parameter)\n      },\n      updateElementCount: function() {\n        that.$todoItemCounter.innerHTML = that.template.itemCounter(parameter)\n      },\n      clearCompletedButton: function() {\n        that._clearCompletedButton(parameter.completed, parameter.visible)\n      },\n      contentBlockVisibility: function() {\n        that.$main.style.display = that.$footer.style.display = parameter.visible ? 'block' : 'none'\n      },\n      toggleAll: function() {\n        that.$toggleAll.checked = parameter.checked\n      },\n      setFilter: function() {\n        _setFilter(parameter)\n      },\n      clearNewTodo: function() {\n        that.$newTodo.value = ''\n      },\n      elementComplete: function() {\n        _elementComplete(parameter.id, parameter.completed)\n      },\n      editItem: function() {\n        _editItem(parameter.id, parameter.title)\n      },\n      editItemDone: function() {\n        that._editItemDone(parameter.id, parameter.title)\n      }\n    }\n\n    viewCommands[viewCmd]()\n  }\n\n  _bindItemEditDone(handler) {\n    var that = this\n    $delegate(that.$todoList, 'li .edit', 'blur', function() {\n      if (!this.dataset.iscanceled) {\n        handler({\n          id: _itemId(this),\n          title: this.value\n        })\n      }\n    })\n\n    $delegate(that.$todoList, 'li .edit', 'keypress', function(event) {\n      if (event.keyCode === that.ENTER_KEY) {\n        // Remove the cursor from the input when you hit enter just like if it\n        // were a real form\n        this.blur()\n      }\n    })\n  }\n\n  _bindItemEditCancel(handler) {\n    var that = this\n    $delegate(that.$todoList, 'li .edit', 'keyup', function(event) {\n      if (event.keyCode === that.ESCAPE_KEY) {\n        this.dataset.iscanceled = true\n        this.blur()\n\n        handler({id: _itemId(this)})\n      }\n    })\n  }\n\n  bind(event, handler) {\n    var that = this\n    if (event === 'newTodo') {\n      $on(that.$newTodo, 'change', function() {\n        handler(that.$newTodo.value)\n      })\n\n    } else if (event === 'removeCompleted') {\n      $on(that.$clearCompleted, 'click', function() {\n        handler()\n      })\n\n    } else if (event === 'toggleAll') {\n      $on(that.$toggleAll, 'click', function() {\n        handler({completed: this.checked})\n      })\n\n    } else if (event === 'itemEdit') {\n      $delegate(that.$todoList, 'li label', 'dblclick', function() {\n        handler({id: _itemId(this)})\n      })\n\n    } else if (event === 'itemRemove') {\n      $delegate(that.$todoList, '.destroy', 'click', function() {\n        handler({id: _itemId(this)})\n      })\n\n    } else if (event === 'itemToggle') {\n      $delegate(that.$todoList, '.toggle', 'click', function() {\n        handler({\n          id: _itemId(this),\n          completed: this.checked\n        })\n      })\n\n    } else if (event === 'itemEditDone') {\n      that._bindItemEditDone(handler)\n\n    } else if (event === 'itemEditCancel') {\n      that._bindItemEditCancel(handler)\n    }\n  }\n}\n\nfunction _setFilter(currentPage) {\n  qs('.filters .selected').className = ''\n  qs('.filters [href=\"#/' + currentPage + '\"]').className = 'selected'\n}\n\nfunction _elementComplete(id, completed) {\n  var listItem = qs('[data-id=\"' + id + '\"]')\n\n  if (!listItem) {\n    return\n  }\n\n  listItem.className = completed ? 'completed' : ''\n\n  // In case it was toggled from an event and not by clicking the checkbox\n  qs('input', listItem).checked = completed\n}\n\nfunction _editItem(id, title) {\n  var listItem = qs('[data-id=\"' + id + '\"]')\n\n  if (!listItem) {\n    return\n  }\n\n  listItem.className = listItem.className + ' editing'\n\n  var input = document.createElement('input')\n  input.className = 'edit'\n\n  listItem.appendChild(input)\n  input.focus()\n  input.value = title\n}\n\nfunction _itemId(element) {\n  var li = $parent(element, 'li')\n  return parseInt(li.dataset.id, 10)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./view.js","/* eslint no-console:0 */\nimport {onLoad} from './app'\nimport {$on} from './helpers'\n\n// this is only relevant when using `hot` mode with webpack\n// special thanks to Eric Clemmons: https://github.com/ericclemmons/webpack-hot-server-example\nconst reloading = document.readyState === 'complete'\nif (module.hot) {\n  module.hot.accept(function(err) {\n  })\n  if (reloading) {\n    onLoad()\n  } else {\n    bootstrap()\n  }\n} else {\n  bootstrap()\n}\n\nfunction bootstrap() {\n  $on(window, 'load', onLoad)\n  $on(window, 'hashchange', onLoad)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./bootstrap.js"],"sourceRoot":""}
     1{"version":3,"sources":["webpack:///bundle.app.9debb1b0a94f14d0ebe9.js","webpack:///./helpers.js","webpack:///./app.js","webpack:///./controller.js","webpack:///./memory.js","webpack:///./model.js","webpack:///./store.js","webpack:///./template.js","webpack:///./todo.js","webpack:///./view.js","webpack:///./bootstrap.js"],"names":["webpackJsonp","module","exports","__webpack_require__","qs","selector","scope","document","querySelector","qsa","querySelectorAll","$on","target","type","callback","useCapture","addEventListener","$delegate","handler","dispatchEvent","event","targetElement","potentialElements","hasMatch","Array","prototype","indexOf","call","$parent","element","tagName","parentNode","toLowerCase","remove","array","thing","index","splice","d","NodeList","forEach","onLoad","i","__WEBPACK_IMPORTED_MODULE_3__todo__","__WEBPACK_IMPORTED_MODULE_0_todomvc_app_css_index_css__","__WEBPACK_IMPORTED_MODULE_1__app_css__","n","Controller","model","view","that","this","bind","title","addItem","item","editItem","id","editItemSave","editItemCancel","removeItem","toggleComplete","completed","removeCompletedItems","status","toggleAll","setView","locationHash","route","split","page","_updateFilterState","showAll","read","data","render","showActive","showCompleted","trim","create","_filter","update","silent","_updateCount","getCount","todos","active","visible","checked","total","force","activeRoute","_activeRoute","charAt","toUpperCase","substr","_lastActiveRoute","currentPage","_typeof","Symbol","iterator","obj","constructor","root","localStorageMemory","cache","length","getItem","key","setItem","value","hasOwnProperty","Object","keys","clear","Model","storage","newItem","save","query","queryType","findAll","parseInt","find","removeAll","drop","todo","Store","name","_dbName","__WEBPACK_IMPORTED_MODULE_1__memory__","JSON","stringify","parse","subscribers","__WEBPACK_IMPORTED_MODULE_0__helpers__","subscribe","subscriber","_this","push","_notify","s","filter","q","updateData","Date","getTime","Template","defaultTemplate","htmlEscapes","&","<",">","\"","'","`","escapeHtmlChar","chr","reUnescapedHtml","reHasUnescapedHtml","RegExp","source","escape","string","test","replace","show","l","template","itemCounter","activeTodos","plural","clearCompletedButton","completedTodos","Todo","__WEBPACK_IMPORTED_MODULE_3__store__","__WEBPACK_IMPORTED_MODULE_2__model__","__WEBPACK_IMPORTED_MODULE_4__template__","__WEBPACK_IMPORTED_MODULE_0__view__","controller","__WEBPACK_IMPORTED_MODULE_1__controller__","updateTodo","location","hash","_classCallCheck","instance","Constructor","TypeError","_setFilter","className","_elementComplete","listItem","_editItem","input","createElement","appendChild","focus","_itemId","li","dataset","_createClass","defineProperties","props","descriptor","enumerable","configurable","writable","defineProperty","protoProps","staticProps","View","ENTER_KEY","ESCAPE_KEY","$todoList","$todoItemCounter","$clearCompleted","$main","$footer","$toggleAll","$newTodo","elem","removeChild","completedCount","innerHTML","style","display","label","textContent","viewCmd","parameter","viewCommands","showEntries","_removeItem","updateElementCount","_clearCompletedButton","contentBlockVisibility","setFilter","clearNewTodo","elementComplete","editItemDone","_editItemDone","iscanceled","keyCode","blur","_bindItemEditDone","_bindItemEditCancel","bootstrap","__WEBPACK_IMPORTED_MODULE_1__helpers__","window","__WEBPACK_IMPORTED_MODULE_0__app__","readyState"],"mappings":"AAAAA,cAAc,EAAE,IAEV,SAASC,EAAQC,EAASC,GAEhC,YCDA,SAASC,GAAGC,EAAUC,GACpB,OAAQA,GAASC,UAAUC,cAAcH,GAG3C,QAASI,GAAIJ,EAAUC,GACrB,OAAQA,GAASC,UAAUG,iBAAiBL,GAI9C,QAASM,GAAIC,EAAQC,EAAMC,EAAUC,GACnCH,EAAOI,iBAAiBH,EAAMC,IAAYC,GAK5C,QAASE,GAAUL,EAAQP,EAAUQ,EAAMK,GAKzC,QAASC,GAAcC,GACrB,GAAIC,GAAgBD,EAAMR,OACtBU,EAAoBb,EAAIJ,EAAUO,GAClCW,EAAWC,MAAMC,UAAUC,QAAQC,KAAKL,EAAmBD,IAAkB,CAE7EE,IACFL,EAAQS,KAAKN,EAAeD,GAThC,GAAIL,GA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AAY,WAChDnM,GAASuC,GAAI4I,EAAQlJ,UAGJ,eAAV/B,EACTjB,EAAAuC,EAAA6F,EAAA,GAAUrF,EAAKmK,UAAW,WAAY,QAAS,WAC7CnM,GAASuC,GAAI4I,EAAQlJ,UAGJ,eAAV/B,EACTjB,EAAAuC,EAAA6F,EAAA,GAAUrF,EAAKmK,UAAW,UAAW,QAAS,WAC5CnM,GACEuC,GAAI4I,EAAQlJ,MACZW,UAAWX,KAAKqC,YAID,iBAAVpE,EACT8B,EAAKkM,kBAAkBlO,GAEJ,mBAAVE,GACT8B,EAAKmM,oBAAoBnO,OT25BtBgM,IAGoBhN,GAAW,ES5jCnBgN,GTymCf,SAASjN,EAAQC,KAMjB,SAASD,EAAQC,EAASC,GAEhC,YU1mCA,SAASmP,KACPnP,EAAAuC,EAAA6M,EAAA,GAAIC,OAAQ,OAAQC,EAAA,GACpBtP,EAAAuC,EAAA6M,EAAA,GAAIC,OAAQ,aAAcC,EAAA,GVymCP,GAAIA,GAAqCtP,EAAoB,GU9nClFoP,EAAApP,EAAA,EAM0C,cAAxBI,SAASmP,UAUzBJ,QVwoCC","file":"bundle.app.9debb1b0a94f14d0ebe9.js","sourcesContent":["webpackJsonp([0,2],[\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/* harmony export */ __webpack_require__.d(exports, \"a\", function() { return qs; });\n/* harmony export */ __webpack_require__.d(exports, \"b\", function() { return qsa; });\n/* harmony export */ __webpack_require__.d(exports, \"d\", function() { return $on; });\n/* harmony export */ __webpack_require__.d(exports, \"c\", function() { return $delegate; });\n/* harmony export */ __webpack_require__.d(exports, \"e\", function() { return $parent; });\n/* harmony export */ __webpack_require__.d(exports, \"f\", function() { return remove; });\n\n// Get element(s) by CSS selector:\nfunction qs(selector, scope) {\n  return (scope || document).querySelector(selector);\n}\n\nfunction qsa(selector, scope) {\n  return (scope || document).querySelectorAll(selector);\n}\n\n// addEventListener wrapper:\nfunction $on(target, type, callback, useCapture) {\n  target.addEventListener(type, callback, !!useCapture);\n}\n\n// Attach a handler to event for all elements that match the selector,\n// now or in the future, based on a root element\nfunction $delegate(target, selector, type, handler) {\n  // https://developer.mozilla.org/en-US/docs/Web/Events/blur\n  var useCapture = type === 'blur' || type === 'focus';\n  $on(target, type, dispatchEvent, useCapture);\n\n  function dispatchEvent(event) {\n    var targetElement = event.target;\n    var potentialElements = qsa(selector, target);\n    var hasMatch = Array.prototype.indexOf.call(potentialElements, targetElement) >= 0;\n\n    if (hasMatch) {\n      handler.call(targetElement, event);\n    }\n  }\n}\n\n// Find the element's parent with the given tag name:\n// $parent(qs('a'), 'div');\nfunction $parent(element, tagName) {\n  if (!element.parentNode) {\n    return undefined;\n  }\n  if (element.parentNode.tagName.toLowerCase() === tagName.toLowerCase()) {\n    return element.parentNode;\n  }\n  return $parent(element.parentNode, tagName);\n}\n\n// removes an element from an array\n// const x = [1,2,3]\n// remove(x, 2)\n// x ~== [1,3]\nfunction remove(array, thing) {\n  var index = array.indexOf(thing);\n  if (index === -1) {\n    return array;\n  }\n  array.splice(index, 1);\n}\n\n// Allow for looping on nodes by chaining:\n// qsa('.foo').forEach(function () {})\nNodeList.prototype.forEach = Array.prototype.forEach;\n\n/***/ },\n/* 1 */,\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_todomvc_app_css_index_css__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_todomvc_app_css_index_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_todomvc_app_css_index_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_css__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__app_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__helpers__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__todo__ = __webpack_require__(8);\n/* harmony export */ exports[\"a\"] = onLoad;\n\n\n\n\n\nfunction onLoad() {\n  // eslint-disable-line import/prefer-default-export\n  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__todo__[\"a\" /* updateTodo */])();\n}\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ exports[\"a\"] = Controller;\n\n/**\n* Takes a model and view and acts as the controller between them\n*\n* @constructor\n* @param {object} model The model instance\n* @param {object} view The view instance\n*/\nfunction Controller(model, view) {\n  var that = this;\n  that.model = model;\n  that.view = view;\n\n  that.view.bind('newTodo', function (title) {\n    that.addItem(title);\n  });\n\n  that.view.bind('itemEdit', function (item) {\n    that.editItem(item.id);\n  });\n\n  that.view.bind('itemEditDone', function (item) {\n    that.editItemSave(item.id, item.title);\n  });\n\n  that.view.bind('itemEditCancel', function (item) {\n    that.editItemCancel(item.id);\n  });\n\n  that.view.bind('itemRemove', function (item) {\n    that.removeItem(item.id);\n  });\n\n  that.view.bind('itemToggle', function (item) {\n    that.toggleComplete(item.id, item.completed);\n  });\n\n  that.view.bind('removeCompleted', function () {\n    that.removeCompletedItems();\n  });\n\n  that.view.bind('toggleAll', function (status) {\n    that.toggleAll(status.completed);\n  });\n}\n\n/**\n* Loads and initialises the view\n*\n* @param {string} '' | 'active' | 'completed'\n*/\nController.prototype.setView = function (locationHash) {\n  var route = locationHash.split('/')[1];\n  var page = route || '';\n  this._updateFilterState(page);\n};\n\n/**\n* An event to fire on load. Will get all items and display them in the\n* todo-list\n*/\nController.prototype.showAll = function () {\n  var that = this;\n  that.model.read(function (data) {\n    that.view.render('showEntries', data);\n  });\n};\n\n/**\n* Renders all active tasks\n*/\nController.prototype.showActive = function () {\n  var that = this;\n  that.model.read({ completed: false }, function (data) {\n    that.view.render('showEntries', data);\n  });\n};\n\n/**\n* Renders all completed tasks\n*/\nController.prototype.showCompleted = function () {\n  var that = this;\n  that.model.read({ completed: true }, function (data) {\n    that.view.render('showEntries', data);\n  });\n};\n\n/**\n* An event to fire whenever you want to add an item. Simply pass in the event\n* object and it'll handle the DOM insertion and saving of the new item.\n*/\nController.prototype.addItem = function (title) {\n  var that = this;\n\n  if (title.trim() === '') {\n    return;\n  }\n\n  that.model.create(title, function () {\n    that.view.render('clearNewTodo');\n    that._filter(true);\n  });\n};\n\n/*\n* Triggers the item editing mode.\n*/\nController.prototype.editItem = function (id) {\n  var that = this;\n  that.model.read(id, function (data) {\n    that.view.render('editItem', { id: id, title: data[0].title });\n  });\n};\n\n/*\n* Finishes the item editing mode successfully.\n*/\nController.prototype.editItemSave = function (id, title) {\n  var that = this;\n  if (title.trim()) {\n    that.model.update(id, { title: title }, function () {\n      that.view.render('editItemDone', { id: id, title: title });\n    });\n  } else {\n    that.removeItem(id);\n  }\n};\n\n/*\n* Cancels the item editing mode.\n*/\nController.prototype.editItemCancel = function (id) {\n  var that = this;\n  that.model.read(id, function (data) {\n    that.view.render('editItemDone', { id: id, title: data[0].title });\n  });\n};\n\n/**\n* By giving it an ID it'll find the DOM element matching that ID,\n* remove it from the DOM and also remove it from storage.\n*\n* @param {number} id The ID of the item to remove from the DOM and\n* storage\n*/\nController.prototype.removeItem = function (id) {\n  var that = this;\n  that.model.remove(id, function () {\n    that.view.render('removeItem', id);\n  });\n\n  that._filter();\n};\n\n/**\n* Will remove all completed items from the DOM and storage.\n*/\nController.prototype.removeCompletedItems = function () {\n  var that = this;\n  that.model.read({ completed: true }, function (data) {\n    data.forEach(function (item) {\n      that.removeItem(item.id);\n    });\n  });\n\n  that._filter();\n};\n\n/**\n* Give it an ID of a model and a checkbox and it will update the item\n* in storage based on the checkbox's state.\n*\n* @param {number} id The ID of the element to complete or uncomplete\n* @param {object} checkbox The checkbox to check the state of complete\n*                          or not\n* @param {boolean|undefined} silent Prevent re-filtering the todo items\n*/\nController.prototype.toggleComplete = function (id, completed, silent) {\n  var that = this;\n  that.model.update(id, { completed: completed }, function () {\n    that.view.render('elementComplete', {\n      id: id,\n      completed: completed\n    });\n  });\n\n  if (!silent) {\n    that._filter();\n  }\n};\n\n/**\n* Will toggle ALL checkboxes' on/off state and completeness of models.\n* Just pass in the event object.\n*/\nController.prototype.toggleAll = function (completed) {\n  var that = this;\n  that.model.read({ completed: !completed }, function (data) {\n    data.forEach(function (item) {\n      that.toggleComplete(item.id, completed, true);\n    });\n  });\n\n  that._filter();\n};\n\n/**\n* Updates the pieces of the page which change depending on the remaining\n* number of todos.\n*/\nController.prototype._updateCount = function () {\n  var that = this;\n  that.model.getCount(function (todos) {\n    that.view.render('updateElementCount', todos.active);\n    that.view.render('clearCompletedButton', {\n      completed: todos.completed,\n      visible: todos.completed > 0\n    });\n\n    that.view.render('toggleAll', { checked: todos.completed === todos.total });\n    that.view.render('contentBlockVisibility', { visible: todos.total > 0 });\n  });\n};\n\n/**\n* Re-filters the todo items, based on the active route.\n* @param {boolean|undefined} force  forces a re-painting of todo items.\n*/\nController.prototype._filter = function (force) {\n  var activeRoute = this._activeRoute.charAt(0).toUpperCase() + this._activeRoute.substr(1);\n\n  // Update the elements on the page, which change with each completed todo\n  this._updateCount();\n\n  // If the last active route isn't \"All\", or we're switching routes, we\n  // re-create the todo item elements, calling:\n  //   this.show[All|Active|Completed]();\n  if (force || this._lastActiveRoute !== 'All' || this._lastActiveRoute !== activeRoute) {\n    this['show' + activeRoute]();\n  }\n\n  this._lastActiveRoute = activeRoute;\n};\n\n/**\n* Simply updates the filter nav's selected states\n*/\nController.prototype._updateFilterState = function (currentPage) {\n  // Store a reference to the active route, allowing us to re-filter todo\n  // items as they are marked complete or incomplete.\n  currentPage = currentPage.split('?')[0];\n  this._activeRoute = currentPage;\n\n  if (currentPage === '') {\n    this._activeRoute = 'All';\n  }\n\n  this._filter();\n\n  this.view.render('setFilter', currentPage);\n};\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n(function (root) {\n  var localStorageMemory = {};\n  var cache = {};\n\n  /**\n   * number of stored items.\n   */\n  localStorageMemory.length = 0;\n\n  /**\n   * returns item for passed key, or null\n   *\n   * @para {String} key\n   *       name of item to be returned\n   * @returns {String|null}\n   */\n  localStorageMemory.getItem = function (key) {\n    return cache[key] || null;\n  };\n\n  /**\n   * sets item for key to passed value, as String\n   *\n   * @para {String} key\n   *       name of item to be set\n   * @para {String} value\n   *       value, will always be turned into a String\n   * @returns {undefined}\n   */\n  localStorageMemory.setItem = function (key, value) {\n    if (typeof value === 'undefined') {\n      localStorageMemory.removeItem(key);\n    } else {\n      if (!cache.hasOwnProperty(key)) {\n        localStorageMemory.length++;\n      }\n\n      cache[key] = '' + value;\n    }\n  };\n\n  /**\n   * removes item for passed key\n   *\n   * @para {String} key\n   *       name of item to be removed\n   * @returns {undefined}\n   */\n  localStorageMemory.removeItem = function (key) {\n    if (cache.hasOwnProperty(key)) {\n      delete cache[key];\n      localStorageMemory.length--;\n    }\n  };\n\n  /**\n   * returns name of key at passed index\n   *\n   * @para {Number} index\n   *       Position for key to be returned (starts at 0)\n   * @returns {String|null}\n   */\n  localStorageMemory.key = function (index) {\n    return Object.keys(cache)[index] || null;\n  };\n\n  /**\n   * removes all stored items and sets length to 0\n   *\n   * @returns {undefined}\n   */\n  localStorageMemory.clear = function () {\n    cache = {};\n    localStorageMemory.length = 0;\n  };\n\n  if (( false ? 'undefined' : _typeof(exports)) === 'object') {\n    module.exports = localStorageMemory;\n  } else {\n    root.localStorageMemory = localStorageMemory;\n  }\n})(this);\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/* harmony default export */ exports[\"a\"] = Model;\n\n/**\n* Creates a new Model instance and hooks up the storage.\n*\n* @constructor\n* @param {object} storage A reference to the client side storage class\n*/\nfunction Model(storage) {\n  this.storage = storage;\n}\n\n/**\n* Creates a new todo model\n*\n* @param {string} [title] The title of the task\n* @param {function} [callback] The callback to fire after the model is created\n*/\nModel.prototype.create = function (title, callback) {\n  title = title || '';\n  callback = callback || function () {};\n\n  var newItem = {\n    title: title.trim(),\n    completed: false\n  };\n\n  this.storage.save(newItem, callback);\n};\n\n/**\n * Finds and returns a model in storage. If no query is given it'll simply\n * return everything. If you pass in a string or number it'll look that up as\n * the ID of the model to find. Lastly, you can pass it an object to match against.\n *\n * @param {string|number|object} [query] A query to match models against\n * @param {function} [callback] The callback to fire after the model is found\n *\n * @example\n * model.read(1, func); // Will find the model with an ID of 1\n * model.read('1'); // Same as above\n * //Below will find a model with foo equalling bar and hello equalling world.\n * model.read({ foo: 'bar', hello: 'world' });\n */\nModel.prototype.read = function (query, callback) {\n  var queryType = typeof query === 'undefined' ? 'undefined' : _typeof(query);\n  callback = callback || function () {};\n\n  if (queryType === 'function') {\n    callback = query;\n    return this.storage.findAll(callback);\n  } else if (queryType === 'string' || queryType === 'number') {\n    query = parseInt(query, 10);\n    this.storage.find({ id: query }, callback);\n  } else {\n    this.storage.find(query, callback);\n  }\n  return undefined;\n};\n\n/**\n* Updates a model by giving it an ID, data to update, and a callback to fire when\n* the update is complete.\n*\n* @param {number} id The id of the model to update\n* @param {object} data The properties to update and their new value\n* @param {function} callback The callback to fire when the update is complete.\n*/\nModel.prototype.update = function (id, data, callback) {\n  this.storage.save(data, callback, id);\n};\n\n/**\n* Removes a model from storage\n*\n* @param {number} id The ID of the model to remove\n* @param {function} callback The callback to fire when the removal is complete.\n*/\nModel.prototype.remove = function (id, callback) {\n  this.storage.remove(id, callback);\n};\n\n/**\n* WARNING: Will remove ALL data from storage.\n*\n* @param {function} callback The callback to fire when the storage is wiped.\n*/\nModel.prototype.removeAll = function (callback) {\n  this.storage.drop(callback);\n};\n\n/**\n* Returns a count of all todos\n*/\nModel.prototype.getCount = function (callback) {\n  var todos = {\n    active: 0,\n    completed: 0,\n    total: 0\n  };\n\n  this.storage.findAll(function (data) {\n    data.forEach(function (todo) {\n      if (todo.completed) {\n        todos.completed++;\n      } else {\n        todos.active++;\n      }\n\n      todos.total++;\n    });\n    callback(todos);\n  });\n};\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__helpers__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__memory__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__memory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__memory__);\n\n\n/* harmony default export */ exports[\"a\"] = Store;\n\n/**\n * Creates a new client side storage object and will create an empty\n * collection if no collection already exists.\n *\n * @param {string} name The name of our DB we want to use\n * @param {function} callback Our fake DB uses callbacks because in\n * real life you probably would be making AJAX calls\n */\nfunction Store(name, callback) {\n  callback = callback || function () {};\n\n  this._dbName = name;\n\n  if (!__WEBPACK_IMPORTED_MODULE_1__memory__[name]) {\n    var data = {\n      todos: []\n    };\n\n    __WEBPACK_IMPORTED_MODULE_1__memory__[name] = JSON.stringify(data);\n  }\n\n  callback.call(this, JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[name]));\n  this.subscribers = [];\n}\n\nStore.prototype.subscribe = function (subscriber) {\n  var _this = this;\n\n  this.subscribers.push(subscriber);\n  return function () {\n    return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"f\" /* remove */])(_this.subscribers, subscriber);\n  };\n};\n\nStore.prototype._notify = function () {\n  this.subscribers.forEach(function (s) {\n    return s();\n  });\n};\n\n/**\n* Finds items based on a query given as a JS object\n*\n* @param {object} query The query to match against (i.e. {foo: 'bar'})\n* @param {function} callback   The callback to fire when the query has\n* completed running\n*\n* @example\n* db.find({foo: 'bar', hello: 'world'}, function (data) {\n*   // data will return any items that have foo: bar and\n*   // hello: world in their properties\n* });\n*/\nStore.prototype.find = function (query, callback) {\n  if (!callback) {\n    return;\n  }\n\n  var todos = JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]).todos;\n\n  callback.call(this, todos.filter(function (todo) {\n    for (var q in query) {\n      if (query[q] !== todo[q]) {\n        return false;\n      }\n    }\n    return true;\n  }));\n};\n\n/**\n* Will retrieve all data from the collection\n*\n* @param {function} callback The callback to fire upon retrieving data\n*/\nStore.prototype.findAll = function (callback) {\n  callback = callback || function () {};\n  callback.call(this, JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]).todos);\n};\n\n/**\n* Will save the given data to the DB. If no item exists it will create a new\n* item, otherwise it'll simply update an existing item's properties\n*\n* @param {object} updateData The data to save back into the DB\n* @param {function} callback The callback to fire after saving\n* @param {number} id An optional param to enter an ID of an item to update\n*/\nStore.prototype.save = function (updateData, callback, id) {\n  var data = JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]);\n  var todos = data.todos;\n\n  callback = callback || function () {};\n\n  // If an ID was actually given, find the item and update each property\n  if (id) {\n    for (var i = 0; i < todos.length; i++) {\n      if (todos[i].id === id) {\n        for (var key in updateData) {\n          // eslint-disable-line guard-for-in\n          todos[i][key] = updateData[key];\n        }\n        break;\n      }\n    }\n\n    __WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName] = JSON.stringify(data);\n    callback.call(this, JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]).todos);\n  } else {\n    // Generate an ID\n    updateData.id = new Date().getTime();\n\n    todos.push(updateData);\n    __WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName] = JSON.stringify(data);\n    callback.call(this, [updateData]);\n  }\n  this._notify();\n};\n\n/**\n* Will remove an item from the Store based on its ID\n*\n* @param {number} id The ID of the item you want to remove\n* @param {function} callback The callback to fire after saving\n*/\nStore.prototype.remove = function (id, callback) {\n  var data = JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]);\n  var todos = data.todos;\n\n  for (var i = 0; i < todos.length; i++) {\n    if (todos[i].id === id) {\n      todos.splice(i, 1);\n      break;\n    }\n  }\n\n  __WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName] = JSON.stringify(data);\n  callback.call(this, JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]).todos);\n  this._notify();\n};\n\n/**\n* Will drop all storage and start fresh\n*\n* @param {function} callback The callback to fire after dropping the data\n*/\nStore.prototype.drop = function (callback) {\n  __WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName] = JSON.stringify({ todos: [] });\n  callback.call(this, JSON.parse(__WEBPACK_IMPORTED_MODULE_1__memory__[this._dbName]).todos);\n  this._notify();\n};\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ exports[\"a\"] = Template;\n\nvar htmlEscapes = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;',\n  '\\'': '&#x27;',\n  '`': '&#x60;'\n};\n\nvar escapeHtmlChar = function escapeHtmlChar(chr) {\n  return htmlEscapes[chr];\n};\n\nvar reUnescapedHtml = /[&<>\"'`]/g;\nvar reHasUnescapedHtml = new RegExp(reUnescapedHtml.source);\n\nvar escape = function escape(string) {\n  if (string && reHasUnescapedHtml.test(string)) {\n    return string.replace(reUnescapedHtml, escapeHtmlChar);\n  } else {\n    return string;\n  }\n};\n\n/**\n* Sets up defaults for all the Template methods such as a default template\n*\n* @constructor\n*/\nfunction Template() {\n  this.defaultTemplate = '\\n    <li data-id=\"{{id}}\" class=\"{{completed}}\">\\n      <div class=\"view\">\\n        <input class=\"toggle\" type=\"checkbox\" {{checked}} />\\n        <label>{{title}}</label>\\n        <button class=\"destroy\"></button>\\n      </div>\\n    </li>\\n  ';\n}\n\n/**\n * Creates an <li> HTML string and returns it for placement in your app.\n *\n * NOTE: In real life you should be using a templating engine such as Mustache\n * or Handlebars, however, this is a vanilla JS example.\n *\n * @param {object} data The object containing keys you want to find in the\n *                      template to replace.\n * @returns {string} HTML String of an <li> element\n *\n * @example\n * view.show({\n *  id: 1,\n *  title: \"Hello World\",\n *  completed: 0,\n * });\n */\nTemplate.prototype.show = function (data) {\n  var i, l;\n  var view = '';\n\n  for (i = 0, l = data.length; i < l; i++) {\n    var template = this.defaultTemplate;\n    var completed = '';\n    var checked = '';\n\n    if (data[i].completed) {\n      completed = 'completed';\n      checked = 'checked';\n    }\n\n    template = template.replace('{{id}}', data[i].id);\n    template = template.replace('{{title}}', escape(data[i].title));\n    template = template.replace('{{completed}}', completed);\n    template = template.replace('{{checked}}', checked);\n\n    view = view + template;\n  }\n\n  return view;\n};\n\n/**\n * Displays a counter of how many to dos are left to complete\n *\n * @param {number} activeTodos The number of active todos.\n * @returns {string} String containing the count\n */\nTemplate.prototype.itemCounter = function (activeTodos) {\n  var plural = activeTodos === 1 ? '' : 's';\n\n  return '<strong>' + activeTodos + '</strong> item' + plural + ' left';\n};\n\n/**\n * Updates the text within the \"Clear completed\" button\n *\n * @param  {[type]} completedTodos The number of completed todos.\n * @returns {string} String containing the count\n */\nTemplate.prototype.clearCompletedButton = function (completedTodos) {\n  if (completedTodos > 0) {\n    return 'Clear completed';\n  } else {\n    return '';\n  }\n};\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__view__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__controller__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__model__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__store__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__template__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__helpers__ = __webpack_require__(0);\n\n/* harmony export */ __webpack_require__.d(exports, \"a\", function() { return updateTodo; });/* unused harmony export getTodo *//* unused harmony export subscribe */\n\n\n\n\n\n\n\n\nvar todo = void 0;\nvar subscribers = [];\n\n/**\n * Sets up a brand new Todo list.\n *\n * @param {string} name The name of your new to do list.\n */\nfunction Todo(name) {\n  this.storage = new __WEBPACK_IMPORTED_MODULE_3__store__[\"a\" /* default */](name);\n  this.model = new __WEBPACK_IMPORTED_MODULE_2__model__[\"a\" /* default */](this.storage);\n  this.template = new __WEBPACK_IMPORTED_MODULE_4__template__[\"a\" /* default */]();\n  this.view = new __WEBPACK_IMPORTED_MODULE_0__view__[\"a\" /* default */](this.template);\n  this.controller = new __WEBPACK_IMPORTED_MODULE_1__controller__[\"a\" /* default */](this.model, this.view);\n}\n\nfunction updateTodo() {\n  todo = new Todo('todos-vanillajs');\n  todo.controller.setView(document.location.hash);\n  subscribers.forEach(function (s) {\n    return s();\n  });\n}\n\nfunction getTodo() {\n  return todo;\n}\n\nfunction subscribe(cb) {\n  subscribers.push(cb);\n  return function unsubscribe() {\n    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__helpers__[\"f\" /* remove */])(subscribers, cb);\n  };\n}\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__helpers__ = __webpack_require__(0);\nvar _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/* eslint no-invalid-this: 0, complexity:[2, 9] */\n\n\n/**\n * View that abstracts away the browser's DOM completely.\n * It has two simple entry points:\n *\n *   - bind(eventName, handler)\n *     Takes a todo application event and registers the handler\n *   - render(command, parameterObject)\n *     Renders the given command with the options\n */\n\nvar View = function () {\n  function View(template) {\n    _classCallCheck(this, View);\n\n    this.template = template;\n\n    this.ENTER_KEY = 13;\n    this.ESCAPE_KEY = 27;\n\n    this.$todoList = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.todo-list');\n    this.$todoItemCounter = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.todo-count');\n    this.$clearCompleted = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.clear-completed');\n    this.$main = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.main');\n    this.$footer = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.footer');\n    this.$toggleAll = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.toggle-all');\n    this.$newTodo = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.new-todo');\n  }\n\n  _createClass(View, [{\n    key: '_removeItem',\n    value: function _removeItem(id) {\n      var elem = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('[data-id=\"' + id + '\"]');\n\n      if (elem) {\n        this.$todoList.removeChild(elem);\n      }\n    }\n  }, {\n    key: '_clearCompletedButton',\n    value: function _clearCompletedButton(completedCount, visible) {\n      this.$clearCompleted.innerHTML = this.template.clearCompletedButton(completedCount);\n      this.$clearCompleted.style.display = visible ? 'block' : 'none';\n    }\n  }, {\n    key: '_editItemDone',\n    value: function _editItemDone(id, title) {\n      var listItem = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('[data-id=\"' + id + '\"]');\n\n      if (!listItem) {\n        return;\n      }\n\n      var input = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('input.edit', listItem);\n      listItem.removeChild(input);\n\n      listItem.className = listItem.className.replace('editing', '');\n\n      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"b\" /* qsa */])('label', listItem).forEach(function (label) {\n        label.textContent = title;\n      });\n    }\n  }, {\n    key: 'render',\n    value: function render(viewCmd, parameter) {\n      var that = this;\n      var viewCommands = {\n        showEntries: function showEntries() {\n          that.$todoList.innerHTML = that.template.show(parameter);\n        },\n        removeItem: function removeItem() {\n          that._removeItem(parameter);\n        },\n        updateElementCount: function updateElementCount() {\n          that.$todoItemCounter.innerHTML = that.template.itemCounter(parameter);\n        },\n        clearCompletedButton: function clearCompletedButton() {\n          that._clearCompletedButton(parameter.completed, parameter.visible);\n        },\n        contentBlockVisibility: function contentBlockVisibility() {\n          that.$main.style.display = that.$footer.style.display = parameter.visible ? 'block' : 'none';\n        },\n        toggleAll: function toggleAll() {\n          that.$toggleAll.checked = parameter.checked;\n        },\n        setFilter: function setFilter() {\n          _setFilter(parameter);\n        },\n        clearNewTodo: function clearNewTodo() {\n          that.$newTodo.value = '';\n        },\n        elementComplete: function elementComplete() {\n          _elementComplete(parameter.id, parameter.completed);\n        },\n        editItem: function editItem() {\n          _editItem(parameter.id, parameter.title);\n        },\n        editItemDone: function editItemDone() {\n          that._editItemDone(parameter.id, parameter.title);\n        }\n      };\n\n      viewCommands[viewCmd]();\n    }\n  }, {\n    key: '_bindItemEditDone',\n    value: function _bindItemEditDone(handler) {\n      var that = this;\n      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"c\" /* $delegate */])(that.$todoList, 'li .edit', 'blur', function () {\n        if (!this.dataset.iscanceled) {\n          handler({\n            id: _itemId(this),\n            title: this.value\n          });\n        }\n      });\n\n      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"c\" /* $delegate */])(that.$todoList, 'li .edit', 'keypress', function (event) {\n        if (event.keyCode === that.ENTER_KEY) {\n          // Remove the cursor from the input when you hit enter just like if it\n          // were a real form\n          this.blur();\n        }\n      });\n    }\n  }, {\n    key: '_bindItemEditCancel',\n    value: function _bindItemEditCancel(handler) {\n      var that = this;\n      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"c\" /* $delegate */])(that.$todoList, 'li .edit', 'keyup', function (event) {\n        if (event.keyCode === that.ESCAPE_KEY) {\n          this.dataset.iscanceled = true;\n          this.blur();\n\n          handler({ id: _itemId(this) });\n        }\n      });\n    }\n  }, {\n    key: 'bind',\n    value: function bind(event, handler) {\n      var that = this;\n      if (event === 'newTodo') {\n        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"d\" /* $on */])(that.$newTodo, 'change', function () {\n          handler(that.$newTodo.value);\n        });\n      } else if (event === 'removeCompleted') {\n        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"d\" /* $on */])(that.$clearCompleted, 'click', function () {\n          handler();\n        });\n      } else if (event === 'toggleAll') {\n        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"d\" /* $on */])(that.$toggleAll, 'click', function () {\n          handler({ completed: this.checked });\n        });\n      } else if (event === 'itemEdit') {\n        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"c\" /* $delegate */])(that.$todoList, 'li label', 'dblclick', function () {\n          handler({ id: _itemId(this) });\n        });\n      } else if (event === 'itemRemove') {\n        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"c\" /* $delegate */])(that.$todoList, '.destroy', 'click', function () {\n          handler({ id: _itemId(this) });\n        });\n      } else if (event === 'itemToggle') {\n        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"c\" /* $delegate */])(that.$todoList, '.toggle', 'click', function () {\n          handler({\n            id: _itemId(this),\n            completed: this.checked\n          });\n        });\n      } else if (event === 'itemEditDone') {\n        that._bindItemEditDone(handler);\n      } else if (event === 'itemEditCancel') {\n        that._bindItemEditCancel(handler);\n      }\n    }\n  }]);\n\n  return View;\n}();\n\n/* harmony default export */ exports[\"a\"] = View;\n\n\nfunction _setFilter(currentPage) {\n  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.filters .selected').className = '';\n  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('.filters [href=\"#/' + currentPage + '\"]').className = 'selected';\n}\n\nfunction _elementComplete(id, completed) {\n  var listItem = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('[data-id=\"' + id + '\"]');\n\n  if (!listItem) {\n    return;\n  }\n\n  listItem.className = completed ? 'completed' : '';\n\n  // In case it was toggled from an event and not by clicking the checkbox\n  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('input', listItem).checked = completed;\n}\n\nfunction _editItem(id, title) {\n  var listItem = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"a\" /* qs */])('[data-id=\"' + id + '\"]');\n\n  if (!listItem) {\n    return;\n  }\n\n  listItem.className = listItem.className + ' editing';\n\n  var input = document.createElement('input');\n  input.className = 'edit';\n\n  listItem.appendChild(input);\n  input.focus();\n  input.value = title;\n}\n\nfunction _itemId(element) {\n  var li = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__[\"e\" /* $parent */])(element, 'li');\n  return parseInt(li.dataset.id, 10);\n}\n\n/***/ },\n/* 10 */\n/***/ function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__app__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__helpers__ = __webpack_require__(0);\n/* eslint no-console:0 */\n\n\n\n// this is only relevant when using `hot` mode with webpack\n// special thanks to Eric Clemmons: https://github.com/ericclemmons/webpack-hot-server-example\nvar reloading = document.readyState === 'complete';\nif (false) {\n  module.hot.accept(function (err) {});\n  if (reloading) {\n    onLoad();\n  } else {\n    bootstrap();\n  }\n} else {\n  bootstrap();\n}\n\nfunction bootstrap() {\n  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__helpers__[\"d\" /* $on */])(window, 'load', __WEBPACK_IMPORTED_MODULE_0__app__[\"a\" /* onLoad */]);\n  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__helpers__[\"d\" /* $on */])(window, 'hashchange', __WEBPACK_IMPORTED_MODULE_0__app__[\"a\" /* onLoad */]);\n}\n\n/***/ }\n],[11]);\n\n\n// WEBPACK FOOTER //\n// bundle.app.9debb1b0a94f14d0ebe9.js","export {qs, qsa, $on, $delegate, $parent, remove}\n\n// Get element(s) by CSS selector:\nfunction qs(selector, scope) {\n  return (scope || document).querySelector(selector)\n}\n\nfunction qsa(selector, scope) {\n  return (scope || document).querySelectorAll(selector)\n}\n\n// addEventListener wrapper:\nfunction $on(target, type, callback, useCapture) {\n  target.addEventListener(type, callback, !!useCapture)\n}\n\n// Attach a handler to event for all elements that match the selector,\n// now or in the future, based on a root element\nfunction $delegate(target, selector, type, handler) {\n  // https://developer.mozilla.org/en-US/docs/Web/Events/blur\n  var useCapture = type === 'blur' || type === 'focus'\n  $on(target, type, dispatchEvent, useCapture)\n\n  function dispatchEvent(event) {\n    var targetElement = event.target\n    var potentialElements = qsa(selector, target)\n    var hasMatch = Array.prototype.indexOf.call(potentialElements, targetElement) >= 0\n\n    if (hasMatch) {\n      handler.call(targetElement, event)\n    }\n  }\n}\n\n// Find the element's parent with the given tag name:\n// $parent(qs('a'), 'div');\nfunction $parent(element, tagName) {\n  if (!element.parentNode) {\n    return undefined\n  }\n  if (element.parentNode.tagName.toLowerCase() === tagName.toLowerCase()) {\n    return element.parentNode\n  }\n  return $parent(element.parentNode, tagName)\n}\n\n// removes an element from an array\n// const x = [1,2,3]\n// remove(x, 2)\n// x ~== [1,3]\nfunction remove(array, thing) {\n  const index = array.indexOf(thing)\n  if (index === -1) {\n    return array\n  }\n  array.splice(index, 1)\n}\n\n// Allow for looping on nodes by chaining:\n// qsa('.foo').forEach(function () {})\nNodeList.prototype.forEach = Array.prototype.forEach\n\n\n\n// WEBPACK FOOTER //\n// ./helpers.js","import 'todomvc-app-css/index.css'\nimport './app.css'\n\nimport {$on} from './helpers'\nimport {updateTodo} from './todo'\n\nexport function onLoad() { // eslint-disable-line import/prefer-default-export\n  updateTodo()\n}\n\n\n\n// WEBPACK FOOTER //\n// ./app.js","export default Controller\n\n/**\n* Takes a model and view and acts as the controller between them\n*\n* @constructor\n* @param {object} model The model instance\n* @param {object} view The view instance\n*/\nfunction Controller(model, view) {\n  var that = this\n  that.model = model\n  that.view = view\n\n  that.view.bind('newTodo', function(title) {\n    that.addItem(title)\n  })\n\n  that.view.bind('itemEdit', function(item) {\n    that.editItem(item.id)\n  })\n\n  that.view.bind('itemEditDone', function(item) {\n    that.editItemSave(item.id, item.title)\n  })\n\n  that.view.bind('itemEditCancel', function(item) {\n    that.editItemCancel(item.id)\n  })\n\n  that.view.bind('itemRemove', function(item) {\n    that.removeItem(item.id)\n  })\n\n  that.view.bind('itemToggle', function(item) {\n    that.toggleComplete(item.id, item.completed)\n  })\n\n  that.view.bind('removeCompleted', function() {\n    that.removeCompletedItems()\n  })\n\n  that.view.bind('toggleAll', function(status) {\n    that.toggleAll(status.completed)\n  })\n}\n\n/**\n* Loads and initialises the view\n*\n* @param {string} '' | 'active' | 'completed'\n*/\nController.prototype.setView = function(locationHash) {\n  var route = locationHash.split('/')[1]\n  var page = route || ''\n  this._updateFilterState(page)\n}\n\n/**\n* An event to fire on load. Will get all items and display them in the\n* todo-list\n*/\nController.prototype.showAll = function() {\n  var that = this\n  that.model.read(function(data) {\n    that.view.render('showEntries', data)\n  })\n}\n\n/**\n* Renders all active tasks\n*/\nController.prototype.showActive = function() {\n  var that = this\n  that.model.read({completed: false}, function(data) {\n    that.view.render('showEntries', data)\n  })\n}\n\n/**\n* Renders all completed tasks\n*/\nController.prototype.showCompleted = function() {\n  var that = this\n  that.model.read({completed: true}, function(data) {\n    that.view.render('showEntries', data)\n  })\n}\n\n/**\n* An event to fire whenever you want to add an item. Simply pass in the event\n* object and it'll handle the DOM insertion and saving of the new item.\n*/\nController.prototype.addItem = function(title) {\n  var that = this\n\n  if (title.trim() === '') {\n    return\n  }\n\n  that.model.create(title, function() {\n    that.view.render('clearNewTodo')\n    that._filter(true)\n  })\n}\n\n/*\n* Triggers the item editing mode.\n*/\nController.prototype.editItem = function(id) {\n  var that = this\n  that.model.read(id, function(data) {\n    that.view.render('editItem', {id, title: data[0].title})\n  })\n}\n\n/*\n* Finishes the item editing mode successfully.\n*/\nController.prototype.editItemSave = function(id, title) {\n  var that = this\n  if (title.trim()) {\n    that.model.update(id, {title}, function() {\n      that.view.render('editItemDone', {id, title})\n    })\n  } else {\n    that.removeItem(id)\n  }\n}\n\n/*\n* Cancels the item editing mode.\n*/\nController.prototype.editItemCancel = function(id) {\n  var that = this\n  that.model.read(id, function(data) {\n    that.view.render('editItemDone', {id, title: data[0].title})\n  })\n}\n\n/**\n* By giving it an ID it'll find the DOM element matching that ID,\n* remove it from the DOM and also remove it from storage.\n*\n* @param {number} id The ID of the item to remove from the DOM and\n* storage\n*/\nController.prototype.removeItem = function(id) {\n  var that = this\n  that.model.remove(id, function() {\n    that.view.render('removeItem', id)\n  })\n\n  that._filter()\n}\n\n/**\n* Will remove all completed items from the DOM and storage.\n*/\nController.prototype.removeCompletedItems = function() {\n  var that = this\n  that.model.read({completed: true}, function(data) {\n    data.forEach(function(item) {\n      that.removeItem(item.id)\n    })\n  })\n\n  that._filter()\n}\n\n/**\n* Give it an ID of a model and a checkbox and it will update the item\n* in storage based on the checkbox's state.\n*\n* @param {number} id The ID of the element to complete or uncomplete\n* @param {object} checkbox The checkbox to check the state of complete\n*                          or not\n* @param {boolean|undefined} silent Prevent re-filtering the todo items\n*/\nController.prototype.toggleComplete = function(id, completed, silent) {\n  var that = this\n  that.model.update(id, {completed}, function() {\n    that.view.render('elementComplete', {\n      id,\n      completed,\n    })\n  })\n\n  if (!silent) {\n    that._filter()\n  }\n}\n\n/**\n* Will toggle ALL checkboxes' on/off state and completeness of models.\n* Just pass in the event object.\n*/\nController.prototype.toggleAll = function(completed) {\n  var that = this\n  that.model.read({completed: !completed}, function(data) {\n    data.forEach(function(item) {\n      that.toggleComplete(item.id, completed, true)\n    })\n  })\n\n  that._filter()\n}\n\n/**\n* Updates the pieces of the page which change depending on the remaining\n* number of todos.\n*/\nController.prototype._updateCount = function() {\n  var that = this\n  that.model.getCount(function(todos) {\n    that.view.render('updateElementCount', todos.active)\n    that.view.render('clearCompletedButton', {\n      completed: todos.completed,\n      visible: todos.completed > 0\n    })\n\n    that.view.render('toggleAll', {checked: todos.completed === todos.total})\n    that.view.render('contentBlockVisibility', {visible: todos.total > 0})\n  })\n}\n\n/**\n* Re-filters the todo items, based on the active route.\n* @param {boolean|undefined} force  forces a re-painting of todo items.\n*/\nController.prototype._filter = function(force) {\n  var activeRoute = this._activeRoute.charAt(0).toUpperCase() + this._activeRoute.substr(1)\n\n  // Update the elements on the page, which change with each completed todo\n  this._updateCount()\n\n  // If the last active route isn't \"All\", or we're switching routes, we\n  // re-create the todo item elements, calling:\n  //   this.show[All|Active|Completed]();\n  if (force || this._lastActiveRoute !== 'All' || this._lastActiveRoute !== activeRoute) {\n    this['show' + activeRoute]()\n  }\n\n  this._lastActiveRoute = activeRoute\n}\n\n/**\n* Simply updates the filter nav's selected states\n*/\nController.prototype._updateFilterState = function(currentPage) {\n  // Store a reference to the active route, allowing us to re-filter todo\n  // items as they are marked complete or incomplete.\n  currentPage = currentPage.split('?')[0]\n  this._activeRoute = currentPage\n\n  if (currentPage === '') {\n    this._activeRoute = 'All'\n  }\n\n  this._filter()\n\n  this.view.render('setFilter', currentPage)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./controller.js","(function(root) {\n  var localStorageMemory = {};\n  var cache = {};\n\n  /**\n   * number of stored items.\n   */\n  localStorageMemory.length = 0;\n\n  /**\n   * returns item for passed key, or null\n   *\n   * @para {String} key\n   *       name of item to be returned\n   * @returns {String|null}\n   */\n  localStorageMemory.getItem = function(key) {\n    return cache[key] || null;\n  };\n\n  /**\n   * sets item for key to passed value, as String\n   *\n   * @para {String} key\n   *       name of item to be set\n   * @para {String} value\n   *       value, will always be turned into a String\n   * @returns {undefined}\n   */\n  localStorageMemory.setItem = function(key, value) {\n    if (typeof value === 'undefined') {\n      localStorageMemory.removeItem(key);\n    } else {\n      if (!(cache.hasOwnProperty(key))) {\n        localStorageMemory.length++;\n      }\n\n      cache[key] = '' + value;\n    }\n  };\n\n  /**\n   * removes item for passed key\n   *\n   * @para {String} key\n   *       name of item to be removed\n   * @returns {undefined}\n   */\n  localStorageMemory.removeItem = function(key) {\n    if (cache.hasOwnProperty(key)) {\n      delete cache[key];\n      localStorageMemory.length--;\n    }\n  };\n\n  /**\n   * returns name of key at passed index\n   *\n   * @para {Number} index\n   *       Position for key to be returned (starts at 0)\n   * @returns {String|null}\n   */\n  localStorageMemory.key = function(index) {\n    return Object.keys(cache)[index] || null;\n  };\n\n  /**\n   * removes all stored items and sets length to 0\n   *\n   * @returns {undefined}\n   */\n  localStorageMemory.clear = function() {\n    cache = {};\n    localStorageMemory.length = 0;\n  };\n\n  if (typeof exports === 'object') {\n    module.exports = localStorageMemory;\n  } else {\n    root.localStorageMemory = localStorageMemory;\n  }\n})(this);\n\n\n// WEBPACK FOOTER //\n// ./memory.js","export default Model\n\n/**\n* Creates a new Model instance and hooks up the storage.\n*\n* @constructor\n* @param {object} storage A reference to the client side storage class\n*/\nfunction Model(storage) {\n  this.storage = storage\n}\n\n/**\n* Creates a new todo model\n*\n* @param {string} [title] The title of the task\n* @param {function} [callback] The callback to fire after the model is created\n*/\nModel.prototype.create = function(title, callback) {\n  title = title || ''\n  callback = callback || function() {\n  }\n\n  var newItem = {\n    title: title.trim(),\n    completed: false\n  }\n\n  this.storage.save(newItem, callback)\n}\n\n/**\n * Finds and returns a model in storage. If no query is given it'll simply\n * return everything. If you pass in a string or number it'll look that up as\n * the ID of the model to find. Lastly, you can pass it an object to match against.\n *\n * @param {string|number|object} [query] A query to match models against\n * @param {function} [callback] The callback to fire after the model is found\n *\n * @example\n * model.read(1, func); // Will find the model with an ID of 1\n * model.read('1'); // Same as above\n * //Below will find a model with foo equalling bar and hello equalling world.\n * model.read({ foo: 'bar', hello: 'world' });\n */\nModel.prototype.read = function(query, callback) {\n  var queryType = typeof query\n  callback = callback || function() {\n  }\n\n  if (queryType === 'function') {\n    callback = query\n    return this.storage.findAll(callback)\n  } else if (queryType === 'string' || queryType === 'number') {\n    query = parseInt(query, 10)\n    this.storage.find({id: query}, callback)\n  } else {\n    this.storage.find(query, callback)\n  }\n  return undefined\n}\n\n/**\n* Updates a model by giving it an ID, data to update, and a callback to fire when\n* the update is complete.\n*\n* @param {number} id The id of the model to update\n* @param {object} data The properties to update and their new value\n* @param {function} callback The callback to fire when the update is complete.\n*/\nModel.prototype.update = function(id, data, callback) {\n  this.storage.save(data, callback, id)\n}\n\n/**\n* Removes a model from storage\n*\n* @param {number} id The ID of the model to remove\n* @param {function} callback The callback to fire when the removal is complete.\n*/\nModel.prototype.remove = function(id, callback) {\n  this.storage.remove(id, callback)\n}\n\n/**\n* WARNING: Will remove ALL data from storage.\n*\n* @param {function} callback The callback to fire when the storage is wiped.\n*/\nModel.prototype.removeAll = function(callback) {\n  this.storage.drop(callback)\n}\n\n/**\n* Returns a count of all todos\n*/\nModel.prototype.getCount = function(callback) {\n  var todos = {\n    active: 0,\n    completed: 0,\n    total: 0\n  }\n\n  this.storage.findAll(function(data) {\n    data.forEach(function(todo) {\n      if (todo.completed) {\n        todos.completed++\n      } else {\n        todos.active++\n      }\n\n      todos.total++\n    })\n    callback(todos)\n  })\n}\n\n\n\n// WEBPACK FOOTER //\n// ./model.js","import {remove} from './helpers'\nimport * as localStorageMemory from './memory'\nexport default Store\n\n/**\n * Creates a new client side storage object and will create an empty\n * collection if no collection already exists.\n *\n * @param {string} name The name of our DB we want to use\n * @param {function} callback Our fake DB uses callbacks because in\n * real life you probably would be making AJAX calls\n */\nfunction Store(name, callback) {\n  callback = callback || function() {\n  }\n\n  this._dbName = name\n\n  if (!localStorageMemory[name]) {\n    var data = {\n      todos: []\n    }\n\n    localStorageMemory[name] = JSON.stringify(data)\n  }\n\n  callback.call(this, JSON.parse(localStorageMemory[name]))\n  this.subscribers = []\n}\n\nStore.prototype.subscribe = function(subscriber) {\n  this.subscribers.push(subscriber)\n  return () => remove(this.subscribers, subscriber)\n}\n\nStore.prototype._notify = function() {\n  this.subscribers.forEach(s => s())\n}\n\n/**\n* Finds items based on a query given as a JS object\n*\n* @param {object} query The query to match against (i.e. {foo: 'bar'})\n* @param {function} callback   The callback to fire when the query has\n* completed running\n*\n* @example\n* db.find({foo: 'bar', hello: 'world'}, function (data) {\n*   // data will return any items that have foo: bar and\n*   // hello: world in their properties\n* });\n*/\nStore.prototype.find = function(query, callback) {\n  if (!callback) {\n    return\n  }\n\n  var todos = JSON.parse(localStorageMemory[this._dbName]).todos\n\n  callback.call(this, todos.filter(function(todo) {\n    for (var q in query) {\n      if (query[q] !== todo[q]) {\n        return false\n      }\n    }\n    return true\n  }))\n}\n\n/**\n* Will retrieve all data from the collection\n*\n* @param {function} callback The callback to fire upon retrieving data\n*/\nStore.prototype.findAll = function(callback) {\n  callback = callback || function() {\n  }\n  callback.call(this, JSON.parse(localStorageMemory[this._dbName]).todos)\n}\n\n/**\n* Will save the given data to the DB. If no item exists it will create a new\n* item, otherwise it'll simply update an existing item's properties\n*\n* @param {object} updateData The data to save back into the DB\n* @param {function} callback The callback to fire after saving\n* @param {number} id An optional param to enter an ID of an item to update\n*/\nStore.prototype.save = function(updateData, callback, id) {\n  var data = JSON.parse(localStorageMemory[this._dbName])\n  var todos = data.todos\n\n  callback = callback || function() {\n  }\n\n  // If an ID was actually given, find the item and update each property\n  if (id) {\n    for (var i = 0; i < todos.length; i++) {\n      if (todos[i].id === id) {\n        for (var key in updateData) { // eslint-disable-line guard-for-in\n          todos[i][key] = updateData[key]\n        }\n        break\n      }\n    }\n\n    localStorageMemory[this._dbName] = JSON.stringify(data)\n    callback.call(this, JSON.parse(localStorageMemory[this._dbName]).todos)\n  } else {\n    // Generate an ID\n    updateData.id = new Date().getTime()\n\n    todos.push(updateData)\n    localStorageMemory[this._dbName] = JSON.stringify(data)\n    callback.call(this, [updateData])\n  }\n  this._notify()\n}\n\n/**\n* Will remove an item from the Store based on its ID\n*\n* @param {number} id The ID of the item you want to remove\n* @param {function} callback The callback to fire after saving\n*/\nStore.prototype.remove = function(id, callback) {\n  var data = JSON.parse(localStorageMemory[this._dbName])\n  var todos = data.todos\n\n  for (var i = 0; i < todos.length; i++) {\n    if (todos[i].id === id) {\n      todos.splice(i, 1)\n      break\n    }\n  }\n\n  localStorageMemory[this._dbName] = JSON.stringify(data)\n  callback.call(this, JSON.parse(localStorageMemory[this._dbName]).todos)\n  this._notify()\n}\n\n/**\n* Will drop all storage and start fresh\n*\n* @param {function} callback The callback to fire after dropping the data\n*/\nStore.prototype.drop = function(callback) {\n  localStorageMemory[this._dbName] = JSON.stringify({todos: []})\n  callback.call(this, JSON.parse(localStorageMemory[this._dbName]).todos)\n  this._notify()\n}\n\n\n\n// WEBPACK FOOTER //\n// ./store.js","export default Template\n\nvar htmlEscapes = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;',\n  '\\'': '&#x27;',\n  '`': '&#x60;'\n}\n\nvar escapeHtmlChar = function(chr) {\n  return htmlEscapes[chr]\n}\n\nvar reUnescapedHtml = /[&<>\"'`]/g\nvar reHasUnescapedHtml = new RegExp(reUnescapedHtml.source)\n\nvar escape = function(string) {\n  if (string && reHasUnescapedHtml.test(string)) {\n    return string.replace(reUnescapedHtml, escapeHtmlChar)\n  } else {\n    return string\n  }\n}\n\n/**\n* Sets up defaults for all the Template methods such as a default template\n*\n* @constructor\n*/\nfunction Template() {\n  this.defaultTemplate = `\n    <li data-id=\"{{id}}\" class=\"{{completed}}\">\n      <div class=\"view\">\n        <input class=\"toggle\" type=\"checkbox\" {{checked}} />\n        <label>{{title}}</label>\n        <button class=\"destroy\"></button>\n      </div>\n    </li>\n  `\n}\n\n/**\n * Creates an <li> HTML string and returns it for placement in your app.\n *\n * NOTE: In real life you should be using a templating engine such as Mustache\n * or Handlebars, however, this is a vanilla JS example.\n *\n * @param {object} data The object containing keys you want to find in the\n *                      template to replace.\n * @returns {string} HTML String of an <li> element\n *\n * @example\n * view.show({\n *  id: 1,\n *  title: \"Hello World\",\n *  completed: 0,\n * });\n */\nTemplate.prototype.show = function(data) {\n  var i, l\n  var view = ''\n\n  for (i = 0, l = data.length; i < l; i++) {\n    var template = this.defaultTemplate\n    var completed = ''\n    var checked = ''\n\n    if (data[i].completed) {\n      completed = 'completed'\n      checked = 'checked'\n    }\n\n    template = template.replace('{{id}}', data[i].id)\n    template = template.replace('{{title}}', escape(data[i].title))\n    template = template.replace('{{completed}}', completed)\n    template = template.replace('{{checked}}', checked)\n\n    view = view + template\n  }\n\n  return view\n}\n\n/**\n * Displays a counter of how many to dos are left to complete\n *\n * @param {number} activeTodos The number of active todos.\n * @returns {string} String containing the count\n */\nTemplate.prototype.itemCounter = function(activeTodos) {\n  var plural = activeTodos === 1 ? '' : 's'\n\n  return '<strong>' + activeTodos + '</strong> item' + plural + ' left'\n}\n\n/**\n * Updates the text within the \"Clear completed\" button\n *\n * @param  {[type]} completedTodos The number of completed todos.\n * @returns {string} String containing the count\n */\nTemplate.prototype.clearCompletedButton = function(completedTodos) {\n  if (completedTodos > 0) {\n    return 'Clear completed'\n  } else {\n    return ''\n  }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./template.js","import View from './view'\nimport Controller from './controller'\nimport Model from './model'\nimport Store from './store'\nimport Template from './template'\nimport {remove} from './helpers'\n\nexport {updateTodo, getTodo, subscribe}\n\nlet todo\nconst subscribers = []\n\n/**\n * Sets up a brand new Todo list.\n *\n * @param {string} name The name of your new to do list.\n */\nfunction Todo(name) {\n  this.storage = new Store(name)\n  this.model = new Model(this.storage)\n  this.template = new Template()\n  this.view = new View(this.template)\n  this.controller = new Controller(this.model, this.view)\n}\n\nfunction updateTodo() {\n  todo = new Todo('todos-vanillajs')\n  todo.controller.setView(document.location.hash)\n  subscribers.forEach(s => s())\n}\n\nfunction getTodo() {\n  return todo\n}\n\nfunction subscribe(cb) {\n  subscribers.push(cb)\n  return function unsubscribe() {\n    remove(subscribers, cb)\n  }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./todo.js","/* eslint no-invalid-this: 0, complexity:[2, 9] */\nimport {qs, qsa, $on, $parent, $delegate} from './helpers'\n\n/**\n * View that abstracts away the browser's DOM completely.\n * It has two simple entry points:\n *\n *   - bind(eventName, handler)\n *     Takes a todo application event and registers the handler\n *   - render(command, parameterObject)\n *     Renders the given command with the options\n */\nexport default class View {\n  constructor(template) {\n    this.template = template\n\n    this.ENTER_KEY = 13\n    this.ESCAPE_KEY = 27\n\n    this.$todoList = qs('.todo-list')\n    this.$todoItemCounter = qs('.todo-count')\n    this.$clearCompleted = qs('.clear-completed')\n    this.$main = qs('.main')\n    this.$footer = qs('.footer')\n    this.$toggleAll = qs('.toggle-all')\n    this.$newTodo = qs('.new-todo')\n  }\n\n  _removeItem(id) {\n    var elem = qs('[data-id=\"' + id + '\"]')\n\n    if (elem) {\n      this.$todoList.removeChild(elem)\n    }\n  }\n\n  _clearCompletedButton(completedCount, visible) {\n    this.$clearCompleted.innerHTML = this.template.clearCompletedButton(completedCount)\n    this.$clearCompleted.style.display = visible ? 'block' : 'none'\n  }\n\n  _editItemDone(id, title) {\n    var listItem = qs('[data-id=\"' + id + '\"]')\n\n    if (!listItem) {\n      return\n    }\n\n    var input = qs('input.edit', listItem)\n    listItem.removeChild(input)\n\n    listItem.className = listItem.className.replace('editing', '')\n\n    qsa('label', listItem).forEach(function(label) {\n      label.textContent = title\n    })\n  }\n\n  render(viewCmd, parameter) {\n    var that = this\n    var viewCommands = {\n      showEntries: function() {\n        that.$todoList.innerHTML = that.template.show(parameter)\n      },\n      removeItem: function() {\n        that._removeItem(parameter)\n      },\n      updateElementCount: function() {\n        that.$todoItemCounter.innerHTML = that.template.itemCounter(parameter)\n      },\n      clearCompletedButton: function() {\n        that._clearCompletedButton(parameter.completed, parameter.visible)\n      },\n      contentBlockVisibility: function() {\n        that.$main.style.display = that.$footer.style.display = parameter.visible ? 'block' : 'none'\n      },\n      toggleAll: function() {\n        that.$toggleAll.checked = parameter.checked\n      },\n      setFilter: function() {\n        _setFilter(parameter)\n      },\n      clearNewTodo: function() {\n        that.$newTodo.value = ''\n      },\n      elementComplete: function() {\n        _elementComplete(parameter.id, parameter.completed)\n      },\n      editItem: function() {\n        _editItem(parameter.id, parameter.title)\n      },\n      editItemDone: function() {\n        that._editItemDone(parameter.id, parameter.title)\n      }\n    }\n\n    viewCommands[viewCmd]()\n  }\n\n  _bindItemEditDone(handler) {\n    var that = this\n    $delegate(that.$todoList, 'li .edit', 'blur', function() {\n      if (!this.dataset.iscanceled) {\n        handler({\n          id: _itemId(this),\n          title: this.value\n        })\n      }\n    })\n\n    $delegate(that.$todoList, 'li .edit', 'keypress', function(event) {\n      if (event.keyCode === that.ENTER_KEY) {\n        // Remove the cursor from the input when you hit enter just like if it\n        // were a real form\n        this.blur()\n      }\n    })\n  }\n\n  _bindItemEditCancel(handler) {\n    var that = this\n    $delegate(that.$todoList, 'li .edit', 'keyup', function(event) {\n      if (event.keyCode === that.ESCAPE_KEY) {\n        this.dataset.iscanceled = true\n        this.blur()\n\n        handler({id: _itemId(this)})\n      }\n    })\n  }\n\n  bind(event, handler) {\n    var that = this\n    if (event === 'newTodo') {\n      $on(that.$newTodo, 'change', function() {\n        handler(that.$newTodo.value)\n      })\n\n    } else if (event === 'removeCompleted') {\n      $on(that.$clearCompleted, 'click', function() {\n        handler()\n      })\n\n    } else if (event === 'toggleAll') {\n      $on(that.$toggleAll, 'click', function() {\n        handler({completed: this.checked})\n      })\n\n    } else if (event === 'itemEdit') {\n      $delegate(that.$todoList, 'li label', 'dblclick', function() {\n        handler({id: _itemId(this)})\n      })\n\n    } else if (event === 'itemRemove') {\n      $delegate(that.$todoList, '.destroy', 'click', function() {\n        handler({id: _itemId(this)})\n      })\n\n    } else if (event === 'itemToggle') {\n      $delegate(that.$todoList, '.toggle', 'click', function() {\n        handler({\n          id: _itemId(this),\n          completed: this.checked\n        })\n      })\n\n    } else if (event === 'itemEditDone') {\n      that._bindItemEditDone(handler)\n\n    } else if (event === 'itemEditCancel') {\n      that._bindItemEditCancel(handler)\n    }\n  }\n}\n\nfunction _setFilter(currentPage) {\n  qs('.filters .selected').className = ''\n  qs('.filters [href=\"#/' + currentPage + '\"]').className = 'selected'\n}\n\nfunction _elementComplete(id, completed) {\n  var listItem = qs('[data-id=\"' + id + '\"]')\n\n  if (!listItem) {\n    return\n  }\n\n  listItem.className = completed ? 'completed' : ''\n\n  // In case it was toggled from an event and not by clicking the checkbox\n  qs('input', listItem).checked = completed\n}\n\nfunction _editItem(id, title) {\n  var listItem = qs('[data-id=\"' + id + '\"]')\n\n  if (!listItem) {\n    return\n  }\n\n  listItem.className = listItem.className + ' editing'\n\n  var input = document.createElement('input')\n  input.className = 'edit'\n\n  listItem.appendChild(input)\n  input.focus()\n  input.value = title\n}\n\nfunction _itemId(element) {\n  var li = $parent(element, 'li')\n  return parseInt(li.dataset.id, 10)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./view.js","/* eslint no-console:0 */\nimport {onLoad} from './app'\nimport {$on} from './helpers'\n\n// this is only relevant when using `hot` mode with webpack\n// special thanks to Eric Clemmons: https://github.com/ericclemmons/webpack-hot-server-example\nconst reloading = document.readyState === 'complete'\nif (module.hot) {\n  module.hot.accept(function(err) {\n  })\n  if (reloading) {\n    onLoad()\n  } else {\n    bootstrap()\n  }\n} else {\n  bootstrap()\n}\n\nfunction bootstrap() {\n  $on(window, 'load', onLoad)\n  $on(window, 'hashchange', onLoad)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./bootstrap.js"],"sourceRoot":""}
  • trunk/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.manifest.a55034b424c795b1a9a8.js.map

    r219902 r219903  
    1 {"version":3,"sources":["webpack:///bundle.manifest.112bf70a7f3deebf1f93.js","webpack:///webpack/bootstrap d32b2cef151447642421"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","parentJsonpFunction","window","chunkIds","moreModules","executeModules","chunkId","result","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","shift","s","2","e","onScriptComplete","script","onerror","onload","clearTimeout","timeout","chunk","Error","undefined","Promise","resolve","head","document","getElementsByTagName","createElement","type","charset","async","src","p","0","1","setTimeout","appendChild","promise","reject","m","c","value","d","name","getter","defineProperty","configurable","enumerable","get","n","__esModule","o","object","property","oe","err","console","error"],"mappings":"CAAS,SAAUA,GCqCnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAxDA,GAAAK,GAAAC,OAAA,YACAA,QAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,GAAAX,GAAAY,EAAAC,EAAAT,EAAA,EAAAU,KACQV,EAAAK,EAAAM,OAAoBX,IAC5BQ,EAAAH,EAAAL,GACA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AApD,EAAAqD,EAAAC,GACAtC,OAAAuC,eAAAvD,EAAAqD,GACAG,cAAA,EACAC,YAAA,EACAC,IAAAJ,KAKAzD,EAAA8D,EAAA,SAAA1D,GACA,GAAAqD,GAAArD,KAAA2D,WACA,WAA2B,MAAA3D,GAAA,YAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAuD,EAAAE,EAAA,IAAAA,GACAA,GAIAzD,EAAAgE,EAAA,SAAAC,EAAAC,GAAsD,MAAA/C,QAAAC,UAAAC,eAAAd,KAAA0D,EAAAC,IAGtDlE,EAAA6C,EAAA,GAGA7C,EAAAmE,GAAA,SAAAC,GAA8D,KAApBC,SAAAC,MAAAF,GAAoBA","file":"bundle.manifest.112bf70a7f3deebf1f93.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// install a JSONP callback for chunk loading\n/******/ \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n/******/ \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n/******/ \t\t// add \"moreModules\" to the modules object,\n/******/ \t\t// then flag all \"chunkIds\" as loaded and fire callback\n/******/ \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n/******/ \t\tfor(;i < chunkIds.length; i++) {\n/******/ \t\t\tchunkId = chunkIds[i];\n/******/ \t\t\tif(installedChunks[chunkId])\n/******/ \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n/******/ \t\t\tinstalledChunks[chunkId] = 0;\n/******/ \t\t}\n/******/ \t\tfor(moduleId in moreModules) {\n/******/ \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n/******/ \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n/******/ \t\twhile(resolves.length)\n/******/ \t\t\tresolves.shift()();\n/******/ \t\tif(executeModules) {\n/******/ \t\t\tfor(i=0; i < executeModules.length; i++) {\n/******/ \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\treturn result;\n/******/ \t};\n/******/\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// objects to store loaded and loading chunks\n/******/ \tvar installedChunks = {\n/******/ \t\t2: 0\n/******/ \t};\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\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\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.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/ \t// This file contains only the entry chunk.\n/******/ \t// The chunk loading function for additional chunks\n/******/ \t__webpack_require__.e = function requireEnsure(chunkId) {\n/******/ \t\tif(installedChunks[chunkId] === 0)\n/******/ \t\t\treturn Promise.resolve();\n/******/\n/******/ \t\t// an Promise means \"currently loading\".\n/******/ \t\tif(installedChunks[chunkId]) {\n/******/ \t\t\treturn installedChunks[chunkId][2];\n/******/ \t\t}\n/******/ \t\t// start chunk loading\n/******/ \t\tvar head = document.getElementsByTagName('head')[0];\n/******/ \t\tvar script = document.createElement('script');\n/******/ \t\tscript.type = 'text/javascript';\n/******/ \t\tscript.charset = 'utf-8';\n/******/ \t\tscript.async = true;\n/******/ \t\tscript.timeout = 120000;\n/******/\n/******/ \t\tscript.src = __webpack_require__.p + \"bundle.\" + chunkId + \".\" + {\"0\":\"73bcc5d3c1d07180f0e3\",\"1\":\"efaa3e0e20077c8e7471\"}[chunkId] + \".js\";\n/******/ \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n/******/ \t\tscript.onerror = script.onload = onScriptComplete;\n/******/ \t\tfunction onScriptComplete() {\n/******/ \t\t\t// avoid mem leaks in IE.\n/******/ \t\t\tscript.onerror = script.onload = null;\n/******/ \t\t\tclearTimeout(timeout);\n/******/ \t\t\tvar chunk = installedChunks[chunkId];\n/******/ \t\t\tif(chunk !== 0) {\n/******/ \t\t\t\tif(chunk) chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n/******/ \t\t\t\tinstalledChunks[chunkId] = undefined;\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\thead.appendChild(script);\n/******/\n/******/ \t\tvar promise = new Promise(function(resolve, reject) {\n/******/ \t\t\tinstalledChunks[chunkId] = [resolve, reject];\n/******/ \t\t});\n/******/ \t\treturn installedChunks[chunkId][2] = promise;\n/******/ \t};\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// identity function for calling harmory imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmory exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tObject.defineProperty(exports, name, {\n/******/ \t\t\tconfigurable: false,\n/******/ \t\t\tenumerable: true,\n/******/ \t\t\tget: getter\n/******/ \t\t});\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// on error function for async loading\n/******/ \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n/******/ })\n/************************************************************************/\n/******/ ([]);\n\n\n// WEBPACK FOOTER //\n// bundle.manifest.112bf70a7f3deebf1f93.js"," \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId])\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length)\n \t\t\tresolves.shift()();\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\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\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\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.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tif(installedChunks[chunkId] === 0)\n \t\t\treturn Promise.resolve();\n\n \t\t// an Promise means \"currently loading\".\n \t\tif(installedChunks[chunkId]) {\n \t\t\treturn installedChunks[chunkId][2];\n \t\t}\n \t\t// start chunk loading\n \t\tvar head = document.getElementsByTagName('head')[0];\n \t\tvar script = document.createElement('script');\n \t\tscript.type = 'text/javascript';\n \t\tscript.charset = 'utf-8';\n \t\tscript.async = true;\n \t\tscript.timeout = 120000;\n\n \t\tscript.src = __webpack_require__.p + \"bundle.\" + chunkId + \".\" + {\"0\":\"73bcc5d3c1d07180f0e3\",\"1\":\"efaa3e0e20077c8e7471\"}[chunkId] + \".js\";\n \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n \t\tscript.onerror = script.onload = onScriptComplete;\n \t\tfunction onScriptComplete() {\n \t\t\t// avoid mem leaks in IE.\n \t\t\tscript.onerror = script.onload = null;\n \t\t\tclearTimeout(timeout);\n \t\t\tvar chunk = installedChunks[chunkId];\n \t\t\tif(chunk !== 0) {\n \t\t\t\tif(chunk) chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n \t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t}\n \t\t};\n \t\thead.appendChild(script);\n\n \t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\tinstalledChunks[chunkId] = [resolve, reject];\n \t\t});\n \t\treturn installedChunks[chunkId][2] = promise;\n \t};\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// identity function for calling harmory imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmory exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tObject.defineProperty(exports, name, {\n \t\t\tconfigurable: false,\n \t\t\tenumerable: true,\n \t\t\tget: getter\n \t\t});\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap d32b2cef151447642421"],"sourceRoot":""}
     1{"version":3,"sources":["webpack:///bundle.manifest.a55034b424c795b1a9a8.js","webpack:///webpack/bootstrap f8b9c276690ba4d5a4d8"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","parentJsonpFunction","window","chunkIds","moreModules","executeModules","chunkId","result","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","shift","s","2","e","onScriptComplete","script","onerror","onload","clearTimeout","timeout","chunk","Error","undefined","Promise","resolve","head","document","getElementsByTagName","createElement","type","charset","async","src","p","0","1","setTimeout","appendChild","promise","reject","m","c","value","d","name","getter","defineProperty","configurable","enumerable","get","n","__esModule","o","object","property","oe","err","console","error"],"mappings":"CAAS,SAAUA,GCqCnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAA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Y,YAAAtB,EAEA,IAAAuB,GAAA,GAAAf,SAAA,SAAAC,EAAAe,GACAlC,EAAAJ,IAAAuB,EAAAe,IAEA,OAAAlC,GAAAJ,GAAA,GAAAqC,GAIAlD,EAAAoD,EAAArD,EAGAC,EAAAqD,EAAAnD,EAGAF,EAAAK,EAAA,SAAAiD,GAA2C,MAAAA,IAG3CtD,EAAAuD,EAAA,SAAApD,EAAAqD,EAAAC,GACAtC,OAAAuC,eAAAvD,EAAAqD,GACAG,cAAA,EACAC,YAAA,EACAC,IAAAJ,KAKAzD,EAAA8D,EAAA,SAAA1D,GACA,GAAAqD,GAAArD,KAAA2D,WACA,WAA2B,MAAA3D,GAAA,YAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAuD,EAAAE,EAAA,IAAAA,GACAA,GAIAzD,EAAAgE,EAAA,SAAAC,EAAAC,GAAsD,MAAA/C,QAAAC,UAAAC,eAAAd,KAAA0D,EAAAC,IAGtDlE,EAAA6C,EAAA,GAGA7C,EAAAmE,GAAA,SAAAC,GAA8D,KAApBC,SAAAC,MAAAF,GAAoBA","file":"bundle.manifest.a55034b424c795b1a9a8.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// install a JSONP callback for chunk loading\n/******/ \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n/******/ \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n/******/ \t\t// add \"moreModules\" to the modules object,\n/******/ \t\t// then flag all \"chunkIds\" as loaded and fire callback\n/******/ \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n/******/ \t\tfor(;i < chunkIds.length; i++) {\n/******/ \t\t\tchunkId = chunkIds[i];\n/******/ \t\t\tif(installedChunks[chunkId])\n/******/ \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n/******/ \t\t\tinstalledChunks[chunkId] = 0;\n/******/ \t\t}\n/******/ \t\tfor(moduleId in moreModules) {\n/******/ \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n/******/ \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n/******/ \t\twhile(resolves.length)\n/******/ \t\t\tresolves.shift()();\n/******/ \t\tif(executeModules) {\n/******/ \t\t\tfor(i=0; i < executeModules.length; i++) {\n/******/ \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\treturn result;\n/******/ \t};\n/******/\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// objects to store loaded and loading chunks\n/******/ \tvar installedChunks = {\n/******/ \t\t2: 0\n/******/ \t};\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\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\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.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/ \t// This file contains only the entry chunk.\n/******/ \t// The chunk loading function for additional chunks\n/******/ \t__webpack_require__.e = function requireEnsure(chunkId) {\n/******/ \t\tif(installedChunks[chunkId] === 0)\n/******/ \t\t\treturn Promise.resolve();\n/******/\n/******/ \t\t// an Promise means \"currently loading\".\n/******/ \t\tif(installedChunks[chunkId]) {\n/******/ \t\t\treturn installedChunks[chunkId][2];\n/******/ \t\t}\n/******/ \t\t// start chunk loading\n/******/ \t\tvar head = document.getElementsByTagName('head')[0];\n/******/ \t\tvar script = document.createElement('script');\n/******/ \t\tscript.type = 'text/javascript';\n/******/ \t\tscript.charset = 'utf-8';\n/******/ \t\tscript.async = true;\n/******/ \t\tscript.timeout = 120000;\n/******/\n/******/ \t\tscript.src = __webpack_require__.p + \"bundle.\" + chunkId + \".\" + {\"0\":\"9debb1b0a94f14d0ebe9\",\"1\":\"bade2cb8992d8a68d0d7\"}[chunkId] + \".js\";\n/******/ \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n/******/ \t\tscript.onerror = script.onload = onScriptComplete;\n/******/ \t\tfunction onScriptComplete() {\n/******/ \t\t\t// avoid mem leaks in IE.\n/******/ \t\t\tscript.onerror = script.onload = null;\n/******/ \t\t\tclearTimeout(timeout);\n/******/ \t\t\tvar chunk = installedChunks[chunkId];\n/******/ \t\t\tif(chunk !== 0) {\n/******/ \t\t\t\tif(chunk) chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n/******/ \t\t\t\tinstalledChunks[chunkId] = undefined;\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\thead.appendChild(script);\n/******/\n/******/ \t\tvar promise = new Promise(function(resolve, reject) {\n/******/ \t\t\tinstalledChunks[chunkId] = [resolve, reject];\n/******/ \t\t});\n/******/ \t\treturn installedChunks[chunkId][2] = promise;\n/******/ \t};\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// identity function for calling harmory imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmory exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tObject.defineProperty(exports, name, {\n/******/ \t\t\tconfigurable: false,\n/******/ \t\t\tenumerable: true,\n/******/ \t\t\tget: getter\n/******/ \t\t});\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// on error function for async loading\n/******/ \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n/******/ })\n/************************************************************************/\n/******/ ([]);\n\n\n// WEBPACK FOOTER //\n// bundle.manifest.a55034b424c795b1a9a8.js"," \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId])\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length)\n \t\t\tresolves.shift()();\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\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\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\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.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tif(installedChunks[chunkId] === 0)\n \t\t\treturn Promise.resolve();\n\n \t\t// an Promise means \"currently loading\".\n \t\tif(installedChunks[chunkId]) {\n \t\t\treturn installedChunks[chunkId][2];\n \t\t}\n \t\t// start chunk loading\n \t\tvar head = document.getElementsByTagName('head')[0];\n \t\tvar script = document.createElement('script');\n \t\tscript.type = 'text/javascript';\n \t\tscript.charset = 'utf-8';\n \t\tscript.async = true;\n \t\tscript.timeout = 120000;\n\n \t\tscript.src = __webpack_require__.p + \"bundle.\" + chunkId + \".\" + {\"0\":\"9debb1b0a94f14d0ebe9\",\"1\":\"bade2cb8992d8a68d0d7\"}[chunkId] + \".js\";\n \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n \t\tscript.onerror = script.onload = onScriptComplete;\n \t\tfunction onScriptComplete() {\n \t\t\t// avoid mem leaks in IE.\n \t\t\tscript.onerror = script.onload = null;\n \t\t\tclearTimeout(timeout);\n \t\t\tvar chunk = installedChunks[chunkId];\n \t\t\tif(chunk !== 0) {\n \t\t\t\tif(chunk) chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n \t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t}\n \t\t};\n \t\thead.appendChild(script);\n\n \t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\tinstalledChunks[chunkId] = [resolve, reject];\n \t\t});\n \t\treturn installedChunks[chunkId][2] = promise;\n \t};\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// identity function for calling harmory imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmory exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tObject.defineProperty(exports, name, {\n \t\t\tconfigurable: false,\n \t\t\tenumerable: true,\n \t\t\tget: getter\n \t\t});\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap f8b9c276690ba4d5a4d8"],"sourceRoot":""}
  • trunk/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.vendor.bade2cb8992d8a68d0d7.js

    r219902 r219903  
    11webpackJsonp([1,2],{1:function(n,t){},12:function(n,t,r){n.exports=r(1)},13:function(n,t){n.exports=function(){var n=[];return n.toString=function(){for(var n=[],t=0;t<this.length;t++){var r=this[t];r[2]?n.push("@media "+r[2]+"{"+r[1]+"}"):n.push(r[1])}return n.join("")},n.i=function(t,r){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i<this.length;i++){var e=this[i][0];"number"==typeof e&&(o[e]=!0)}for(i=0;i<t.length;i++){var u=t[i];"number"==typeof u[0]&&o[u[0]]||(r&&!u[2]?u[2]=r:r&&(u[2]="("+u[2]+") and ("+r+")"),n.push(u))}},n}}},[12]);
    2 //# sourceMappingURL=bundle.vendor.efaa3e0e20077c8e7471.js.map
     2//# sourceMappingURL=bundle.vendor.bade2cb8992d8a68d0d7.js.map
  • trunk/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.vendor.bade2cb8992d8a68d0d7.js.map

    r219902 r219903  
    1 {"version":3,"sources":["webpack:///bundle.vendor.efaa3e0e20077c8e7471.js","webpack:///../~/css-loader/lib/css-base.js"],"names":["webpackJsonp","1","module","exports","12","__webpack_require__","13","list","toString","result","i","this","length","item","push","join","modules","mediaQuery","alreadyImportedModules","id"],"mappings":"AAAAA,cAAc,EAAE,IAEVC,EACA,SAASC,EAAQC,KAMjBC,GACA,SAASF,EAAQC,EAASE,GAEhCH,EAAOC,QAAUE,EAAoB,IAK/BC,GACA,SAASJ,EAAQC,GCbvBD,EAAAC,QAAA,WACA,GAAAI,KA0CA,OAvCAA,GAAAC,SAAA,WAEA,OADAC,MACAC,EAAA,EAAgBA,EAAAC,KAAAC,OAAiBF,IAAA,CACjC,GAAAG,GAAAF,KAAAD,EACAG,GAAA,GACAJ,EAAAK,KAAA,UAAAD,EAAA,OAAwCA,EAAA,QAExCJ,EAAAK,KAAAD,EAAA,IAGA,MAAAJ,GAAAM,KAAA,KAIAR,EAAAG,EAAA,SAAAM,EAAAC,GACA,gBAAAD,KACAA,IAAA,KAAAA,EAAA,KAEA,QADAE,MACAR,EAAA,EAAgBA,EAAAC,KAAAC,OAAiBF,IAAA,CACjC,GAAAS,GAAAR,KAAAD,GAAA,EACA,iBAAAS,KACAD,EAAAC,IAAA,GAEA,IAAAT,EAAA,EAAYA,EAAAM,EAAAJ,OAAoBF,IAAA,CAChC,GAAAG,GAAAG,EAAAN,EAKA,iBAAAG,GAAA,IAAAK,EAAAL,EAAA,MACAI,IAAAJ,EAAA,GACAA,EAAA,GAAAI,EACKA,IACLJ,EAAA,OAAAA,EAAA,aAAAI,EAAA,KAEAV,EAAAO,KAAAD,MAIAN,MD0BG","file":"bundle.vendor.efaa3e0e20077c8e7471.js","sourcesContent":["webpackJsonp([1,2],{\n\n/***/ 1:\n/***/ function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ },\n\n/***/ 12:\n/***/ function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1);\n\n\n/***/ },\n\n/***/ 13:\n/***/ function(module, exports) {\n\n/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\n// css base code, injected by the css-loader\r\nmodule.exports = function() {\r\n\tvar list = [];\r\n\r\n\t// return the list of modules as css string\r\n\tlist.toString = function toString() {\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar item = this[i];\r\n\t\t\tif(item[2]) {\r\n\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\r\n\t\t\t} else {\r\n\t\t\t\tresult.push(item[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result.join(\"\");\r\n\t};\r\n\r\n\t// import a list of modules into the list\r\n\tlist.i = function(modules, mediaQuery) {\r\n\t\tif(typeof modules === \"string\")\r\n\t\t\tmodules = [[null, modules, \"\"]];\r\n\t\tvar alreadyImportedModules = {};\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar id = this[i][0];\r\n\t\t\tif(typeof id === \"number\")\r\n\t\t\t\talreadyImportedModules[id] = true;\r\n\t\t}\r\n\t\tfor(i = 0; i < modules.length; i++) {\r\n\t\t\tvar item = modules[i];\r\n\t\t\t// skip already imported module\r\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\r\n\t\t\t//  when a module is imported multiple times with different media queries.\r\n\t\t\t//  I hope this will never occur (Hey this way we have smaller bundles)\r\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\r\n\t\t\t\tif(mediaQuery && !item[2]) {\r\n\t\t\t\t\titem[2] = mediaQuery;\r\n\t\t\t\t} else if(mediaQuery) {\r\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\r\n\t\t\t\t}\r\n\t\t\t\tlist.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn list;\r\n};\r\n\n\n/***/ }\n\n},[12]);\n\n\n// WEBPACK FOOTER //\n// bundle.vendor.efaa3e0e20077c8e7471.js","/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\n// css base code, injected by the css-loader\r\nmodule.exports = function() {\r\n\tvar list = [];\r\n\r\n\t// return the list of modules as css string\r\n\tlist.toString = function toString() {\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar item = this[i];\r\n\t\t\tif(item[2]) {\r\n\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\r\n\t\t\t} else {\r\n\t\t\t\tresult.push(item[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result.join(\"\");\r\n\t};\r\n\r\n\t// import a list of modules into the list\r\n\tlist.i = function(modules, mediaQuery) {\r\n\t\tif(typeof modules === \"string\")\r\n\t\t\tmodules = [[null, modules, \"\"]];\r\n\t\tvar alreadyImportedModules = {};\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar id = this[i][0];\r\n\t\t\tif(typeof id === \"number\")\r\n\t\t\t\talreadyImportedModules[id] = true;\r\n\t\t}\r\n\t\tfor(i = 0; i < modules.length; i++) {\r\n\t\t\tvar item = modules[i];\r\n\t\t\t// skip already imported module\r\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\r\n\t\t\t//  when a module is imported multiple times with different media queries.\r\n\t\t\t//  I hope this will never occur (Hey this way we have smaller bundles)\r\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\r\n\t\t\t\tif(mediaQuery && !item[2]) {\r\n\t\t\t\t\titem[2] = mediaQuery;\r\n\t\t\t\t} else if(mediaQuery) {\r\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\r\n\t\t\t\t}\r\n\t\t\t\tlist.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn list;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/css-loader/lib/css-base.js\n// module id = 13\n// module chunks = 1"],"sourceRoot":""}
     1{"version":3,"sources":["webpack:///bundle.vendor.bade2cb8992d8a68d0d7.js","webpack:///../~/css-loader/lib/css-base.js"],"names":["webpackJsonp","1","module","exports","12","__webpack_require__","13","list","toString","result","i","this","length","item","push","join","modules","mediaQuery","alreadyImportedModules","id"],"mappings":"AAAAA,cAAc,EAAE,IAEVC,EACA,SAASC,EAAQC,KAMjBC,GACA,SAASF,EAAQC,EAASE,GAEhCH,EAAOC,QAAUE,EAAoB,IAK/BC,GACA,SAASJ,EAAQC,GCbvBD,EAAAC,QAAA,WACA,GAAAI,KA0CA,OAvCAA,GAAAC,SAAA,WAEA,OADAC,MACAC,EAAA,EAAgBA,EAAAC,KAAAC,OAAiBF,IAAA,CACjC,GAAAG,GAAAF,KAAAD,EACAG,GAAA,GACAJ,EAAAK,KAAA,UAAAD,EAAA,OAAwCA,EAAA,QAExCJ,EAAAK,KAAAD,EAAA,IAGA,MAAAJ,GAAAM,KAAA,KAIAR,EAAAG,EAAA,SAAAM,EAAAC,GACA,gBAAAD,KACAA,IAAA,KAAAA,EAAA,KAEA,QADAE,MACAR,EAAA,EAAgBA,EAAAC,KAAAC,OAAiBF,IAAA,CACjC,GAAAS,GAAAR,KAAAD,GAAA,EACA,iBAAAS,KACAD,EAAAC,IAAA,GAEA,IAAAT,EAAA,EAAYA,EAAAM,EAAAJ,OAAoBF,IAAA,CAChC,GAAAG,GAAAG,EAAAN,EAKA,iBAAAG,GAAA,IAAAK,EAAAL,EAAA,MACAI,IAAAJ,EAAA,GACAA,EAAA,GAAAI,EACKA,IACLJ,EAAA,OAAAA,EAAA,aAAAI,EAAA,KAEAV,EAAAO,KAAAD,MAIAN,MD0BG","file":"bundle.vendor.bade2cb8992d8a68d0d7.js","sourcesContent":["webpackJsonp([1,2],{\n\n/***/ 1:\n/***/ function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ },\n\n/***/ 12:\n/***/ function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1);\n\n\n/***/ },\n\n/***/ 13:\n/***/ function(module, exports) {\n\n/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\n// css base code, injected by the css-loader\r\nmodule.exports = function() {\r\n\tvar list = [];\r\n\r\n\t// return the list of modules as css string\r\n\tlist.toString = function toString() {\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar item = this[i];\r\n\t\t\tif(item[2]) {\r\n\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\r\n\t\t\t} else {\r\n\t\t\t\tresult.push(item[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result.join(\"\");\r\n\t};\r\n\r\n\t// import a list of modules into the list\r\n\tlist.i = function(modules, mediaQuery) {\r\n\t\tif(typeof modules === \"string\")\r\n\t\t\tmodules = [[null, modules, \"\"]];\r\n\t\tvar alreadyImportedModules = {};\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar id = this[i][0];\r\n\t\t\tif(typeof id === \"number\")\r\n\t\t\t\talreadyImportedModules[id] = true;\r\n\t\t}\r\n\t\tfor(i = 0; i < modules.length; i++) {\r\n\t\t\tvar item = modules[i];\r\n\t\t\t// skip already imported module\r\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\r\n\t\t\t//  when a module is imported multiple times with different media queries.\r\n\t\t\t//  I hope this will never occur (Hey this way we have smaller bundles)\r\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\r\n\t\t\t\tif(mediaQuery && !item[2]) {\r\n\t\t\t\t\titem[2] = mediaQuery;\r\n\t\t\t\t} else if(mediaQuery) {\r\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\r\n\t\t\t\t}\r\n\t\t\t\tlist.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn list;\r\n};\r\n\n\n/***/ }\n\n},[12]);\n\n\n// WEBPACK FOOTER //\n// bundle.vendor.bade2cb8992d8a68d0d7.js","/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\n// css base code, injected by the css-loader\r\nmodule.exports = function() {\r\n\tvar list = [];\r\n\r\n\t// return the list of modules as css string\r\n\tlist.toString = function toString() {\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar item = this[i];\r\n\t\t\tif(item[2]) {\r\n\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\r\n\t\t\t} else {\r\n\t\t\t\tresult.push(item[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result.join(\"\");\r\n\t};\r\n\r\n\t// import a list of modules into the list\r\n\tlist.i = function(modules, mediaQuery) {\r\n\t\tif(typeof modules === \"string\")\r\n\t\t\tmodules = [[null, modules, \"\"]];\r\n\t\tvar alreadyImportedModules = {};\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar id = this[i][0];\r\n\t\t\tif(typeof id === \"number\")\r\n\t\t\t\talreadyImportedModules[id] = true;\r\n\t\t}\r\n\t\tfor(i = 0; i < modules.length; i++) {\r\n\t\t\tvar item = modules[i];\r\n\t\t\t// skip already imported module\r\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\r\n\t\t\t//  when a module is imported multiple times with different media queries.\r\n\t\t\t//  I hope this will never occur (Hey this way we have smaller bundles)\r\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\r\n\t\t\t\tif(mediaQuery && !item[2]) {\r\n\t\t\t\t\titem[2] = mediaQuery;\r\n\t\t\t\t} else if(mediaQuery) {\r\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\r\n\t\t\t\t}\r\n\t\t\t\tlist.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn list;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/css-loader/lib/css-base.js\n// module id = 13\n// module chunks = 1"],"sourceRoot":""}
  • trunk/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/index.html

    r216727 r219903  
    33  <head>
    44    <meta charset="utf-8">
    5     <title>VanillaJS • TodoMVC</title>
    6     <script>!function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,c,u){for(var a,i,f,l=0,s=[];l<t.length;l++)i=t[l],o[i]&&s.push(o[i][0]),o[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(t,c,u);s.length;)s.shift()();if(u)for(l=0;l<u.length;l++)f=r(r.s=u[l]);return f};var t={},o={2:0};r.e=function(e){function n(){c.onerror=c.onload=null,clearTimeout(u);var r=o[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}if(0===o[e])return Promise.resolve();if(o[e])return o[e][2];var t=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,c.src=r.p+"bundle."+e+"."+{0:"73bcc5d3c1d07180f0e3",1:"efaa3e0e20077c8e7471"}[e]+".js";var u=setTimeout(n,12e4);c.onerror=c.onload=n,t.appendChild(c);var a=new Promise(function(r,n){o[e]=[r,n]});return o[e][2]=a},r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,r,n){Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r.oe=function(e){throw console.error(e),e}}([]);
     5    <title>ES2015 + Babel + Webpack TodoMVC example</title>
     6    <script>!function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,u,a){for(var i,c,f,l=0,s=[];l<t.length;l++)c=t[l],o[c]&&s.push(o[c][0]),o[c]=0;for(i in u)Object.prototype.hasOwnProperty.call(u,i)&&(e[i]=u[i]);for(n&&n(t,u,a);s.length;)s.shift()();if(a)for(l=0;l<a.length;l++)f=r(r.s=a[l]);return f};var t={},o={2:0};r.e=function(e){function n(){u.onerror=u.onload=null,clearTimeout(a);var r=o[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}if(0===o[e])return Promise.resolve();if(o[e])return o[e][2];var t=document.getElementsByTagName("head")[0],u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,u.timeout=12e4,u.src=r.p+"bundle."+e+"."+{0:"9debb1b0a94f14d0ebe9",1:"bade2cb8992d8a68d0d7"}[e]+".js";var a=setTimeout(n,12e4);u.onerror=u.onload=n,t.appendChild(u);var i=new Promise(function(r,n){o[e]=[r,n]});return o[e][2]=i},r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,r,n){Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r.oe=function(e){throw console.error(e),e}}([]);
    77</script>
    8   <link href="styles.vendor.efaa3e0e20077c8e7471.css" rel="stylesheet"><link href="styles.app.73bcc5d3c1d07180f0e3.css" rel="stylesheet"><script type="text/javascript" src="bundle.vendor.efaa3e0e20077c8e7471.js"></script><script type="text/javascript" src="bundle.app.73bcc5d3c1d07180f0e3.js"></script></head>
     8  <link href="styles.vendor.bade2cb8992d8a68d0d7.css" rel="stylesheet"><link href="styles.app.9debb1b0a94f14d0ebe9.css" rel="stylesheet"><script type="text/javascript" src="bundle.vendor.bade2cb8992d8a68d0d7.js"></script><script type="text/javascript" src="bundle.app.9debb1b0a94f14d0ebe9.js"></script></head>
    99  <body>
    1010    <section class="todoapp">
  • trunk/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.app.9debb1b0a94f14d0ebe9.css

    r219902 r219903  
    11.toggle-graph{float:left;margin-left:16px;cursor:pointer;position:relative;z-index:1}.toggle-graph svg{height:20px;width:20px}.toggle-graph svg path{fill:#777}.toggle-graph.active svg path,.toggle-graph:focus svg path,.toggle-graph:hover svg path{fill:#000}
    2 /*# sourceMappingURL=styles.app.73bcc5d3c1d07180f0e3.css.map*/
     2/*# sourceMappingURL=styles.app.9debb1b0a94f14d0ebe9.css.map*/
  • trunk/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.app.9debb1b0a94f14d0ebe9.css.map

    r219902 r219903  
    1 {"version":3,"sources":[],"names":[],"mappings":"","file":"styles.app.73bcc5d3c1d07180f0e3.css","sourceRoot":""}
     1{"version":3,"sources":[],"names":[],"mappings":"","file":"styles.app.9debb1b0a94f14d0ebe9.css","sourceRoot":""}
  • trunk/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.vendor.bade2cb8992d8a68d0d7.css

    r219902 r219903  
    11body,button,html{margin:0;padding:0}button{border:0;background:none;font-size:100%;vertical-align:baseline;font-family:inherit;font-weight:inherit;color:inherit;-webkit-appearance:none;appearance:none;-webkit-font-smoothing:antialiased}body,button{-moz-osx-font-smoothing:grayscale}body{font:14px Helvetica Neue,Helvetica,Arial,sans-serif;line-height:1.4em;background:#f5f5f5;color:#4d4d4d;min-width:230px;max-width:550px;margin:0 auto;-webkit-font-smoothing:antialiased;font-weight:300}:focus{outline:0}.hidden{display:none}.todoapp{background:#fff;margin:130px 0 40px;position:relative;box-shadow:0 2px 4px 0 rgba(0,0,0,.2),0 25px 50px 0 rgba(0,0,0,.1)}.todoapp input::-webkit-input-placeholder{font-style:italic;font-weight:300;color:#e6e6e6}.todoapp input::-moz-placeholder{font-style:italic;font-weight:300;color:#e6e6e6}.todoapp input::input-placeholder{font-style:italic;font-weight:300;color:#e6e6e6}.todoapp h1{position:absolute;top:-155px;width:100%;font-size:100px;font-weight:100;text-align:center;color:rgba(175,47,47,.15);-webkit-text-rendering:optimizeLegibility;-moz-text-rendering:optimizeLegibility;text-rendering:optimizeLegibility}.edit,.new-todo{position:relative;margin:0;width:100%;font-size:24px;font-family:inherit;font-weight:inherit;line-height:1.4em;border:0;color:inherit;padding:6px;border:1px solid #999;box-shadow:inset 0 -1px 5px 0 rgba(0,0,0,.2);box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.new-todo{padding:16px 16px 16px 60px;border:none;background:rgba(0,0,0,.003);box-shadow:inset 0 -2px 1px rgba(0,0,0,.03)}.main{position:relative;z-index:2;border-top:1px solid #e6e6e6}label[for=toggle-all]{display:none}.toggle-all{position:absolute;top:-55px;left:-12px;width:60px;height:34px;text-align:center;border:none}.toggle-all:before{content:"\276F";font-size:22px;color:#e6e6e6;padding:10px 27px}.toggle-all:checked:before{color:#737373}.todo-list{margin:0;padding:0;list-style:none}.todo-list li{position:relative;font-size:24px;border-bottom:1px solid #ededed}.todo-list li:last-child{border-bottom:none}.todo-list li.editing{border-bottom:none;padding:0}.todo-list li.editing .edit{display:block;width:506px;padding:12px 16px;margin:0 0 0 43px}.todo-list li.editing .view{display:none}.todo-list li .toggle{text-align:center;width:40px;height:auto;position:absolute;top:0;bottom:0;margin:auto 0;border:none;-webkit-appearance:none;appearance:none}.todo-list li .toggle:after{content:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="-10 -18 100 135"><circle cx="50" cy="50" r="50" fill="none" stroke="#ededed" stroke-width="3"/></svg>')}.todo-list li .toggle:checked:after{content:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="-10 -18 100 135"><circle cx="50" cy="50" r="50" fill="none" stroke="#bddad5" stroke-width="3"/><path fill="#5dc2af" d="M72 25L42 71 27 56l-4 4 20 20 34-52z"/></svg>')}.todo-list li label{word-break:break-all;padding:15px 60px 15px 15px;margin-left:45px;display:block;line-height:1.2;transition:color .4s}.todo-list li.completed label{color:#d9d9d9;text-decoration:line-through}.todo-list li .destroy{display:none;position:absolute;top:0;right:10px;bottom:0;width:40px;height:40px;margin:auto 0;font-size:30px;color:#cc9a9a;margin-bottom:11px;transition:color .2s ease-out}.todo-list li .destroy:hover{color:#af5b5e}.todo-list li .destroy:after{content:"\D7"}.todo-list li:hover .destroy{display:block}.todo-list li .edit{display:none}.todo-list li.editing:last-child{margin-bottom:-1px}.footer{color:#777;padding:10px 15px;height:20px;text-align:center;border-top:1px solid #e6e6e6}.footer:before{content:"";position:absolute;right:0;bottom:0;left:0;height:50px;overflow:hidden;box-shadow:0 1px 1px rgba(0,0,0,.2),0 8px 0 -3px #f6f6f6,0 9px 1px -3px rgba(0,0,0,.2),0 16px 0 -6px #f6f6f6,0 17px 2px -6px rgba(0,0,0,.2)}.todo-count{float:left;text-align:left}.todo-count strong{font-weight:300}.filters{margin:0;padding:0;list-style:none;position:absolute;right:0;left:0}.filters li{display:inline}.filters li a{color:inherit;margin:3px;padding:3px 7px;text-decoration:none;border:1px solid transparent;border-radius:3px}.filters li a:hover{border-color:rgba(175,47,47,.1)}.filters li a.selected{border-color:rgba(175,47,47,.2)}.clear-completed,html .clear-completed:active{float:right;position:relative;line-height:20px;text-decoration:none;cursor:pointer}.clear-completed:hover{text-decoration:underline}.info{margin:65px auto 0;color:#bfbfbf;font-size:10px;text-shadow:0 1px 0 hsla(0,0%,100%,.5);text-align:center}.info p{line-height:1}.info a{color:inherit;text-decoration:none;font-weight:400}.info a:hover{text-decoration:underline}@media screen and (-webkit-min-device-pixel-ratio:0){.todo-list li .toggle,.toggle-all{background:none}.todo-list li .toggle{height:40px}.toggle-all{-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-appearance:none;appearance:none}}@media (max-width:430px){.footer{height:50px}.filters{bottom:10px}}
    2 /*# sourceMappingURL=styles.vendor.efaa3e0e20077c8e7471.css.map*/
     2/*# sourceMappingURL=styles.vendor.bade2cb8992d8a68d0d7.css.map*/
  • trunk/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.vendor.bade2cb8992d8a68d0d7.css.map

    r219902 r219903  
    1 {"version":3,"sources":[],"names":[],"mappings":"","file":"styles.vendor.efaa3e0e20077c8e7471.css","sourceRoot":""}
     1{"version":3,"sources":[],"names":[],"mappings":"","file":"styles.vendor.bade2cb8992d8a68d0d7.css","sourceRoot":""}
  • trunk/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/package.json

    r216727 r219903  
    2323    "eslint-config-kentcdodds": "^9.0.0",
    2424    "extract-text-webpack-plugin": "2.0.0-beta.3",
    25     "ghooks": "1.3.2",
    2625    "html-webpack-plugin": "2.22.0",
    2726    "http-server": "0.9.0",
     
    4544    "webpack-validator": "2.2.7"
    4645  },
    47   "config": {
    48     "ghooks": {
    49       "pre-commit": "opt --in pre-commit --exec \"npm run validate\""
    50     }
    51   },
    5246  "scripts": {
    53     "predeploy": "npm run build",
    54     "deploy": "./scripts/deploy",
    5547    "prebuild": "rimraf dist",
    5648    "build": "webpack --env.prod -p",
    57     "postbuild": "cpy favicon.ico dist",
    5849    "prebuild:dev": "rimraf dist",
    5950    "build:dev": "webpack --env.dev",
    60     "postbuild:dev": "cpy favicon.ico dist",
    6151    "start": "http-server dist",
    6252    "dev": "webpack-dev-server --env.dev --hot",
     
    6858    "validate": "npm-run-all --parallel lint build test",
    6959    "lint": "eslint .",
    70     "setup": "npm install && npm run validate",
    71     "setup:fem": "git checkout FEM/07.1-deploy-surge && npm install && npm run validate && rimraf dist coverage && git checkout FEM/00-original-project",
    72     "setup:workshop": "git checkout workshop/07-coverage && npm install && npm run validate && rimraf dist coverage && git checkout workshop/00-original-project",
    73     "setup:egghead": "git checkout prelesson/polyfill-promises && npm install && mkdir dist && npm run validate"
     60    "setup": "npm install && npm run validate"
    7461  }
    7562}
  • trunk/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/index.html

    r216727 r219903  
    33  <head>
    44    <meta charset="utf-8">
    5     <title>VanillaJS • TodoMVC</title>
     5    <title>ES2015 + Babel + Webpack TodoMVC example</title>
    66    <%=htmlWebpackPlugin.files.webpackManifest%>
    77  </head>
Note: See TracChangeset for help on using the changeset viewer.