Skip to content

Instantly share code, notes, and snippets.

@gpspake
Last active April 4, 2018 18:52
Show Gist options
  • Save gpspake/60986cdc295b0e2e130a37f7afb6173b to your computer and use it in GitHub Desktop.
Save gpspake/60986cdc295b0e2e130a37f7afb6173b to your computer and use it in GitHub Desktop.
webpack -p bundle | tree shaking not working
!function(t){function webpackJsonpCallback(e){for(var o,a,i=e[0],l=e[1],s=0,d=[];s<i.length;s++)a=i[s],n[a]&&d.push(n[a][0]),n[a]=0;for(o in l)Object.prototype.hasOwnProperty.call(l,o)&&(t[o]=l[o]);for(r&&r(e);d.length;)d.shift()()}var e={},n={2:0};function __webpack_require__(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}__webpack_require__.e=function requireEnsure(t){var e=[],o=n[t];if(0!==o)if(o)e.push(o[2]);else{var a=new Promise(function(e,a){o=n[t]=[e,a]});e.push(o[2]=a);var i=document.getElementsByTagName("head")[0],r=document.createElement("script");r.charset="utf-8",r.timeout=12e4,__webpack_require__.nc&&r.setAttribute("nonce",__webpack_require__.nc),r.src=__webpack_require__.p+""+t+".bundle.js";var l=setTimeout(function(){onScriptComplete({type:"timeout",target:r})},12e4);function onScriptComplete(e){r.onerror=r.onload=null,clearTimeout(l);var o=n[t];if(0!==o){if(o){var a=e&&("load"===e.type?"missing":e.type),i=e&&e.target&&e.target.src,s=new Error("Loading chunk "+t+" failed.\n("+a+": "+i+")");s.type=a,s.request=i,o[1](s)}n[t]=void 0}}r.onerror=r.onload=onScriptComplete,i.appendChild(r)}return Promise.all(e)},__webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function getDefault(){return t.default}:function getModuleExports(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__.oe=function(t){throw console.error(t),t};var o=window.webpackJsonp=window.webpackJsonp||[],a=o.push.bind(o);o.push=webpackJsonpCallback,o=o.slice();for(var i=0;i<o.length;i++)webpackJsonpCallback(o[i]);var r=a;__webpack_require__(__webpack_require__.s=0)}([function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n\n// EXTERNAL MODULE: ./node_modules/todomvc-app-css/index.css\nvar todomvc_app_css = __webpack_require__(5);\n\n// CONCATENATED MODULE: ./src/helpers.js\n // Get element(s) by CSS selector:\n\nfunction qs(selector, scope) {\n return (scope || document).querySelector(selector);\n}\n\nfunction qsa(selector, scope) {\n return (scope || document).querySelectorAll(selector);\n}\n\nfunction log() {\n if (window.console && window.console.log) {\n var _window$console;\n\n (_window$console = window.console).log.apply(_window$console, arguments);\n }\n} // addEventListener wrapper:\n\n\nfunction $on(target, type, callback, useCapture) {\n target.addEventListener(type, callback, !!useCapture);\n} // Attach a handler to event for all elements that match the selector,\n// now or in the future, based on a root element\n\n\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} // Find the element's parent with the given tag name:\n// $parent(qs('a'), 'div');\n\n\nfunction $parent(element, tagName) {\n if (!element.parentNode) {\n return undefined;\n }\n\n if (element.parentNode.tagName.toLowerCase() === tagName.toLowerCase()) {\n return element.parentNode;\n }\n\n return $parent(element.parentNode, tagName);\n} // removes an element from an array\n// const x = [1,2,3]\n// remove(x, 2)\n// x ~== [1,3]\n\n\nfunction remove(array, thing) {\n var index = array.indexOf(thing);\n\n if (index === -1) {\n return array;\n }\n\n array.splice(index, 1);\n} // pad the left of the given string by the given size with the given character\n// leftPad('10', 3, '0') -> 010\n\n\nfunction leftPad(str, size, padWith) {\n if (size <= str.length) {\n return str;\n } else {\n return Array(size - str.length + 1).join(padWith || '0') + str;\n }\n} // Allow for looping on nodes by chaining:\n// qsa('.foo').forEach(function () {})\n\n\nNodeList.prototype.forEach = Array.prototype.forEach;\n// CONCATENATED MODULE: ./src/view.js\n\n/* harmony default export */ var view = (view_View);\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\nfunction view_View(template) {\n this.template = template;\n this.ENTER_KEY = 13;\n this.ESCAPE_KEY = 27;\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\nview_View.prototype._removeItem = function (id) {\n var elem = qs('[data-id=\"' + id + '\"]');\n\n if (elem) {\n this.$todoList.removeChild(elem);\n }\n};\n\nview_View.prototype._clearCompletedButton = function (completedCount, visible) {\n this.$clearCompleted.innerHTML = this.template.clearCompletedButton(completedCount);\n this.$clearCompleted.style.display = visible ? 'block' : 'none';\n};\n\nview_View.prototype._setFilter = function (currentPage) {\n qs('.filters .selected').className = '';\n qs('.filters [href=\"#/' + currentPage + '\"]').className = 'selected';\n};\n\nview_View.prototype._elementComplete = function (id, completed) {\n var listItem = qs('[data-id=\"' + id + '\"]');\n\n if (!listItem) {\n return;\n }\n\n listItem.className = completed ? 'completed' : ''; // In case it was toggled from an event and not by clicking the checkbox\n\n qs('input', listItem).checked = completed;\n};\n\nview_View.prototype._editItem = function (id, title) {\n var listItem = qs('[data-id=\"' + id + '\"]');\n\n if (!listItem) {\n return;\n }\n\n listItem.className = listItem.className + ' editing';\n var input = document.createElement('input');\n input.className = 'edit';\n listItem.appendChild(input);\n input.focus();\n input.value = title;\n};\n\nview_View.prototype._editItemDone = function (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 listItem.className = listItem.className.replace('editing', '');\n qsa('label', listItem).forEach(function (label) {\n label.textContent = title;\n });\n};\n\nview_View.prototype.render = function (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 that._setFilter(parameter);\n },\n clearNewTodo: function clearNewTodo() {\n that.$newTodo.value = '';\n },\n elementComplete: function elementComplete() {\n that._elementComplete(parameter.id, parameter.completed);\n },\n editItem: function editItem() {\n that._editItem(parameter.id, parameter.title);\n },\n editItemDone: function editItemDone() {\n that._editItemDone(parameter.id, parameter.title);\n }\n };\n viewCommands[viewCmd]();\n};\n\nview_View.prototype._itemId = function (element) {\n var li = $parent(element, 'li');\n return parseInt(li.dataset.id, 10);\n};\n\nview_View.prototype._bindItemEditDone = function (handler) {\n var that = this;\n $delegate(that.$todoList, 'li .edit', 'blur', function () {\n if (!this.dataset.iscanceled) {\n handler({\n id: that._itemId(this),\n title: this.value\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\nview_View.prototype._bindItemEditCancel = function (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 handler({\n id: that._itemId(this)\n });\n }\n });\n};\n\nview_View.prototype.bind = function (event, handler) {\n // eslint-disable-line\n var that = this;\n\n if (event === 'newTodo') {\n $on(that.$newTodo, 'change', function () {\n handler(that.$newTodo.value);\n });\n } else if (event === 'removeCompleted') {\n $on(that.$clearCompleted, 'click', function () {\n handler();\n });\n } else if (event === 'toggleAll') {\n $on(that.$toggleAll, 'click', function () {\n handler({\n completed: this.checked\n });\n });\n } else if (event === 'itemEdit') {\n $delegate(that.$todoList, 'li label', 'dblclick', function () {\n handler({\n id: that._itemId(this)\n });\n });\n } else if (event === 'itemRemove') {\n $delegate(that.$todoList, '.destroy', 'click', function () {\n handler({\n id: that._itemId(this)\n });\n });\n } else if (event === 'itemToggle') {\n $delegate(that.$todoList, '.toggle', 'click', function () {\n handler({\n id: that._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// CONCATENATED MODULE: ./src/controller.js\n/* harmony default export */ var controller = (Controller);\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 */\n\nfunction Controller(model, view) {\n var that = this;\n that.model = model;\n that.view = view;\n that.view.bind('newTodo', function (title) {\n that.addItem(title);\n });\n that.view.bind('itemEdit', function (item) {\n that.editItem(item.id);\n });\n that.view.bind('itemEditDone', function (item) {\n that.editItemSave(item.id, item.title);\n });\n that.view.bind('itemEditCancel', function (item) {\n that.editItemCancel(item.id);\n });\n that.view.bind('itemRemove', function (item) {\n that.removeItem(item.id);\n });\n that.view.bind('itemToggle', function (item) {\n that.toggleComplete(item.id, item.completed);\n });\n that.view.bind('removeCompleted', function () {\n that.removeCompletedItems();\n });\n that.view.bind('toggleAll', function (status) {\n that.toggleAll(status.completed);\n });\n}\n/**\n * Loads and initialises the view\n *\n * @param {string} '' | 'active' | 'completed'\n */\n\n\nController.prototype.setView = function (locationHash) {\n var route = locationHash.split('/')[1];\n var page = route || '';\n\n this._updateFilterState(page);\n};\n/**\n * An event to fire on load. Will get all items and display them in the\n * todo-list\n */\n\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 * Renders all active tasks\n */\n\n\nController.prototype.showActive = function () {\n var that = this;\n that.model.read({\n completed: false\n }, function (data) {\n that.view.render('showEntries', data);\n });\n};\n/**\n * Renders all completed tasks\n */\n\n\nController.prototype.showCompleted = function () {\n var that = this;\n that.model.read({\n completed: true\n }, function (data) {\n that.view.render('showEntries', data);\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 */\n\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\n that._filter(true);\n });\n};\n/*\n * Triggers the item editing mode.\n */\n\n\nController.prototype.editItem = function (id) {\n var that = this;\n that.model.read(id, function (data) {\n that.view.render('editItem', {\n id: id,\n title: data[0].title\n });\n });\n};\n/*\n * Finishes the item editing mode successfully.\n */\n\n\nController.prototype.editItemSave = function (id, title) {\n var that = this;\n\n if (title.trim()) {\n that.model.update(id, {\n title: title\n }, function () {\n that.view.render('editItemDone', {\n id: id,\n title: title\n });\n });\n } else {\n that.removeItem(id);\n }\n};\n/*\n * Cancels the item editing mode.\n */\n\n\nController.prototype.editItemCancel = function (id) {\n var that = this;\n that.model.read(id, function (data) {\n that.view.render('editItemDone', {\n id: id,\n 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 */\n\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 * Will remove all completed items from the DOM and storage.\n */\n\n\nController.prototype.removeCompletedItems = function () {\n var that = this;\n that.model.read({\n completed: true\n }, function (data) {\n data.forEach(function (item) {\n that.removeItem(item.id);\n });\n });\n\n that._filter();\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 */\n\n\nController.prototype.toggleComplete = function (id, completed, silent) {\n var that = this;\n that.model.update(id, {\n completed: completed\n }, 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 * Will toggle ALL checkboxes' on/off state and completeness of models.\n * Just pass in the event object.\n */\n\n\nController.prototype.toggleAll = function (completed) {\n var that = this;\n that.model.read({\n completed: !completed\n }, function (data) {\n data.forEach(function (item) {\n that.toggleComplete(item.id, completed, true);\n });\n });\n\n that._filter();\n};\n/**\n * Updates the pieces of the page which change depending on the remaining\n * number of todos.\n */\n\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 that.view.render('toggleAll', {\n checked: todos.completed === todos.total\n });\n that.view.render('contentBlockVisibility', {\n 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 */\n\n\nController.prototype._filter = function (force) {\n var activeRoute = this._activeRoute.charAt(0).toUpperCase() + this._activeRoute.substr(1); // Update the elements on the page, which change with each completed todo\n\n\n this._updateCount(); // 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\n\n if (force || this._lastActiveRoute !== 'All' || this._lastActiveRoute !== activeRoute) {\n this['show' + activeRoute]();\n }\n\n this._lastActiveRoute = activeRoute;\n};\n/**\n * Simply updates the filter nav's selected states\n */\n\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 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// CONCATENATED MODULE: ./src/model.js\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* harmony default export */ var model = (Model);\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 */\n\nfunction Model(storage) {\n this.storage = storage;\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 */\n\n\nModel.prototype.create = function (title, callback) {\n title = title || '';\n\n callback = callback || function () {};\n\n var newItem = {\n title: title.trim(),\n completed: false\n };\n this.storage.save(newItem, callback);\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 */\n\n\nModel.prototype.read = function (query, callback) {\n var queryType = _typeof(query);\n\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({\n id: query\n }, callback);\n } else {\n this.storage.find(query, callback);\n }\n\n return undefined;\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 */\n\n\nModel.prototype.update = function (id, data, callback) {\n this.storage.save(data, callback, id);\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 */\n\n\nModel.prototype.remove = function (id, callback) {\n this.storage.remove(id, callback);\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 */\n\n\nModel.prototype.removeAll = function (callback) {\n this.storage.drop(callback);\n};\n/**\n * Returns a count of all todos\n */\n\n\nModel.prototype.getCount = function (callback) {\n var todos = {\n active: 0,\n completed: 0,\n total: 0\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// CONCATENATED MODULE: ./src/store.js\n\n/* harmony default export */ var store = (store_Store);\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 */\n\nfunction store_Store(name, callback) {\n callback = callback || function () {};\n\n this._dbName = name;\n\n if (!localStorage[name]) {\n var data = {\n todos: []\n };\n localStorage[name] = JSON.stringify(data);\n }\n\n callback.call(this, JSON.parse(localStorage[name]));\n this.subscribers = [];\n}\n\nstore_Store.prototype.subscribe = function (subscriber) {\n var _this = this;\n\n this.subscribers.push(subscriber);\n return function () {\n return remove(_this.subscribers, subscriber);\n };\n};\n\nstore_Store.prototype._notify = function () {\n this.subscribers.forEach(function (s) {\n return 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\t * // data will return any items that have foo: bar and\n\t *\t // hello: world in their properties\n\t * });\n */\n\n\nstore_Store.prototype.find = function (query, callback) {\n if (!callback) {\n return;\n }\n\n var todos = JSON.parse(localStorage[this._dbName]).todos;\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\n return true;\n }));\n};\n/**\n * Will retrieve all data from the collection\n *\n * @param {function} callback The callback to fire upon retrieving data\n */\n\n\nstore_Store.prototype.findAll = function (callback) {\n callback = callback || function () {};\n\n callback.call(this, JSON.parse(localStorage[this._dbName]).todos);\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 */\n\n\nstore_Store.prototype.save = function (updateData, callback, id) {\n var data = JSON.parse(localStorage[this._dbName]);\n var todos = data.todos;\n\n callback = callback || function () {}; // If an ID was actually given, find the item and update each property\n\n\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\n break;\n }\n }\n\n localStorage[this._dbName] = JSON.stringify(data);\n callback.call(this, JSON.parse(localStorage[this._dbName]).todos);\n } else {\n // Generate an ID\n updateData.id = new Date().getTime();\n todos.push(updateData);\n localStorage[this._dbName] = JSON.stringify(data);\n callback.call(this, [updateData]);\n }\n\n this._notify();\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 */\n\n\nstore_Store.prototype.remove = function (id, callback) {\n var data = JSON.parse(localStorage[this._dbName]);\n var todos = data.todos;\n\n for (var i = 0; i < todos.length; i++) {\n if (todos[i].id === id) {\n // eslint-disable-line\n todos.splice(i, 1);\n break;\n }\n }\n\n localStorage[this._dbName] = JSON.stringify(data);\n callback.call(this, JSON.parse(localStorage[this._dbName]).todos);\n\n this._notify();\n};\n/**\n * Will drop all storage and start fresh\n *\n * @param {function} callback The callback to fire after dropping the data\n */\n\n\nstore_Store.prototype.drop = function (callback) {\n localStorage[this._dbName] = JSON.stringify({\n todos: []\n });\n callback.call(this, JSON.parse(localStorage[this._dbName]).todos);\n\n this._notify();\n};\n// CONCATENATED MODULE: ./src/template.js\n/* harmony default export */ var src_template = (Template);\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 template_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 * Sets up defaults for all the Template methods such as a default template\n *\n * @constructor\n */\n\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 * 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 */\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}}', template_escape(data[i].title));\n template = template.replace('{{completed}}', completed);\n template = template.replace('{{checked}}', checked);\n view = view + template;\n }\n\n return view;\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 */\n\n\nTemplate.prototype.itemCounter = function (activeTodos) {\n var plural = activeTodos === 1 ? '' : 's';\n return '<strong>' + activeTodos + '</strong> item' + plural + ' left';\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 */\n\n\nTemplate.prototype.clearCompletedButton = function (completedTodos) {\n if (completedTodos > 0) {\n return 'Clear completed';\n } else {\n return '';\n }\n};\n// CONCATENATED MODULE: ./src/todo.js\n\n\n\n\n\n\n\nvar todo_todo;\nvar todo_subscribers = [];\n/**\n * Sets up a brand new Todo list.\n *\n * @param {string} name The name of your new to do list.\n */\n\nfunction todo_Todo(name) {\n this.storage = new store(name);\n this.model = new model(this.storage);\n this.template = new src_template();\n this.view = new view(this.template);\n this.controller = new controller(this.model, this.view);\n}\n\nfunction todo_updateTodo() {\n todo_todo = new todo_Todo('todos-vanillajs');\n todo_todo.controller.setView(document.location.hash);\n todo_subscribers.forEach(function (s) {\n return s();\n });\n}\n\nfunction todo_getTodo() {\n return todo_todo;\n}\n\nfunction todo_subscribe(cb) {\n todo_subscribers.push(cb);\n return function unsubscribe() {\n remove(todo_subscribers, cb);\n };\n}\n// CONCATENATED MODULE: ./src/graph/index.js\n\nvar graph_graphArea;\nvar graph_unsubscribe = {\n store: null,\n todo: null\n};\n/* harmony default export */ var graph = (graph_toggleGraph);\n\nfunction graph_toggleGraph() {\n if (graph_graphArea) {\n graph_graphArea.remove();\n graph_graphArea = null;\n graph_unsubscribe.store();\n graph_unsubscribe.todo();\n return false;\n } else {\n graph_graphArea = document.createElement('div');\n document.body.querySelector('.graph-area-container').appendChild(graph_graphArea);\n\n var _getTodo = todo_getTodo(),\n storage = _getTodo.storage;\n\n graph_loadAndRenderGraph(graph_graphArea, storage);\n graph_updateTodoSubscription();\n graph_updateStoreSubscription(storage);\n return true;\n }\n}\n\nfunction graph_updateTodoSubscription() {\n if (graph_unsubscribe.todo) {\n graph_unsubscribe.todo();\n }\n\n graph_unsubscribe.todo = todo_subscribe(function onTodoUpdate() {\n var _getTodo2 = todo_getTodo(),\n storage = _getTodo2.storage;\n\n graph_updateStoreSubscription(storage);\n graph_loadAndRenderGraph(graph_graphArea, storage);\n });\n}\n\nfunction graph_updateStoreSubscription(store) {\n if (graph_unsubscribe.store) {\n graph_unsubscribe.store();\n }\n\n graph_unsubscribe.store = store.subscribe(function onStoreUpdate() {\n graph_loadAndRenderGraph(graph_graphArea, store);\n });\n}\n\nfunction graph_loadAndRenderGraph(graphArea, store) {\n Promise.all(/*! import() */[__webpack_require__.e(0), __webpack_require__.e(1)]).then(__webpack_require__.bind(null, /*! ./render */ 236)).then(function (thing) {\n var renderGraph = thing.default;\n renderGraph(graphArea, store);\n });\n}\n// CONCATENATED MODULE: ./src/app.js\n\n\n\n\n\nfunction app_onLoad() {\n todo_updateTodo();\n var toggleGraphButton = document.querySelector('.toggle-graph');\n $on(toggleGraphButton, 'click', function () {\n var active = graph();\n\n if (active) {\n toggleGraphButton.classList.add('active');\n } else {\n toggleGraphButton.classList.remove('active');\n }\n });\n}\n// CONCATENATED MODULE: ./src/bootstrap.js\n\n\n$on(window, 'load', app_onLoad);\n$on(window, 'hashchange', app_onLoad);\n\n//# sourceURL=webpack:///./src/bootstrap.js_+_9_modules?")},function(module,exports){eval('\n/**\n * When source maps are enabled, `style-loader` uses a link element with a data-uri to\n * embed the css on the page. This breaks all relative urls because now they are relative to a\n * bundle instead of the current page.\n *\n * One solution is to only use full urls, but that may be impossible.\n *\n * Instead, this function "fixes" the relative urls to be absolute according to the current page location.\n *\n * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.\n *\n */\n\nmodule.exports = function (css) {\n // get current location\n var location = typeof window !== "undefined" && window.location;\n\n if (!location) {\n throw new Error("fixUrls requires window.location");\n }\n\n\t// blank or null?\n\tif (!css || typeof css !== "string") {\n\t return css;\n }\n\n var baseUrl = location.protocol + "//" + location.host;\n var currentDir = baseUrl + location.pathname.replace(/\\/[^\\/]*$/, "/");\n\n\t// convert each url(...)\n\t/*\n\tThis regular expression is just a way to recursively match brackets within\n\ta string.\n\n\t /url\\s*\\( = Match on the word "url" with any whitespace after it and then a parens\n\t ( = Start a capturing group\n\t (?: = Start a non-capturing group\n\t [^)(] = Match anything that isn\'t a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t (?: = Start another non-capturing groups\n\t [^)(]+ = Match anything that isn\'t a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t [^)(]* = Match anything that isn\'t a parentheses\n\t \\) = Match a end parentheses\n\t ) = End Group\n *\\) = Match anything and then a close parens\n ) = Close non-capturing group\n * = Match anything\n ) = Close capturing group\n\t \\) = Match a close parens\n\n\t /gi = Get all matches, not the first. Be case insensitive.\n\t */\n\tvar fixedCss = css.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi, function(fullMatch, origUrl) {\n\t\t// strip quotes (if they exist)\n\t\tvar unquotedOrigUrl = origUrl\n\t\t\t.trim()\n\t\t\t.replace(/^"(.*)"$/, function(o, $1){ return $1; })\n\t\t\t.replace(/^\'(.*)\'$/, function(o, $1){ return $1; });\n\n\t\t// already a full url? no change\n\t\tif (/^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|\\s*$)/i.test(unquotedOrigUrl)) {\n\t\t return fullMatch;\n\t\t}\n\n\t\t// convert the url to a full url\n\t\tvar newUrl;\n\n\t\tif (unquotedOrigUrl.indexOf("//") === 0) {\n\t\t \t//TODO: should we add protocol?\n\t\t\tnewUrl = unquotedOrigUrl;\n\t\t} else if (unquotedOrigUrl.indexOf("/") === 0) {\n\t\t\t// path should be relative to the base url\n\t\t\tnewUrl = baseUrl + unquotedOrigUrl; // already starts with \'/\'\n\t\t} else {\n\t\t\t// path should be relative to current directory\n\t\t\tnewUrl = currentDir + unquotedOrigUrl.replace(/^\\.\\//, ""); // Strip leading \'./\'\n\t\t}\n\n\t\t// send back the fixed url(...)\n\t\treturn "url(" + JSON.stringify(newUrl) + ")";\n\t});\n\n\t// send back the fixed css\n\treturn fixedCss;\n};\n\n\n//# sourceURL=webpack:///./node_modules/style-loader/lib/urls.js?')},function(module,exports,__webpack_require__){eval('/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === "undefined") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target) {\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target) {\n // If passing function in options, then use it for resolve "head" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector("#foo").shadowRoot }\n // }\n if (typeof target === \'function\') {\n return target();\n }\n if (typeof memo[target] === "undefined") {\n\t\t\tvar styleTarget = getTarget.call(this, target);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = __webpack_require__(/*! ./urls */ 1);\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== "undefined" && DEBUG) {\n\t\tif (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === "object" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t// tags it will allow on a page\n\tif (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();\n\n\t// By default, add <style> tags to the <head> element\n if (!options.insertInto) options.insertInto = "head";\n\n\t// By default, add <style> tags to the bottom of the target\n\tif (!options.insertAt) options.insertAt = "bottom";\n\n\tvar styles = listToStyles(list, options);\n\n\taddStylesToDom(styles, options);\n\n\treturn function update (newList) {\n\t\tvar mayRemove = [];\n\n\t\tfor (var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\n\t\t\tdomStyle.refs--;\n\t\t\tmayRemove.push(domStyle);\n\t\t}\n\n\t\tif(newList) {\n\t\t\tvar newStyles = listToStyles(newList, options);\n\t\t\taddStylesToDom(newStyles, options);\n\t\t}\n\n\t\tfor (var i = 0; i < mayRemove.length; i++) {\n\t\t\tvar domStyle = mayRemove[i];\n\n\t\t\tif(domStyle.refs === 0) {\n\t\t\t\tfor (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();\n\n\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t}\n\t\t}\n\t};\n};\n\nfunction addStylesToDom (styles, options) {\n\tfor (var i = 0; i < styles.length; i++) {\n\t\tvar item = styles[i];\n\t\tvar domStyle = stylesInDom[item.id];\n\n\t\tif(domStyle) {\n\t\t\tdomStyle.refs++;\n\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t}\n\n\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t} else {\n\t\t\tvar parts = [];\n\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t}\n\t}\n}\n\nfunction listToStyles (list, options) {\n\tvar styles = [];\n\tvar newStyles = {};\n\n\tfor (var i = 0; i < list.length; i++) {\n\t\tvar item = list[i];\n\t\tvar id = options.base ? item[0] + options.base : item[0];\n\t\tvar css = item[1];\n\t\tvar media = item[2];\n\t\tvar sourceMap = item[3];\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\n\t\tif(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});\n\t\telse newStyles[id].parts.push(part);\n\t}\n\n\treturn styles;\n}\n\nfunction insertStyleElement (options, style) {\n\tvar target = getElement(options.insertInto)\n\n\tif (!target) {\n\t\tthrow new Error("Couldn\'t find a style target. This probably means that the value for the \'insertInto\' parameter is invalid.");\n\t}\n\n\tvar lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];\n\n\tif (options.insertAt === "top") {\n\t\tif (!lastStyleElementInsertedAtTop) {\n\t\t\ttarget.insertBefore(style, target.firstChild);\n\t\t} else if (lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\ttarget.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);\n\t\t} else {\n\t\t\ttarget.appendChild(style);\n\t\t}\n\t\tstylesInsertedAtTop.push(style);\n\t} else if (options.insertAt === "bottom") {\n\t\ttarget.appendChild(style);\n\t} else if (typeof options.insertAt === "object" && options.insertAt.before) {\n\t\tvar nextSibling = getElement(options.insertInto + " " + options.insertAt.before);\n\t\ttarget.insertBefore(style, nextSibling);\n\t} else {\n\t\tthrow new Error("[Style Loader]\\n\\n Invalid value for parameter \'insertAt\' (\'options.insertAt\') found.\\n Must be \'top\', \'bottom\', or Object.\\n (https://github.com/webpack-contrib/style-loader#insertat)\\n");\n\t}\n}\n\nfunction removeStyleElement (style) {\n\tif (style.parentNode === null) return false;\n\tstyle.parentNode.removeChild(style);\n\n\tvar idx = stylesInsertedAtTop.indexOf(style);\n\tif(idx >= 0) {\n\t\tstylesInsertedAtTop.splice(idx, 1);\n\t}\n}\n\nfunction createStyleElement (options) {\n\tvar style = document.createElement("style");\n\n\toptions.attrs.type = "text/css";\n\n\taddAttrs(style, options.attrs);\n\tinsertStyleElement(options, style);\n\n\treturn style;\n}\n\nfunction createLinkElement (options) {\n\tvar link = document.createElement("link");\n\n\toptions.attrs.type = "text/css";\n\toptions.attrs.rel = "stylesheet";\n\n\taddAttrs(link, options.attrs);\n\tinsertStyleElement(options, link);\n\n\treturn link;\n}\n\nfunction addAttrs (el, attrs) {\n\tObject.keys(attrs).forEach(function (key) {\n\t\tel.setAttribute(key, attrs[key]);\n\t});\n}\n\nfunction addStyle (obj, options) {\n\tvar style, update, remove, result;\n\n\t// If a transform function was defined, run it on the css\n\tif (options.transform && obj.css) {\n\t result = options.transform(obj.css);\n\n\t if (result) {\n\t \t// If transform returns a value, use that instead of the original css.\n\t \t// This allows running runtime transformations on the css.\n\t \tobj.css = result;\n\t } else {\n\t \t// If the transform function returns a falsy value, don\'t add this css.\n\t \t// This allows conditional loading of css\n\t \treturn function() {\n\t \t\t// noop\n\t \t};\n\t }\n\t}\n\n\tif (options.singleton) {\n\t\tvar styleIndex = singletonCounter++;\n\n\t\tstyle = singleton || (singleton = createStyleElement(options));\n\n\t\tupdate = applyToSingletonTag.bind(null, style, styleIndex, false);\n\t\tremove = applyToSingletonTag.bind(null, style, styleIndex, true);\n\n\t} else if (\n\t\tobj.sourceMap &&\n\t\ttypeof URL === "function" &&\n\t\ttypeof URL.createObjectURL === "function" &&\n\t\ttypeof URL.revokeObjectURL === "function" &&\n\t\ttypeof Blob === "function" &&\n\t\ttypeof btoa === "function"\n\t) {\n\t\tstyle = createLinkElement(options);\n\t\tupdate = updateLink.bind(null, style, options);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\n\t\t\tif(style.href) URL.revokeObjectURL(style.href);\n\t\t};\n\t} else {\n\t\tstyle = createStyleElement(options);\n\t\tupdate = applyToTag.bind(null, style);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\t\t};\n\t}\n\n\tupdate(obj);\n\n\treturn function updateStyle (newObj) {\n\t\tif (newObj) {\n\t\t\tif (\n\t\t\t\tnewObj.css === obj.css &&\n\t\t\t\tnewObj.media === obj.media &&\n\t\t\t\tnewObj.sourceMap === obj.sourceMap\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate(obj = newObj);\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t};\n}\n\nvar replaceText = (function () {\n\tvar textStore = [];\n\n\treturn function (index, replacement) {\n\t\ttextStore[index] = replacement;\n\n\t\treturn textStore.filter(Boolean).join(\'\\n\');\n\t};\n})();\n\nfunction applyToSingletonTag (style, index, remove, obj) {\n\tvar css = remove ? "" : obj.css;\n\n\tif (style.styleSheet) {\n\t\tstyle.styleSheet.cssText = replaceText(index, css);\n\t} else {\n\t\tvar cssNode = document.createTextNode(css);\n\t\tvar childNodes = style.childNodes;\n\n\t\tif (childNodes[index]) style.removeChild(childNodes[index]);\n\n\t\tif (childNodes.length) {\n\t\t\tstyle.insertBefore(cssNode, childNodes[index]);\n\t\t} else {\n\t\t\tstyle.appendChild(cssNode);\n\t\t}\n\t}\n}\n\nfunction applyToTag (style, obj) {\n\tvar css = obj.css;\n\tvar media = obj.media;\n\n\tif(media) {\n\t\tstyle.setAttribute("media", media)\n\t}\n\n\tif(style.styleSheet) {\n\t\tstyle.styleSheet.cssText = css;\n\t} else {\n\t\twhile(style.firstChild) {\n\t\t\tstyle.removeChild(style.firstChild);\n\t\t}\n\n\t\tstyle.appendChild(document.createTextNode(css));\n\t}\n}\n\nfunction updateLink (link, options, obj) {\n\tvar css = obj.css;\n\tvar sourceMap = obj.sourceMap;\n\n\t/*\n\t\tIf convertToAbsoluteUrls isn\'t defined, but sourcemaps are enabled\n\t\tand there is no publicPath defined then lets turn convertToAbsoluteUrls\n\t\ton by default. Otherwise default to the convertToAbsoluteUrls option\n\t\tdirectly\n\t*/\n\tvar autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;\n\n\tif (options.convertToAbsoluteUrls || autoFixUrls) {\n\t\tcss = fixUrls(css);\n\t}\n\n\tif (sourceMap) {\n\t\t// http://stackoverflow.com/a/26603875\n\t\tcss += "\\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";\n\t}\n\n\tvar blob = new Blob([css], { type: "text/css" });\n\n\tvar oldSrc = link.href;\n\n\tlink.href = URL.createObjectURL(blob);\n\n\tif(oldSrc) URL.revokeObjectURL(oldSrc);\n}\n\n\n//# sourceURL=webpack:///./node_modules/style-loader/lib/addStyles.js?')},function(module,exports){eval('/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn "@media " + item[2] + "{" + content + "}";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join("");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === "string")\n\t\t\tmodules = [[null, modules, ""]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === "number")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = "(" + item[2] + ") and (" + mediaQuery + ")";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || \'\';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === \'function\') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn \'/*# sourceURL=\' + cssMapping.sourceRoot + source + \' */\'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join(\'\\n\');\n\t}\n\n\treturn [content].join(\'\\n\');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = \'sourceMappingURL=data:application/json;charset=utf-8;base64,\' + base64;\n\n\treturn \'/*# \' + data + \' */\';\n}\n\n\n//# sourceURL=webpack:///./node_modules/css-loader/lib/css-base.js?')},function(module,exports,__webpack_require__){eval('exports = module.exports = __webpack_require__(/*! ../css-loader/lib/css-base.js */ 3)(false);\n// imports\n\n\n// module\nexports.push([module.i, "body,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}}", ""]);\n\n// exports\n\n\n//# sourceURL=webpack:///./node_modules/todomvc-app-css/index.css?./node_modules/css-loader')},function(module,exports,__webpack_require__){eval("\nvar content = __webpack_require__(/*! !../css-loader!./index.css */ 4);\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../style-loader/lib/addStyles.js */ 2)(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/todomvc-app-css/index.css?")}]);
@gpspake
Copy link
Author

gpspake commented Apr 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment