t.exports=function(){"use strict";vart=function(){this._properties={},this._namespace="",this._isSupported=!0},n={namespace:{}};n.namespace.get=function(){returnthis._namespace},n.namespace.set=function(t){this._namespace=t?t+".":""},t.prototype._getLsKey=function(t){return""+this._namespace+t},t.prototype._lsSet=function(t,e,n){vari=this._getLsKey(t),a=n&&[Array,Object].includes(n)?JSON.stringify(e):e;window.localStorage.setItem(i,a)},t.prototype._lsGet=function(t){vare=this._getLsKey(t);returnwindow.localStorage[e]},t.prototype.get=function(t,e,n){if(void0===e&&(e=null),void0===n&&(n=String),!this._isSupported)returnnull;if(this._lsGet(t)){vari=n;for(varainthis._properties)if(a===t){i=this._properties[a].type;break}returnthis._process(i,this._lsGet(t))}returnnull!==e?e:null},t.prototype.set=function(t,e){if(!this._isSupported)returnnull;for(varninthis._properties){vari=this._properties[n].type;if(n===t)returnthis._lsSet(t,e,i),e}returnthis._lsSet(t,e),e},t.prototype.remove=function(t){returnthis._isSupported?window.localStorage.removeItem(t):null},t.prototype.addProperty=function(t,e,n){void0===n&&(n=void0),e=e||String,this._properties[t]={type:e},this._lsGet(t)||null===n||this._lsSet(t,n,e)},t.prototype._process=function(t,e){switch(t){caseBoolean:return"true"===e;caseNumber:returnparseFloat(e);caseArray:try{varn=JSON.parse(e);returnArray.isArray(n)?n:[]}catch(t){return[]}caseObject:try{returnJSON.parse(e)}catch(t){return{}}default:returne}},Object.defineProperties(t.prototype,n);vari=newt;return{install:function(t,n){if(void0===n&&(n={}),void0===e||!(e.server||e.SERVER_BUILD||e.env&&"server"===e.env.VUE_ENV)){vara=!0;try{varo="__vue-localstorage-test__";window.localStorage.setItem(o,o),window.localStorage.removeItem(o)}catch(t){a=!1,i._isSupported=!1,console.error("Local storage is not supported")}varr=n.name||"localStorage",s=n.bind;n.namespace&&(i.namespace=n.namespace),t.mixin({beforeCreate:function(){vare=this;a&&this.$options[r]&&Object.keys(this.$options[r]).forEach((function(n){vara=e.$options[r][n],o=[a.type,a.default],c=o[0],l=o[1];if(i.addProperty(n,c,l),Object.getOwnPropertyDescriptor(i,n))t.config.silent||console.log(n+": is already defined and will be reused");else{varu={get:function(){returnt.localStorage.get(n,l)},set:function(e){returnt.localStorage.set(n,e)},configurable:!0};Object.defineProperty(i,n,u),t.util.defineReactive(i,n,l)}(s||a.bind)&&!1!==a.bind&&(e.$options.computed=e.$options.computed||{},e.$options.computed[n]||(e.$options.computed[n]={get:function(){returnt.localStorage[n]},set:function(e){t.localStorage[n]=e}}))}))}}),t[r]=i,t.prototype["$"+r]=i}}}}()}).call(this,n(64))}}]);