text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Vuex=e()}(this,function(){"use strict";var f="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function c(e,n){Object.keys(e).forEach(function(t){return n(e[t],t)})}function l(t,e){if(!t)throw new Error("[vuex] "+e)}var i=function(t,e){this.runtime=e,this._children=Object.create(null);var n=(this._rawModule=t).state;this.state=("function"==typeof n?n():n)||{}},t={namespaced:{configurable:!0}};t.namespaced.get=function(){return!!this._rawModule.namespaced},i.prototype.addChild=function(t,e){this._children[t]=e},i.prototype.removeChild=function(t){delete this._children[t]},i.prototype.getChild=function(t){return this._children[t]},i.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},i.prototype.forEachChild=function(t){c(this._children,t)},i.prototype.forEachGetter=function(t){this._rawModule.getters&&c(this._rawModule.getters,t)},i.prototype.forEachAction=function(t){this._rawModule.actions&&c(this._rawModule.actions,t)},i.prototype.forEachMutation=function(t){this._rawModule.mutations&&c(this._rawModule.mutations,t)},Object.defineProperties(i.prototype,t);var p=function(t){this.register([],t,!1)};p.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},p.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(t,e){return t+((n=n.getChild(e)).namespaced?e+"/":"")},"")},p.prototype.update=function(t){!function t(e,n,o){a(e,o);n.update(o);if(o.modules)for(var r in o.modules){if(!n.getChild(r))return void console.warn("[vuex] trying to add a new module '"+r+"' on hot reloading, manual reload is needed");t(e.concat(r),n.getChild(r),o.modules[r])}}([],this.root,t)},p.prototype.register=function(n,t,o){var r=this;void 0===o&&(o=!0),a(n,t);var e=new i(t,o);0===n.length?this.root=e:this.get(n.slice(0,-1)).addChild(n[n.length-1],e);t.modules&&c(t.modules,function(t,e){r.register(n.concat(e),t,o)})},p.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var m,e={assert:function(t){return"function"==typeof t},expected:"function"},s={getters:e,mutations:e,actions:{assert:function(t){return"function"==typeof t||"object"==typeof t&&"function"==typeof t.handler},expected:'function or object with "handler" function'}};function a(r,t){Object.keys(s).forEach(function(n){if(t[n]){var o=s[n];c(t[n],function(t,e){l(o.assert(t),function(t,e,n,o,r){var i=e+" should be "+r+' but "'+e+"."+n+'"';0<t.length&&(i+=' in module "'+t.join(".")+'"');return i+=" is "+JSON.stringify(o)+"."}(r,n,e,t,o.expected))})}})}var n=function t(e){var n=this;void 0===e&&(e={}),!m&&"undefined"!=typeof window&&window.Vue&&d(window.Vue),l(m,"must call Vue.use(Vuex) before creating a store instance."),l("undefined"!=typeof Promise,"vuex requires a Promise polyfill in this browser."),l(this instanceof t,"store must be called with the new operator.");var o=e.plugins;void 0===o&&(o=[]);var r=e.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new p(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new m;var i=this,s=this.dispatch,a=this.commit;this.dispatch=function(t,e){return s.call(i,t,e)},this.commit=function(t,e,n){return a.call(i,t,e,n)},this.strict=r;var c,u=this._modules.root.state;v(this,u,[],this._modules.root),h(this,u),o.forEach(function(t){return t(n)}),(void 0!==e.devtools?e.devtools:m.config.devtools)&&(c=this,f&&((c._devtoolHook=f).emit("vuex:init",c),f.on("vuex:travel-to-state",function(t){c.replaceState(t)}),c.subscribe(function(t,e){f.emit("vuex:mutation",t,e)})))},o={state:{configurable:!0}};function r(e,n){return n.indexOf(e)<0&&n.push(e),function(){var t=n.indexOf(e);-1<t&&n.splice(t,1)}}function u(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;v(t,n,[],t._modules.root,!0),h(t,n,e)}function h(n,t,e){var o=n._vm;n.getters={};var r=n._wrappedGetters,i={};c(r,function(t,e){i[e]=function(){return t(n)},Object.defineProperty(n.getters,e,{get:function(){return n._vm[e]},enumerable:!0})});var s,a=m.config.silent;m.config.silent=!0,n._vm=new m({data:{$$state:t},computed:i}),m.config.silent=a,n.strict&&(s=n)._vm.$watch(function(){return this._data.$$state},function(){l(s._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,sync:!0}),o&&(e&&n._withCommit(function(){o._data.$$state=null}),m.nextTick(function(){return o.$destroy()}))}function v(c,n,o,t,r){var e=!o.length,u=c._modules.getNamespace(o);if(t.namespaced&&(c._modulesNamespaceMap[u]=t),!e&&!r){var i=y(n,o.slice(0,-1)),s=o[o.length-1];c._withCommit(function(){m.set(i,s,t.state)})}var a,f,l,p,h,d=t.context=(a=c,l=o,h={dispatch:(p=""===(f=u))?a.dispatch:function(t,e,n){var o=g(t,e,n),r=o.payload,i=o.options,s=o.type;if(i&&i.root||(s=f+s,a._actions[s]))return a.dispatch(s,r);console.error("[vuex] unknown local action type: "+o.type+", global type: "+s)},commit:p?a.commit:function(t,e,n){var o=g(t,e,n),r=o.payload,i=o.options,s=o.type;i&&i.root||(s=f+s,a._mutations[s])?a.commit(s,r,i):console.error("[vuex] unknown local mutation type: "+o.type+", global type: "+s)}},Object.defineProperties(h,{getters:{get:p?function(){return a.getters}:function(){return n=a,r={},i=(o=f).length,Object.keys(n.getters).forEach(function(t){if(t.slice(0,i)===o){var e=t.slice(i);Object.defineProperty(r,e,{get:function(){return n.getters[t]},enumerable:!0})}}),r;var n,o,r,i}},state:{get:function(){return y(a.state,l)}}}),h);t.forEachMutation(function(t,e){var n,o,r,i;o=u+e,r=t,i=d,((n=c)._mutations[o]||(n._mutations[o]=[])).push(function(t){r.call(n,i.state,t)})}),t.forEachAction(function(t,e){var r,n,i,s,o=t.root?e:u+e,a=t.handler||t;n=o,i=a,s=d,((r=c)._actions[n]||(r._actions[n]=[])).push(function(t,e){var n,o=i.call(r,{dispatch:s.dispatch,commit:s.commit,getters:s.getters,state:s.state,rootGetters:r.getters,rootState:r.state},t,e);return(n=o)&&"function"==typeof n.then||(o=Promise.resolve(o)),r._devtoolHook?o.catch(function(t){throw r._devtoolHook.emit("vuex:error",t),t}):o})}),t.forEachGetter(function(t,e){!function(t,e,n,o){if(t._wrappedGetters[e])return console.error("[vuex] duplicate getter key: "+e);t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)}}(c,u+e,t,d)}),t.forEachChild(function(t,e){v(c,n,o.concat(e),t,r)})}function y(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function g(t,e,n){var o;return null!==(o=t)&&"object"==typeof o&&t.type&&(n=e,t=(e=t).type),l("string"==typeof t,"expects string as the type, but found "+typeof t+"."),{type:t,payload:e,options:n}}function d(t){m&&t===m?console.error("[vuex] already installed. Vue.use(Vuex) should be called only once."):function(t){if(2<=Number(t.version.split(".")[0]))t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(m=t)}o.state.get=function(){return this._vm._data.$$state},o.state.set=function(t){l(!1,"use store.replaceState() to explicit replace store state.")},n.prototype.commit=function(t,e,n){var o=this,r=g(t,e,n),i=r.type,s=r.payload,a=r.options,c={type:i,payload:s},u=this._mutations[i];u?(this._withCommit(function(){u.forEach(function(t){t(s)})}),this._subscribers.forEach(function(t){return t(c,o.state)}),a&&a.silent&&console.warn("[vuex] mutation type: "+i+". Silent option has been removed. Use the filter functionality in the vue-devtools")):console.error("[vuex] unknown mutation type: "+i)},n.prototype.dispatch=function(t,e){var n=this,o=g(t,e),r=o.type,i=o.payload,s={type:r,payload:i},a=this._actions[r];if(a){try{this._actionSubscribers.filter(function(t){return t.before}).forEach(function(t){return t.before(s,n.state)})}catch(t){console.warn("[vuex] error in before action subscribers: "),console.error(t)}return(1<a.length?Promise.all(a.map(function(t){return t(i)})):a[0](i)).then(function(t){try{n._actionSubscribers.filter(function(t){return t.after}).forEach(function(t){return t.after(s,n.state)})}catch(t){console.warn("[vuex] error in after action subscribers: "),console.error(t)}return t})}console.error("[vuex] unknown action type: "+r)},n.prototype.subscribe=function(t){return r(t,this._subscribers)},n.prototype.subscribeAction=function(t){return r("function"==typeof t?{before:t}:t,this._actionSubscribers)},n.prototype.watch=function(t,e,n){var o=this;return l("function"==typeof t,"store.watch only accepts a function."),this._watcherVM.$watch(function(){return t(o.state,o.getters)},e,n)},n.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},n.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),l(Array.isArray(t),"module path must be a string or an Array."),l(0<t.length,"cannot register the root module by using registerModule."),this._modules.register(t,e),v(this,this.state,t,this._modules.get(t),n.preserveState),h(this,this.state)},n.prototype.unregisterModule=function(e){var n=this;"string"==typeof e&&(e=[e]),l(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var t=y(n.state,e.slice(0,-1));m.delete(t,e[e.length-1])}),u(this)},n.prototype.hotUpdate=function(t){this._modules.update(t),u(this,!0)},n.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(n.prototype,o);var _=M(function(r,t){var n={};return $(t).forEach(function(t){var e=t.key,o=t.val;n[e]=function(){var t=this.$store.state,e=this.$store.getters;if(r){var n=O(this.$store,"mapState",r);if(!n)return;t=n.context.state,e=n.context.getters}return"function"==typeof o?o.call(this,t,e):t[o]},n[e].vuex=!0}),n}),b=M(function(i,t){var n={};return $(t).forEach(function(t){var e=t.key,r=t.val;n[e]=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=this.$store.commit;if(i){var o=O(this.$store,"mapMutations",i);if(!o)return;n=o.context.commit}return"function"==typeof r?r.apply(this,[n].concat(t)):n.apply(this.$store,[r].concat(t))}}),n}),w=M(function(o,t){var r={};return $(t).forEach(function(t){var e=t.key,n=t.val;n=o+n,r[e]=function(){if(!o||O(this.$store,"mapGetters",o)){if(n in this.$store.getters)return this.$store.getters[n];console.error("[vuex] unknown getter: "+n)}},r[e].vuex=!0}),r}),x=M(function(i,t){var n={};return $(t).forEach(function(t){var e=t.key,r=t.val;n[e]=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=this.$store.dispatch;if(i){var o=O(this.$store,"mapActions",i);if(!o)return;n=o.context.dispatch}return"function"==typeof r?r.apply(this,[n].concat(t)):n.apply(this.$store,[r].concat(t))}}),n});function $(e){return Array.isArray(e)?e.map(function(t){return{key:t,val:t}}):Object.keys(e).map(function(t){return{key:t,val:e[t]}})}function M(n){return function(t,e){return"string"!=typeof t?(e=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),n(t,e)}}function O(t,e,n){var o=t._modulesNamespaceMap[n];return o||console.error("[vuex] module namespace not found in "+e+"(): "+n),o}return{Store:n,install:d,version:"3.1.0",mapState:_,mapMutations:b,mapGetters:w,mapActions:x,createNamespacedHelpers:function(t){return{mapState:_.bind(null,t),mapGetters:w.bind(null,t),mapMutations:b.bind(null,t),mapActions:x.bind(null,t)}}}});
  //# sourceMappingURL=vuex.js.map
  