From c234eadebdc3002ef2ec70a2b294cf82bfd937d9 Mon Sep 17 00:00:00 2001 From: David Rivera Date: Mon, 12 Dec 2016 13:00:24 -0600 Subject: [PATCH] Allow 'console.warn()' in the minified js --- dist/proxy-storage.js | 33 ++++++++++++++++++++++++++------- dist/proxy-storage.min.js | 2 +- dist/proxy-storage.min.js.map | 2 +- src/web-storage.js | 6 ++++-- webpack.uglify.config.js | 2 +- 5 files changed, 33 insertions(+), 12 deletions(-) diff --git a/dist/proxy-storage.js b/dist/proxy-storage.js index 28f796b..8a96d6f 100644 --- a/dist/proxy-storage.js +++ b/dist/proxy-storage.js @@ -251,6 +251,24 @@ return /******/ (function(modules) { // webpackBootstrap }, value); } + /** + * @private + * + * Try to parse a value + * + * @param {string} value: the value to parse + * @return {any} + */ + function tryParse(value) { + var parsed = void 0; + try { + parsed = JSON.parse(value); + } catch (e) { + parsed = value; + } + return parsed; + } + /** * @private * @@ -262,12 +280,7 @@ return /******/ (function(modules) { // webpackBootstrap */ function copyKeys(instance, storage) { Object.keys(storage).forEach(function (key) { - var value = storage[key]; - try { - instance[key] = JSON.parse(value); - } catch (e) { - instance[key] = value; - } + instance[key] = tryParse(storage[key]); }); } @@ -377,7 +390,13 @@ return /******/ (function(modules) { // webpackBootstrap value: function getItem(key) { (0, _utils.checkEmpty)(key); var value = _proxyMechanism.proxy[this.__storage__].getItem(key); - if (value === undefined) value = null;else value = JSON.parse(value); + if (value === undefined) { + delete this[key]; + value = null; + } else { + value = tryParse(value); + this[key] = value; + } var v = executeInterceptors('getItem', key, value); if (v !== undefined) value = v; return value; diff --git a/dist/proxy-storage.min.js b/dist/proxy-storage.min.js index 89295b2..9360666 100644 --- a/dist/proxy-storage.min.js +++ b/dist/proxy-storage.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.proxyStorage=t():e.proxyStorage=t()}(this,function(){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){!function(t,r){e.exports=r()}(this,function(){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function n(e){var t=u.proxy[e],r="__proxy-storage__";try{return t.setItem(r,r),t.removeItem(r),!0}catch(e){return!1}}function i(e){return c.isAvailable[e]&&(u.webStorageSettings.default=e,f.set(e)),c.isAvailable[e]}function a(){c.isAvailable.localStorage=n("localStorage"),c.isAvailable.sessionStorage=n("sessionStorage"),c.isAvailable.cookieStorage=n("cookieStorage"),u.webStorageSettings.isAvailable=c.isAvailable,Object.keys(c.isAvailable).some(i)}Object.defineProperty(t,"__esModule",{value:!0}),t.isAvailable=t.configStorage=t.WebStorage=t.default=void 0;var u=r(1),s=o(u),c=r(6),l=null,f={get:function(){return l.__storage__},set:function(e){if(!u.proxy.hasOwnProperty(e))throw new Error('Storage type "'+e+'" is not valid');t.default=l=new s.default(e)}};a(),t.default=l,t.WebStorage=s.default,t.configStorage=f,t.isAvailable=c.isAvailable},function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o-1&&(o=n.substring(0,r),e.removeItem(o.trim()))})},initialize:function(){u.get().split(";").forEach(function(t){var r=t.indexOf("="),o=t.substring(0,r).trim(),n=t.substring(r+1).trim();o&&(e[o]=decodeURIComponent(n))})}};return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=r(4),u={get:function(){return document.cookie},set:function(e){document.cookie=e}}},function(e,t){"use strict";function r(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},e),r=t.date instanceof Date?t.date:new Date;return+t.hours&&r.setHours(r.getHours()+t.hours),+t.days&&r.setDate(r.getDate()+t.days),+t.months&&r.setMonth(r.getMonth()+t.months),+t.years&&r.setFullYear(r.getFullYear()+t.years),r}function n(e,t,r){var o={configurable:!1,enumerable:!1,writable:!1};"undefined"!=typeof r&&(o.value=r),Object.defineProperty(e,t,o)}function i(e){if(null==e||""===e)throw new Error("The key provided can not be empty")}Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=r,t.setTimestamp=o,t.setProperty=n,t.checkEmpty=i},function(e,t){"use strict";function r(){try{var e=JSON.parse(window.self.name);if(e&&"object"===("undefined"==typeof e?"undefined":i(e)))return e}catch(e){return{}}}function o(e){var t=JSON.stringify(e);window.self.name=t}function n(){var e=r(),t={setItem:function(t,r){e[t]=r,o(e)},getItem:function(t){var r=e[t];return void 0===r?null:r},removeItem:function(t){delete e[t],o(e)},clear:function(){Object.keys(e).forEach(function(t){return delete e[t]}),o(e)},initialize:function(){Object.assign(t,e)}};return t}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.isAvailable={localStorage:!1,sessionStorage:!1,cookieStorage:!1,memoryStorage:!0}}])})}])}); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.proxyStorage=t():e.proxyStorage=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){!function(t,o){e.exports=o()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=u.proxy[e],o="__proxy-storage__";try{return t.setItem(o,o),t.removeItem(o),!0}catch(e){return!1}}function i(e){return c.isAvailable[e]&&(u.webStorageSettings.default=e,f.set(e)),c.isAvailable[e]}function a(){c.isAvailable.localStorage=r("localStorage"),c.isAvailable.sessionStorage=r("sessionStorage"),c.isAvailable.cookieStorage=r("cookieStorage"),u.webStorageSettings.isAvailable=c.isAvailable,Object.keys(c.isAvailable).some(i)}Object.defineProperty(t,"__esModule",{value:!0}),t.isAvailable=t.configStorage=t.WebStorage=t.default=void 0;var u=o(1),s=n(u),c=o(6),l=null,f={get:function(){return l.__storage__},set:function(e){if(!u.proxy.hasOwnProperty(e))throw new Error('Storage type "'+e+'" is not valid');t.default=l=new s.default(e)}};a(),t.default=l,t.WebStorage=s.default,t.configStorage=f,t.isAvailable=c.isAvailable},function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n-1&&(n=r.substring(0,o),e.removeItem(n.trim()))})},initialize:function(){u.get().split(";").forEach(function(t){var o=t.indexOf("="),n=t.substring(0,o).trim(),r=t.substring(o+1).trim();n&&(e[n]=decodeURIComponent(r))})}};return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=o(4),u={get:function(){return document.cookie},set:function(e){document.cookie=e}}},function(e,t){"use strict";function o(e){return"[object Object]"===Object.prototype.toString.call(e)}function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},e),o=t.date instanceof Date?t.date:new Date;return+t.hours&&o.setHours(o.getHours()+t.hours),+t.days&&o.setDate(o.getDate()+t.days),+t.months&&o.setMonth(o.getMonth()+t.months),+t.years&&o.setFullYear(o.getFullYear()+t.years),o}function r(e,t,o){var n={configurable:!1,enumerable:!1,writable:!1};"undefined"!=typeof o&&(n.value=o),Object.defineProperty(e,t,n)}function i(e){if(null==e||""===e)throw new Error("The key provided can not be empty")}Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=o,t.setTimestamp=n,t.setProperty=r,t.checkEmpty=i},function(e,t){"use strict";function o(){try{var e=JSON.parse(window.self.name);if(e&&"object"===("undefined"==typeof e?"undefined":i(e)))return e}catch(e){return{}}}function n(e){var t=JSON.stringify(e);window.self.name=t}function r(){var e=o(),t={setItem:function(t,o){e[t]=o,n(e)},getItem:function(t){var o=e[t];return void 0===o?null:o},removeItem:function(t){delete e[t],n(e)},clear:function(){Object.keys(e).forEach(function(t){return delete e[t]}),n(e)},initialize:function(){Object.assign(t,e)}};return t}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.isAvailable={localStorage:!1,sessionStorage:!1,cookieStorage:!1,memoryStorage:!0}}])})}])}); //# sourceMappingURL=proxy-storage.min.js.map \ No newline at end of file diff --git a/dist/proxy-storage.min.js.map b/dist/proxy-storage.min.js.map index 86547e6..c0ec74a 100644 --- a/dist/proxy-storage.min.js.map +++ b/dist/proxy-storage.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///proxy-storage.min.js","webpack:///webpack/bootstrap 850469365dafc979f64d","webpack:///./dist/proxy-storage.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","isStorageAvailable","storageType","storageObj","_webStorage","proxy","data","setItem","removeItem","e","storageAvailable","_isAvailable","isAvailable","webStorageSettings","configStorage","set","init","localStorage","sessionStorage","cookieStorage","Object","keys","some","defineProperty","value","WebStorage","undefined","_webStorage2","storage","get","__storage__","hasOwnProperty","Error","_classCallCheck","instance","Constructor","TypeError","executeInterceptors","command","_len","arguments","length","args","Array","_key","key","shift","_interceptors","reduce","val","action","transformed","apply","concat","copyKeys","forEach","JSON","parse","_createClass","defineProperties","target","props","i","descriptor","enumerable","configurable","writable","protoProps","staticProps","prototype","_proxyMechanism","_utils","_instances","getItem","clear","cachedInstance","setProperty","options","checkEmpty","v","stringify","_this","push","initApi","api","initialize","prop","_cookieStorage","_cookieStorage2","_memoryStorage","_memoryStorage2","window","memoryStorage","buildExpirationString","date","expires","Date","setTimestamp","toUTCString","findCookie","cookie","nameEQ","toString","trim","indexOf","assign","path","isObject","encodeURIComponent","$cookie","split","find","substring","decodeURIComponent","days","eq","indexEQ","index","document","opt","d","hours","setHours","getHours","setDate","getDate","months","setMonth","getMonth","years","setFullYear","getFullYear","name","getStoreFromWindow","store","self","_typeof","setStoreToWindow","hashtable","Symbol","iterator","constructor"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,aAAAD,IAEAD,EAAA,aAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAASL,EAAQD,EAASM,IEtDhC,SAAAR,EAA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,KAAAC,MAAAkC,OAAA4C,KAAAH,KACA,IAAAE,GAAA,+BAAAA,GAAA,YAAAE,EAAAF,IAAA,MAAAA,GACI,MAAA7H,GACJ,UAYA,QAAAgI,GAAAC,GACA,GAAAJ,GAAA9E,KAAAwB,UAAA0D,EACA/C,QAAA4C,KAAAH,KAAAE,EAYA,QAAA1C,KACA,GAAA8C,GAAAL,IACAjD,GACA7E,QAAA,SAAAsC,EAAArB,GACAkH,EAAA7F,GAAArB,EACAiH,EAAAC,IAEAjE,QAAA,SAAA5B,GACA,GAAArB,GAAAkH,EAAA7F,EACA,OAAAnB,UAAAF,EAAA,KAAAA,GAEAhB,WAAA,SAAAqC,SACA6F,GAAA7F,GACA4F,EAAAC,IAEAhE,MAAA,WACAtD,OAAAC,KAAAqH,GAAAnF,QAAA,SAAAV,GACA,aAAA6F,GAAA7F,KAEA4F,EAAAC,IAKArD,WAAA,WAEAjE,OAAAqF,OAAArB,EAAAsD,IAGA,OAAAtD,GA1EAhE,OAAAG,eAAAzC,EAAA,cACA0C,OAAA,GAGA,IAAAgH,GAAA,kBAAAG,SAAA,gBAAAA,QAAAC,SAAA,SAAA9I,GAAqG,aAAAA,IAAqB,SAAAA,GAAmB,MAAAA,IAAA,kBAAA6I,SAAA7I,EAAA+I,cAAAF,QAAA7I,IAAA6I,OAAAtE,UAAA,eAAAvE,GAE7IhB,GAAAkB,QAAA4F,GAyEA,SAAA7G,EAAAD,GAEA,YAEAsC,QAAAG,eAAAzC,EAAA,cACA0C,OAAA,GASA1C,GAAA8B,aACAK,cAAA,EACAC,gBAAA,EACAC,eAAA,EACAyE,eAAA","file":"proxy-storage.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"proxyStorage\"] = factory();\n\telse\n\t\troot[\"proxyStorage\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"proxyStorage\"] = factory();\n\telse\n\t\troot[\"proxyStorage\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t(function webpackUniversalModuleDefinition(root, factory) {\n\t\tif(true)\n\t\t\tmodule.exports = factory();\n\t\telse if(typeof define === 'function' && define.amd)\n\t\t\tdefine([], factory);\n\t\telse if(typeof exports === 'object')\n\t\t\texports[\"proxyStorage\"] = factory();\n\t\telse\n\t\t\troot[\"proxyStorage\"] = factory();\n\t})(this, function() {\n\treturn /******/ (function(modules) { // webpackBootstrap\n\t/******/ \t// The module cache\n\t/******/ \tvar installedModules = {};\n\t\n\t/******/ \t// The require function\n\t/******/ \tfunction __webpack_require__(moduleId) {\n\t\n\t/******/ \t\t// Check if module is in cache\n\t/******/ \t\tif(installedModules[moduleId])\n\t/******/ \t\t\treturn installedModules[moduleId].exports;\n\t\n\t/******/ \t\t// Create a new module (and put it into the cache)\n\t/******/ \t\tvar module = installedModules[moduleId] = {\n\t/******/ \t\t\texports: {},\n\t/******/ \t\t\tid: moduleId,\n\t/******/ \t\t\tloaded: false\n\t/******/ \t\t};\n\t\n\t/******/ \t\t// Execute the module function\n\t/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\n\t/******/ \t\t// Flag the module as loaded\n\t/******/ \t\tmodule.loaded = true;\n\t\n\t/******/ \t\t// Return the exports of the module\n\t/******/ \t\treturn module.exports;\n\t/******/ \t}\n\t\n\t\n\t/******/ \t// expose the modules object (__webpack_modules__)\n\t/******/ \t__webpack_require__.m = modules;\n\t\n\t/******/ \t// expose the module cache\n\t/******/ \t__webpack_require__.c = installedModules;\n\t\n\t/******/ \t// __webpack_public_path__\n\t/******/ \t__webpack_require__.p = \"\";\n\t\n\t/******/ \t// Load entry module and return exports\n\t/******/ \treturn __webpack_require__(0);\n\t/******/ })\n\t/************************************************************************/\n\t/******/ ([\n\t/* 0 */\n\t/***/ function(module, exports, __webpack_require__) {\n\t\n\t\t'use strict';\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\texports.isAvailable = exports.configStorage = exports.WebStorage = exports.default = undefined;\n\t\n\t\tvar _webStorage = __webpack_require__(1);\n\t\n\t\tvar _webStorage2 = _interopRequireDefault(_webStorage);\n\t\n\t\tvar _isAvailable = __webpack_require__(6);\n\t\n\t\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\t\t// If you want to support all ES6 features, uncomment the next line\n\t\t// import 'babel-polyfill';\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Current storage mechanism.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\t/**\n\t\t * This library uses an adapter that implements the Web Storage interface,\n\t\t * which is very useful to deal with the lack of compatibility between\n\t\t * document.cookie and localStorage and sessionStorage.\n\t\t *\n\t\t * It also provides a memoryStorage fallback that stores the data in memory\n\t\t * when all of above mechanisms are not available.\n\t\t *\n\t\t * Author: David Rivera\n\t\t * Github: https://github.com/jherax\n\t\t * License: \"MIT\"\n\t\t *\n\t\t * You can fork this project on github:\n\t\t * https://github.com/jherax/proxy-storage.git\n\t\t */\n\t\n\t\tvar storage = null;\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Get/Set the storage mechanism to use by default.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar configStorage = {\n\t\t get: function get() {\n\t\t return storage.__storage__;\n\t\t },\n\t\n\t\n\t\t /**\n\t\t * Sets the storage mechanism to use by default.\n\t\t *\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t * @return {void}\n\t\t */\n\t\t set: function set(storageType) {\n\t\t if (!_webStorage.proxy.hasOwnProperty(storageType)) {\n\t\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t\t }\n\t\t exports.default = storage = new _webStorage2.default(storageType);\n\t\t }\n\t\t};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Checks whether a storage mechanism is available.\n\t\t *\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction isStorageAvailable(storageType) {\n\t\t var storageObj = _webStorage.proxy[storageType];\n\t\t var data = '__proxy-storage__';\n\t\t try {\n\t\t storageObj.setItem(data, data);\n\t\t storageObj.removeItem(data);\n\t\t return true;\n\t\t } catch (e) {\n\t\t return false;\n\t\t }\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Sets the first or default storage available.\n\t\t *\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction storageAvailable(storageType) {\n\t\t if (_isAvailable.isAvailable[storageType]) {\n\t\t _webStorage.webStorageSettings.default = storageType;\n\t\t configStorage.set(storageType);\n\t\t }\n\t\t return _isAvailable.isAvailable[storageType];\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Initializes the module.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tfunction init() {\n\t\t _isAvailable.isAvailable.localStorage = isStorageAvailable('localStorage');\n\t\t _isAvailable.isAvailable.sessionStorage = isStorageAvailable('sessionStorage');\n\t\t _isAvailable.isAvailable.cookieStorage = isStorageAvailable('cookieStorage');\n\t\t _webStorage.webStorageSettings.isAvailable = _isAvailable.isAvailable;\n\t\t // sets the default storage mechanism available\n\t\t Object.keys(_isAvailable.isAvailable).some(storageAvailable);\n\t\t}\n\t\n\t\tinit();\n\t\n\t\t// @public API\n\t\texports.default = storage;\n\t\texports.WebStorage = _webStorage2.default;\n\t\texports.configStorage = configStorage;\n\t\texports.isAvailable = _isAvailable.isAvailable;\n\t\n\t/***/ },\n\t/* 1 */\n\t/***/ function(module, exports, __webpack_require__) {\n\t\n\t\t'use strict';\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\texports.proxy = exports.webStorageSettings = exports.default = undefined;\n\t\n\t\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\t\tvar _proxyMechanism = __webpack_require__(2);\n\t\n\t\tvar _utils = __webpack_require__(4);\n\t\n\t\tvar _isAvailable = __webpack_require__(6);\n\t\n\t\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Keeps WebStorage instances by type as singletons.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar _instances = {};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Stores the interceptors for WebStorage methods.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar _interceptors = {\n\t\t setItem: [],\n\t\t getItem: [],\n\t\t removeItem: [],\n\t\t clear: []\n\t\t};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Executes the interceptors for a WebStorage method and\n\t\t * allows the transformation in chain of the value passed through.\n\t\t *\n\t\t * @param {string} command: name of the method to intercept\n\t\t * @return {any}\n\t\t */\n\t\tfunction executeInterceptors(command) {\n\t\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t\t args[_key - 1] = arguments[_key];\n\t\t }\n\t\n\t\t var key = args.shift();\n\t\t var value = args.shift();\n\t\t return _interceptors[command].reduce(function (val, action) {\n\t\t var transformed = action.apply(undefined, [key, val].concat(args));\n\t\t if (transformed === undefined) return val;\n\t\t return transformed;\n\t\t }, value);\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Copies all existing keys in the WebStorage instance.\n\t\t *\n\t\t * @param {WebStorage} instance: the instance to where copy the keys\n\t\t * @param {object} storage: the storage mechanism\n\t\t * @return {void}\n\t\t */\n\t\tfunction copyKeys(instance, storage) {\n\t\t Object.keys(storage).forEach(function (key) {\n\t\t var value = storage[key];\n\t\t try {\n\t\t instance[key] = JSON.parse(value);\n\t\t } catch (e) {\n\t\t instance[key] = value;\n\t\t }\n\t\t });\n\t\t}\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Allows to validate if a storage mechanism is valid\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar webStorageSettings = {\n\t\t default: null,\n\t\t isAvailable: _isAvailable.isAvailable\n\t\t};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Validates if the storage mechanism is available and can be used safely.\n\t\t *\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t * @return {string}\n\t\t */\n\t\tfunction storageAvailable(storageType) {\n\t\t if (webStorageSettings.isAvailable[storageType]) return storageType;\n\t\t console.warn(storageType + ' is not available. Falling back to ' + webStorageSettings.default); // eslint-disable-line\n\t\t return webStorageSettings.default;\n\t\t}\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Implementation of the Web Storage interface.\n\t\t * It saves and retrieves values as JSON.\n\t\t *\n\t\t * @see\n\t\t * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n\t\t *\n\t\t * @type {class}\n\t\t */\n\t\n\t\tvar WebStorage = function () {\n\t\n\t\t /**\n\t\t * Creates an instance of WebStorage.\n\t\t *\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\t function WebStorage(storageType) {\n\t\t _classCallCheck(this, WebStorage);\n\t\n\t\t if (!_proxyMechanism.proxy.hasOwnProperty(storageType)) {\n\t\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t\t }\n\t\t // gets the requested storage mechanism\n\t\t var storage = _proxyMechanism.proxy[storageType];\n\t\t // if the storage is not available, sets the default\n\t\t storageType = storageAvailable(storageType);\n\t\t // keeps only one instance by storageType (singleton)\n\t\t var cachedInstance = _instances[storageType];\n\t\t if (cachedInstance) {\n\t\t copyKeys(cachedInstance, storage);\n\t\t return cachedInstance;\n\t\t }\n\t\t (0, _utils.setProperty)(this, '__storage__', storageType);\n\t\t // copies all existing keys in the storage mechanism\n\t\t copyKeys(this, storage);\n\t\t _instances[storageType] = this;\n\t\t }\n\t\n\t\t /**\n\t\t * Stores a value given a key name.\n\t\t *\n\t\t * @param {string} key: keyname of the storage\n\t\t * @param {any} value: data to save in the storage\n\t\t * @param {object} options: additional options for cookieStorage\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\n\t\t _createClass(WebStorage, [{\n\t\t key: 'setItem',\n\t\t value: function setItem(key, value, options) {\n\t\t (0, _utils.checkEmpty)(key);\n\t\t var v = executeInterceptors('setItem', key, value, options);\n\t\t if (v !== undefined) value = v;\n\t\t this[key] = value;\n\t\t value = JSON.stringify(value);\n\t\t _proxyMechanism.proxy[this.__storage__].setItem(key, value, options);\n\t\t }\n\t\n\t\t /**\n\t\t * Retrieves a value by its key name.\n\t\t *\n\t\t * @param {string} key: keyname of the storage\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }, {\n\t\t key: 'getItem',\n\t\t value: function getItem(key) {\n\t\t (0, _utils.checkEmpty)(key);\n\t\t var value = _proxyMechanism.proxy[this.__storage__].getItem(key);\n\t\t if (value === undefined) value = null;else value = JSON.parse(value);\n\t\t var v = executeInterceptors('getItem', key, value);\n\t\t if (v !== undefined) value = v;\n\t\t return value;\n\t\t }\n\t\n\t\t /**\n\t\t * Deletes a key from the storage.\n\t\t *\n\t\t * @param {string} key: keyname of the storage\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }, {\n\t\t key: 'removeItem',\n\t\t value: function removeItem(key) {\n\t\t (0, _utils.checkEmpty)(key);\n\t\t executeInterceptors('removeItem', key);\n\t\t delete this[key];\n\t\t _proxyMechanism.proxy[this.__storage__].removeItem(key);\n\t\t }\n\t\n\t\t /**\n\t\t * Removes all keys from the storage.\n\t\t *\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }, {\n\t\t key: 'clear',\n\t\t value: function clear() {\n\t\t var _this = this;\n\t\n\t\t executeInterceptors('clear');\n\t\t Object.keys(this).forEach(function (key) {\n\t\t delete _this[key];\n\t\t }, this);\n\t\t _proxyMechanism.proxy[this.__storage__].clear();\n\t\t }\n\t\n\t\t /**\n\t\t * Gets the number of data items stored in the Storage object.\n\t\t *\n\t\t * @readonly\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }, {\n\t\t key: 'length',\n\t\t get: function get() {\n\t\t return Object.keys(this).length;\n\t\t }\n\t\n\t\t /**\n\t\t * Adds an interceptor to a WebStorage method.\n\t\t *\n\t\t * @param {string} command: name of the API method to intercept\n\t\t * @param {function} action: callback executed when the API method is called\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }], [{\n\t\t key: 'interceptors',\n\t\t value: function interceptors(command, action) {\n\t\t if (command in _interceptors && typeof action === 'function') _interceptors[command].push(action);\n\t\t }\n\t\t }]);\n\t\n\t\t return WebStorage;\n\t\t}();\n\t\n\t\t// @public API\n\t\n\t\n\t\texports.default = WebStorage;\n\t\texports.webStorageSettings = webStorageSettings;\n\t\texports.proxy = _proxyMechanism.proxy;\n\t\n\t/***/ },\n\t/* 2 */\n\t/***/ function(module, exports, __webpack_require__) {\n\t\n\t\t'use strict';\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\texports.proxy = undefined;\n\t\n\t\tvar _cookieStorage = __webpack_require__(3);\n\t\n\t\tvar _cookieStorage2 = _interopRequireDefault(_cookieStorage);\n\t\n\t\tvar _memoryStorage = __webpack_require__(5);\n\t\n\t\tvar _memoryStorage2 = _interopRequireDefault(_memoryStorage);\n\t\n\t\tvar _utils = __webpack_require__(4);\n\t\n\t\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Adds the current elements in the storage object.\n\t\t *\n\t\t * @param {object} api: the storage mechanism to initialize\n\t\t * @return {object}\n\t\t */\n\t\tfunction initApi(api) {\n\t\t if (!api.initialize) return api;\n\t\t // sets read-only and non-enumerable properties\n\t\t for (var prop in api) {\n\t\t // eslint-disable-line\n\t\t if (prop !== 'initialize') (0, _utils.setProperty)(api, prop);\n\t\t }\n\t\t api.initialize();\n\t\t // this method is removed after being invoked\n\t\t // because is not part of the Web Storage interface\n\t\t delete api.initialize;\n\t\t return api;\n\t\t}\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Proxy for storage mechanisms.\n\t\t * All members implement the Web Storage interface.\n\t\t *\n\t\t * @see\n\t\t * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar proxy = exports.proxy = {\n\t\t localStorage: window.localStorage,\n\t\t sessionStorage: window.sessionStorage,\n\t\t cookieStorage: initApi((0, _cookieStorage2.default)()),\n\t\t memoryStorage: initApi((0, _memoryStorage2.default)())\n\t\t};\n\t\n\t/***/ },\n\t/* 3 */\n\t/***/ function(module, exports, __webpack_require__) {\n\t\n\t\t'use strict';\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\texports.default = cookieStorage;\n\t\n\t\tvar _utils = __webpack_require__(4);\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Proxy for the default cookie storage associated with the current document.\n\t\t *\n\t\t * @see\n\t\t * https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar $cookie = {\n\t\t get: function get() {\n\t\t return document.cookie;\n\t\t },\n\t\t set: function set(value) {\n\t\t document.cookie = value;\n\t\t }\n\t\t};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Builds the expiration part for the cookie.\n\t\t *\n\t\t * @see utils.setTimestamp(options)\n\t\t *\n\t\t * @param {Date|object} date: the expiration date\n\t\t * @return {string}\n\t\t */\n\t\t/* eslint-disable no-invalid-this */\n\t\tfunction buildExpirationString(date) {\n\t\t var expires = date instanceof Date ? (0, _utils.setTimestamp)({ date: date }) : (0, _utils.setTimestamp)(date);\n\t\t return '; expires=' + expires.toUTCString();\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Finds an element in the array.\n\t\t *\n\t\t * @param {string} cookie: key=value\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction findCookie(cookie) {\n\t\t var nameEQ = this.toString();\n\t\t // prevent leading spaces before the key\n\t\t return cookie.trim().indexOf(nameEQ) === 0;\n\t\t}\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Create, read, and delete elements from document cookies\n\t\t * and implements the Web Storage interface.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tfunction cookieStorage() {\n\t\t var api = {\n\t\t setItem: function setItem(key, value, options) {\n\t\t var expires = '',\n\t\t cookie = void 0;\n\t\t options = Object.assign({ path: '/' }, options);\n\t\t if ((0, _utils.isObject)(options.expires) || options.expires instanceof Date) {\n\t\t expires = buildExpirationString(options.expires);\n\t\t }\n\t\t cookie = key + '=' + encodeURIComponent(value) + expires + '; path=' + options.path;\n\t\t $cookie.set(cookie);\n\t\t },\n\t\t getItem: function getItem(key) {\n\t\t var value = null;\n\t\t var nameEQ = key + '=';\n\t\t var cookie = $cookie.get().split(';').find(findCookie, nameEQ);\n\t\t if (cookie) {\n\t\t // prevent leading spaces before the key name\n\t\t value = cookie.trim().substring(nameEQ.length, cookie.length);\n\t\t value = decodeURIComponent(value);\n\t\t }\n\t\t return value;\n\t\t },\n\t\t removeItem: function removeItem(key) {\n\t\t api.setItem(key, '', { expires: { days: -1 } });\n\t\t },\n\t\t clear: function clear() {\n\t\t var eq = '=';\n\t\t var indexEQ = void 0,\n\t\t key = void 0;\n\t\t $cookie.get().split(';').forEach(function (cookie) {\n\t\t indexEQ = cookie.indexOf(eq);\n\t\t if (indexEQ > -1) {\n\t\t key = cookie.substring(0, indexEQ);\n\t\t // prevent leading spaces before the key\n\t\t api.removeItem(key.trim());\n\t\t }\n\t\t });\n\t\t },\n\t\n\t\n\t\t // this method will be removed after being invoked\n\t\t // because is not part of the Web Storage interface\n\t\t initialize: function initialize() {\n\t\t $cookie.get().split(';').forEach(function (cookie) {\n\t\t var index = cookie.indexOf('=');\n\t\t var key = cookie.substring(0, index).trim();\n\t\t var value = cookie.substring(index + 1).trim();\n\t\t // copies all existing elements in the storage\n\t\t if (key) api[key] = decodeURIComponent(value);\n\t\t });\n\t\t }\n\t\t };\n\t\t return api;\n\t\t}\n\t\n\t/***/ },\n\t/* 4 */\n\t/***/ function(module, exports) {\n\t\n\t\t'use strict';\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\texports.isObject = isObject;\n\t\texports.setTimestamp = setTimestamp;\n\t\texports.setProperty = setProperty;\n\t\texports.checkEmpty = checkEmpty;\n\t\t/**\n\t\t * Determines whether a value is a plain object.\n\t\t *\n\t\t * @param {any} value: the object to test\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction isObject(value) {\n\t\t return Object.prototype.toString.call(value) === '[object Object]';\n\t\t}\n\t\n\t\t/**\n\t\t * Allows add or subtract timestamps to the current date or to a specific date.\n\t\t *\n\t\t * @param {object} options: It contains the timestamps to add or remove to the date, and have the following properties:\n\t\t * - {Date} date: if provided, the timestamps will affect this date, otherwise a new current date will be used.\n\t\t * - {number} hours: hours to add/subtract\n\t\t * - {number} days: days to add/subtract\n\t\t * - {number} months: months to add/subtract\n\t\t * - {number} years: years to add/subtract\n\t\t * @return {Date}\n\t\t */\n\t\tfunction setTimestamp() {\n\t\t var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t\n\t\t var opt = Object.assign({}, options);\n\t\t var d = opt.date instanceof Date ? opt.date : new Date();\n\t\t if (+opt.hours) d.setHours(d.getHours() + opt.hours);\n\t\t if (+opt.days) d.setDate(d.getDate() + opt.days);\n\t\t if (+opt.months) d.setMonth(d.getMonth() + opt.months);\n\t\t if (+opt.years) d.setFullYear(d.getFullYear() + opt.years);\n\t\t return d;\n\t\t}\n\t\n\t\t/**\n\t\t * Creates a non-enumerable read-only property.\n\t\t *\n\t\t * @param {object} obj: the object to add the property\n\t\t * @param {string} name: the name of the property\n\t\t * @param {any} value: the value of the property\n\t\t * @return {void}\n\t\t */\n\t\tfunction setProperty(obj, name, value) {\n\t\t var descriptor = {\n\t\t configurable: false,\n\t\t enumerable: false,\n\t\t writable: false\n\t\t };\n\t\t if (typeof value !== 'undefined') {\n\t\t descriptor.value = value;\n\t\t }\n\t\t Object.defineProperty(obj, name, descriptor);\n\t\t}\n\t\n\t\t/**\n\t\t * Validates if the key is not empty.\n\t\t * (null, undefined either empty string)\n\t\t *\n\t\t * @param {string} key: keyname of an element in the storage mechanism\n\t\t * @return {void}\n\t\t */\n\t\tfunction checkEmpty(key) {\n\t\t if (key == null || key === '') {\n\t\t throw new Error('The key provided can not be empty');\n\t\t }\n\t\t}\n\t\n\t/***/ },\n\t/* 5 */\n\t/***/ function(module, exports) {\n\t\n\t\t'use strict';\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\n\t\tvar _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\t\n\t\texports.default = memoryStorage;\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Gets the hashtable-store from the current window.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tfunction getStoreFromWindow() {\n\t\t try {\n\t\t var store = JSON.parse(window.self.name);\n\t\t if (store && (typeof store === 'undefined' ? 'undefined' : _typeof(store)) === 'object') return store;\n\t\t } catch (e) {\n\t\t return {};\n\t\t }\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Saves the hashtable-store in the current window.\n\t\t *\n\t\t * @param {object} hashtable: {key,value} pairs stored in memoryStorage\n\t\t * @return {void}\n\t\t */\n\t\tfunction setStoreToWindow(hashtable) {\n\t\t var store = JSON.stringify(hashtable);\n\t\t window.self.name = store;\n\t\t}\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Create, read, and delete elements from memory store and\n\t\t * implements the Web Storage interface. It also adds a hack\n\t\t * to persist the store in session for the current browser-tab.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tfunction memoryStorage() {\n\t\t var hashtable = getStoreFromWindow();\n\t\t var api = {\n\t\t setItem: function setItem(key, value) {\n\t\t hashtable[key] = value;\n\t\t setStoreToWindow(hashtable);\n\t\t },\n\t\t getItem: function getItem(key) {\n\t\t var value = hashtable[key];\n\t\t return value === undefined ? null : value;\n\t\t },\n\t\t removeItem: function removeItem(key) {\n\t\t delete hashtable[key];\n\t\t setStoreToWindow(hashtable);\n\t\t },\n\t\t clear: function clear() {\n\t\t Object.keys(hashtable).forEach(function (key) {\n\t\t return delete hashtable[key];\n\t\t });\n\t\t setStoreToWindow(hashtable);\n\t\t },\n\t\n\t\t // this method will be removed after being invoked\n\t\t // because is not part of the Web Storage interface\n\t\t initialize: function initialize() {\n\t\t // copies all existing elements in the storage\n\t\t Object.assign(api, hashtable);\n\t\t }\n\t\t };\n\t\t return api;\n\t\t}\n\t\n\t/***/ },\n\t/* 6 */\n\t/***/ function(module, exports) {\n\t\n\t\t\"use strict\";\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Used to determine which storage mechanisms are available.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar isAvailable = exports.isAvailable = {\n\t\t localStorage: false,\n\t\t sessionStorage: false,\n\t\t cookieStorage: false,\n\t\t memoryStorage: true };\n\t\n\t/***/ }\n\t/******/ ])\n\t});\n\t;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// proxy-storage.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 850469365dafc979f64d","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"proxyStorage\"] = factory();\n\telse\n\t\troot[\"proxyStorage\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.isAvailable = exports.configStorage = exports.WebStorage = exports.default = undefined;\n\n\tvar _webStorage = __webpack_require__(1);\n\n\tvar _webStorage2 = _interopRequireDefault(_webStorage);\n\n\tvar _isAvailable = __webpack_require__(6);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n\t// If you want to support all ES6 features, uncomment the next line\n\t// import 'babel-polyfill';\n\n\t/**\n\t * @public\n\t *\n\t * Current storage mechanism.\n\t *\n\t * @type {object}\n\t */\n\t/**\n\t * This library uses an adapter that implements the Web Storage interface,\n\t * which is very useful to deal with the lack of compatibility between\n\t * document.cookie and localStorage and sessionStorage.\n\t *\n\t * It also provides a memoryStorage fallback that stores the data in memory\n\t * when all of above mechanisms are not available.\n\t *\n\t * Author: David Rivera\n\t * Github: https://github.com/jherax\n\t * License: \"MIT\"\n\t *\n\t * You can fork this project on github:\n\t * https://github.com/jherax/proxy-storage.git\n\t */\n\n\tvar storage = null;\n\n\t/**\n\t * @public\n\t *\n\t * Get/Set the storage mechanism to use by default.\n\t *\n\t * @type {object}\n\t */\n\tvar configStorage = {\n\t get: function get() {\n\t return storage.__storage__;\n\t },\n\n\n\t /**\n\t * Sets the storage mechanism to use by default.\n\t *\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {void}\n\t */\n\t set: function set(storageType) {\n\t if (!_webStorage.proxy.hasOwnProperty(storageType)) {\n\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t }\n\t exports.default = storage = new _webStorage2.default(storageType);\n\t }\n\t};\n\n\t/**\n\t * @private\n\t *\n\t * Checks whether a storage mechanism is available.\n\t *\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {boolean}\n\t */\n\tfunction isStorageAvailable(storageType) {\n\t var storageObj = _webStorage.proxy[storageType];\n\t var data = '__proxy-storage__';\n\t try {\n\t storageObj.setItem(data, data);\n\t storageObj.removeItem(data);\n\t return true;\n\t } catch (e) {\n\t return false;\n\t }\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Sets the first or default storage available.\n\t *\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {boolean}\n\t */\n\tfunction storageAvailable(storageType) {\n\t if (_isAvailable.isAvailable[storageType]) {\n\t _webStorage.webStorageSettings.default = storageType;\n\t configStorage.set(storageType);\n\t }\n\t return _isAvailable.isAvailable[storageType];\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Initializes the module.\n\t *\n\t * @return {void}\n\t */\n\tfunction init() {\n\t _isAvailable.isAvailable.localStorage = isStorageAvailable('localStorage');\n\t _isAvailable.isAvailable.sessionStorage = isStorageAvailable('sessionStorage');\n\t _isAvailable.isAvailable.cookieStorage = isStorageAvailable('cookieStorage');\n\t _webStorage.webStorageSettings.isAvailable = _isAvailable.isAvailable;\n\t // sets the default storage mechanism available\n\t Object.keys(_isAvailable.isAvailable).some(storageAvailable);\n\t}\n\n\tinit();\n\n\t// @public API\n\texports.default = storage;\n\texports.WebStorage = _webStorage2.default;\n\texports.configStorage = configStorage;\n\texports.isAvailable = _isAvailable.isAvailable;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.proxy = exports.webStorageSettings = exports.default = undefined;\n\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\tvar _proxyMechanism = __webpack_require__(2);\n\n\tvar _utils = __webpack_require__(4);\n\n\tvar _isAvailable = __webpack_require__(6);\n\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\t/**\n\t * @private\n\t *\n\t * Keeps WebStorage instances by type as singletons.\n\t *\n\t * @type {object}\n\t */\n\tvar _instances = {};\n\n\t/**\n\t * @private\n\t *\n\t * Stores the interceptors for WebStorage methods.\n\t *\n\t * @type {object}\n\t */\n\tvar _interceptors = {\n\t setItem: [],\n\t getItem: [],\n\t removeItem: [],\n\t clear: []\n\t};\n\n\t/**\n\t * @private\n\t *\n\t * Executes the interceptors for a WebStorage method and\n\t * allows the transformation in chain of the value passed through.\n\t *\n\t * @param {string} command: name of the method to intercept\n\t * @return {any}\n\t */\n\tfunction executeInterceptors(command) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var key = args.shift();\n\t var value = args.shift();\n\t return _interceptors[command].reduce(function (val, action) {\n\t var transformed = action.apply(undefined, [key, val].concat(args));\n\t if (transformed === undefined) return val;\n\t return transformed;\n\t }, value);\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Copies all existing keys in the WebStorage instance.\n\t *\n\t * @param {WebStorage} instance: the instance to where copy the keys\n\t * @param {object} storage: the storage mechanism\n\t * @return {void}\n\t */\n\tfunction copyKeys(instance, storage) {\n\t Object.keys(storage).forEach(function (key) {\n\t var value = storage[key];\n\t try {\n\t instance[key] = JSON.parse(value);\n\t } catch (e) {\n\t instance[key] = value;\n\t }\n\t });\n\t}\n\n\t/**\n\t * @public\n\t *\n\t * Allows to validate if a storage mechanism is valid\n\t *\n\t * @type {object}\n\t */\n\tvar webStorageSettings = {\n\t default: null,\n\t isAvailable: _isAvailable.isAvailable\n\t};\n\n\t/**\n\t * @private\n\t *\n\t * Validates if the storage mechanism is available and can be used safely.\n\t *\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {string}\n\t */\n\tfunction storageAvailable(storageType) {\n\t if (webStorageSettings.isAvailable[storageType]) return storageType;\n\t console.warn(storageType + ' is not available. Falling back to ' + webStorageSettings.default); // eslint-disable-line\n\t return webStorageSettings.default;\n\t}\n\n\t/**\n\t * @public\n\t *\n\t * Implementation of the Web Storage interface.\n\t * It saves and retrieves values as JSON.\n\t *\n\t * @see\n\t * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n\t *\n\t * @type {class}\n\t */\n\n\tvar WebStorage = function () {\n\n\t /**\n\t * Creates an instance of WebStorage.\n\t *\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t *\n\t * @memberOf WebStorage\n\t */\n\t function WebStorage(storageType) {\n\t _classCallCheck(this, WebStorage);\n\n\t if (!_proxyMechanism.proxy.hasOwnProperty(storageType)) {\n\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t }\n\t // gets the requested storage mechanism\n\t var storage = _proxyMechanism.proxy[storageType];\n\t // if the storage is not available, sets the default\n\t storageType = storageAvailable(storageType);\n\t // keeps only one instance by storageType (singleton)\n\t var cachedInstance = _instances[storageType];\n\t if (cachedInstance) {\n\t copyKeys(cachedInstance, storage);\n\t return cachedInstance;\n\t }\n\t (0, _utils.setProperty)(this, '__storage__', storageType);\n\t // copies all existing keys in the storage mechanism\n\t copyKeys(this, storage);\n\t _instances[storageType] = this;\n\t }\n\n\t /**\n\t * Stores a value given a key name.\n\t *\n\t * @param {string} key: keyname of the storage\n\t * @param {any} value: data to save in the storage\n\t * @param {object} options: additional options for cookieStorage\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\n\t _createClass(WebStorage, [{\n\t key: 'setItem',\n\t value: function setItem(key, value, options) {\n\t (0, _utils.checkEmpty)(key);\n\t var v = executeInterceptors('setItem', key, value, options);\n\t if (v !== undefined) value = v;\n\t this[key] = value;\n\t value = JSON.stringify(value);\n\t _proxyMechanism.proxy[this.__storage__].setItem(key, value, options);\n\t }\n\n\t /**\n\t * Retrieves a value by its key name.\n\t *\n\t * @param {string} key: keyname of the storage\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }, {\n\t key: 'getItem',\n\t value: function getItem(key) {\n\t (0, _utils.checkEmpty)(key);\n\t var value = _proxyMechanism.proxy[this.__storage__].getItem(key);\n\t if (value === undefined) value = null;else value = JSON.parse(value);\n\t var v = executeInterceptors('getItem', key, value);\n\t if (v !== undefined) value = v;\n\t return value;\n\t }\n\n\t /**\n\t * Deletes a key from the storage.\n\t *\n\t * @param {string} key: keyname of the storage\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }, {\n\t key: 'removeItem',\n\t value: function removeItem(key) {\n\t (0, _utils.checkEmpty)(key);\n\t executeInterceptors('removeItem', key);\n\t delete this[key];\n\t _proxyMechanism.proxy[this.__storage__].removeItem(key);\n\t }\n\n\t /**\n\t * Removes all keys from the storage.\n\t *\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }, {\n\t key: 'clear',\n\t value: function clear() {\n\t var _this = this;\n\n\t executeInterceptors('clear');\n\t Object.keys(this).forEach(function (key) {\n\t delete _this[key];\n\t }, this);\n\t _proxyMechanism.proxy[this.__storage__].clear();\n\t }\n\n\t /**\n\t * Gets the number of data items stored in the Storage object.\n\t *\n\t * @readonly\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }, {\n\t key: 'length',\n\t get: function get() {\n\t return Object.keys(this).length;\n\t }\n\n\t /**\n\t * Adds an interceptor to a WebStorage method.\n\t *\n\t * @param {string} command: name of the API method to intercept\n\t * @param {function} action: callback executed when the API method is called\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }], [{\n\t key: 'interceptors',\n\t value: function interceptors(command, action) {\n\t if (command in _interceptors && typeof action === 'function') _interceptors[command].push(action);\n\t }\n\t }]);\n\n\t return WebStorage;\n\t}();\n\n\t// @public API\n\n\n\texports.default = WebStorage;\n\texports.webStorageSettings = webStorageSettings;\n\texports.proxy = _proxyMechanism.proxy;\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.proxy = undefined;\n\n\tvar _cookieStorage = __webpack_require__(3);\n\n\tvar _cookieStorage2 = _interopRequireDefault(_cookieStorage);\n\n\tvar _memoryStorage = __webpack_require__(5);\n\n\tvar _memoryStorage2 = _interopRequireDefault(_memoryStorage);\n\n\tvar _utils = __webpack_require__(4);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n\t/**\n\t * @private\n\t *\n\t * Adds the current elements in the storage object.\n\t *\n\t * @param {object} api: the storage mechanism to initialize\n\t * @return {object}\n\t */\n\tfunction initApi(api) {\n\t if (!api.initialize) return api;\n\t // sets read-only and non-enumerable properties\n\t for (var prop in api) {\n\t // eslint-disable-line\n\t if (prop !== 'initialize') (0, _utils.setProperty)(api, prop);\n\t }\n\t api.initialize();\n\t // this method is removed after being invoked\n\t // because is not part of the Web Storage interface\n\t delete api.initialize;\n\t return api;\n\t}\n\n\t/**\n\t * @public\n\t *\n\t * Proxy for storage mechanisms.\n\t * All members implement the Web Storage interface.\n\t *\n\t * @see\n\t * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n\t *\n\t * @type {object}\n\t */\n\tvar proxy = exports.proxy = {\n\t localStorage: window.localStorage,\n\t sessionStorage: window.sessionStorage,\n\t cookieStorage: initApi((0, _cookieStorage2.default)()),\n\t memoryStorage: initApi((0, _memoryStorage2.default)())\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = cookieStorage;\n\n\tvar _utils = __webpack_require__(4);\n\n\t/**\n\t * @private\n\t *\n\t * Proxy for the default cookie storage associated with the current document.\n\t *\n\t * @see\n\t * https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie\n\t *\n\t * @type {object}\n\t */\n\tvar $cookie = {\n\t get: function get() {\n\t return document.cookie;\n\t },\n\t set: function set(value) {\n\t document.cookie = value;\n\t }\n\t};\n\n\t/**\n\t * @private\n\t *\n\t * Builds the expiration part for the cookie.\n\t *\n\t * @see utils.setTimestamp(options)\n\t *\n\t * @param {Date|object} date: the expiration date\n\t * @return {string}\n\t */\n\t/* eslint-disable no-invalid-this */\n\tfunction buildExpirationString(date) {\n\t var expires = date instanceof Date ? (0, _utils.setTimestamp)({ date: date }) : (0, _utils.setTimestamp)(date);\n\t return '; expires=' + expires.toUTCString();\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Finds an element in the array.\n\t *\n\t * @param {string} cookie: key=value\n\t * @return {boolean}\n\t */\n\tfunction findCookie(cookie) {\n\t var nameEQ = this.toString();\n\t // prevent leading spaces before the key\n\t return cookie.trim().indexOf(nameEQ) === 0;\n\t}\n\n\t/**\n\t * @public\n\t *\n\t * Create, read, and delete elements from document cookies\n\t * and implements the Web Storage interface.\n\t *\n\t * @return {object}\n\t */\n\tfunction cookieStorage() {\n\t var api = {\n\t setItem: function setItem(key, value, options) {\n\t var expires = '',\n\t cookie = void 0;\n\t options = Object.assign({ path: '/' }, options);\n\t if ((0, _utils.isObject)(options.expires) || options.expires instanceof Date) {\n\t expires = buildExpirationString(options.expires);\n\t }\n\t cookie = key + '=' + encodeURIComponent(value) + expires + '; path=' + options.path;\n\t $cookie.set(cookie);\n\t },\n\t getItem: function getItem(key) {\n\t var value = null;\n\t var nameEQ = key + '=';\n\t var cookie = $cookie.get().split(';').find(findCookie, nameEQ);\n\t if (cookie) {\n\t // prevent leading spaces before the key name\n\t value = cookie.trim().substring(nameEQ.length, cookie.length);\n\t value = decodeURIComponent(value);\n\t }\n\t return value;\n\t },\n\t removeItem: function removeItem(key) {\n\t api.setItem(key, '', { expires: { days: -1 } });\n\t },\n\t clear: function clear() {\n\t var eq = '=';\n\t var indexEQ = void 0,\n\t key = void 0;\n\t $cookie.get().split(';').forEach(function (cookie) {\n\t indexEQ = cookie.indexOf(eq);\n\t if (indexEQ > -1) {\n\t key = cookie.substring(0, indexEQ);\n\t // prevent leading spaces before the key\n\t api.removeItem(key.trim());\n\t }\n\t });\n\t },\n\n\n\t // this method will be removed after being invoked\n\t // because is not part of the Web Storage interface\n\t initialize: function initialize() {\n\t $cookie.get().split(';').forEach(function (cookie) {\n\t var index = cookie.indexOf('=');\n\t var key = cookie.substring(0, index).trim();\n\t var value = cookie.substring(index + 1).trim();\n\t // copies all existing elements in the storage\n\t if (key) api[key] = decodeURIComponent(value);\n\t });\n\t }\n\t };\n\t return api;\n\t}\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.isObject = isObject;\n\texports.setTimestamp = setTimestamp;\n\texports.setProperty = setProperty;\n\texports.checkEmpty = checkEmpty;\n\t/**\n\t * Determines whether a value is a plain object.\n\t *\n\t * @param {any} value: the object to test\n\t * @return {boolean}\n\t */\n\tfunction isObject(value) {\n\t return Object.prototype.toString.call(value) === '[object Object]';\n\t}\n\n\t/**\n\t * Allows add or subtract timestamps to the current date or to a specific date.\n\t *\n\t * @param {object} options: It contains the timestamps to add or remove to the date, and have the following properties:\n\t * - {Date} date: if provided, the timestamps will affect this date, otherwise a new current date will be used.\n\t * - {number} hours: hours to add/subtract\n\t * - {number} days: days to add/subtract\n\t * - {number} months: months to add/subtract\n\t * - {number} years: years to add/subtract\n\t * @return {Date}\n\t */\n\tfunction setTimestamp() {\n\t var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t var opt = Object.assign({}, options);\n\t var d = opt.date instanceof Date ? opt.date : new Date();\n\t if (+opt.hours) d.setHours(d.getHours() + opt.hours);\n\t if (+opt.days) d.setDate(d.getDate() + opt.days);\n\t if (+opt.months) d.setMonth(d.getMonth() + opt.months);\n\t if (+opt.years) d.setFullYear(d.getFullYear() + opt.years);\n\t return d;\n\t}\n\n\t/**\n\t * Creates a non-enumerable read-only property.\n\t *\n\t * @param {object} obj: the object to add the property\n\t * @param {string} name: the name of the property\n\t * @param {any} value: the value of the property\n\t * @return {void}\n\t */\n\tfunction setProperty(obj, name, value) {\n\t var descriptor = {\n\t configurable: false,\n\t enumerable: false,\n\t writable: false\n\t };\n\t if (typeof value !== 'undefined') {\n\t descriptor.value = value;\n\t }\n\t Object.defineProperty(obj, name, descriptor);\n\t}\n\n\t/**\n\t * Validates if the key is not empty.\n\t * (null, undefined either empty string)\n\t *\n\t * @param {string} key: keyname of an element in the storage mechanism\n\t * @return {void}\n\t */\n\tfunction checkEmpty(key) {\n\t if (key == null || key === '') {\n\t throw new Error('The key provided can not be empty');\n\t }\n\t}\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _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\texports.default = memoryStorage;\n\t/**\n\t * @private\n\t *\n\t * Gets the hashtable-store from the current window.\n\t *\n\t * @return {object}\n\t */\n\tfunction getStoreFromWindow() {\n\t try {\n\t var store = JSON.parse(window.self.name);\n\t if (store && (typeof store === 'undefined' ? 'undefined' : _typeof(store)) === 'object') return store;\n\t } catch (e) {\n\t return {};\n\t }\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Saves the hashtable-store in the current window.\n\t *\n\t * @param {object} hashtable: {key,value} pairs stored in memoryStorage\n\t * @return {void}\n\t */\n\tfunction setStoreToWindow(hashtable) {\n\t var store = JSON.stringify(hashtable);\n\t window.self.name = store;\n\t}\n\n\t/**\n\t * @public\n\t *\n\t * Create, read, and delete elements from memory store and\n\t * implements the Web Storage interface. It also adds a hack\n\t * to persist the store in session for the current browser-tab.\n\t *\n\t * @return {object}\n\t */\n\tfunction memoryStorage() {\n\t var hashtable = getStoreFromWindow();\n\t var api = {\n\t setItem: function setItem(key, value) {\n\t hashtable[key] = value;\n\t setStoreToWindow(hashtable);\n\t },\n\t getItem: function getItem(key) {\n\t var value = hashtable[key];\n\t return value === undefined ? null : value;\n\t },\n\t removeItem: function removeItem(key) {\n\t delete hashtable[key];\n\t setStoreToWindow(hashtable);\n\t },\n\t clear: function clear() {\n\t Object.keys(hashtable).forEach(function (key) {\n\t return delete hashtable[key];\n\t });\n\t setStoreToWindow(hashtable);\n\t },\n\n\t // this method will be removed after being invoked\n\t // because is not part of the Web Storage interface\n\t initialize: function initialize() {\n\t // copies all existing elements in the storage\n\t Object.assign(api, hashtable);\n\t }\n\t };\n\t return api;\n\t}\n\n/***/ },\n/* 6 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t/**\n\t * @public\n\t *\n\t * Used to determine which storage mechanisms are available.\n\t *\n\t * @type {object}\n\t */\n\tvar isAvailable = exports.isAvailable = {\n\t localStorage: false,\n\t sessionStorage: false,\n\t cookieStorage: false,\n\t memoryStorage: true };\n\n/***/ }\n/******/ ])\n});\n;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./dist/proxy-storage.js\n// module id = 0\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///proxy-storage.min.js","webpack:///webpack/bootstrap 966879872bda9d0c39c0","webpack:///./dist/proxy-storage.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","isStorageAvailable","storageType","storageObj","_webStorage","proxy","data","setItem","removeItem","e","storageAvailable","_isAvailable","isAvailable","webStorageSettings","configStorage","set","init","localStorage","sessionStorage","cookieStorage","Object","keys","some","defineProperty","value","WebStorage","undefined","_webStorage2","storage","get","__storage__","hasOwnProperty","Error","_classCallCheck","instance","Constructor","TypeError","executeInterceptors","command","_len","arguments","length","args","Array","_key","key","shift","_interceptors","reduce","val","action","transformed","apply","concat","tryParse","parsed","JSON","parse","copyKeys","forEach","console","warn","_createClass","defineProperties","target","props","i","descriptor","enumerable","configurable","writable","protoProps","staticProps","prototype","_proxyMechanism","_utils","_instances","getItem","clear","cachedInstance","setProperty","options","checkEmpty","v","stringify","_this","push","initApi","api","initialize","prop","_cookieStorage","_cookieStorage2","_memoryStorage","_memoryStorage2","window","memoryStorage","buildExpirationString","date","expires","Date","setTimestamp","toUTCString","findCookie","cookie","nameEQ","toString","trim","indexOf","assign","path","isObject","encodeURIComponent","$cookie","split","find","substring","decodeURIComponent","days","eq","indexEQ","index","document","opt","d","hours","setHours","getHours","setDate","getDate","months","setMonth","getMonth","years","setFullYear","getFullYear","name","getStoreFromWindow","store","self","_typeof","setStoreToWindow","hashtable","Symbol","iterator","constructor"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,aAAAD,IAEAD,EAAA,aAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAASL,EAAQD,EAASM,IEtDhC,SAAAR,EAAAC,GAEAE,EAAAD,QAAAD,KAOCK,KAAA,WACD,gBAAAC,GAKA,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KAKA,SAAAL,EAAAD,EAAAM,GAEA,YAaA,SAAAS,GAAAC,GAAuC,MAAAA,MAAAC,WAAAD,GAAuCE,QAAAF,GAiE9E,QAAAG,GAAAC,GACA,GAAAC,GAAAC,EAAAC,MAAAH,GACAI,EAAA,mBACA,KAGA,MAFAH,GAAAI,QAA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MAAA,WACA1D,OAAAC,KAAAyH,GAAAnF,QAAA,SAAAd,GACA,aAAAiG,GAAAjG,KAEAgG,EAAAC,IAKArD,WAAA,WAEArE,OAAAyF,OAAArB,EAAAsD,IAGA,OAAAtD,GA1EApE,OAAAG,eAAAzC,EAAA,cACA0C,OAAA,GAGA,IAAAoH,GAAA,kBAAAG,SAAA,gBAAAA,QAAAC,SAAA,SAAAlJ,GAAqG,aAAAA,IAAqB,SAAAA,GAAmB,MAAAA,IAAA,kBAAAiJ,SAAAjJ,EAAAmJ,cAAAF,QAAAjJ,IAAAiJ,OAAAtE,UAAA,eAAA3E,GAE7IhB,GAAAkB,QAAAgG,GAyEA,SAAAjH,EAAAD,GAEA,YAEAsC,QAAAG,eAAAzC,EAAA,cACA0C,OAAA,GASA1C,GAAA8B,aACAK,cAAA,EACAC,gBAAA,EACAC,eAAA,EACA6E,eAAA","file":"proxy-storage.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"proxyStorage\"] = factory();\n\telse\n\t\troot[\"proxyStorage\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"proxyStorage\"] = factory();\n\telse\n\t\troot[\"proxyStorage\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t(function webpackUniversalModuleDefinition(root, factory) {\n\t\tif(true)\n\t\t\tmodule.exports = factory();\n\t\telse if(typeof define === 'function' && define.amd)\n\t\t\tdefine([], factory);\n\t\telse if(typeof exports === 'object')\n\t\t\texports[\"proxyStorage\"] = factory();\n\t\telse\n\t\t\troot[\"proxyStorage\"] = factory();\n\t})(this, function() {\n\treturn /******/ (function(modules) { // webpackBootstrap\n\t/******/ \t// The module cache\n\t/******/ \tvar installedModules = {};\n\t\n\t/******/ \t// The require function\n\t/******/ \tfunction __webpack_require__(moduleId) {\n\t\n\t/******/ \t\t// Check if module is in cache\n\t/******/ \t\tif(installedModules[moduleId])\n\t/******/ \t\t\treturn installedModules[moduleId].exports;\n\t\n\t/******/ \t\t// Create a new module (and put it into the cache)\n\t/******/ \t\tvar module = installedModules[moduleId] = {\n\t/******/ \t\t\texports: {},\n\t/******/ \t\t\tid: moduleId,\n\t/******/ \t\t\tloaded: false\n\t/******/ \t\t};\n\t\n\t/******/ \t\t// Execute the module function\n\t/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\n\t/******/ \t\t// Flag the module as loaded\n\t/******/ \t\tmodule.loaded = true;\n\t\n\t/******/ \t\t// Return the exports of the module\n\t/******/ \t\treturn module.exports;\n\t/******/ \t}\n\t\n\t\n\t/******/ \t// expose the modules object (__webpack_modules__)\n\t/******/ \t__webpack_require__.m = modules;\n\t\n\t/******/ \t// expose the module cache\n\t/******/ \t__webpack_require__.c = installedModules;\n\t\n\t/******/ \t// __webpack_public_path__\n\t/******/ \t__webpack_require__.p = \"\";\n\t\n\t/******/ \t// Load entry module and return exports\n\t/******/ \treturn __webpack_require__(0);\n\t/******/ })\n\t/************************************************************************/\n\t/******/ ([\n\t/* 0 */\n\t/***/ function(module, exports, __webpack_require__) {\n\t\n\t\t'use strict';\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\texports.isAvailable = exports.configStorage = exports.WebStorage = exports.default = undefined;\n\t\n\t\tvar _webStorage = __webpack_require__(1);\n\t\n\t\tvar _webStorage2 = _interopRequireDefault(_webStorage);\n\t\n\t\tvar _isAvailable = __webpack_require__(6);\n\t\n\t\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\t\t// If you want to support all ES6 features, uncomment the next line\n\t\t// import 'babel-polyfill';\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Current storage mechanism.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\t/**\n\t\t * This library uses an adapter that implements the Web Storage interface,\n\t\t * which is very useful to deal with the lack of compatibility between\n\t\t * document.cookie and localStorage and sessionStorage.\n\t\t *\n\t\t * It also provides a memoryStorage fallback that stores the data in memory\n\t\t * when all of above mechanisms are not available.\n\t\t *\n\t\t * Author: David Rivera\n\t\t * Github: https://github.com/jherax\n\t\t * License: \"MIT\"\n\t\t *\n\t\t * You can fork this project on github:\n\t\t * https://github.com/jherax/proxy-storage.git\n\t\t */\n\t\n\t\tvar storage = null;\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Get/Set the storage mechanism to use by default.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar configStorage = {\n\t\t get: function get() {\n\t\t return storage.__storage__;\n\t\t },\n\t\n\t\n\t\t /**\n\t\t * Sets the storage mechanism to use by default.\n\t\t *\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t * @return {void}\n\t\t */\n\t\t set: function set(storageType) {\n\t\t if (!_webStorage.proxy.hasOwnProperty(storageType)) {\n\t\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t\t }\n\t\t exports.default = storage = new _webStorage2.default(storageType);\n\t\t }\n\t\t};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Checks whether a storage mechanism is available.\n\t\t *\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction isStorageAvailable(storageType) {\n\t\t var storageObj = _webStorage.proxy[storageType];\n\t\t var data = '__proxy-storage__';\n\t\t try {\n\t\t storageObj.setItem(data, data);\n\t\t storageObj.removeItem(data);\n\t\t return true;\n\t\t } catch (e) {\n\t\t return false;\n\t\t }\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Sets the first or default storage available.\n\t\t *\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction storageAvailable(storageType) {\n\t\t if (_isAvailable.isAvailable[storageType]) {\n\t\t _webStorage.webStorageSettings.default = storageType;\n\t\t configStorage.set(storageType);\n\t\t }\n\t\t return _isAvailable.isAvailable[storageType];\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Initializes the module.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tfunction init() {\n\t\t _isAvailable.isAvailable.localStorage = isStorageAvailable('localStorage');\n\t\t _isAvailable.isAvailable.sessionStorage = isStorageAvailable('sessionStorage');\n\t\t _isAvailable.isAvailable.cookieStorage = isStorageAvailable('cookieStorage');\n\t\t _webStorage.webStorageSettings.isAvailable = _isAvailable.isAvailable;\n\t\t // sets the default storage mechanism available\n\t\t Object.keys(_isAvailable.isAvailable).some(storageAvailable);\n\t\t}\n\t\n\t\tinit();\n\t\n\t\t// @public API\n\t\texports.default = storage;\n\t\texports.WebStorage = _webStorage2.default;\n\t\texports.configStorage = configStorage;\n\t\texports.isAvailable = _isAvailable.isAvailable;\n\t\n\t/***/ },\n\t/* 1 */\n\t/***/ function(module, exports, __webpack_require__) {\n\t\n\t\t'use strict';\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\texports.proxy = exports.webStorageSettings = exports.default = undefined;\n\t\n\t\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\t\tvar _proxyMechanism = __webpack_require__(2);\n\t\n\t\tvar _utils = __webpack_require__(4);\n\t\n\t\tvar _isAvailable = __webpack_require__(6);\n\t\n\t\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Keeps WebStorage instances by type as singletons.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar _instances = {};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Stores the interceptors for WebStorage methods.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar _interceptors = {\n\t\t setItem: [],\n\t\t getItem: [],\n\t\t removeItem: [],\n\t\t clear: []\n\t\t};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Executes the interceptors for a WebStorage method and\n\t\t * allows the transformation in chain of the value passed through.\n\t\t *\n\t\t * @param {string} command: name of the method to intercept\n\t\t * @return {any}\n\t\t */\n\t\tfunction executeInterceptors(command) {\n\t\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t\t args[_key - 1] = arguments[_key];\n\t\t }\n\t\n\t\t var key = args.shift();\n\t\t var value = args.shift();\n\t\t return _interceptors[command].reduce(function (val, action) {\n\t\t var transformed = action.apply(undefined, [key, val].concat(args));\n\t\t if (transformed === undefined) return val;\n\t\t return transformed;\n\t\t }, value);\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Try to parse a value\n\t\t *\n\t\t * @param {string} value: the value to parse\n\t\t * @return {any}\n\t\t */\n\t\tfunction tryParse(value) {\n\t\t var parsed = void 0;\n\t\t try {\n\t\t parsed = JSON.parse(value);\n\t\t } catch (e) {\n\t\t parsed = value;\n\t\t }\n\t\t return parsed;\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Copies all existing keys in the WebStorage instance.\n\t\t *\n\t\t * @param {WebStorage} instance: the instance to where copy the keys\n\t\t * @param {object} storage: the storage mechanism\n\t\t * @return {void}\n\t\t */\n\t\tfunction copyKeys(instance, storage) {\n\t\t Object.keys(storage).forEach(function (key) {\n\t\t instance[key] = tryParse(storage[key]);\n\t\t });\n\t\t}\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Allows to validate if a storage mechanism is valid\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar webStorageSettings = {\n\t\t default: null,\n\t\t isAvailable: _isAvailable.isAvailable\n\t\t};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Validates if the storage mechanism is available and can be used safely.\n\t\t *\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t * @return {string}\n\t\t */\n\t\tfunction storageAvailable(storageType) {\n\t\t if (webStorageSettings.isAvailable[storageType]) return storageType;\n\t\t console.warn(storageType + ' is not available. Falling back to ' + webStorageSettings.default); // eslint-disable-line\n\t\t return webStorageSettings.default;\n\t\t}\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Implementation of the Web Storage interface.\n\t\t * It saves and retrieves values as JSON.\n\t\t *\n\t\t * @see\n\t\t * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n\t\t *\n\t\t * @type {class}\n\t\t */\n\t\n\t\tvar WebStorage = function () {\n\t\n\t\t /**\n\t\t * Creates an instance of WebStorage.\n\t\t *\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\t function WebStorage(storageType) {\n\t\t _classCallCheck(this, WebStorage);\n\t\n\t\t if (!_proxyMechanism.proxy.hasOwnProperty(storageType)) {\n\t\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t\t }\n\t\t // gets the requested storage mechanism\n\t\t var storage = _proxyMechanism.proxy[storageType];\n\t\t // if the storage is not available, sets the default\n\t\t storageType = storageAvailable(storageType);\n\t\t // keeps only one instance by storageType (singleton)\n\t\t var cachedInstance = _instances[storageType];\n\t\t if (cachedInstance) {\n\t\t copyKeys(cachedInstance, storage);\n\t\t return cachedInstance;\n\t\t }\n\t\t (0, _utils.setProperty)(this, '__storage__', storageType);\n\t\t // copies all existing keys in the storage mechanism\n\t\t copyKeys(this, storage);\n\t\t _instances[storageType] = this;\n\t\t }\n\t\n\t\t /**\n\t\t * Stores a value given a key name.\n\t\t *\n\t\t * @param {string} key: keyname of the storage\n\t\t * @param {any} value: data to save in the storage\n\t\t * @param {object} options: additional options for cookieStorage\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\n\t\t _createClass(WebStorage, [{\n\t\t key: 'setItem',\n\t\t value: function setItem(key, value, options) {\n\t\t (0, _utils.checkEmpty)(key);\n\t\t var v = executeInterceptors('setItem', key, value, options);\n\t\t if (v !== undefined) value = v;\n\t\t this[key] = value;\n\t\t value = JSON.stringify(value);\n\t\t _proxyMechanism.proxy[this.__storage__].setItem(key, value, options);\n\t\t }\n\t\n\t\t /**\n\t\t * Retrieves a value by its key name.\n\t\t *\n\t\t * @param {string} key: keyname of the storage\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }, {\n\t\t key: 'getItem',\n\t\t value: function getItem(key) {\n\t\t (0, _utils.checkEmpty)(key);\n\t\t var value = _proxyMechanism.proxy[this.__storage__].getItem(key);\n\t\t if (value === undefined) {\n\t\t delete this[key];\n\t\t value = null;\n\t\t } else {\n\t\t value = tryParse(value);\n\t\t this[key] = value;\n\t\t }\n\t\t var v = executeInterceptors('getItem', key, value);\n\t\t if (v !== undefined) value = v;\n\t\t return value;\n\t\t }\n\t\n\t\t /**\n\t\t * Deletes a key from the storage.\n\t\t *\n\t\t * @param {string} key: keyname of the storage\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }, {\n\t\t key: 'removeItem',\n\t\t value: function removeItem(key) {\n\t\t (0, _utils.checkEmpty)(key);\n\t\t executeInterceptors('removeItem', key);\n\t\t delete this[key];\n\t\t _proxyMechanism.proxy[this.__storage__].removeItem(key);\n\t\t }\n\t\n\t\t /**\n\t\t * Removes all keys from the storage.\n\t\t *\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }, {\n\t\t key: 'clear',\n\t\t value: function clear() {\n\t\t var _this = this;\n\t\n\t\t executeInterceptors('clear');\n\t\t Object.keys(this).forEach(function (key) {\n\t\t delete _this[key];\n\t\t }, this);\n\t\t _proxyMechanism.proxy[this.__storage__].clear();\n\t\t }\n\t\n\t\t /**\n\t\t * Gets the number of data items stored in the Storage object.\n\t\t *\n\t\t * @readonly\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }, {\n\t\t key: 'length',\n\t\t get: function get() {\n\t\t return Object.keys(this).length;\n\t\t }\n\t\n\t\t /**\n\t\t * Adds an interceptor to a WebStorage method.\n\t\t *\n\t\t * @param {string} command: name of the API method to intercept\n\t\t * @param {function} action: callback executed when the API method is called\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }], [{\n\t\t key: 'interceptors',\n\t\t value: function interceptors(command, action) {\n\t\t if (command in _interceptors && typeof action === 'function') _interceptors[command].push(action);\n\t\t }\n\t\t }]);\n\t\n\t\t return WebStorage;\n\t\t}();\n\t\n\t\t// @public API\n\t\n\t\n\t\texports.default = WebStorage;\n\t\texports.webStorageSettings = webStorageSettings;\n\t\texports.proxy = _proxyMechanism.proxy;\n\t\n\t/***/ },\n\t/* 2 */\n\t/***/ function(module, exports, __webpack_require__) {\n\t\n\t\t'use strict';\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\texports.proxy = undefined;\n\t\n\t\tvar _cookieStorage = __webpack_require__(3);\n\t\n\t\tvar _cookieStorage2 = _interopRequireDefault(_cookieStorage);\n\t\n\t\tvar _memoryStorage = __webpack_require__(5);\n\t\n\t\tvar _memoryStorage2 = _interopRequireDefault(_memoryStorage);\n\t\n\t\tvar _utils = __webpack_require__(4);\n\t\n\t\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Adds the current elements in the storage object.\n\t\t *\n\t\t * @param {object} api: the storage mechanism to initialize\n\t\t * @return {object}\n\t\t */\n\t\tfunction initApi(api) {\n\t\t if (!api.initialize) return api;\n\t\t // sets read-only and non-enumerable properties\n\t\t for (var prop in api) {\n\t\t // eslint-disable-line\n\t\t if (prop !== 'initialize') (0, _utils.setProperty)(api, prop);\n\t\t }\n\t\t api.initialize();\n\t\t // this method is removed after being invoked\n\t\t // because is not part of the Web Storage interface\n\t\t delete api.initialize;\n\t\t return api;\n\t\t}\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Proxy for storage mechanisms.\n\t\t * All members implement the Web Storage interface.\n\t\t *\n\t\t * @see\n\t\t * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar proxy = exports.proxy = {\n\t\t localStorage: window.localStorage,\n\t\t sessionStorage: window.sessionStorage,\n\t\t cookieStorage: initApi((0, _cookieStorage2.default)()),\n\t\t memoryStorage: initApi((0, _memoryStorage2.default)())\n\t\t};\n\t\n\t/***/ },\n\t/* 3 */\n\t/***/ function(module, exports, __webpack_require__) {\n\t\n\t\t'use strict';\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\texports.default = cookieStorage;\n\t\n\t\tvar _utils = __webpack_require__(4);\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Proxy for the default cookie storage associated with the current document.\n\t\t *\n\t\t * @see\n\t\t * https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar $cookie = {\n\t\t get: function get() {\n\t\t return document.cookie;\n\t\t },\n\t\t set: function set(value) {\n\t\t document.cookie = value;\n\t\t }\n\t\t};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Builds the expiration part for the cookie.\n\t\t *\n\t\t * @see utils.setTimestamp(options)\n\t\t *\n\t\t * @param {Date|object} date: the expiration date\n\t\t * @return {string}\n\t\t */\n\t\t/* eslint-disable no-invalid-this */\n\t\tfunction buildExpirationString(date) {\n\t\t var expires = date instanceof Date ? (0, _utils.setTimestamp)({ date: date }) : (0, _utils.setTimestamp)(date);\n\t\t return '; expires=' + expires.toUTCString();\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Finds an element in the array.\n\t\t *\n\t\t * @param {string} cookie: key=value\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction findCookie(cookie) {\n\t\t var nameEQ = this.toString();\n\t\t // prevent leading spaces before the key\n\t\t return cookie.trim().indexOf(nameEQ) === 0;\n\t\t}\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Create, read, and delete elements from document cookies\n\t\t * and implements the Web Storage interface.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tfunction cookieStorage() {\n\t\t var api = {\n\t\t setItem: function setItem(key, value, options) {\n\t\t var expires = '',\n\t\t cookie = void 0;\n\t\t options = Object.assign({ path: '/' }, options);\n\t\t if ((0, _utils.isObject)(options.expires) || options.expires instanceof Date) {\n\t\t expires = buildExpirationString(options.expires);\n\t\t }\n\t\t cookie = key + '=' + encodeURIComponent(value) + expires + '; path=' + options.path;\n\t\t $cookie.set(cookie);\n\t\t },\n\t\t getItem: function getItem(key) {\n\t\t var value = null;\n\t\t var nameEQ = key + '=';\n\t\t var cookie = $cookie.get().split(';').find(findCookie, nameEQ);\n\t\t if (cookie) {\n\t\t // prevent leading spaces before the key name\n\t\t value = cookie.trim().substring(nameEQ.length, cookie.length);\n\t\t value = decodeURIComponent(value);\n\t\t }\n\t\t return value;\n\t\t },\n\t\t removeItem: function removeItem(key) {\n\t\t api.setItem(key, '', { expires: { days: -1 } });\n\t\t },\n\t\t clear: function clear() {\n\t\t var eq = '=';\n\t\t var indexEQ = void 0,\n\t\t key = void 0;\n\t\t $cookie.get().split(';').forEach(function (cookie) {\n\t\t indexEQ = cookie.indexOf(eq);\n\t\t if (indexEQ > -1) {\n\t\t key = cookie.substring(0, indexEQ);\n\t\t // prevent leading spaces before the key\n\t\t api.removeItem(key.trim());\n\t\t }\n\t\t });\n\t\t },\n\t\n\t\n\t\t // this method will be removed after being invoked\n\t\t // because is not part of the Web Storage interface\n\t\t initialize: function initialize() {\n\t\t $cookie.get().split(';').forEach(function (cookie) {\n\t\t var index = cookie.indexOf('=');\n\t\t var key = cookie.substring(0, index).trim();\n\t\t var value = cookie.substring(index + 1).trim();\n\t\t // copies all existing elements in the storage\n\t\t if (key) api[key] = decodeURIComponent(value);\n\t\t });\n\t\t }\n\t\t };\n\t\t return api;\n\t\t}\n\t\n\t/***/ },\n\t/* 4 */\n\t/***/ function(module, exports) {\n\t\n\t\t'use strict';\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\texports.isObject = isObject;\n\t\texports.setTimestamp = setTimestamp;\n\t\texports.setProperty = setProperty;\n\t\texports.checkEmpty = checkEmpty;\n\t\t/**\n\t\t * Determines whether a value is a plain object.\n\t\t *\n\t\t * @param {any} value: the object to test\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction isObject(value) {\n\t\t return Object.prototype.toString.call(value) === '[object Object]';\n\t\t}\n\t\n\t\t/**\n\t\t * Allows add or subtract timestamps to the current date or to a specific date.\n\t\t *\n\t\t * @param {object} options: It contains the timestamps to add or remove to the date, and have the following properties:\n\t\t * - {Date} date: if provided, the timestamps will affect this date, otherwise a new current date will be used.\n\t\t * - {number} hours: hours to add/subtract\n\t\t * - {number} days: days to add/subtract\n\t\t * - {number} months: months to add/subtract\n\t\t * - {number} years: years to add/subtract\n\t\t * @return {Date}\n\t\t */\n\t\tfunction setTimestamp() {\n\t\t var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t\n\t\t var opt = Object.assign({}, options);\n\t\t var d = opt.date instanceof Date ? opt.date : new Date();\n\t\t if (+opt.hours) d.setHours(d.getHours() + opt.hours);\n\t\t if (+opt.days) d.setDate(d.getDate() + opt.days);\n\t\t if (+opt.months) d.setMonth(d.getMonth() + opt.months);\n\t\t if (+opt.years) d.setFullYear(d.getFullYear() + opt.years);\n\t\t return d;\n\t\t}\n\t\n\t\t/**\n\t\t * Creates a non-enumerable read-only property.\n\t\t *\n\t\t * @param {object} obj: the object to add the property\n\t\t * @param {string} name: the name of the property\n\t\t * @param {any} value: the value of the property\n\t\t * @return {void}\n\t\t */\n\t\tfunction setProperty(obj, name, value) {\n\t\t var descriptor = {\n\t\t configurable: false,\n\t\t enumerable: false,\n\t\t writable: false\n\t\t };\n\t\t if (typeof value !== 'undefined') {\n\t\t descriptor.value = value;\n\t\t }\n\t\t Object.defineProperty(obj, name, descriptor);\n\t\t}\n\t\n\t\t/**\n\t\t * Validates if the key is not empty.\n\t\t * (null, undefined either empty string)\n\t\t *\n\t\t * @param {string} key: keyname of an element in the storage mechanism\n\t\t * @return {void}\n\t\t */\n\t\tfunction checkEmpty(key) {\n\t\t if (key == null || key === '') {\n\t\t throw new Error('The key provided can not be empty');\n\t\t }\n\t\t}\n\t\n\t/***/ },\n\t/* 5 */\n\t/***/ function(module, exports) {\n\t\n\t\t'use strict';\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\n\t\tvar _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\t\n\t\texports.default = memoryStorage;\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Gets the hashtable-store from the current window.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tfunction getStoreFromWindow() {\n\t\t try {\n\t\t var store = JSON.parse(window.self.name);\n\t\t if (store && (typeof store === 'undefined' ? 'undefined' : _typeof(store)) === 'object') return store;\n\t\t } catch (e) {\n\t\t return {};\n\t\t }\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Saves the hashtable-store in the current window.\n\t\t *\n\t\t * @param {object} hashtable: {key,value} pairs stored in memoryStorage\n\t\t * @return {void}\n\t\t */\n\t\tfunction setStoreToWindow(hashtable) {\n\t\t var store = JSON.stringify(hashtable);\n\t\t window.self.name = store;\n\t\t}\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Create, read, and delete elements from memory store and\n\t\t * implements the Web Storage interface. It also adds a hack\n\t\t * to persist the store in session for the current browser-tab.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tfunction memoryStorage() {\n\t\t var hashtable = getStoreFromWindow();\n\t\t var api = {\n\t\t setItem: function setItem(key, value) {\n\t\t hashtable[key] = value;\n\t\t setStoreToWindow(hashtable);\n\t\t },\n\t\t getItem: function getItem(key) {\n\t\t var value = hashtable[key];\n\t\t return value === undefined ? null : value;\n\t\t },\n\t\t removeItem: function removeItem(key) {\n\t\t delete hashtable[key];\n\t\t setStoreToWindow(hashtable);\n\t\t },\n\t\t clear: function clear() {\n\t\t Object.keys(hashtable).forEach(function (key) {\n\t\t return delete hashtable[key];\n\t\t });\n\t\t setStoreToWindow(hashtable);\n\t\t },\n\t\n\t\t // this method will be removed after being invoked\n\t\t // because is not part of the Web Storage interface\n\t\t initialize: function initialize() {\n\t\t // copies all existing elements in the storage\n\t\t Object.assign(api, hashtable);\n\t\t }\n\t\t };\n\t\t return api;\n\t\t}\n\t\n\t/***/ },\n\t/* 6 */\n\t/***/ function(module, exports) {\n\t\n\t\t\"use strict\";\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Used to determine which storage mechanisms are available.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar isAvailable = exports.isAvailable = {\n\t\t localStorage: false,\n\t\t sessionStorage: false,\n\t\t cookieStorage: false,\n\t\t memoryStorage: true };\n\t\n\t/***/ }\n\t/******/ ])\n\t});\n\t;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// proxy-storage.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 966879872bda9d0c39c0","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"proxyStorage\"] = factory();\n\telse\n\t\troot[\"proxyStorage\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.isAvailable = exports.configStorage = exports.WebStorage = exports.default = undefined;\n\n\tvar _webStorage = __webpack_require__(1);\n\n\tvar _webStorage2 = _interopRequireDefault(_webStorage);\n\n\tvar _isAvailable = __webpack_require__(6);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n\t// If you want to support all ES6 features, uncomment the next line\n\t// import 'babel-polyfill';\n\n\t/**\n\t * @public\n\t *\n\t * Current storage mechanism.\n\t *\n\t * @type {object}\n\t */\n\t/**\n\t * This library uses an adapter that implements the Web Storage interface,\n\t * which is very useful to deal with the lack of compatibility between\n\t * document.cookie and localStorage and sessionStorage.\n\t *\n\t * It also provides a memoryStorage fallback that stores the data in memory\n\t * when all of above mechanisms are not available.\n\t *\n\t * Author: David Rivera\n\t * Github: https://github.com/jherax\n\t * License: \"MIT\"\n\t *\n\t * You can fork this project on github:\n\t * https://github.com/jherax/proxy-storage.git\n\t */\n\n\tvar storage = null;\n\n\t/**\n\t * @public\n\t *\n\t * Get/Set the storage mechanism to use by default.\n\t *\n\t * @type {object}\n\t */\n\tvar configStorage = {\n\t get: function get() {\n\t return storage.__storage__;\n\t },\n\n\n\t /**\n\t * Sets the storage mechanism to use by default.\n\t *\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {void}\n\t */\n\t set: function set(storageType) {\n\t if (!_webStorage.proxy.hasOwnProperty(storageType)) {\n\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t }\n\t exports.default = storage = new _webStorage2.default(storageType);\n\t }\n\t};\n\n\t/**\n\t * @private\n\t *\n\t * Checks whether a storage mechanism is available.\n\t *\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {boolean}\n\t */\n\tfunction isStorageAvailable(storageType) {\n\t var storageObj = _webStorage.proxy[storageType];\n\t var data = '__proxy-storage__';\n\t try {\n\t storageObj.setItem(data, data);\n\t storageObj.removeItem(data);\n\t return true;\n\t } catch (e) {\n\t return false;\n\t }\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Sets the first or default storage available.\n\t *\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {boolean}\n\t */\n\tfunction storageAvailable(storageType) {\n\t if (_isAvailable.isAvailable[storageType]) {\n\t _webStorage.webStorageSettings.default = storageType;\n\t configStorage.set(storageType);\n\t }\n\t return _isAvailable.isAvailable[storageType];\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Initializes the module.\n\t *\n\t * @return {void}\n\t */\n\tfunction init() {\n\t _isAvailable.isAvailable.localStorage = isStorageAvailable('localStorage');\n\t _isAvailable.isAvailable.sessionStorage = isStorageAvailable('sessionStorage');\n\t _isAvailable.isAvailable.cookieStorage = isStorageAvailable('cookieStorage');\n\t _webStorage.webStorageSettings.isAvailable = _isAvailable.isAvailable;\n\t // sets the default storage mechanism available\n\t Object.keys(_isAvailable.isAvailable).some(storageAvailable);\n\t}\n\n\tinit();\n\n\t// @public API\n\texports.default = storage;\n\texports.WebStorage = _webStorage2.default;\n\texports.configStorage = configStorage;\n\texports.isAvailable = _isAvailable.isAvailable;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.proxy = exports.webStorageSettings = exports.default = undefined;\n\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\tvar _proxyMechanism = __webpack_require__(2);\n\n\tvar _utils = __webpack_require__(4);\n\n\tvar _isAvailable = __webpack_require__(6);\n\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\t/**\n\t * @private\n\t *\n\t * Keeps WebStorage instances by type as singletons.\n\t *\n\t * @type {object}\n\t */\n\tvar _instances = {};\n\n\t/**\n\t * @private\n\t *\n\t * Stores the interceptors for WebStorage methods.\n\t *\n\t * @type {object}\n\t */\n\tvar _interceptors = {\n\t setItem: [],\n\t getItem: [],\n\t removeItem: [],\n\t clear: []\n\t};\n\n\t/**\n\t * @private\n\t *\n\t * Executes the interceptors for a WebStorage method and\n\t * allows the transformation in chain of the value passed through.\n\t *\n\t * @param {string} command: name of the method to intercept\n\t * @return {any}\n\t */\n\tfunction executeInterceptors(command) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var key = args.shift();\n\t var value = args.shift();\n\t return _interceptors[command].reduce(function (val, action) {\n\t var transformed = action.apply(undefined, [key, val].concat(args));\n\t if (transformed === undefined) return val;\n\t return transformed;\n\t }, value);\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Try to parse a value\n\t *\n\t * @param {string} value: the value to parse\n\t * @return {any}\n\t */\n\tfunction tryParse(value) {\n\t var parsed = void 0;\n\t try {\n\t parsed = JSON.parse(value);\n\t } catch (e) {\n\t parsed = value;\n\t }\n\t return parsed;\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Copies all existing keys in the WebStorage instance.\n\t *\n\t * @param {WebStorage} instance: the instance to where copy the keys\n\t * @param {object} storage: the storage mechanism\n\t * @return {void}\n\t */\n\tfunction copyKeys(instance, storage) {\n\t Object.keys(storage).forEach(function (key) {\n\t instance[key] = tryParse(storage[key]);\n\t });\n\t}\n\n\t/**\n\t * @public\n\t *\n\t * Allows to validate if a storage mechanism is valid\n\t *\n\t * @type {object}\n\t */\n\tvar webStorageSettings = {\n\t default: null,\n\t isAvailable: _isAvailable.isAvailable\n\t};\n\n\t/**\n\t * @private\n\t *\n\t * Validates if the storage mechanism is available and can be used safely.\n\t *\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {string}\n\t */\n\tfunction storageAvailable(storageType) {\n\t if (webStorageSettings.isAvailable[storageType]) return storageType;\n\t console.warn(storageType + ' is not available. Falling back to ' + webStorageSettings.default); // eslint-disable-line\n\t return webStorageSettings.default;\n\t}\n\n\t/**\n\t * @public\n\t *\n\t * Implementation of the Web Storage interface.\n\t * It saves and retrieves values as JSON.\n\t *\n\t * @see\n\t * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n\t *\n\t * @type {class}\n\t */\n\n\tvar WebStorage = function () {\n\n\t /**\n\t * Creates an instance of WebStorage.\n\t *\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t *\n\t * @memberOf WebStorage\n\t */\n\t function WebStorage(storageType) {\n\t _classCallCheck(this, WebStorage);\n\n\t if (!_proxyMechanism.proxy.hasOwnProperty(storageType)) {\n\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t }\n\t // gets the requested storage mechanism\n\t var storage = _proxyMechanism.proxy[storageType];\n\t // if the storage is not available, sets the default\n\t storageType = storageAvailable(storageType);\n\t // keeps only one instance by storageType (singleton)\n\t var cachedInstance = _instances[storageType];\n\t if (cachedInstance) {\n\t copyKeys(cachedInstance, storage);\n\t return cachedInstance;\n\t }\n\t (0, _utils.setProperty)(this, '__storage__', storageType);\n\t // copies all existing keys in the storage mechanism\n\t copyKeys(this, storage);\n\t _instances[storageType] = this;\n\t }\n\n\t /**\n\t * Stores a value given a key name.\n\t *\n\t * @param {string} key: keyname of the storage\n\t * @param {any} value: data to save in the storage\n\t * @param {object} options: additional options for cookieStorage\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\n\t _createClass(WebStorage, [{\n\t key: 'setItem',\n\t value: function setItem(key, value, options) {\n\t (0, _utils.checkEmpty)(key);\n\t var v = executeInterceptors('setItem', key, value, options);\n\t if (v !== undefined) value = v;\n\t this[key] = value;\n\t value = JSON.stringify(value);\n\t _proxyMechanism.proxy[this.__storage__].setItem(key, value, options);\n\t }\n\n\t /**\n\t * Retrieves a value by its key name.\n\t *\n\t * @param {string} key: keyname of the storage\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }, {\n\t key: 'getItem',\n\t value: function getItem(key) {\n\t (0, _utils.checkEmpty)(key);\n\t var value = _proxyMechanism.proxy[this.__storage__].getItem(key);\n\t if (value === undefined) {\n\t delete this[key];\n\t value = null;\n\t } else {\n\t value = tryParse(value);\n\t this[key] = value;\n\t }\n\t var v = executeInterceptors('getItem', key, value);\n\t if (v !== undefined) value = v;\n\t return value;\n\t }\n\n\t /**\n\t * Deletes a key from the storage.\n\t *\n\t * @param {string} key: keyname of the storage\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }, {\n\t key: 'removeItem',\n\t value: function removeItem(key) {\n\t (0, _utils.checkEmpty)(key);\n\t executeInterceptors('removeItem', key);\n\t delete this[key];\n\t _proxyMechanism.proxy[this.__storage__].removeItem(key);\n\t }\n\n\t /**\n\t * Removes all keys from the storage.\n\t *\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }, {\n\t key: 'clear',\n\t value: function clear() {\n\t var _this = this;\n\n\t executeInterceptors('clear');\n\t Object.keys(this).forEach(function (key) {\n\t delete _this[key];\n\t }, this);\n\t _proxyMechanism.proxy[this.__storage__].clear();\n\t }\n\n\t /**\n\t * Gets the number of data items stored in the Storage object.\n\t *\n\t * @readonly\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }, {\n\t key: 'length',\n\t get: function get() {\n\t return Object.keys(this).length;\n\t }\n\n\t /**\n\t * Adds an interceptor to a WebStorage method.\n\t *\n\t * @param {string} command: name of the API method to intercept\n\t * @param {function} action: callback executed when the API method is called\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }], [{\n\t key: 'interceptors',\n\t value: function interceptors(command, action) {\n\t if (command in _interceptors && typeof action === 'function') _interceptors[command].push(action);\n\t }\n\t }]);\n\n\t return WebStorage;\n\t}();\n\n\t// @public API\n\n\n\texports.default = WebStorage;\n\texports.webStorageSettings = webStorageSettings;\n\texports.proxy = _proxyMechanism.proxy;\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.proxy = undefined;\n\n\tvar _cookieStorage = __webpack_require__(3);\n\n\tvar _cookieStorage2 = _interopRequireDefault(_cookieStorage);\n\n\tvar _memoryStorage = __webpack_require__(5);\n\n\tvar _memoryStorage2 = _interopRequireDefault(_memoryStorage);\n\n\tvar _utils = __webpack_require__(4);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n\t/**\n\t * @private\n\t *\n\t * Adds the current elements in the storage object.\n\t *\n\t * @param {object} api: the storage mechanism to initialize\n\t * @return {object}\n\t */\n\tfunction initApi(api) {\n\t if (!api.initialize) return api;\n\t // sets read-only and non-enumerable properties\n\t for (var prop in api) {\n\t // eslint-disable-line\n\t if (prop !== 'initialize') (0, _utils.setProperty)(api, prop);\n\t }\n\t api.initialize();\n\t // this method is removed after being invoked\n\t // because is not part of the Web Storage interface\n\t delete api.initialize;\n\t return api;\n\t}\n\n\t/**\n\t * @public\n\t *\n\t * Proxy for storage mechanisms.\n\t * All members implement the Web Storage interface.\n\t *\n\t * @see\n\t * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n\t *\n\t * @type {object}\n\t */\n\tvar proxy = exports.proxy = {\n\t localStorage: window.localStorage,\n\t sessionStorage: window.sessionStorage,\n\t cookieStorage: initApi((0, _cookieStorage2.default)()),\n\t memoryStorage: initApi((0, _memoryStorage2.default)())\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = cookieStorage;\n\n\tvar _utils = __webpack_require__(4);\n\n\t/**\n\t * @private\n\t *\n\t * Proxy for the default cookie storage associated with the current document.\n\t *\n\t * @see\n\t * https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie\n\t *\n\t * @type {object}\n\t */\n\tvar $cookie = {\n\t get: function get() {\n\t return document.cookie;\n\t },\n\t set: function set(value) {\n\t document.cookie = value;\n\t }\n\t};\n\n\t/**\n\t * @private\n\t *\n\t * Builds the expiration part for the cookie.\n\t *\n\t * @see utils.setTimestamp(options)\n\t *\n\t * @param {Date|object} date: the expiration date\n\t * @return {string}\n\t */\n\t/* eslint-disable no-invalid-this */\n\tfunction buildExpirationString(date) {\n\t var expires = date instanceof Date ? (0, _utils.setTimestamp)({ date: date }) : (0, _utils.setTimestamp)(date);\n\t return '; expires=' + expires.toUTCString();\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Finds an element in the array.\n\t *\n\t * @param {string} cookie: key=value\n\t * @return {boolean}\n\t */\n\tfunction findCookie(cookie) {\n\t var nameEQ = this.toString();\n\t // prevent leading spaces before the key\n\t return cookie.trim().indexOf(nameEQ) === 0;\n\t}\n\n\t/**\n\t * @public\n\t *\n\t * Create, read, and delete elements from document cookies\n\t * and implements the Web Storage interface.\n\t *\n\t * @return {object}\n\t */\n\tfunction cookieStorage() {\n\t var api = {\n\t setItem: function setItem(key, value, options) {\n\t var expires = '',\n\t cookie = void 0;\n\t options = Object.assign({ path: '/' }, options);\n\t if ((0, _utils.isObject)(options.expires) || options.expires instanceof Date) {\n\t expires = buildExpirationString(options.expires);\n\t }\n\t cookie = key + '=' + encodeURIComponent(value) + expires + '; path=' + options.path;\n\t $cookie.set(cookie);\n\t },\n\t getItem: function getItem(key) {\n\t var value = null;\n\t var nameEQ = key + '=';\n\t var cookie = $cookie.get().split(';').find(findCookie, nameEQ);\n\t if (cookie) {\n\t // prevent leading spaces before the key name\n\t value = cookie.trim().substring(nameEQ.length, cookie.length);\n\t value = decodeURIComponent(value);\n\t }\n\t return value;\n\t },\n\t removeItem: function removeItem(key) {\n\t api.setItem(key, '', { expires: { days: -1 } });\n\t },\n\t clear: function clear() {\n\t var eq = '=';\n\t var indexEQ = void 0,\n\t key = void 0;\n\t $cookie.get().split(';').forEach(function (cookie) {\n\t indexEQ = cookie.indexOf(eq);\n\t if (indexEQ > -1) {\n\t key = cookie.substring(0, indexEQ);\n\t // prevent leading spaces before the key\n\t api.removeItem(key.trim());\n\t }\n\t });\n\t },\n\n\n\t // this method will be removed after being invoked\n\t // because is not part of the Web Storage interface\n\t initialize: function initialize() {\n\t $cookie.get().split(';').forEach(function (cookie) {\n\t var index = cookie.indexOf('=');\n\t var key = cookie.substring(0, index).trim();\n\t var value = cookie.substring(index + 1).trim();\n\t // copies all existing elements in the storage\n\t if (key) api[key] = decodeURIComponent(value);\n\t });\n\t }\n\t };\n\t return api;\n\t}\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.isObject = isObject;\n\texports.setTimestamp = setTimestamp;\n\texports.setProperty = setProperty;\n\texports.checkEmpty = checkEmpty;\n\t/**\n\t * Determines whether a value is a plain object.\n\t *\n\t * @param {any} value: the object to test\n\t * @return {boolean}\n\t */\n\tfunction isObject(value) {\n\t return Object.prototype.toString.call(value) === '[object Object]';\n\t}\n\n\t/**\n\t * Allows add or subtract timestamps to the current date or to a specific date.\n\t *\n\t * @param {object} options: It contains the timestamps to add or remove to the date, and have the following properties:\n\t * - {Date} date: if provided, the timestamps will affect this date, otherwise a new current date will be used.\n\t * - {number} hours: hours to add/subtract\n\t * - {number} days: days to add/subtract\n\t * - {number} months: months to add/subtract\n\t * - {number} years: years to add/subtract\n\t * @return {Date}\n\t */\n\tfunction setTimestamp() {\n\t var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t var opt = Object.assign({}, options);\n\t var d = opt.date instanceof Date ? opt.date : new Date();\n\t if (+opt.hours) d.setHours(d.getHours() + opt.hours);\n\t if (+opt.days) d.setDate(d.getDate() + opt.days);\n\t if (+opt.months) d.setMonth(d.getMonth() + opt.months);\n\t if (+opt.years) d.setFullYear(d.getFullYear() + opt.years);\n\t return d;\n\t}\n\n\t/**\n\t * Creates a non-enumerable read-only property.\n\t *\n\t * @param {object} obj: the object to add the property\n\t * @param {string} name: the name of the property\n\t * @param {any} value: the value of the property\n\t * @return {void}\n\t */\n\tfunction setProperty(obj, name, value) {\n\t var descriptor = {\n\t configurable: false,\n\t enumerable: false,\n\t writable: false\n\t };\n\t if (typeof value !== 'undefined') {\n\t descriptor.value = value;\n\t }\n\t Object.defineProperty(obj, name, descriptor);\n\t}\n\n\t/**\n\t * Validates if the key is not empty.\n\t * (null, undefined either empty string)\n\t *\n\t * @param {string} key: keyname of an element in the storage mechanism\n\t * @return {void}\n\t */\n\tfunction checkEmpty(key) {\n\t if (key == null || key === '') {\n\t throw new Error('The key provided can not be empty');\n\t }\n\t}\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _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\texports.default = memoryStorage;\n\t/**\n\t * @private\n\t *\n\t * Gets the hashtable-store from the current window.\n\t *\n\t * @return {object}\n\t */\n\tfunction getStoreFromWindow() {\n\t try {\n\t var store = JSON.parse(window.self.name);\n\t if (store && (typeof store === 'undefined' ? 'undefined' : _typeof(store)) === 'object') return store;\n\t } catch (e) {\n\t return {};\n\t }\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Saves the hashtable-store in the current window.\n\t *\n\t * @param {object} hashtable: {key,value} pairs stored in memoryStorage\n\t * @return {void}\n\t */\n\tfunction setStoreToWindow(hashtable) {\n\t var store = JSON.stringify(hashtable);\n\t window.self.name = store;\n\t}\n\n\t/**\n\t * @public\n\t *\n\t * Create, read, and delete elements from memory store and\n\t * implements the Web Storage interface. It also adds a hack\n\t * to persist the store in session for the current browser-tab.\n\t *\n\t * @return {object}\n\t */\n\tfunction memoryStorage() {\n\t var hashtable = getStoreFromWindow();\n\t var api = {\n\t setItem: function setItem(key, value) {\n\t hashtable[key] = value;\n\t setStoreToWindow(hashtable);\n\t },\n\t getItem: function getItem(key) {\n\t var value = hashtable[key];\n\t return value === undefined ? null : value;\n\t },\n\t removeItem: function removeItem(key) {\n\t delete hashtable[key];\n\t setStoreToWindow(hashtable);\n\t },\n\t clear: function clear() {\n\t Object.keys(hashtable).forEach(function (key) {\n\t return delete hashtable[key];\n\t });\n\t setStoreToWindow(hashtable);\n\t },\n\n\t // this method will be removed after being invoked\n\t // because is not part of the Web Storage interface\n\t initialize: function initialize() {\n\t // copies all existing elements in the storage\n\t Object.assign(api, hashtable);\n\t }\n\t };\n\t return api;\n\t}\n\n/***/ },\n/* 6 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t/**\n\t * @public\n\t *\n\t * Used to determine which storage mechanisms are available.\n\t *\n\t * @type {object}\n\t */\n\tvar isAvailable = exports.isAvailable = {\n\t localStorage: false,\n\t sessionStorage: false,\n\t cookieStorage: false,\n\t memoryStorage: true };\n\n/***/ }\n/******/ ])\n});\n;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./dist/proxy-storage.js\n// module id = 0\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/src/web-storage.js b/src/web-storage.js index eb17f28..f6d103f 100644 --- a/src/web-storage.js +++ b/src/web-storage.js @@ -173,8 +173,10 @@ class WebStorage { getItem(key) { checkEmpty(key); let value = proxy[this.__storage__].getItem(key); - if (value === undefined) value = null; - else { + if (value === undefined) { + delete this[key]; + value = null; + } else { value = tryParse(value); this[key] = value; } diff --git a/webpack.uglify.config.js b/webpack.uglify.config.js index fa7a1d9..bcb2d1e 100644 --- a/webpack.uglify.config.js +++ b/webpack.uglify.config.js @@ -23,7 +23,7 @@ const config = { compress: { dead_code: true, drop_debugger: true, - drop_console: true, + drop_console: false, }, mangle: { except: ['WebStorage'],