diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 1abba82..34d19cd 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -117,6 +117,7 @@ module: path: 0 path_alias_xt: 0 pathologic: 0 + permissions_filter: 0 persistent_login: 0 profile: 0 recurring_period: 0 diff --git a/config/sync/language/fr/profile.type.customer.yml b/config/sync/language/fr/profile.type.customer.yml index 8999223..8f083dd 100644 --- a/config/sync/language/fr/profile.type.customer.yml +++ b/config/sync/language/fr/profile.type.customer.yml @@ -1 +1,2 @@ label: Client +display_label: 'Informations sur le client' diff --git a/web/themes/custom/materiotheme/assets/dist/main.css b/web/themes/custom/materiotheme/assets/dist/main.css index f2b22cc..6e3a265 100644 --- a/web/themes/custom/materiotheme/assets/dist/main.css +++ b/web/themes/custom/materiotheme/assets/dist/main.css @@ -1250,6 +1250,10 @@ header[role="banner"] { margin: 0; } header[role="banner"] #block-userlogin .item-list ul li a { font-size: 0.756em; } + header[role="banner"] #block-userblock h2 { + display: none; } + header[role="banner"] #block-userblock a { + margin-right: 1em; } header[role="banner"] #block-header { margin-right: 1em; padding-left: 1em; diff --git a/web/themes/custom/materiotheme/assets/dist/main.js b/web/themes/custom/materiotheme/assets/dist/main.js index 65b3d25..7d7be90 100644 --- a/web/themes/custom/materiotheme/assets/dist/main.js +++ b/web/themes/custom/materiotheme/assets/dist/main.js @@ -381,7 +381,7 @@ eval("\n\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n props: ['title', 'block'],\n data: function data() {\n return {\n template: null,\n mail: '',\n password: ''\n };\n },\n // computed: {\n // ...mapState(['User'])\n // },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userLogin: 'User/userLogin'\n }), {\n login: function login() {\n this.userLogin({\n mail: this.mail,\n pass: this.password\n });\n },\n request_password: function request_password() {\n console.log('request_password');\n },\n create_account: function create_account() {\n console.log('create_account');\n }\n }),\n beforeMount: function beforeMount() {\n var _this = this;\n\n // console.log('LoginBlock beforeMount', this._props.block);\n if (this._props.block) {\n // console.log('LoginBlock beforeMount if this._props.block ok');\n this.template = _vue.default.compile(this._props.block);\n this.$options.staticRenderFns = [];\n this._staticTrees = [];\n this.template.staticRenderFns.map(function (fn) {\n return _this.$options.staticRenderFns.push(fn);\n });\n }\n },\n mounted: function mounted() {\n // console.log('LoginBlock mounted');\n Drupal.attachBehaviors(this.$el);\n },\n render: function render(h) {\n // console.log('LoginBlock render');\n if (!this.template) {\n // console.log('LoginBlock render NAN');\n return h('span', 'Loading ...');\n } else {\n // console.log('LoginBlock render template');\n return this.template.render.call(this);\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Block/LoginBlock.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n props: ['title', 'block'],\n data: function data() {\n return {\n template: null,\n mail: '',\n password: ''\n };\n },\n // computed: {\n // ...mapState(['User'])\n // },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userLogin: 'User/userLogin'\n }), {\n login: function login() {\n this.userLogin({\n mail: this.mail,\n pass: this.password\n });\n },\n request_password: function request_password() {\n console.log('request_password');\n },\n create_account: function create_account() {\n console.log('create_account');\n }\n }),\n beforeMount: function beforeMount() {\n var _this = this;\n\n // console.log('LoginBlock beforeMount', this._props.block);\n if (this._props.block) {\n // console.log('LoginBlock beforeMount if this._props.block ok');\n this.template = _vue.default.compile(this._props.block);\n this.$options.staticRenderFns = [];\n this._staticTrees = [];\n this.template.staticRenderFns.map(function (fn) {\n return _this.$options.staticRenderFns.push(fn);\n });\n }\n },\n mounted: function mounted() {\n // console.log('LoginBlock mounted');\n Drupal.attachBehaviors(this.$el);\n },\n render: function render(h) {\n // console.log('LoginBlock render');\n if (!this.template) {\n // console.log('LoginBlock render NAN');\n return h('span', 'Loading ...');\n } else {\n // console.log('LoginBlock render template');\n return this.template.render.call(this);\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Block/LoginBlock.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -393,7 +393,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _SearchForm = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Form/SearchForm */ \"./web/themes/custom/materiotheme/vuejs/components/Form/SearchForm.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n props: ['blockid', 'formhtml'],\n data: function data() {\n return {\n form: null\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n canSearch: function canSearch(state) {\n return state.User.canSearch;\n }\n }), {\n displayform: function displayform() {\n // console.log('computed displayform');\n return this.canSearch && this.form;\n }\n }),\n beforeMount: function beforeMount() {\n // console.log('SearchBlock beforeMount');\n this.form = this.formhtml;\n },\n watch: {\n canSearch: function canSearch(new_value, old_value) {\n // console.log('canSearch changed, old: '+old_value+\", new: \"+new_value);\n if (new_value && !this.form) {\n this.getSearchForm();\n }\n\n if (!new_value && this.form) {\n this.form = null;\n }\n }\n },\n methods: {\n getSearchForm: function getSearchForm() {\n var _this = this;\n\n _maAxios.MA.get(\"/materio_sapi/search_form\").then(function (_ref) {\n var data = _ref.data;\n // console.log(\"getSearchForm\");\n _this.form = data.rendered;\n }).catch(function (error) {\n console.warn('Issue with get searchform', error);\n });\n }\n },\n components: {\n SearchForm: _SearchForm.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Block/SearchBlock.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _SearchForm = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Form/SearchForm */ \"./web/themes/custom/materiotheme/vuejs/components/Form/SearchForm.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n props: ['blockid', 'formhtml'],\n data: function data() {\n return {\n form: null\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n canSearch: function canSearch(state) {\n return state.User.canSearch;\n }\n }), {\n displayform: function displayform() {\n // console.log('computed displayform');\n return this.canSearch && this.form;\n }\n }),\n beforeMount: function beforeMount() {\n // console.log('SearchBlock beforeMount');\n this.form = this.formhtml;\n },\n watch: {\n canSearch: function canSearch(new_value, old_value) {\n // console.log('canSearch changed, old: '+old_value+\", new: \"+new_value);\n if (new_value && !this.form) {\n this.getSearchForm();\n }\n\n if (!new_value && this.form) {\n this.form = null;\n }\n }\n },\n methods: {\n getSearchForm: function getSearchForm() {\n var _this = this;\n\n _maAxios.MA.get(\"/materio_sapi/search_form\").then(function (_ref) {\n var data = _ref.data;\n // console.log(\"getSearchForm\");\n _this.form = data.rendered;\n }).catch(function (error) {\n console.warn('Issue with get searchform', error);\n });\n }\n },\n components: {\n SearchForm: _SearchForm.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Block/SearchBlock.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -405,7 +405,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _LoginBlock = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Block/LoginBlock */ \"./web/themes/custom/materiotheme/vuejs/components/Block/LoginBlock.vue\"));\n\nvar _UserTools = _interopRequireDefault(__webpack_require__(/*! vuejs/components/User/UserTools */ \"./web/themes/custom/materiotheme/vuejs/components/User/UserTools.vue\"));\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n props: ['title', 'loginblock'],\n data: function data() {\n return {\n block: null\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n isloggedin: function isloggedin(state) {\n return state.User.isloggedin;\n }\n })),\n beforeMount: function beforeMount() {\n console.log('UserBlock beforeMount');\n\n if (this.loginblock) {\n this.block = this.loginblock;\n } else {\n this.getLoginBlock();\n }\n },\n methods: {\n getLoginBlock: function getLoginBlock() {\n var _this = this;\n\n _maAxios.MA.get(\"/materio_user/login_block\").then(function (_ref) {\n var data = _ref.data;\n // console.log(\"getLoginBlock data\", data);\n _this.block = data.rendered;\n }).catch(function (error) {\n console.warn('Issue with getLoginBlock', error);\n });\n }\n },\n components: {\n LoginBlock: _LoginBlock.default,\n UserTools: _UserTools.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Block/UserBlock.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _LoginBlock = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Block/LoginBlock */ \"./web/themes/custom/materiotheme/vuejs/components/Block/LoginBlock.vue\"));\n\nvar _UserTools = _interopRequireDefault(__webpack_require__(/*! vuejs/components/User/UserTools */ \"./web/themes/custom/materiotheme/vuejs/components/User/UserTools.vue\"));\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n props: ['title', 'loginblock'],\n data: function data() {\n return {\n block: null\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n isloggedin: function isloggedin(state) {\n return state.User.isloggedin;\n }\n })),\n beforeMount: function beforeMount() {\n console.log('UserBlock beforeMount');\n\n if (this.loginblock) {\n this.block = this.loginblock;\n } else {\n this.getLoginBlock();\n }\n },\n methods: {\n getLoginBlock: function getLoginBlock() {\n var _this = this;\n\n _maAxios.MA.get(\"/materio_user/login_block\").then(function (_ref) {\n var data = _ref.data;\n // console.log(\"getLoginBlock data\", data);\n _this.block = data.rendered;\n }).catch(function (error) {\n console.warn('Issue with getLoginBlock', error);\n });\n }\n },\n components: {\n LoginBlock: _LoginBlock.default,\n UserTools: _UserTools.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Block/UserBlock.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -417,7 +417,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _jsonAxios = __webpack_require__(/*! vuejs/api/json-axios */ \"./web/themes/custom/materiotheme/vuejs/api/json-axios.js\");\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar basePath = drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix;\nvar _default = {\n name: \"ArticleCard\",\n router: _route.default,\n props: ['item'],\n data: function data() {\n return {\n alias: this.item.view_node.replace(/^.?\\/blabla\\//g, '')\n };\n },\n methods: {\n onclick: function onclick() {\n console.log('clicked on article', this.alias);\n this.$router.push({\n name: \"article\",\n params: {\n alias: this.alias\n },\n query: {\n uuid: this.item.uuid // meta: { uuid:this.item.uuid },\n\n }\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/ArticleCard.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _jsonAxios = __webpack_require__(/*! vuejs/api/json-axios */ \"./web/themes/custom/materiotheme/vuejs/api/json-axios.js\");\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar basePath = drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix;\nvar _default = {\n name: \"ArticleCard\",\n router: _route.default,\n props: ['item'],\n data: function data() {\n return {\n alias: this.item.view_node.replace(/^.?\\/blabla\\//g, '')\n };\n },\n methods: {\n onclick: function onclick() {\n console.log('clicked on article', this.alias);\n this.$router.push({\n name: \"article\",\n params: {\n alias: this.alias\n },\n query: {\n uuid: this.item.uuid\n } // meta: { uuid:this.item.uuid },\n\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/ArticleCard.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -453,7 +453,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _restAxios = __webpack_require__(/*! vuejs/api/rest-axios */ \"./web/themes/custom/materiotheme/vuejs/api/rest-axios.js\");\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _Modal = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Helper/Modal */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/Modal.vue\"));\n\nvar _LoginRegister = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Helper/LoginRegister */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar basePath = drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix;\nvar _default = {\n name: \"Product\",\n router: _route.default,\n props: ['product'],\n data: function data() {\n return {\n quantity: 1,\n showLoginModal: false\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n isloggedin: function isloggedin(state) {\n return state.User.isloggedin;\n },\n isAdherent: function isAdherent(state) {\n return state.User.isAdherent;\n }\n })),\n methods: {\n // ...mapActions({\n // userLogin: 'User/userLogin'\n // }),\n closeModal: function closeModal() {\n this.showLoginModal = false;\n },\n checkaddtocart: function checkaddtocart() {\n console.log('checkaddtocart');\n\n if (!this.isloggedin) {\n // TODO: show popup login or register\n this.showLoginModal = true; // TODO: rest login or register\n // TODO: rest login\n // TODO: this.addtocart()\n } else {\n this.addtocart();\n }\n },\n logedIn: function logedIn() {\n console.log('Product: logedIn');\n this.addtocart();\n },\n registered: function registered() {\n console.log('Product: registered');\n this.addtocart();\n },\n addtocart: function addtocart() {\n var _this = this;\n\n console.log(\"addtocart\");\n\n _restAxios.REST.post(\"/cart/add?_format=json\", [{\n \"purchased_entity_type\": \"commerce_product_variation\",\n \"purchased_entity_id\": this.product.variation_id,\n \"quantity\": this.quantity\n }]).then(function (_ref) {\n var data = _ref.data;\n console.log('product add to cart REST: data', data);\n\n _this.closeModal(); // TODO: redirect to /cart\n\n }).catch(function (error) {\n console.warn('Issue with product add to cart', error);\n Promise.reject(error);\n });\n }\n },\n components: {\n Modal: _Modal.default,\n LoginRegister: _LoginRegister.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _restAxios = __webpack_require__(/*! vuejs/api/rest-axios */ \"./web/themes/custom/materiotheme/vuejs/api/rest-axios.js\");\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _Modal = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Helper/Modal */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/Modal.vue\"));\n\nvar _LoginRegister = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Helper/LoginRegister */ \"./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar basePath = drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix;\nvar _default = {\n name: \"Product\",\n router: _route.default,\n props: ['product'],\n data: function data() {\n return {\n quantity: 1,\n showLoginModal: false\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n isloggedin: function isloggedin(state) {\n return state.User.isloggedin;\n },\n isAdherent: function isAdherent(state) {\n return state.User.isAdherent;\n }\n })),\n methods: {\n // ...mapActions({\n // userLogin: 'User/userLogin'\n // }),\n closeModal: function closeModal() {\n this.showLoginModal = false;\n },\n checkaddtocart: function checkaddtocart() {\n console.log('checkaddtocart');\n\n if (!this.isloggedin) {\n // show popup for login or register\n // login or register event will be catched by onLogedin or onRegistered\n this.showLoginModal = true;\n } else {\n // if already logedin directly goes to cart operations\n this.addtocart();\n }\n },\n // event bubbled from modal login form\n onLogedIn: function onLogedIn() {\n console.log('Product: onLogedIn');\n this.addtocart();\n },\n // event bubbled from modal register form\n onRegistered: function onRegistered() {\n console.log('Product: onRegistered');\n this.addtocart();\n },\n getCarts: function getCarts() {\n return _restAxios.REST.get(\"/cart?_format=json\") // .then(({ data }) => {\n // console.log('current user carts: data', data)\n // })\n .catch(function (error) {\n console.warn('Issue with get cart', error);\n Promise.reject(error);\n });\n },\n deleteCart: function deleteCart(order_id) {\n console.log('deleting cart ', order_id);\n return _restAxios.REST.delete(\"/cart/\".concat(order_id, \"/items?_format=json\")).then(function (_ref) {\n var data = _ref.data;\n console.log(\"product cart \".concat(order_id, \" deleted: data\"), data);\n }).catch(function (error) {\n console.warn(\"Issue with cart \".concat(order_id, \" deleting\"), error);\n Promise.reject(error);\n });\n },\n clearCarts: function clearCarts(data) {\n var promises = []; // clear each cart as a promise\n\n for (var i = 0; i < data.length; i++) {\n promises.push(this.deleteCart(data[i].order_id));\n } // return all the promises as one\n\n\n return Promise.all(promises);\n },\n addtocart: function addtocart() {\n var _this = this;\n\n console.log(\"addtocart\");\n this.getCarts().then(function (_ref2) {\n var data = _ref2.data;\n console.log('current user carts: data', data);\n\n _this.clearCarts(data).then(function () {\n console.log('all carts cleared'); // fill the cart with new product\n\n _restAxios.REST.post(\"/cart/add?_format=json\", [{\n \"purchased_entity_type\": \"commerce_product_variation\",\n \"purchased_entity_id\": _this.product.variation_id,\n \"quantity\": _this.quantity\n }]).then(function (_ref3) {\n var data = _ref3.data;\n console.log('product added to cart: data', data);\n\n _this.closeModal(); // redirect to /cart\n // window.location.href = \"/cart\"\n // TODO: redirect to checkout instead of cart\n\n\n window.location.href = \"/checkout/\".concat(data[0].order_id, \"/order_information\");\n }).catch(function (error) {\n console.warn('Issue with product add to cart', error);\n Promise.reject(error);\n });\n });\n });\n }\n },\n components: {\n Modal: _Modal.default,\n LoginRegister: _LoginRegister.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -477,7 +477,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"LoginForm\",\n data: function data() {\n return {\n form: null,\n mail: null,\n password: null\n };\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userLogin: 'User/userLogin'\n }), {\n getLoginForm: function getLoginForm() {\n var _this = this;\n\n // Form through ajax is provided by materio_user drupal custom module\n // vuejs attributes a inserted by form alter in same module\n _maAxios.MA.get(\"/materio_user/login_form\").then(function (_ref) {\n var data = _ref.data;\n console.log(\"getLoginForm data\");\n _this.form = _vue.default.compile(data.rendered);\n _this.$options.staticRenderFns = [];\n _this._staticTrees = [];\n\n _this.form.staticRenderFns.map(function (fn) {\n return _this.$options.staticRenderFns.push(fn);\n });\n }).catch(function (error) {\n console.warn('Issue with getLoginForm', error);\n });\n },\n login: function login() {\n var _this2 = this;\n\n this.userLogin({\n mail: this.mail,\n pass: this.password\n }).then(function () {\n console.log('logedin from login component');\n\n _this2.$emit('onLogedIn');\n }).catch(function (error) {\n console.warn('Issue with login from login component', error);\n Promise.reject(error);\n });\n }\n }),\n beforeMount: function beforeMount() {\n if (!this.form) {\n this.getLoginForm();\n }\n },\n mounted: function mounted() {\n // console.log('LoginBlock mounted');\n Drupal.attachBehaviors(this.$el);\n },\n render: function render(h) {\n // console.log('LoginBlock render');\n if (!this.form) {\n // console.log('LoginBlock render NAN');\n return h('span', 'Loading ...');\n } else {\n // console.log('LoginBlock render template');\n return this.form.render.call(this);\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"LoginForm\",\n data: function data() {\n return {\n form: null,\n mail: null,\n password: null\n };\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userLogin: 'User/userLogin'\n }), {\n getLoginForm: function getLoginForm() {\n var _this = this;\n\n // Form through ajax is provided by materio_user drupal custom module\n // vuejs attributes a inserted by form alter in same module\n _maAxios.MA.get(\"/materio_user/login_form\").then(function (_ref) {\n var data = _ref.data;\n console.log(\"getLoginForm data\");\n _this.form = _vue.default.compile(data.rendered);\n _this.$options.staticRenderFns = [];\n _this._staticTrees = [];\n\n _this.form.staticRenderFns.map(function (fn) {\n return _this.$options.staticRenderFns.push(fn);\n });\n }).catch(function (error) {\n console.warn('Issue with getLoginForm', error);\n });\n },\n login: function login() {\n var _this2 = this;\n\n this.userLogin({\n mail: this.mail,\n pass: this.password\n }).then(function () {\n console.log('logedin from login component');\n\n _this2.$emit('onLogedIn');\n }).catch(function (error) {\n console.warn('Issue with login from login component', error);\n Promise.reject(error);\n });\n }\n }),\n beforeMount: function beforeMount() {\n if (!this.form) {\n this.getLoginForm();\n }\n },\n mounted: function mounted() {\n // console.log('LoginBlock mounted');\n Drupal.attachBehaviors(this.$el);\n },\n render: function render(h) {\n // console.log('LoginBlock render');\n if (!this.form) {\n // console.log('LoginBlock render NAN');\n return h('span', 'Loading ...');\n } else {\n // console.log('LoginBlock render template');\n return this.form.render.call(this);\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -489,7 +489,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"RegisterForm\",\n data: function data() {\n return {\n form: null,\n mail: null,\n pass1: null,\n pass2: null\n };\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userRegister: 'User/userRegister'\n }), {\n getRegisterForm: function getRegisterForm() {\n var _this = this;\n\n // Form through ajax is provided by materio_user drupal custom module\n // vuejs attributes a inserted by form alter in same module\n _maAxios.MA.get(\"/materio_user/register_form\").then(function (_ref) {\n var data = _ref.data;\n console.log(\"getRegisterForm data\", data);\n _this.form = _vue.default.compile(data.rendered);\n _this.$options.staticRenderFns = [];\n _this._staticTrees = [];\n\n _this.form.staticRenderFns.map(function (fn) {\n return _this.$options.staticRenderFns.push(fn);\n });\n }).catch(function (error) {\n console.warn('Issue with getRegisterForm', error);\n });\n },\n register: function register() {\n var _this2 = this;\n\n console.log('register', this.mail, this.pass1, this.pass2); // TODO: check for identical password\n // TODO: check for valide email\n // TODO: check for unique email\n\n if (this.pass1 === this.pass2) {\n this.userRegister({\n name: this.mail,\n mail: this.mail,\n pass: this.pass1\n }).then(function () {\n console.log('registered from register component');\n\n _this2.$emit('onRegistered');\n }).catch(function (error) {\n console.warn('Issue with register from registerform component', error);\n Promise.reject(error);\n });\n }\n }\n }),\n beforeMount: function beforeMount() {\n if (!this.form) {\n this.getRegisterForm();\n }\n },\n mounted: function mounted() {\n // console.log('LoginBlock mounted');\n Drupal.attachBehaviors(this.$el);\n },\n render: function render(h) {\n // console.log('LoginBlock render');\n if (!this.form) {\n // console.log('LoginBlock render NAN');\n return h('span', 'Loading ...');\n } else {\n // console.log('LoginBlock render template');\n return this.form.render.call(this);\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"RegisterForm\",\n data: function data() {\n return {\n form: null,\n mail: null,\n pass1: null,\n pass2: null\n };\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userRegister: 'User/userRegister'\n }), {\n getRegisterForm: function getRegisterForm() {\n var _this = this;\n\n // Form through ajax is provided by materio_user drupal custom module\n // vuejs attributes a inserted by form alter in same module\n _maAxios.MA.get(\"/materio_user/register_form\").then(function (_ref) {\n var data = _ref.data;\n console.log(\"getRegisterForm data\", data);\n _this.form = _vue.default.compile(data.rendered);\n _this.$options.staticRenderFns = [];\n _this._staticTrees = [];\n\n _this.form.staticRenderFns.map(function (fn) {\n return _this.$options.staticRenderFns.push(fn);\n });\n }).catch(function (error) {\n console.warn('Issue with getRegisterForm', error);\n });\n },\n register: function register() {\n var _this2 = this;\n\n console.log('register', this.mail, this.pass1, this.pass2); // TODO: check for identical password\n // TODO: check for valide email\n // TODO: check for unique email\n\n if (this.pass1 === this.pass2) {\n this.userRegister({\n name: this.mail,\n mail: this.mail,\n pass: this.pass1\n }).then(function () {\n console.log('registered from register component');\n\n _this2.$emit('onRegistered');\n }).catch(function (error) {\n console.warn('Issue with register from registerform component', error);\n Promise.reject(error);\n });\n }\n }\n }),\n beforeMount: function beforeMount() {\n if (!this.form) {\n this.getRegisterForm();\n }\n },\n mounted: function mounted() {\n // console.log('LoginBlock mounted');\n Drupal.attachBehaviors(this.$el);\n },\n render: function render(h) {\n // console.log('LoginBlock render');\n if (!this.form) {\n // console.log('LoginBlock render NAN');\n return h('span', 'Loading ...');\n } else {\n // console.log('LoginBlock render template');\n return this.form.render.call(this);\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -501,7 +501,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n router: _route.default,\n props: ['form'],\n data: function data() {\n return {\n template: null,\n typed: null,\n autocomplete: null // basePath: drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix\n\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n keys: function keys(state) {\n return state.Search.keys;\n },\n term: function term(state) {\n return state.Search.term;\n }\n })),\n methods: {\n submit: function submit() {\n console.log(\"search clicked\", this.typed, this.autocomplete); // New search is triggered by Base.vue with router (which will also fill the store)\n\n this.$router.push({\n name: 'base',\n query: {\n keys: this.typed,\n term: this.autocomplete\n }\n }); // this.$router.push({\n // path:`${this.basePath}/base`,\n // query:{keys:this.typed,term:this.autocomplete}\n // })\n },\n onAutoCompleteSelect: function onAutoCompleteSelect(event, ui) {\n event.preventDefault(); // console.log('autoCompleteSelect', event, ui);\n\n this.typed = ui.item.label;\n this.autocomplete = ui.item.value;\n }\n },\n directives: {\n focus: {\n // directive definition\n inserted: function inserted(el) {\n el.focus();\n }\n }\n },\n beforeMount: function beforeMount() {\n var _this = this;\n\n // console.log('SearchForm beforeMount');\n if (this._props.form) {\n // console.log('SearchForm beforeMount if this._props.form ok');\n this.template = _vue.default.compile(this._props.form); // https://github.com/vuejs/vue/issues/9911\n\n this.$options.staticRenderFns = [];\n this._staticTrees = [];\n this.template.staticRenderFns.map(function (fn) {\n return _this.$options.staticRenderFns.push(fn);\n });\n }\n },\n watch: {\n keys: function keys(n, o) {\n console.log('keys changed', n, o);\n this.typed = n;\n },\n term: function term(n, o) {\n console.log('autocomplete changed', n, o);\n this.autocomplete = n;\n }\n },\n created: function created() {\n this.typed = this.keys;\n this.autocomplete = this.term;\n },\n mounted: function mounted() {\n // console.log('SearchForm mounted');\n Drupal.attachBehaviors(this.$el); // get the search input\n\n var $input = this.$el.querySelector('#edit-search'); // // focus on input\n // $input.focus()\n // Catch the jquery ui events for autocmplete widget\n\n jQuery($input).on('autocompleteselect', this.onAutoCompleteSelect);\n },\n render: function render(h) {\n // console.log('searchForm render');\n if (!this.template) {\n return h('span', 'Loading ...');\n } else {\n return this.template.render.call(this);\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/SearchForm.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n router: _route.default,\n props: ['form'],\n data: function data() {\n return {\n template: null,\n typed: null,\n autocomplete: null // basePath: drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix\n\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n keys: function keys(state) {\n return state.Search.keys;\n },\n term: function term(state) {\n return state.Search.term;\n }\n })),\n methods: {\n submit: function submit() {\n console.log(\"search clicked\", this.typed, this.autocomplete); // New search is triggered by Base.vue with router (which will also fill the store)\n\n this.$router.push({\n name: 'base',\n query: {\n keys: this.typed,\n term: this.autocomplete\n }\n }); // this.$router.push({\n // path:`${this.basePath}/base`,\n // query:{keys:this.typed,term:this.autocomplete}\n // })\n },\n onAutoCompleteSelect: function onAutoCompleteSelect(event, ui) {\n event.preventDefault(); // console.log('autoCompleteSelect', event, ui);\n\n this.typed = ui.item.label;\n this.autocomplete = ui.item.value;\n }\n },\n directives: {\n focus: {\n // directive definition\n inserted: function inserted(el) {\n el.focus();\n }\n }\n },\n beforeMount: function beforeMount() {\n var _this = this;\n\n // console.log('SearchForm beforeMount');\n if (this._props.form) {\n // console.log('SearchForm beforeMount if this._props.form ok');\n this.template = _vue.default.compile(this._props.form); // https://github.com/vuejs/vue/issues/9911\n\n this.$options.staticRenderFns = [];\n this._staticTrees = [];\n this.template.staticRenderFns.map(function (fn) {\n return _this.$options.staticRenderFns.push(fn);\n });\n }\n },\n watch: {\n keys: function keys(n, o) {\n console.log('keys changed', n, o);\n this.typed = n;\n },\n term: function term(n, o) {\n console.log('autocomplete changed', n, o);\n this.autocomplete = n;\n }\n },\n created: function created() {\n this.typed = this.keys;\n this.autocomplete = this.term;\n },\n mounted: function mounted() {\n // console.log('SearchForm mounted');\n Drupal.attachBehaviors(this.$el); // get the search input\n\n var $input = this.$el.querySelector('#edit-search'); // // focus on input\n // $input.focus()\n // Catch the jquery ui events for autocmplete widget\n\n jQuery($input).on('autocompleteselect', this.onAutoCompleteSelect);\n },\n render: function render(h) {\n // console.log('searchForm render');\n if (!this.template) {\n return h('span', 'Loading ...');\n } else {\n return this.template.render.call(this);\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/SearchForm.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -513,7 +513,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _LoginForm = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Form/LoginForm */ \"./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue\"));\n\nvar _RegisterForm = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Form/RegisterForm */ \"./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"LoginRegister\",\n data: function data() {\n return {\n loginEmail: null,\n password: null,\n registerEmail: null\n };\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userLogin: 'User/userLogin',\n userRegister: 'User/userRegister'\n }), {\n onLogedIn: function onLogedIn() {\n this.$emit('onLogedIn');\n },\n onRegistered: function onRegistered() {\n this.$emit('onRegistered');\n }\n }),\n components: {\n LoginForm: _LoginForm.default,\n RegisterForm: _RegisterForm.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nvar _LoginForm = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Form/LoginForm */ \"./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue\"));\n\nvar _RegisterForm = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Form/RegisterForm */ \"./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"LoginRegister\",\n data: function data() {\n return {\n loginEmail: null,\n password: null,\n registerEmail: null\n };\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userLogin: 'User/userLogin',\n userRegister: 'User/userRegister'\n }), {\n onLogedIn: function onLogedIn() {\n this.$emit('onLogedIn');\n },\n onRegistered: function onRegistered() {\n this.$emit('onRegistered');\n }\n }),\n components: {\n LoginForm: _LoginForm.default,\n RegisterForm: _RegisterForm.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -537,7 +537,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nvar _store = _interopRequireDefault(__webpack_require__(/*! vuejs/store */ \"./web/themes/custom/materiotheme/vuejs/store/index.js\"));\n\nvar _jsonAxios = __webpack_require__(/*! vuejs/api/json-axios */ \"./web/themes/custom/materiotheme/vuejs/api/json-axios.js\");\n\nvar _querystring = _interopRequireDefault(__webpack_require__(/*! querystring */ \"./node_modules/querystring-es3/index.js\"));\n\nvar _Card = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/Card */ \"./web/themes/custom/materiotheme/vuejs/components/Content/Card.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Article\",\n router: _route.default,\n store: _store.default,\n props: ['item'],\n data: function data() {\n return {\n index: -1,\n prevnext: {},\n uuid: null,\n content: null,\n loading: true\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n items: function items(state) {\n return state.Blabla.items;\n }\n })),\n created: function created() {\n this.getArticle();\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n getItems: 'Blabla/getItems',\n getItemIndex: 'Blabla/getItemIndex',\n getPrevNextItems: 'Blabla/getPrevNextItems'\n }), {\n getArticle: function getArticle() {\n var _this = this;\n\n console.log(this.$route); // get the article uuid\n\n if (this.$route.query.uuid) {\n // we come from internal link with vuejs\n // directly record uuid\n this.uuid = this.$route.query.uuid;\n } else if (drupalDecoupled.entity_type == 'node' && drupalDecoupled.entity_bundle == 'article') {\n // we landed in an internal page\n // get the uuid from drupalDeclouped, provided by materio_decoupled.module\n this.uuid = drupalDecoupled.entity_uuid;\n }\n\n if (this.uuid) {\n this.loadArticle(); // get the prev next items\n\n if (!this.items.length) {\n // if items list not yet loaded preload them\n this.getItems().then(function () {\n // then get the index\n _this.getIndex();\n });\n } else {\n // or directly get the index\n this.getIndex();\n }\n } else {\n // if for any reason we dont have the uuid\n // redirect to home\n this.$route.replace('home');\n }\n },\n getIndex: function getIndex() {\n var _this2 = this;\n\n console.log(\"Article getIndex\");\n this.getItemIndex(this.uuid).then(function (index) {\n _this2.index = index; // console.log('article index', index, this);\n\n _this2.getPrevNextItems(index).then(function (pn) {\n _this2.prevnext = pn;\n });\n });\n },\n loadArticle: function loadArticle() {\n var _this3 = this;\n\n console.log('loadArticle', this.uuid);\n this.loading = true;\n var params = {\n include: 'field_linked_materials.images,field_showroom,field_tags,field_thesaurus,field_visuel,uid'\n };\n\n var q = _querystring.default.stringify(params);\n\n _jsonAxios.JSONAPI.get(\"node/article/\".concat(this.uuid, \"?\").concat(q)).then(function (_ref) {\n var data = _ref.data;\n console.log('loadArticle data', data);\n\n _this3.parseData(data);\n }).catch(function (error) {\n console.warn('Issue with loadArticle', error);\n Promise.reject(error);\n });\n },\n parseData: function parseData(data) {\n var _this4 = this;\n\n var attrs = data.data.attributes;\n var relations = data.data.relationships;\n console.log('relations', relations);\n var inc = data.included;\n console.log('included', inc);\n this.content = {\n title: attrs.title,\n body: attrs.body.value // parse all relationships\n\n };\n\n var _loop = function _loop(key) {\n // skip loop if the property is from prototype\n if (!relations.hasOwnProperty(key)) return \"continue\";\n var relation_obj = relations[key];\n console.log('typeof relation_obj.data', _typeof(relation_obj.data)); // skip relation_obj if data is not array\n\n if (!Array.isArray(relation_obj.data)) return \"continue\"; // create empty field array\n\n _this4.content[key] = []; // parse relationship values using included\n\n var field = {}; // loop through all relation items\n\n relation_obj.data.forEach(function (e) {\n // get the included values for each item using id\n var included = inc.find(function (i) {\n return i.id == e.id;\n }); // if we not found an included item skip the item\n\n if (typeof included != 'undefined') {\n // fill the item values\n switch (key) {\n case 'field_visuel':\n field = e.meta;\n field.id = e.id;\n field.src = included.links.card_medium.href;\n break;\n\n case 'field_linked_materials':\n field = included.attributes;\n field.id = included.id; // get the linked material included images\n\n field.images = [];\n included.relationships.images.data.forEach(function (img) {\n // console.log('href', img.meta.imageDerivatives.links.card_medium.href);\n field.images.push({\n title: img.meta.title,\n url: img.meta.imageDerivatives.links.card_medium.href\n });\n });\n break;\n\n case 'field_thesaurus':\n case 'field_tags':\n field = included.attributes;\n field.id = included.id;\n break;\n // case 'field_showroom':\n // field = included.attributes\n // break\n\n default:\n }\n\n _this4.content[key].push(field);\n }\n });\n };\n\n for (var key in relations) {\n var _ret = _loop(key);\n\n if (_ret === \"continue\") continue;\n } // update main page title\n\n\n this.$store.commit('Common/setPagetitle', this.content.title);\n this.loading = false;\n console.log('article.content', this.content);\n },\n onNext: function onNext() {\n // console.log('clicked on next', this.prevnext.next);\n var alias = this.prevnext.next.view_node.replace(/^.?\\/blabla\\//g, '');\n this.$router.push({\n name: \"article\",\n params: {\n alias: alias\n },\n query: {\n uuid: this.prevnext.next.uuid\n }\n });\n },\n onPrev: function onPrev() {\n // console.log('clicked on prev', this.prevnext.next);\n var alias = this.prevnext.prev.view_node.replace(/^.?\\/blabla\\//g, '');\n this.$router.push({\n name: \"article\",\n params: {\n alias: alias\n },\n query: {\n uuid: this.prevnext.prev.uuid\n }\n });\n }\n }),\n components: {\n Card: _Card.default\n },\n watch: {\n '$route': function $route(to, from) {\n console.log('route change');\n this.getArticle();\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Pages/Article.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nvar _store = _interopRequireDefault(__webpack_require__(/*! vuejs/store */ \"./web/themes/custom/materiotheme/vuejs/store/index.js\"));\n\nvar _jsonAxios = __webpack_require__(/*! vuejs/api/json-axios */ \"./web/themes/custom/materiotheme/vuejs/api/json-axios.js\");\n\nvar _querystring = _interopRequireDefault(__webpack_require__(/*! querystring */ \"./node_modules/querystring-es3/index.js\"));\n\nvar _Card = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/Card */ \"./web/themes/custom/materiotheme/vuejs/components/Content/Card.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Article\",\n router: _route.default,\n store: _store.default,\n props: ['item'],\n data: function data() {\n return {\n index: -1,\n prevnext: {},\n uuid: null,\n content: null,\n loading: true\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n items: function items(state) {\n return state.Blabla.items;\n }\n })),\n created: function created() {\n this.getArticle();\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n getItems: 'Blabla/getItems',\n getItemIndex: 'Blabla/getItemIndex',\n getPrevNextItems: 'Blabla/getPrevNextItems'\n }), {\n getArticle: function getArticle() {\n var _this = this;\n\n console.log(this.$route); // get the article uuid\n\n if (this.$route.query.uuid) {\n // we come from internal link with vuejs\n // directly record uuid\n this.uuid = this.$route.query.uuid;\n } else if (drupalDecoupled.entity_type == 'node' && drupalDecoupled.entity_bundle == 'article') {\n // we landed in an internal page\n // get the uuid from drupalDeclouped, provided by materio_decoupled.module\n this.uuid = drupalDecoupled.entity_uuid;\n }\n\n if (this.uuid) {\n this.loadArticle(); // get the prev next items\n\n if (!this.items.length) {\n // if items list not yet loaded preload them\n this.getItems().then(function () {\n // then get the index\n _this.getIndex();\n });\n } else {\n // or directly get the index\n this.getIndex();\n }\n } else {\n // if for any reason we dont have the uuid\n // redirect to home\n this.$route.replace('home');\n }\n },\n getIndex: function getIndex() {\n var _this2 = this;\n\n console.log(\"Article getIndex\");\n this.getItemIndex(this.uuid).then(function (index) {\n _this2.index = index; // console.log('article index', index, this);\n\n _this2.getPrevNextItems(index).then(function (pn) {\n _this2.prevnext = pn;\n });\n });\n },\n loadArticle: function loadArticle() {\n var _this3 = this;\n\n console.log('loadArticle', this.uuid);\n this.loading = true;\n var params = {\n include: 'field_linked_materials.images,field_showroom,field_tags,field_thesaurus,field_visuel,uid'\n };\n\n var q = _querystring.default.stringify(params);\n\n _jsonAxios.JSONAPI.get(\"node/article/\".concat(this.uuid, \"?\").concat(q)).then(function (_ref) {\n var data = _ref.data;\n console.log('loadArticle data', data);\n\n _this3.parseData(data);\n }).catch(function (error) {\n console.warn('Issue with loadArticle', error);\n Promise.reject(error);\n });\n },\n parseData: function parseData(data) {\n var _this4 = this;\n\n var attrs = data.data.attributes;\n var relations = data.data.relationships;\n console.log('relations', relations);\n var inc = data.included;\n console.log('included', inc);\n this.content = {\n title: attrs.title,\n body: attrs.body.value\n }; // parse all relationships\n\n var _loop = function _loop(key) {\n // skip loop if the property is from prototype\n if (!relations.hasOwnProperty(key)) return \"continue\";\n var relation_obj = relations[key];\n console.log('typeof relation_obj.data', _typeof(relation_obj.data)); // skip relation_obj if data is not array\n\n if (!Array.isArray(relation_obj.data)) return \"continue\"; // create empty field array\n\n _this4.content[key] = []; // parse relationship values using included\n\n var field = {}; // loop through all relation items\n\n relation_obj.data.forEach(function (e) {\n // get the included values for each item using id\n var included = inc.find(function (i) {\n return i.id == e.id;\n }); // if we not found an included item skip the item\n\n if (typeof included != 'undefined') {\n // fill the item values\n switch (key) {\n case 'field_visuel':\n field = e.meta;\n field.id = e.id;\n field.src = included.links.card_medium.href;\n break;\n\n case 'field_linked_materials':\n field = included.attributes;\n field.id = included.id; // get the linked material included images\n\n field.images = [];\n included.relationships.images.data.forEach(function (img) {\n // console.log('href', img.meta.imageDerivatives.links.card_medium.href);\n field.images.push({\n title: img.meta.title,\n url: img.meta.imageDerivatives.links.card_medium.href\n });\n });\n break;\n\n case 'field_thesaurus':\n case 'field_tags':\n field = included.attributes;\n field.id = included.id;\n break;\n // case 'field_showroom':\n // field = included.attributes\n // break\n\n default:\n }\n\n _this4.content[key].push(field);\n }\n });\n };\n\n for (var key in relations) {\n var _ret = _loop(key);\n\n if (_ret === \"continue\") continue;\n } // update main page title\n\n\n this.$store.commit('Common/setPagetitle', this.content.title);\n this.loading = false;\n console.log('article.content', this.content);\n },\n onNext: function onNext() {\n // console.log('clicked on next', this.prevnext.next);\n var alias = this.prevnext.next.view_node.replace(/^.?\\/blabla\\//g, '');\n this.$router.push({\n name: \"article\",\n params: {\n alias: alias\n },\n query: {\n uuid: this.prevnext.next.uuid\n }\n });\n },\n onPrev: function onPrev() {\n // console.log('clicked on prev', this.prevnext.next);\n var alias = this.prevnext.prev.view_node.replace(/^.?\\/blabla\\//g, '');\n this.$router.push({\n name: \"article\",\n params: {\n alias: alias\n },\n query: {\n uuid: this.prevnext.prev.uuid\n }\n });\n }\n }),\n components: {\n Card: _Card.default\n },\n watch: {\n '$route': function $route(to, from) {\n console.log('route change');\n this.getArticle();\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Pages/Article.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -549,7 +549,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Card = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/Card */ \"./web/themes/custom/materiotheme/vuejs/components/Content/Card.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Base\",\n data: function data() {\n return {\n pagetitle: \"Base\" // searchinfos: null\n\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n items: function items(state) {\n return state.Search.items;\n },\n searchinfos: function searchinfos(state) {\n return state.Search.infos;\n },\n count: function count(state) {\n return state.Search.count;\n },\n limit: function limit(state) {\n return state.Search.limit;\n }\n })),\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n newSearch: 'Search/newSearch',\n nextPage: 'Search/nextPage'\n })),\n created: function created() {\n // at first page load or first route entering launch a search if params exists in url query\n console.log('Base created() location', window.location);\n var params = new URLSearchParams(window.location.search);\n\n if (params.has('keys') || params.has('term')) {\n this.$store.commit('Search/setKeys', params.get('keys'));\n this.$store.commit('Search/setTerm', params.get('term'));\n this.pagetitle = params.get('keys');\n this.newSearch();\n }\n },\n beforeRouteUpdate: function beforeRouteUpdate(to, from, next) {\n // when query change launch a new search\n console.log('Base beforeRouteUpdate', to, from, next);\n this.$store.commit('Search/setKeys', to.query.keys);\n this.$store.commit('Search/setTerm', to.query.term);\n this.pagetitle = to.query.keys;\n this.newSearch();\n next();\n },\n components: {\n Card: _Card.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Pages/Base.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Card = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/Card */ \"./web/themes/custom/materiotheme/vuejs/components/Content/Card.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Base\",\n data: function data() {\n return {\n pagetitle: \"Base\" // searchinfos: null\n\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n items: function items(state) {\n return state.Search.items;\n },\n searchinfos: function searchinfos(state) {\n return state.Search.infos;\n },\n count: function count(state) {\n return state.Search.count;\n },\n limit: function limit(state) {\n return state.Search.limit;\n }\n })),\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n newSearch: 'Search/newSearch',\n nextPage: 'Search/nextPage'\n })),\n created: function created() {\n // at first page load or first route entering launch a search if params exists in url query\n console.log('Base created() location', window.location);\n var params = new URLSearchParams(window.location.search);\n\n if (params.has('keys') || params.has('term')) {\n this.$store.commit('Search/setKeys', params.get('keys'));\n this.$store.commit('Search/setTerm', params.get('term'));\n this.pagetitle = params.get('keys');\n this.newSearch();\n }\n },\n beforeRouteUpdate: function beforeRouteUpdate(to, from, next) {\n // when query change launch a new search\n console.log('Base beforeRouteUpdate', to, from, next);\n this.$store.commit('Search/setKeys', to.query.keys);\n this.$store.commit('Search/setTerm', to.query.term);\n this.pagetitle = to.query.keys;\n this.newSearch();\n next();\n },\n components: {\n Card: _Card.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Pages/Base.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -561,7 +561,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _ArticleCard = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/ArticleCard */ \"./web/themes/custom/materiotheme/vuejs/components/Content/ArticleCard.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Blabla\",\n // data() {\n // return {\n // items:[],\n // page:0\n // }\n // },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n items: function items(state) {\n return state.Blabla.items;\n }\n })),\n created: function created() {\n if (!this.items.length) this.getItems();\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n getItems: 'Blabla/getItems',\n nextPage: 'Blabla/nextPage'\n })),\n components: {\n ArticleCard: _ArticleCard.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Pages/Blabla.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _ArticleCard = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/ArticleCard */ \"./web/themes/custom/materiotheme/vuejs/components/Content/ArticleCard.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Blabla\",\n // data() {\n // return {\n // items:[],\n // page:0\n // }\n // },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n items: function items(state) {\n return state.Blabla.items;\n }\n })),\n created: function created() {\n if (!this.items.length) this.getItems();\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n getItems: 'Blabla/getItems',\n nextPage: 'Blabla/nextPage'\n })),\n components: {\n ArticleCard: _ArticleCard.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Pages/Blabla.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -585,7 +585,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Product = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/Product */ \"./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Pricing\",\n // data() {\n // return {\n // items:[],\n // page:0\n // }\n // },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n pricing: function pricing(state) {\n return state.Pages.pricing;\n }\n })),\n created: function created() {\n if (!this.pricing.length) this.getPricing();\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n getPricing: 'Pages/getPricing'\n })),\n components: {\n Product: _Product.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Pages/Pricing.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Product = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/Product */ \"./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Pricing\",\n // data() {\n // return {\n // items:[],\n // page:0\n // }\n // },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n pricing: function pricing(state) {\n return state.Pages.pricing;\n }\n })),\n created: function created() {\n if (!this.pricing.length) this.getPricing();\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n getPricing: 'Pages/getPricing'\n })),\n components: {\n Product: _Product.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Pages/Pricing.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -597,7 +597,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Showroom = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/Showroom */ \"./web/themes/custom/materiotheme/vuejs/components/Content/Showroom.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Showrooms\",\n // data() {\n // return {\n // items:[],\n // page:0\n // }\n // },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n items: function items(state) {\n return state.Showrooms.items;\n }\n })),\n created: function created() {\n if (!this.items.length) this.getItems();\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n getItems: 'Showrooms/getItems'\n })),\n components: {\n Showroom: _Showroom.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Pages/Showrooms.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Showroom = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/Showroom */ \"./web/themes/custom/materiotheme/vuejs/components/Content/Showroom.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Showrooms\",\n // data() {\n // return {\n // items:[],\n // page:0\n // }\n // },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n items: function items(state) {\n return state.Showrooms.items;\n }\n })),\n created: function created() {\n if (!this.items.length) this.getItems();\n },\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n getItems: 'Showrooms/getItems'\n })),\n components: {\n Showroom: _Showroom.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Pages/Showrooms.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -609,7 +609,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n // data () {\n // return {\n // mail: \"Hello User!\"\n // }\n // },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n mail: function mail(state) {\n return state.User.mail;\n },\n isAdmin: function isAdmin(state) {\n return state.User.isAdmin;\n }\n })),\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userLogout: 'User/userLogout'\n }), {\n onLogout: function onLogout() {\n console.log('UserTools onLogout');\n this.userLogout();\n }\n })\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/User/UserTools.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n // data () {\n // return {\n // mail: \"Hello User!\"\n // }\n // },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n mail: function mail(state) {\n return state.User.mail;\n },\n isAdmin: function isAdmin(state) {\n return state.User.isAdmin;\n }\n })),\n methods: _objectSpread({}, (0, _vuex.mapActions)({\n userLogout: 'User/userLogout'\n }), {\n onLogout: function onLogout() {\n console.log('UserTools onLogout');\n this.userLogout();\n }\n })\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/User/UserTools.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -624,58 +624,58 @@ eval("/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukh /***/ }), -/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Block/LoginBlock.vue?vue&type=style&index=0&id=08f975e8&lang=scss&scoped=true&": -/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Block/LoginBlock.vue?vue&type=style&index=0&id=08f975e8&lang=scss&scoped=true& ***! - \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Block/LoginBlock.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options"); - -/***/ }), - -/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=style&index=0&id=7bb795f8&lang=scss&scoped=true&": +/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Block/LoginBlock.vue?vue&type=style&index=0&id=08f975e8&lang=scss&scoped=true&": /*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=style&index=0&id=7bb795f8&lang=scss&scoped=true& ***! + !*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Block/LoginBlock.vue?vue&type=style&index=0&id=08f975e8&lang=scss&scoped=true& ***! \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Block/LoginBlock.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), -/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=style&index=0&id=2acc57a0&lang=scss&scoped=true&": -/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=style&index=0&id=2acc57a0&lang=scss&scoped=true& ***! - \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options"); - -/***/ }), - -/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=style&index=0&id=340aa566&lang=scss&scoped=true&": -/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=style&index=0&id=340aa566&lang=scss&scoped=true& ***! - \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options"); - -/***/ }), - -/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/Modal.vue?vue&type=style&index=0&id=b98ce164&lang=scss&scoped=true&": +/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=style&index=0&id=7bb795f8&lang=scss&scoped=true&": /*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Helper/Modal.vue?vue&type=style&index=0&id=b98ce164&lang=scss&scoped=true& ***! + !*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?vue&type=style&index=0&id=7bb795f8&lang=scss&scoped=true& ***! \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/Modal.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/LoginForm.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options"); + +/***/ }), + +/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=style&index=0&id=2acc57a0&lang=scss&scoped=true&": +/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?vue&type=style&index=0&id=2acc57a0&lang=scss&scoped=true& ***! + \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Form/RegisterForm.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options"); + +/***/ }), + +/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=style&index=0&id=340aa566&lang=scss&scoped=true&": +/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?vue&type=style&index=0&id=340aa566&lang=scss&scoped=true& ***! + \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options"); + +/***/ }), + +/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Helper/Modal.vue?vue&type=style&index=0&id=b98ce164&lang=scss&scoped=true&": +/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Helper/Modal.vue?vue&type=style&index=0&id=b98ce164&lang=scss&scoped=true& ***! + \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Helper/Modal.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -838,7 +838,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"article\",\n { staticClass: \"product\" },\n [\n _c(\"header\", [\n _c(\"h1\", { domProps: { innerHTML: _vm._s(_vm.product.title) } })\n ]),\n _vm._v(\" \"),\n _c(\"section\", { staticClass: \"content\" }, [\n _c(\"div\", {\n staticClass: \"description\",\n domProps: { innerHTML: _vm._s(_vm.product.field_description) }\n }),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"price\" }, [\n _vm._v(_vm._s(_vm.product.price__number))\n ])\n ]),\n _vm._v(\" \"),\n !_vm.isAdherent\n ? _c(\"aside\", [\n _vm.product.field_multiple\n ? _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.quantity,\n expression: \"quantity\"\n }\n ],\n attrs: {\n placeholder: \"quantity\",\n type: \"text\",\n name: \"quantity\",\n value: \"1\"\n },\n domProps: { value: _vm.quantity },\n on: {\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.quantity = $event.target.value\n }\n }\n })\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n attrs: { type: \"button\", name: \"addtocart\" },\n on: {\n click: function($event) {\n $event.stopPropagation()\n return _vm.checkaddtocart($event)\n }\n }\n },\n [_vm._v(\"\\n Commander\\n \")]\n )\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.showLoginModal\n ? _c(\n \"Modal\",\n {\n attrs: { styles: { width: \"500px\", height: \"100%\" } },\n on: { close: _vm.closeModal }\n },\n [\n _c(\"h2\", [_vm._v(\"Please login or register before continue.\")]),\n _vm._v(\" \"),\n _c(\"LoginRegister\", {\n on: { onLogedIn: _vm.logedIn, onRegistered: _vm.registered }\n })\n ],\n 1\n )\n : _vm._e()\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"article\",\n { staticClass: \"product\" },\n [\n _c(\"header\", [\n _c(\"h1\", { domProps: { innerHTML: _vm._s(_vm.product.title) } })\n ]),\n _vm._v(\" \"),\n _c(\"section\", { staticClass: \"content\" }, [\n _c(\"div\", {\n staticClass: \"description\",\n domProps: { innerHTML: _vm._s(_vm.product.field_description) }\n }),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"price\" }, [\n _vm._v(_vm._s(_vm.product.price__number))\n ])\n ]),\n _vm._v(\" \"),\n !_vm.isAdherent\n ? _c(\"aside\", [\n _vm.product.field_multiple\n ? _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.quantity,\n expression: \"quantity\"\n }\n ],\n attrs: {\n placeholder: \"quantity\",\n type: \"text\",\n name: \"quantity\",\n value: \"1\"\n },\n domProps: { value: _vm.quantity },\n on: {\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.quantity = $event.target.value\n }\n }\n })\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n attrs: { type: \"button\", name: \"addtocart\" },\n on: {\n click: function($event) {\n $event.stopPropagation()\n return _vm.checkaddtocart($event)\n }\n }\n },\n [_vm._v(\"\\n Commander\\n \")]\n )\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.showLoginModal\n ? _c(\n \"Modal\",\n {\n attrs: { styles: { width: \"500px\", height: \"100%\" } },\n on: { close: _vm.closeModal }\n },\n [\n _c(\"h2\", [_vm._v(\"Please login or register before continue.\")]),\n _vm._v(\" \"),\n _c(\"LoginRegister\", {\n on: { onLogedIn: _vm.onLogedIn, onRegistered: _vm.onRegistered }\n })\n ],\n 1\n )\n : _vm._e()\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -970,7 +970,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/*!\n * vue-router v3.0.6\n * (c) 2019 Evan You\n * @license MIT\n */\n\n/* */\nfunction assert(condition, message) {\n if (!condition) {\n throw new Error(\"[vue-router] \" + message);\n }\n}\n\nfunction warn(condition, message) {\n if ( true && !condition) {\n typeof console !== 'undefined' && console.warn(\"[vue-router] \" + message);\n }\n}\n\nfunction isError(err) {\n return Object.prototype.toString.call(err).indexOf('Error') > -1;\n}\n\nfunction extend(a, b) {\n for (var key in b) {\n a[key] = b[key];\n }\n\n return a;\n}\n\nvar View = {\n name: 'RouterView',\n functional: true,\n props: {\n name: {\n type: String,\n default: 'default'\n }\n },\n render: function render(_, ref) {\n var props = ref.props;\n var children = ref.children;\n var parent = ref.parent;\n var data = ref.data; // used by devtools to display a router-view badge\n\n data.routerView = true; // directly use parent context's createElement() function\n // so that components rendered by router-view can resolve named slots\n\n var h = parent.$createElement;\n var name = props.name;\n var route = parent.$route;\n var cache = parent._routerViewCache || (parent._routerViewCache = {}); // determine current view depth, also check to see if the tree\n // has been toggled inactive but kept-alive.\n\n var depth = 0;\n var inactive = false;\n\n while (parent && parent._routerRoot !== parent) {\n var vnodeData = parent.$vnode && parent.$vnode.data;\n\n if (vnodeData) {\n if (vnodeData.routerView) {\n depth++;\n }\n\n if (vnodeData.keepAlive && parent._inactive) {\n inactive = true;\n }\n }\n\n parent = parent.$parent;\n }\n\n data.routerViewDepth = depth; // render previous view if the tree is inactive and kept-alive\n\n if (inactive) {\n return h(cache[name], data, children);\n }\n\n var matched = route.matched[depth]; // render empty node if no matched route\n\n if (!matched) {\n cache[name] = null;\n return h();\n }\n\n var component = cache[name] = matched.components[name]; // attach instance registration hook\n // this will be called in the instance's injected lifecycle hooks\n\n data.registerRouteInstance = function (vm, val) {\n // val could be undefined for unregistration\n var current = matched.instances[name];\n\n if (val && current !== vm || !val && current === vm) {\n matched.instances[name] = val;\n }\n } // also register instance in prepatch hook\n // in case the same component instance is reused across different routes\n ;\n\n (data.hook || (data.hook = {})).prepatch = function (_, vnode) {\n matched.instances[name] = vnode.componentInstance;\n }; // register instance in init hook\n // in case kept-alive component be actived when routes changed\n\n\n data.hook.init = function (vnode) {\n if (vnode.data.keepAlive && vnode.componentInstance && vnode.componentInstance !== matched.instances[name]) {\n matched.instances[name] = vnode.componentInstance;\n }\n }; // resolve props\n\n\n var propsToPass = data.props = resolveProps(route, matched.props && matched.props[name]);\n\n if (propsToPass) {\n // clone to prevent mutation\n propsToPass = data.props = extend({}, propsToPass); // pass non-declared props as attrs\n\n var attrs = data.attrs = data.attrs || {};\n\n for (var key in propsToPass) {\n if (!component.props || !(key in component.props)) {\n attrs[key] = propsToPass[key];\n delete propsToPass[key];\n }\n }\n }\n\n return h(component, data, children);\n }\n};\n\nfunction resolveProps(route, config) {\n switch (typeof config) {\n case 'undefined':\n return;\n\n case 'object':\n return config;\n\n case 'function':\n return config(route);\n\n case 'boolean':\n return config ? route.params : undefined;\n\n default:\n if (true) {\n warn(false, \"props in \\\"\" + route.path + \"\\\" is a \" + typeof config + \", \" + \"expecting an object, function or boolean.\");\n }\n\n }\n}\n/* */\n\n\nvar encodeReserveRE = /[!'()*]/g;\n\nvar encodeReserveReplacer = function (c) {\n return '%' + c.charCodeAt(0).toString(16);\n};\n\nvar commaRE = /%2C/g; // fixed encodeURIComponent which is more conformant to RFC3986:\n// - escapes [!'()*]\n// - preserve commas\n\nvar encode = function (str) {\n return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');\n};\n\nvar decode = decodeURIComponent;\n\nfunction resolveQuery(query, extraQuery, _parseQuery) {\n if (extraQuery === void 0) extraQuery = {};\n var parse = _parseQuery || parseQuery;\n var parsedQuery;\n\n try {\n parsedQuery = parse(query || '');\n } catch (e) {\n true && warn(false, e.message);\n parsedQuery = {};\n }\n\n for (var key in extraQuery) {\n parsedQuery[key] = extraQuery[key];\n }\n\n return parsedQuery;\n}\n\nfunction parseQuery(query) {\n var res = {};\n query = query.trim().replace(/^(\\?|#|&)/, '');\n\n if (!query) {\n return res;\n }\n\n query.split('&').forEach(function (param) {\n var parts = param.replace(/\\+/g, ' ').split('=');\n var key = decode(parts.shift());\n var val = parts.length > 0 ? decode(parts.join('=')) : null;\n\n if (res[key] === undefined) {\n res[key] = val;\n } else if (Array.isArray(res[key])) {\n res[key].push(val);\n } else {\n res[key] = [res[key], val];\n }\n });\n return res;\n}\n\nfunction stringifyQuery(obj) {\n var res = obj ? Object.keys(obj).map(function (key) {\n var val = obj[key];\n\n if (val === undefined) {\n return '';\n }\n\n if (val === null) {\n return encode(key);\n }\n\n if (Array.isArray(val)) {\n var result = [];\n val.forEach(function (val2) {\n if (val2 === undefined) {\n return;\n }\n\n if (val2 === null) {\n result.push(encode(key));\n } else {\n result.push(encode(key) + '=' + encode(val2));\n }\n });\n return result.join('&');\n }\n\n return encode(key) + '=' + encode(val);\n }).filter(function (x) {\n return x.length > 0;\n }).join('&') : null;\n return res ? \"?\" + res : '';\n}\n/* */\n\n\nvar trailingSlashRE = /\\/?$/;\n\nfunction createRoute(record, location, redirectedFrom, router) {\n var stringifyQuery$$1 = router && router.options.stringifyQuery;\n var query = location.query || {};\n\n try {\n query = clone(query);\n } catch (e) {}\n\n var route = {\n name: location.name || record && record.name,\n meta: record && record.meta || {},\n path: location.path || '/',\n hash: location.hash || '',\n query: query,\n params: location.params || {},\n fullPath: getFullPath(location, stringifyQuery$$1),\n matched: record ? formatMatch(record) : []\n };\n\n if (redirectedFrom) {\n route.redirectedFrom = getFullPath(redirectedFrom, stringifyQuery$$1);\n }\n\n return Object.freeze(route);\n}\n\nfunction clone(value) {\n if (Array.isArray(value)) {\n return value.map(clone);\n } else if (value && typeof value === 'object') {\n var res = {};\n\n for (var key in value) {\n res[key] = clone(value[key]);\n }\n\n return res;\n } else {\n return value;\n }\n} // the starting route that represents the initial state\n\n\nvar START = createRoute(null, {\n path: '/'\n});\n\nfunction formatMatch(record) {\n var res = [];\n\n while (record) {\n res.unshift(record);\n record = record.parent;\n }\n\n return res;\n}\n\nfunction getFullPath(ref, _stringifyQuery) {\n var path = ref.path;\n var query = ref.query;\n if (query === void 0) query = {};\n var hash = ref.hash;\n if (hash === void 0) hash = '';\n var stringify = _stringifyQuery || stringifyQuery;\n return (path || '/') + stringify(query) + hash;\n}\n\nfunction isSameRoute(a, b) {\n if (b === START) {\n return a === b;\n } else if (!b) {\n return false;\n } else if (a.path && b.path) {\n return a.path.replace(trailingSlashRE, '') === b.path.replace(trailingSlashRE, '') && a.hash === b.hash && isObjectEqual(a.query, b.query);\n } else if (a.name && b.name) {\n return a.name === b.name && a.hash === b.hash && isObjectEqual(a.query, b.query) && isObjectEqual(a.params, b.params);\n } else {\n return false;\n }\n}\n\nfunction isObjectEqual(a, b) {\n if (a === void 0) a = {};\n if (b === void 0) b = {}; // handle null value #1566\n\n if (!a || !b) {\n return a === b;\n }\n\n var aKeys = Object.keys(a);\n var bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n\n return aKeys.every(function (key) {\n var aVal = a[key];\n var bVal = b[key]; // check nested equality\n\n if (typeof aVal === 'object' && typeof bVal === 'object') {\n return isObjectEqual(aVal, bVal);\n }\n\n return String(aVal) === String(bVal);\n });\n}\n\nfunction isIncludedRoute(current, target) {\n return current.path.replace(trailingSlashRE, '/').indexOf(target.path.replace(trailingSlashRE, '/')) === 0 && (!target.hash || current.hash === target.hash) && queryIncludes(current.query, target.query);\n}\n\nfunction queryIncludes(current, target) {\n for (var key in target) {\n if (!(key in current)) {\n return false;\n }\n }\n\n return true;\n}\n/* */\n// work around weird flow bug\n\n\nvar toTypes = [String, Object];\nvar eventTypes = [String, Array];\nvar Link = {\n name: 'RouterLink',\n props: {\n to: {\n type: toTypes,\n required: true\n },\n tag: {\n type: String,\n default: 'a'\n },\n exact: Boolean,\n append: Boolean,\n replace: Boolean,\n activeClass: String,\n exactActiveClass: String,\n event: {\n type: eventTypes,\n default: 'click'\n }\n },\n render: function render(h) {\n var this$1 = this;\n var router = this.$router;\n var current = this.$route;\n var ref = router.resolve(this.to, current, this.append);\n var location = ref.location;\n var route = ref.route;\n var href = ref.href;\n var classes = {};\n var globalActiveClass = router.options.linkActiveClass;\n var globalExactActiveClass = router.options.linkExactActiveClass; // Support global empty active class\n\n var activeClassFallback = globalActiveClass == null ? 'router-link-active' : globalActiveClass;\n var exactActiveClassFallback = globalExactActiveClass == null ? 'router-link-exact-active' : globalExactActiveClass;\n var activeClass = this.activeClass == null ? activeClassFallback : this.activeClass;\n var exactActiveClass = this.exactActiveClass == null ? exactActiveClassFallback : this.exactActiveClass;\n var compareTarget = location.path ? createRoute(null, location, null, router) : route;\n classes[exactActiveClass] = isSameRoute(current, compareTarget);\n classes[activeClass] = this.exact ? classes[exactActiveClass] : isIncludedRoute(current, compareTarget);\n\n var handler = function (e) {\n if (guardEvent(e)) {\n if (this$1.replace) {\n router.replace(location);\n } else {\n router.push(location);\n }\n }\n };\n\n var on = {\n click: guardEvent\n };\n\n if (Array.isArray(this.event)) {\n this.event.forEach(function (e) {\n on[e] = handler;\n });\n } else {\n on[this.event] = handler;\n }\n\n var data = {\n class: classes\n };\n\n if (this.tag === 'a') {\n data.on = on;\n data.attrs = {\n href: href\n };\n } else {\n // find the first child and apply listener and href\n var a = findAnchor(this.$slots.default);\n\n if (a) {\n // in case the is a static node\n a.isStatic = false;\n var aData = a.data = extend({}, a.data);\n aData.on = on;\n var aAttrs = a.data.attrs = extend({}, a.data.attrs);\n aAttrs.href = href;\n } else {\n // doesn't have child, apply listener to self\n data.on = on;\n }\n }\n\n return h(this.tag, data, this.$slots.default);\n }\n};\n\nfunction guardEvent(e) {\n // don't redirect with control keys\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) {\n return;\n } // don't redirect when preventDefault called\n\n\n if (e.defaultPrevented) {\n return;\n } // don't redirect on right click\n\n\n if (e.button !== undefined && e.button !== 0) {\n return;\n } // don't redirect if `target=\"_blank\"`\n\n\n if (e.currentTarget && e.currentTarget.getAttribute) {\n var target = e.currentTarget.getAttribute('target');\n\n if (/\\b_blank\\b/i.test(target)) {\n return;\n }\n } // this may be a Weex event which doesn't have this method\n\n\n if (e.preventDefault) {\n e.preventDefault();\n }\n\n return true;\n}\n\nfunction findAnchor(children) {\n if (children) {\n var child;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.tag === 'a') {\n return child;\n }\n\n if (child.children && (child = findAnchor(child.children))) {\n return child;\n }\n }\n }\n}\n\nvar _Vue;\n\nfunction install(Vue) {\n if (install.installed && _Vue === Vue) {\n return;\n }\n\n install.installed = true;\n _Vue = Vue;\n\n var isDef = function (v) {\n return v !== undefined;\n };\n\n var registerInstance = function (vm, callVal) {\n var i = vm.$options._parentVnode;\n\n if (isDef(i) && isDef(i = i.data) && isDef(i = i.registerRouteInstance)) {\n i(vm, callVal);\n }\n };\n\n Vue.mixin({\n beforeCreate: function beforeCreate() {\n if (isDef(this.$options.router)) {\n this._routerRoot = this;\n this._router = this.$options.router;\n\n this._router.init(this);\n\n Vue.util.defineReactive(this, '_route', this._router.history.current);\n } else {\n this._routerRoot = this.$parent && this.$parent._routerRoot || this;\n }\n\n registerInstance(this, this);\n },\n destroyed: function destroyed() {\n registerInstance(this);\n }\n });\n Object.defineProperty(Vue.prototype, '$router', {\n get: function get() {\n return this._routerRoot._router;\n }\n });\n Object.defineProperty(Vue.prototype, '$route', {\n get: function get() {\n return this._routerRoot._route;\n }\n });\n Vue.component('RouterView', View);\n Vue.component('RouterLink', Link);\n var strats = Vue.config.optionMergeStrategies; // use the same hook merging strategy for route hooks\n\n strats.beforeRouteEnter = strats.beforeRouteLeave = strats.beforeRouteUpdate = strats.created;\n}\n/* */\n\n\nvar inBrowser = typeof window !== 'undefined';\n/* */\n\nfunction resolvePath(relative, base, append) {\n var firstChar = relative.charAt(0);\n\n if (firstChar === '/') {\n return relative;\n }\n\n if (firstChar === '?' || firstChar === '#') {\n return base + relative;\n }\n\n var stack = base.split('/'); // remove trailing segment if:\n // - not appending\n // - appending to trailing slash (last segment is empty)\n\n if (!append || !stack[stack.length - 1]) {\n stack.pop();\n } // resolve relative path\n\n\n var segments = relative.replace(/^\\//, '').split('/');\n\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n\n if (segment === '..') {\n stack.pop();\n } else if (segment !== '.') {\n stack.push(segment);\n }\n } // ensure leading slash\n\n\n if (stack[0] !== '') {\n stack.unshift('');\n }\n\n return stack.join('/');\n}\n\nfunction parsePath(path) {\n var hash = '';\n var query = '';\n var hashIndex = path.indexOf('#');\n\n if (hashIndex >= 0) {\n hash = path.slice(hashIndex);\n path = path.slice(0, hashIndex);\n }\n\n var queryIndex = path.indexOf('?');\n\n if (queryIndex >= 0) {\n query = path.slice(queryIndex + 1);\n path = path.slice(0, queryIndex);\n }\n\n return {\n path: path,\n query: query,\n hash: hash\n };\n}\n\nfunction cleanPath(path) {\n return path.replace(/\\/\\//g, '/');\n}\n\nvar isarray = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n/**\n * Expose `pathToRegexp`.\n */\n\n\nvar pathToRegexp_1 = pathToRegexp;\nvar parse_1 = parse;\nvar compile_1 = compile;\nvar tokensToFunction_1 = tokensToFunction;\nvar tokensToRegExp_1 = tokensToRegExp;\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\n\nvar PATH_REGEXP = new RegExp([// Match escaped characters that would otherwise appear in future matches.\n// This allows the user to escape special characters that won't transform.\n'(\\\\\\\\.)', // Match Express-style parameters and un-named parameters with a prefix\n// and optional suffixes. Matches appear as:\n//\n// \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n// \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n// \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n'([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'].join('|'), 'g');\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\n\nfunction parse(str, options) {\n var tokens = [];\n var key = 0;\n var index = 0;\n var path = '';\n var defaultDelimiter = options && options.delimiter || '/';\n var res;\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0];\n var escaped = res[1];\n var offset = res.index;\n path += str.slice(index, offset);\n index = offset + m.length; // Ignore already escaped sequences.\n\n if (escaped) {\n path += escaped[1];\n continue;\n }\n\n var next = str[index];\n var prefix = res[2];\n var name = res[3];\n var capture = res[4];\n var group = res[5];\n var modifier = res[6];\n var asterisk = res[7]; // Push the current path onto the tokens.\n\n if (path) {\n tokens.push(path);\n path = '';\n }\n\n var partial = prefix != null && next != null && next !== prefix;\n var repeat = modifier === '+' || modifier === '*';\n var optional = modifier === '?' || modifier === '*';\n var delimiter = res[2] || defaultDelimiter;\n var pattern = capture || group;\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?'\n });\n } // Match any characters still remaining.\n\n\n if (index < str.length) {\n path += str.substr(index);\n } // If the path exists, push it onto the end.\n\n\n if (path) {\n tokens.push(path);\n }\n\n return tokens;\n}\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\n\n\nfunction compile(str, options) {\n return tokensToFunction(parse(str, options));\n}\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\n\n\nfunction encodeURIComponentPretty(str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\n\n\nfunction encodeAsterisk(str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n/**\n * Expose a method for transforming tokens into the path function.\n */\n\n\nfunction tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length); // Compile all the patterns before compilation.\n\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\n\n\nfunction escapeString(str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1');\n}\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\n\n\nfunction escapeGroup(group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1');\n}\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\n\n\nfunction attachKeys(re, keys) {\n re.keys = keys;\n return re;\n}\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\n\n\nfunction flags(options) {\n return options.sensitive ? '' : 'i';\n}\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\n\n\nfunction regexpToRegexp(path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g);\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n });\n }\n }\n\n return attachKeys(path, keys);\n}\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\n\n\nfunction arrayToRegexp(path, keys, options) {\n var parts = [];\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source);\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));\n return attachKeys(regexp, keys);\n}\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\n\n\nfunction stringToRegexp(path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options);\n}\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\n\n\nfunction tokensToRegExp(tokens, keys, options) {\n if (!isarray(keys)) {\n options =\n /** @type {!Object} */\n keys || options;\n keys = [];\n }\n\n options = options || {};\n var strict = options.strict;\n var end = options.end !== false;\n var route = ''; // Iterate over the tokens and create our regexp string.\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n route += escapeString(token);\n } else {\n var prefix = escapeString(token.prefix);\n var capture = '(?:' + token.pattern + ')';\n keys.push(token);\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*';\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?';\n } else {\n capture = prefix + '(' + capture + ')?';\n }\n } else {\n capture = prefix + '(' + capture + ')';\n }\n\n route += capture;\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/');\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter; // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';\n }\n\n if (end) {\n route += '$';\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys);\n}\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\n\n\nfunction pathToRegexp(path, keys, options) {\n if (!isarray(keys)) {\n options =\n /** @type {!Object} */\n keys || options;\n keys = [];\n }\n\n options = options || {};\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path,\n /** @type {!Array} */\n keys);\n }\n\n if (isarray(path)) {\n return arrayToRegexp(\n /** @type {!Array} */\n path,\n /** @type {!Array} */\n keys, options);\n }\n\n return stringToRegexp(\n /** @type {string} */\n path,\n /** @type {!Array} */\n keys, options);\n}\n\npathToRegexp_1.parse = parse_1;\npathToRegexp_1.compile = compile_1;\npathToRegexp_1.tokensToFunction = tokensToFunction_1;\npathToRegexp_1.tokensToRegExp = tokensToRegExp_1;\n/* */\n// $flow-disable-line\n\nvar regexpCompileCache = Object.create(null);\n\nfunction fillParams(path, params, routeMsg) {\n params = params || {};\n\n try {\n var filler = regexpCompileCache[path] || (regexpCompileCache[path] = pathToRegexp_1.compile(path)); // Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}\n\n if (params.pathMatch) {\n params[0] = params.pathMatch;\n }\n\n return filler(params, {\n pretty: true\n });\n } catch (e) {\n if (true) {\n warn(false, \"missing param for \" + routeMsg + \": \" + e.message);\n }\n\n return '';\n } finally {\n // delete the 0 if it was added\n delete params[0];\n }\n}\n/* */\n\n\nfunction createRouteMap(routes, oldPathList, oldPathMap, oldNameMap) {\n // the path list is used to control path matching priority\n var pathList = oldPathList || []; // $flow-disable-line\n\n var pathMap = oldPathMap || Object.create(null); // $flow-disable-line\n\n var nameMap = oldNameMap || Object.create(null);\n routes.forEach(function (route) {\n addRouteRecord(pathList, pathMap, nameMap, route);\n }); // ensure wildcard routes are always at the end\n\n for (var i = 0, l = pathList.length; i < l; i++) {\n if (pathList[i] === '*') {\n pathList.push(pathList.splice(i, 1)[0]);\n l--;\n i--;\n }\n }\n\n return {\n pathList: pathList,\n pathMap: pathMap,\n nameMap: nameMap\n };\n}\n\nfunction addRouteRecord(pathList, pathMap, nameMap, route, parent, matchAs) {\n var path = route.path;\n var name = route.name;\n\n if (true) {\n assert(path != null, \"\\\"path\\\" is required in a route configuration.\");\n assert(typeof route.component !== 'string', \"route config \\\"component\\\" for path: \" + String(path || name) + \" cannot be a \" + \"string id. Use an actual component instead.\");\n }\n\n var pathToRegexpOptions = route.pathToRegexpOptions || {};\n var normalizedPath = normalizePath(path, parent, pathToRegexpOptions.strict);\n\n if (typeof route.caseSensitive === 'boolean') {\n pathToRegexpOptions.sensitive = route.caseSensitive;\n }\n\n var record = {\n path: normalizedPath,\n regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),\n components: route.components || {\n default: route.component\n },\n instances: {},\n name: name,\n parent: parent,\n matchAs: matchAs,\n redirect: route.redirect,\n beforeEnter: route.beforeEnter,\n meta: route.meta || {},\n props: route.props == null ? {} : route.components ? route.props : {\n default: route.props\n }\n };\n\n if (route.children) {\n // Warn if route is named, does not redirect and has a default child route.\n // If users navigate to this route by name, the default child will\n // not be rendered (GH Issue #629)\n if (true) {\n if (route.name && !route.redirect && route.children.some(function (child) {\n return /^\\/?$/.test(child.path);\n })) {\n warn(false, \"Named Route '\" + route.name + \"' has a default child route. \" + \"When navigating to this named route (:to=\\\"{name: '\" + route.name + \"'\\\"), \" + \"the default child route will not be rendered. Remove the name from \" + \"this route and use the name of the default child route for named \" + \"links instead.\");\n }\n }\n\n route.children.forEach(function (child) {\n var childMatchAs = matchAs ? cleanPath(matchAs + \"/\" + child.path) : undefined;\n addRouteRecord(pathList, pathMap, nameMap, child, record, childMatchAs);\n });\n }\n\n if (route.alias !== undefined) {\n var aliases = Array.isArray(route.alias) ? route.alias : [route.alias];\n aliases.forEach(function (alias) {\n var aliasRoute = {\n path: alias,\n children: route.children\n };\n addRouteRecord(pathList, pathMap, nameMap, aliasRoute, parent, record.path || '/' // matchAs\n );\n });\n }\n\n if (!pathMap[record.path]) {\n pathList.push(record.path);\n pathMap[record.path] = record;\n }\n\n if (name) {\n if (!nameMap[name]) {\n nameMap[name] = record;\n } else if ( true && !matchAs) {\n warn(false, \"Duplicate named routes definition: \" + \"{ name: \\\"\" + name + \"\\\", path: \\\"\" + record.path + \"\\\" }\");\n }\n }\n}\n\nfunction compileRouteRegex(path, pathToRegexpOptions) {\n var regex = pathToRegexp_1(path, [], pathToRegexpOptions);\n\n if (true) {\n var keys = Object.create(null);\n regex.keys.forEach(function (key) {\n warn(!keys[key.name], \"Duplicate param keys in route with path: \\\"\" + path + \"\\\"\");\n keys[key.name] = true;\n });\n }\n\n return regex;\n}\n\nfunction normalizePath(path, parent, strict) {\n if (!strict) {\n path = path.replace(/\\/$/, '');\n }\n\n if (path[0] === '/') {\n return path;\n }\n\n if (parent == null) {\n return path;\n }\n\n return cleanPath(parent.path + \"/\" + path);\n}\n/* */\n\n\nfunction normalizeLocation(raw, current, append, router) {\n var next = typeof raw === 'string' ? {\n path: raw\n } : raw; // named target\n\n if (next._normalized) {\n return next;\n } else if (next.name) {\n return extend({}, raw);\n } // relative params\n\n\n if (!next.path && next.params && current) {\n next = extend({}, next);\n next._normalized = true;\n var params = extend(extend({}, current.params), next.params);\n\n if (current.name) {\n next.name = current.name;\n next.params = params;\n } else if (current.matched.length) {\n var rawPath = current.matched[current.matched.length - 1].path;\n next.path = fillParams(rawPath, params, \"path \" + current.path);\n } else if (true) {\n warn(false, \"relative params navigation requires a current route.\");\n }\n\n return next;\n }\n\n var parsedPath = parsePath(next.path || '');\n var basePath = current && current.path || '/';\n var path = parsedPath.path ? resolvePath(parsedPath.path, basePath, append || next.append) : basePath;\n var query = resolveQuery(parsedPath.query, next.query, router && router.options.parseQuery);\n var hash = next.hash || parsedPath.hash;\n\n if (hash && hash.charAt(0) !== '#') {\n hash = \"#\" + hash;\n }\n\n return {\n _normalized: true,\n path: path,\n query: query,\n hash: hash\n };\n}\n/* */\n\n\nfunction createMatcher(routes, router) {\n var ref = createRouteMap(routes);\n var pathList = ref.pathList;\n var pathMap = ref.pathMap;\n var nameMap = ref.nameMap;\n\n function addRoutes(routes) {\n createRouteMap(routes, pathList, pathMap, nameMap);\n }\n\n function match(raw, currentRoute, redirectedFrom) {\n var location = normalizeLocation(raw, currentRoute, false, router);\n var name = location.name;\n\n if (name) {\n var record = nameMap[name];\n\n if (true) {\n warn(record, \"Route with name '\" + name + \"' does not exist\");\n }\n\n if (!record) {\n return _createRoute(null, location);\n }\n\n var paramNames = record.regex.keys.filter(function (key) {\n return !key.optional;\n }).map(function (key) {\n return key.name;\n });\n\n if (typeof location.params !== 'object') {\n location.params = {};\n }\n\n if (currentRoute && typeof currentRoute.params === 'object') {\n for (var key in currentRoute.params) {\n if (!(key in location.params) && paramNames.indexOf(key) > -1) {\n location.params[key] = currentRoute.params[key];\n }\n }\n }\n\n if (record) {\n location.path = fillParams(record.path, location.params, \"named route \\\"\" + name + \"\\\"\");\n return _createRoute(record, location, redirectedFrom);\n }\n } else if (location.path) {\n location.params = {};\n\n for (var i = 0; i < pathList.length; i++) {\n var path = pathList[i];\n var record$1 = pathMap[path];\n\n if (matchRoute(record$1.regex, location.path, location.params)) {\n return _createRoute(record$1, location, redirectedFrom);\n }\n }\n } // no match\n\n\n return _createRoute(null, location);\n }\n\n function redirect(record, location) {\n var originalRedirect = record.redirect;\n var redirect = typeof originalRedirect === 'function' ? originalRedirect(createRoute(record, location, null, router)) : originalRedirect;\n\n if (typeof redirect === 'string') {\n redirect = {\n path: redirect\n };\n }\n\n if (!redirect || typeof redirect !== 'object') {\n if (true) {\n warn(false, \"invalid redirect option: \" + JSON.stringify(redirect));\n }\n\n return _createRoute(null, location);\n }\n\n var re = redirect;\n var name = re.name;\n var path = re.path;\n var query = location.query;\n var hash = location.hash;\n var params = location.params;\n query = re.hasOwnProperty('query') ? re.query : query;\n hash = re.hasOwnProperty('hash') ? re.hash : hash;\n params = re.hasOwnProperty('params') ? re.params : params;\n\n if (name) {\n // resolved named direct\n var targetRecord = nameMap[name];\n\n if (true) {\n assert(targetRecord, \"redirect failed: named route \\\"\" + name + \"\\\" not found.\");\n }\n\n return match({\n _normalized: true,\n name: name,\n query: query,\n hash: hash,\n params: params\n }, undefined, location);\n } else if (path) {\n // 1. resolve relative redirect\n var rawPath = resolveRecordPath(path, record); // 2. resolve params\n\n var resolvedPath = fillParams(rawPath, params, \"redirect route with path \\\"\" + rawPath + \"\\\"\"); // 3. rematch with existing query and hash\n\n return match({\n _normalized: true,\n path: resolvedPath,\n query: query,\n hash: hash\n }, undefined, location);\n } else {\n if (true) {\n warn(false, \"invalid redirect option: \" + JSON.stringify(redirect));\n }\n\n return _createRoute(null, location);\n }\n }\n\n function alias(record, location, matchAs) {\n var aliasedPath = fillParams(matchAs, location.params, \"aliased route with path \\\"\" + matchAs + \"\\\"\");\n var aliasedMatch = match({\n _normalized: true,\n path: aliasedPath\n });\n\n if (aliasedMatch) {\n var matched = aliasedMatch.matched;\n var aliasedRecord = matched[matched.length - 1];\n location.params = aliasedMatch.params;\n return _createRoute(aliasedRecord, location);\n }\n\n return _createRoute(null, location);\n }\n\n function _createRoute(record, location, redirectedFrom) {\n if (record && record.redirect) {\n return redirect(record, redirectedFrom || location);\n }\n\n if (record && record.matchAs) {\n return alias(record, location, record.matchAs);\n }\n\n return createRoute(record, location, redirectedFrom, router);\n }\n\n return {\n match: match,\n addRoutes: addRoutes\n };\n}\n\nfunction matchRoute(regex, path, params) {\n var m = path.match(regex);\n\n if (!m) {\n return false;\n } else if (!params) {\n return true;\n }\n\n for (var i = 1, len = m.length; i < len; ++i) {\n var key = regex.keys[i - 1];\n var val = typeof m[i] === 'string' ? decodeURIComponent(m[i]) : m[i];\n\n if (key) {\n // Fix #1994: using * with props: true generates a param named 0\n params[key.name || 'pathMatch'] = val;\n }\n }\n\n return true;\n}\n\nfunction resolveRecordPath(path, record) {\n return resolvePath(path, record.parent ? record.parent.path : '/', true);\n}\n/* */\n\n\nvar positionStore = Object.create(null);\n\nfunction setupScroll() {\n // Fix for #1585 for Firefox\n // Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678\n window.history.replaceState({\n key: getStateKey()\n }, '', window.location.href.replace(window.location.origin, ''));\n window.addEventListener('popstate', function (e) {\n saveScrollPosition();\n\n if (e.state && e.state.key) {\n setStateKey(e.state.key);\n }\n });\n}\n\nfunction handleScroll(router, to, from, isPop) {\n if (!router.app) {\n return;\n }\n\n var behavior = router.options.scrollBehavior;\n\n if (!behavior) {\n return;\n }\n\n if (true) {\n assert(typeof behavior === 'function', \"scrollBehavior must be a function\");\n } // wait until re-render finishes before scrolling\n\n\n router.app.$nextTick(function () {\n var position = getScrollPosition();\n var shouldScroll = behavior.call(router, to, from, isPop ? position : null);\n\n if (!shouldScroll) {\n return;\n }\n\n if (typeof shouldScroll.then === 'function') {\n shouldScroll.then(function (shouldScroll) {\n scrollToPosition(shouldScroll, position);\n }).catch(function (err) {\n if (true) {\n assert(false, err.toString());\n }\n });\n } else {\n scrollToPosition(shouldScroll, position);\n }\n });\n}\n\nfunction saveScrollPosition() {\n var key = getStateKey();\n\n if (key) {\n positionStore[key] = {\n x: window.pageXOffset,\n y: window.pageYOffset\n };\n }\n}\n\nfunction getScrollPosition() {\n var key = getStateKey();\n\n if (key) {\n return positionStore[key];\n }\n}\n\nfunction getElementPosition(el, offset) {\n var docEl = document.documentElement;\n var docRect = docEl.getBoundingClientRect();\n var elRect = el.getBoundingClientRect();\n return {\n x: elRect.left - docRect.left - offset.x,\n y: elRect.top - docRect.top - offset.y\n };\n}\n\nfunction isValidPosition(obj) {\n return isNumber(obj.x) || isNumber(obj.y);\n}\n\nfunction normalizePosition(obj) {\n return {\n x: isNumber(obj.x) ? obj.x : window.pageXOffset,\n y: isNumber(obj.y) ? obj.y : window.pageYOffset\n };\n}\n\nfunction normalizeOffset(obj) {\n return {\n x: isNumber(obj.x) ? obj.x : 0,\n y: isNumber(obj.y) ? obj.y : 0\n };\n}\n\nfunction isNumber(v) {\n return typeof v === 'number';\n}\n\nfunction scrollToPosition(shouldScroll, position) {\n var isObject = typeof shouldScroll === 'object';\n\n if (isObject && typeof shouldScroll.selector === 'string') {\n var el = document.querySelector(shouldScroll.selector);\n\n if (el) {\n var offset = shouldScroll.offset && typeof shouldScroll.offset === 'object' ? shouldScroll.offset : {};\n offset = normalizeOffset(offset);\n position = getElementPosition(el, offset);\n } else if (isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n } else if (isObject && isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n\n if (position) {\n window.scrollTo(position.x, position.y);\n }\n}\n/* */\n\n\nvar supportsPushState = inBrowser && function () {\n var ua = window.navigator.userAgent;\n\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n\n return window.history && 'pushState' in window.history;\n}(); // use User Timing api (if present) for more accurate key precision\n\n\nvar Time = inBrowser && window.performance && window.performance.now ? window.performance : Date;\n\nvar _key = genKey();\n\nfunction genKey() {\n return Time.now().toFixed(3);\n}\n\nfunction getStateKey() {\n return _key;\n}\n\nfunction setStateKey(key) {\n _key = key;\n}\n\nfunction pushState(url, replace) {\n saveScrollPosition(); // try...catch the pushState call to get around Safari\n // DOM Exception 18 where it limits to 100 pushState calls\n\n var history = window.history;\n\n try {\n if (replace) {\n history.replaceState({\n key: _key\n }, '', url);\n } else {\n _key = genKey();\n history.pushState({\n key: _key\n }, '', url);\n }\n } catch (e) {\n window.location[replace ? 'replace' : 'assign'](url);\n }\n}\n\nfunction replaceState(url) {\n pushState(url, true);\n}\n/* */\n\n\nfunction runQueue(queue, fn, cb) {\n var step = function (index) {\n if (index >= queue.length) {\n cb();\n } else {\n if (queue[index]) {\n fn(queue[index], function () {\n step(index + 1);\n });\n } else {\n step(index + 1);\n }\n }\n };\n\n step(0);\n}\n/* */\n\n\nfunction resolveAsyncComponents(matched) {\n return function (to, from, next) {\n var hasAsync = false;\n var pending = 0;\n var error = null;\n flatMapComponents(matched, function (def, _, match, key) {\n // if it's a function and doesn't have cid attached,\n // assume it's an async component resolve function.\n // we are not using Vue's default async resolving mechanism because\n // we want to halt the navigation until the incoming component has been\n // resolved.\n if (typeof def === 'function' && def.cid === undefined) {\n hasAsync = true;\n pending++;\n var resolve = once(function (resolvedDef) {\n if (isESModule(resolvedDef)) {\n resolvedDef = resolvedDef.default;\n } // save resolved on async factory in case it's used elsewhere\n\n\n def.resolved = typeof resolvedDef === 'function' ? resolvedDef : _Vue.extend(resolvedDef);\n match.components[key] = resolvedDef;\n pending--;\n\n if (pending <= 0) {\n next();\n }\n });\n var reject = once(function (reason) {\n var msg = \"Failed to resolve async component \" + key + \": \" + reason;\n true && warn(false, msg);\n\n if (!error) {\n error = isError(reason) ? reason : new Error(msg);\n next(error);\n }\n });\n var res;\n\n try {\n res = def(resolve, reject);\n } catch (e) {\n reject(e);\n }\n\n if (res) {\n if (typeof res.then === 'function') {\n res.then(resolve, reject);\n } else {\n // new syntax in Vue 2.3\n var comp = res.component;\n\n if (comp && typeof comp.then === 'function') {\n comp.then(resolve, reject);\n }\n }\n }\n }\n });\n\n if (!hasAsync) {\n next();\n }\n };\n}\n\nfunction flatMapComponents(matched, fn) {\n return flatten(matched.map(function (m) {\n return Object.keys(m.components).map(function (key) {\n return fn(m.components[key], m.instances[key], m, key);\n });\n }));\n}\n\nfunction flatten(arr) {\n return Array.prototype.concat.apply([], arr);\n}\n\nvar hasSymbol = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\n\nfunction isESModule(obj) {\n return obj.__esModule || hasSymbol && obj[Symbol.toStringTag] === 'Module';\n} // in Webpack 2, require.ensure now also returns a Promise\n// so the resolve/reject functions may get called an extra time\n// if the user uses an arrow function shorthand that happens to\n// return that Promise.\n\n\nfunction once(fn) {\n var called = false;\n return function () {\n var args = [],\n len = arguments.length;\n\n while (len--) args[len] = arguments[len];\n\n if (called) {\n return;\n }\n\n called = true;\n return fn.apply(this, args);\n };\n}\n/* */\n\n\nvar History = function History(router, base) {\n this.router = router;\n this.base = normalizeBase(base); // start with a route object that stands for \"nowhere\"\n\n this.current = START;\n this.pending = null;\n this.ready = false;\n this.readyCbs = [];\n this.readyErrorCbs = [];\n this.errorCbs = [];\n};\n\nHistory.prototype.listen = function listen(cb) {\n this.cb = cb;\n};\n\nHistory.prototype.onReady = function onReady(cb, errorCb) {\n if (this.ready) {\n cb();\n } else {\n this.readyCbs.push(cb);\n\n if (errorCb) {\n this.readyErrorCbs.push(errorCb);\n }\n }\n};\n\nHistory.prototype.onError = function onError(errorCb) {\n this.errorCbs.push(errorCb);\n};\n\nHistory.prototype.transitionTo = function transitionTo(location, onComplete, onAbort) {\n var this$1 = this;\n var route = this.router.match(location, this.current);\n this.confirmTransition(route, function () {\n this$1.updateRoute(route);\n onComplete && onComplete(route);\n this$1.ensureURL(); // fire ready cbs once\n\n if (!this$1.ready) {\n this$1.ready = true;\n this$1.readyCbs.forEach(function (cb) {\n cb(route);\n });\n }\n }, function (err) {\n if (onAbort) {\n onAbort(err);\n }\n\n if (err && !this$1.ready) {\n this$1.ready = true;\n this$1.readyErrorCbs.forEach(function (cb) {\n cb(err);\n });\n }\n });\n};\n\nHistory.prototype.confirmTransition = function confirmTransition(route, onComplete, onAbort) {\n var this$1 = this;\n var current = this.current;\n\n var abort = function (err) {\n if (isError(err)) {\n if (this$1.errorCbs.length) {\n this$1.errorCbs.forEach(function (cb) {\n cb(err);\n });\n } else {\n warn(false, 'uncaught error during route navigation:');\n console.error(err);\n }\n }\n\n onAbort && onAbort(err);\n };\n\n if (isSameRoute(route, current) && // in the case the route map has been dynamically appended to\n route.matched.length === current.matched.length) {\n this.ensureURL();\n return abort();\n }\n\n var ref = resolveQueue(this.current.matched, route.matched);\n var updated = ref.updated;\n var deactivated = ref.deactivated;\n var activated = ref.activated;\n var queue = [].concat( // in-component leave guards\n extractLeaveGuards(deactivated), // global before hooks\n this.router.beforeHooks, // in-component update hooks\n extractUpdateHooks(updated), // in-config enter guards\n activated.map(function (m) {\n return m.beforeEnter;\n }), // async components\n resolveAsyncComponents(activated));\n this.pending = route;\n\n var iterator = function (hook, next) {\n if (this$1.pending !== route) {\n return abort();\n }\n\n try {\n hook(route, current, function (to) {\n if (to === false || isError(to)) {\n // next(false) -> abort navigation, ensure current URL\n this$1.ensureURL(true);\n abort(to);\n } else if (typeof to === 'string' || typeof to === 'object' && (typeof to.path === 'string' || typeof to.name === 'string')) {\n // next('/') or next({ path: '/' }) -> redirect\n abort();\n\n if (typeof to === 'object' && to.replace) {\n this$1.replace(to);\n } else {\n this$1.push(to);\n }\n } else {\n // confirm transition and pass on the value\n next(to);\n }\n });\n } catch (e) {\n abort(e);\n }\n };\n\n runQueue(queue, iterator, function () {\n var postEnterCbs = [];\n\n var isValid = function () {\n return this$1.current === route;\n }; // wait until async components are resolved before\n // extracting in-component enter guards\n\n\n var enterGuards = extractEnterGuards(activated, postEnterCbs, isValid);\n var queue = enterGuards.concat(this$1.router.resolveHooks);\n runQueue(queue, iterator, function () {\n if (this$1.pending !== route) {\n return abort();\n }\n\n this$1.pending = null;\n onComplete(route);\n\n if (this$1.router.app) {\n this$1.router.app.$nextTick(function () {\n postEnterCbs.forEach(function (cb) {\n cb();\n });\n });\n }\n });\n });\n};\n\nHistory.prototype.updateRoute = function updateRoute(route) {\n var prev = this.current;\n this.current = route;\n this.cb && this.cb(route);\n this.router.afterHooks.forEach(function (hook) {\n hook && hook(route, prev);\n });\n};\n\nfunction normalizeBase(base) {\n if (!base) {\n if (inBrowser) {\n // respect tag\n var baseEl = document.querySelector('base');\n base = baseEl && baseEl.getAttribute('href') || '/'; // strip full URL origin\n\n base = base.replace(/^https?:\\/\\/[^\\/]+/, '');\n } else {\n base = '/';\n }\n } // make sure there's the starting slash\n\n\n if (base.charAt(0) !== '/') {\n base = '/' + base;\n } // remove trailing slash\n\n\n return base.replace(/\\/$/, '');\n}\n\nfunction resolveQueue(current, next) {\n var i;\n var max = Math.max(current.length, next.length);\n\n for (i = 0; i < max; i++) {\n if (current[i] !== next[i]) {\n break;\n }\n }\n\n return {\n updated: next.slice(0, i),\n activated: next.slice(i),\n deactivated: current.slice(i)\n };\n}\n\nfunction extractGuards(records, name, bind, reverse) {\n var guards = flatMapComponents(records, function (def, instance, match, key) {\n var guard = extractGuard(def, name);\n\n if (guard) {\n return Array.isArray(guard) ? guard.map(function (guard) {\n return bind(guard, instance, match, key);\n }) : bind(guard, instance, match, key);\n }\n });\n return flatten(reverse ? guards.reverse() : guards);\n}\n\nfunction extractGuard(def, key) {\n if (typeof def !== 'function') {\n // extend now so that global mixins are applied.\n def = _Vue.extend(def);\n }\n\n return def.options[key];\n}\n\nfunction extractLeaveGuards(deactivated) {\n return extractGuards(deactivated, 'beforeRouteLeave', bindGuard, true);\n}\n\nfunction extractUpdateHooks(updated) {\n return extractGuards(updated, 'beforeRouteUpdate', bindGuard);\n}\n\nfunction bindGuard(guard, instance) {\n if (instance) {\n return function boundRouteGuard() {\n return guard.apply(instance, arguments);\n };\n }\n}\n\nfunction extractEnterGuards(activated, cbs, isValid) {\n return extractGuards(activated, 'beforeRouteEnter', function (guard, _, match, key) {\n return bindEnterGuard(guard, match, key, cbs, isValid);\n });\n}\n\nfunction bindEnterGuard(guard, match, key, cbs, isValid) {\n return function routeEnterGuard(to, from, next) {\n return guard(to, from, function (cb) {\n next(cb);\n\n if (typeof cb === 'function') {\n cbs.push(function () {\n // #750\n // if a router-view is wrapped with an out-in transition,\n // the instance may not have been registered at this time.\n // we will need to poll for registration until current route\n // is no longer valid.\n poll(cb, match.instances, key, isValid);\n });\n }\n });\n };\n}\n\nfunction poll(cb, // somehow flow cannot infer this is a function\ninstances, key, isValid) {\n if (instances[key] && !instances[key]._isBeingDestroyed // do not reuse being destroyed instance\n ) {\n cb(instances[key]);\n } else if (isValid()) {\n setTimeout(function () {\n poll(cb, instances, key, isValid);\n }, 16);\n }\n}\n/* */\n\n\nvar HTML5History =\n/*@__PURE__*/\nfunction (History$$1) {\n function HTML5History(router, base) {\n var this$1 = this;\n History$$1.call(this, router, base);\n var expectScroll = router.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll) {\n setupScroll();\n }\n\n var initLocation = getLocation(this.base);\n window.addEventListener('popstate', function (e) {\n var current = this$1.current; // Avoiding first `popstate` event dispatched in some browsers but first\n // history route not updated since async guard at the same time.\n\n var location = getLocation(this$1.base);\n\n if (this$1.current === START && location === initLocation) {\n return;\n }\n\n this$1.transitionTo(location, function (route) {\n if (supportsScroll) {\n handleScroll(router, route, current, true);\n }\n });\n });\n }\n\n if (History$$1) HTML5History.__proto__ = History$$1;\n HTML5History.prototype = Object.create(History$$1 && History$$1.prototype);\n HTML5History.prototype.constructor = HTML5History;\n\n HTML5History.prototype.go = function go(n) {\n window.history.go(n);\n };\n\n HTML5History.prototype.push = function push(location, onComplete, onAbort) {\n var this$1 = this;\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n pushState(cleanPath(this$1.base + route.fullPath));\n handleScroll(this$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.replace = function replace(location, onComplete, onAbort) {\n var this$1 = this;\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n replaceState(cleanPath(this$1.base + route.fullPath));\n handleScroll(this$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.ensureURL = function ensureURL(push) {\n if (getLocation(this.base) !== this.current.fullPath) {\n var current = cleanPath(this.base + this.current.fullPath);\n push ? pushState(current) : replaceState(current);\n }\n };\n\n HTML5History.prototype.getCurrentLocation = function getCurrentLocation() {\n return getLocation(this.base);\n };\n\n return HTML5History;\n}(History);\n\nfunction getLocation(base) {\n var path = decodeURI(window.location.pathname);\n\n if (base && path.indexOf(base) === 0) {\n path = path.slice(base.length);\n }\n\n return (path || '/') + window.location.search + window.location.hash;\n}\n/* */\n\n\nvar HashHistory =\n/*@__PURE__*/\nfunction (History$$1) {\n function HashHistory(router, base, fallback) {\n History$$1.call(this, router, base); // check history fallback deeplinking\n\n if (fallback && checkFallback(this.base)) {\n return;\n }\n\n ensureSlash();\n }\n\n if (History$$1) HashHistory.__proto__ = History$$1;\n HashHistory.prototype = Object.create(History$$1 && History$$1.prototype);\n HashHistory.prototype.constructor = HashHistory; // this is delayed until the app mounts\n // to avoid the hashchange listener being fired too early\n\n HashHistory.prototype.setupListeners = function setupListeners() {\n var this$1 = this;\n var router = this.router;\n var expectScroll = router.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll) {\n setupScroll();\n }\n\n window.addEventListener(supportsPushState ? 'popstate' : 'hashchange', function () {\n var current = this$1.current;\n\n if (!ensureSlash()) {\n return;\n }\n\n this$1.transitionTo(getHash(), function (route) {\n if (supportsScroll) {\n handleScroll(this$1.router, route, current, true);\n }\n\n if (!supportsPushState) {\n replaceHash(route.fullPath);\n }\n });\n });\n };\n\n HashHistory.prototype.push = function push(location, onComplete, onAbort) {\n var this$1 = this;\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n pushHash(route.fullPath);\n handleScroll(this$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HashHistory.prototype.replace = function replace(location, onComplete, onAbort) {\n var this$1 = this;\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n replaceHash(route.fullPath);\n handleScroll(this$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HashHistory.prototype.go = function go(n) {\n window.history.go(n);\n };\n\n HashHistory.prototype.ensureURL = function ensureURL(push) {\n var current = this.current.fullPath;\n\n if (getHash() !== current) {\n push ? pushHash(current) : replaceHash(current);\n }\n };\n\n HashHistory.prototype.getCurrentLocation = function getCurrentLocation() {\n return getHash();\n };\n\n return HashHistory;\n}(History);\n\nfunction checkFallback(base) {\n var location = getLocation(base);\n\n if (!/^\\/#/.test(location)) {\n window.location.replace(cleanPath(base + '/#' + location));\n return true;\n }\n}\n\nfunction ensureSlash() {\n var path = getHash();\n\n if (path.charAt(0) === '/') {\n return true;\n }\n\n replaceHash('/' + path);\n return false;\n}\n\nfunction getHash() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var index = href.indexOf('#'); // empty path\n\n if (index < 0) {\n return '';\n }\n\n href = href.slice(index + 1); // decode the hash but not the search or hash\n // as search(query) is already decoded\n // https://github.com/vuejs/vue-router/issues/2708\n\n var searchIndex = href.indexOf('?');\n\n if (searchIndex < 0) {\n var hashIndex = href.indexOf('#');\n\n if (hashIndex > -1) {\n href = decodeURI(href.slice(0, hashIndex)) + href.slice(hashIndex);\n } else {\n href = decodeURI(href);\n }\n } else {\n if (searchIndex > -1) {\n href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);\n }\n }\n\n return href;\n}\n\nfunction getUrl(path) {\n var href = window.location.href;\n var i = href.indexOf('#');\n var base = i >= 0 ? href.slice(0, i) : href;\n return base + \"#\" + path;\n}\n\nfunction pushHash(path) {\n if (supportsPushState) {\n pushState(getUrl(path));\n } else {\n window.location.hash = path;\n }\n}\n\nfunction replaceHash(path) {\n if (supportsPushState) {\n replaceState(getUrl(path));\n } else {\n window.location.replace(getUrl(path));\n }\n}\n/* */\n\n\nvar AbstractHistory =\n/*@__PURE__*/\nfunction (History$$1) {\n function AbstractHistory(router, base) {\n History$$1.call(this, router, base);\n this.stack = [];\n this.index = -1;\n }\n\n if (History$$1) AbstractHistory.__proto__ = History$$1;\n AbstractHistory.prototype = Object.create(History$$1 && History$$1.prototype);\n AbstractHistory.prototype.constructor = AbstractHistory;\n\n AbstractHistory.prototype.push = function push(location, onComplete, onAbort) {\n var this$1 = this;\n this.transitionTo(location, function (route) {\n this$1.stack = this$1.stack.slice(0, this$1.index + 1).concat(route);\n this$1.index++;\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n AbstractHistory.prototype.replace = function replace(location, onComplete, onAbort) {\n var this$1 = this;\n this.transitionTo(location, function (route) {\n this$1.stack = this$1.stack.slice(0, this$1.index).concat(route);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n AbstractHistory.prototype.go = function go(n) {\n var this$1 = this;\n var targetIndex = this.index + n;\n\n if (targetIndex < 0 || targetIndex >= this.stack.length) {\n return;\n }\n\n var route = this.stack[targetIndex];\n this.confirmTransition(route, function () {\n this$1.index = targetIndex;\n this$1.updateRoute(route);\n });\n };\n\n AbstractHistory.prototype.getCurrentLocation = function getCurrentLocation() {\n var current = this.stack[this.stack.length - 1];\n return current ? current.fullPath : '/';\n };\n\n AbstractHistory.prototype.ensureURL = function ensureURL() {// noop\n };\n\n return AbstractHistory;\n}(History);\n/* */\n\n\nvar VueRouter = function VueRouter(options) {\n if (options === void 0) options = {};\n this.app = null;\n this.apps = [];\n this.options = options;\n this.beforeHooks = [];\n this.resolveHooks = [];\n this.afterHooks = [];\n this.matcher = createMatcher(options.routes || [], this);\n var mode = options.mode || 'hash';\n this.fallback = mode === 'history' && !supportsPushState && options.fallback !== false;\n\n if (this.fallback) {\n mode = 'hash';\n }\n\n if (!inBrowser) {\n mode = 'abstract';\n }\n\n this.mode = mode;\n\n switch (mode) {\n case 'history':\n this.history = new HTML5History(this, options.base);\n break;\n\n case 'hash':\n this.history = new HashHistory(this, options.base, this.fallback);\n break;\n\n case 'abstract':\n this.history = new AbstractHistory(this, options.base);\n break;\n\n default:\n if (true) {\n assert(false, \"invalid mode: \" + mode);\n }\n\n }\n};\n\nvar prototypeAccessors = {\n currentRoute: {\n configurable: true\n }\n};\n\nVueRouter.prototype.match = function match(raw, current, redirectedFrom) {\n return this.matcher.match(raw, current, redirectedFrom);\n};\n\nprototypeAccessors.currentRoute.get = function () {\n return this.history && this.history.current;\n};\n\nVueRouter.prototype.init = function init(app\n/* Vue component instance */\n) {\n var this$1 = this;\n true && assert(install.installed, \"not installed. Make sure to call `Vue.use(VueRouter)` \" + \"before creating root instance.\");\n this.apps.push(app); // set up app destroyed handler\n // https://github.com/vuejs/vue-router/issues/2639\n\n app.$once('hook:destroyed', function () {\n // clean out app from this.apps array once destroyed\n var index = this$1.apps.indexOf(app);\n\n if (index > -1) {\n this$1.apps.splice(index, 1);\n } // ensure we still have a main app or null if no apps\n // we do not release the router so it can be reused\n\n\n if (this$1.app === app) {\n this$1.app = this$1.apps[0] || null;\n }\n }); // main app previously initialized\n // return as we don't need to set up new history listener\n\n if (this.app) {\n return;\n }\n\n this.app = app;\n var history = this.history;\n\n if (history instanceof HTML5History) {\n history.transitionTo(history.getCurrentLocation());\n } else if (history instanceof HashHistory) {\n var setupHashListener = function () {\n history.setupListeners();\n };\n\n history.transitionTo(history.getCurrentLocation(), setupHashListener, setupHashListener);\n }\n\n history.listen(function (route) {\n this$1.apps.forEach(function (app) {\n app._route = route;\n });\n });\n};\n\nVueRouter.prototype.beforeEach = function beforeEach(fn) {\n return registerHook(this.beforeHooks, fn);\n};\n\nVueRouter.prototype.beforeResolve = function beforeResolve(fn) {\n return registerHook(this.resolveHooks, fn);\n};\n\nVueRouter.prototype.afterEach = function afterEach(fn) {\n return registerHook(this.afterHooks, fn);\n};\n\nVueRouter.prototype.onReady = function onReady(cb, errorCb) {\n this.history.onReady(cb, errorCb);\n};\n\nVueRouter.prototype.onError = function onError(errorCb) {\n this.history.onError(errorCb);\n};\n\nVueRouter.prototype.push = function push(location, onComplete, onAbort) {\n this.history.push(location, onComplete, onAbort);\n};\n\nVueRouter.prototype.replace = function replace(location, onComplete, onAbort) {\n this.history.replace(location, onComplete, onAbort);\n};\n\nVueRouter.prototype.go = function go(n) {\n this.history.go(n);\n};\n\nVueRouter.prototype.back = function back() {\n this.go(-1);\n};\n\nVueRouter.prototype.forward = function forward() {\n this.go(1);\n};\n\nVueRouter.prototype.getMatchedComponents = function getMatchedComponents(to) {\n var route = to ? to.matched ? to : this.resolve(to).route : this.currentRoute;\n\n if (!route) {\n return [];\n }\n\n return [].concat.apply([], route.matched.map(function (m) {\n return Object.keys(m.components).map(function (key) {\n return m.components[key];\n });\n }));\n};\n\nVueRouter.prototype.resolve = function resolve(to, current, append) {\n current = current || this.history.current;\n var location = normalizeLocation(to, current, append, this);\n var route = this.match(location, current);\n var fullPath = route.redirectedFrom || route.fullPath;\n var base = this.history.base;\n var href = createHref(base, fullPath, this.mode);\n return {\n location: location,\n route: route,\n href: href,\n // for backwards compat\n normalizedTo: location,\n resolved: route\n };\n};\n\nVueRouter.prototype.addRoutes = function addRoutes(routes) {\n this.matcher.addRoutes(routes);\n\n if (this.history.current !== START) {\n this.history.transitionTo(this.history.getCurrentLocation());\n }\n};\n\nObject.defineProperties(VueRouter.prototype, prototypeAccessors);\n\nfunction registerHook(list, fn) {\n list.push(fn);\n return function () {\n var i = list.indexOf(fn);\n\n if (i > -1) {\n list.splice(i, 1);\n }\n };\n}\n\nfunction createHref(base, fullPath, mode) {\n var path = mode === 'hash' ? '#' + fullPath : fullPath;\n return base ? cleanPath(base + '/' + path) : path;\n}\n\nVueRouter.install = install;\nVueRouter.version = '3.0.6';\n\nif (inBrowser && window.Vue) {\n window.Vue.use(VueRouter);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (VueRouter);\n\n//# sourceURL=webpack:///./node_modules/vue-router/dist/vue-router.esm.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/*!\n * vue-router v3.1.3\n * (c) 2019 Evan You\n * @license MIT\n */\n\n/* */\nfunction assert(condition, message) {\n if (!condition) {\n throw new Error(\"[vue-router] \" + message);\n }\n}\n\nfunction warn(condition, message) {\n if ( true && !condition) {\n typeof console !== 'undefined' && console.warn(\"[vue-router] \" + message);\n }\n}\n\nfunction isError(err) {\n return Object.prototype.toString.call(err).indexOf('Error') > -1;\n}\n\nfunction isExtendedError(constructor, err) {\n return err instanceof constructor || // _name is to support IE9 too\n err && (err.name === constructor.name || err._name === constructor._name);\n}\n\nfunction extend(a, b) {\n for (var key in b) {\n a[key] = b[key];\n }\n\n return a;\n}\n\nvar View = {\n name: 'RouterView',\n functional: true,\n props: {\n name: {\n type: String,\n default: 'default'\n }\n },\n render: function render(_, ref) {\n var props = ref.props;\n var children = ref.children;\n var parent = ref.parent;\n var data = ref.data; // used by devtools to display a router-view badge\n\n data.routerView = true; // directly use parent context's createElement() function\n // so that components rendered by router-view can resolve named slots\n\n var h = parent.$createElement;\n var name = props.name;\n var route = parent.$route;\n var cache = parent._routerViewCache || (parent._routerViewCache = {}); // determine current view depth, also check to see if the tree\n // has been toggled inactive but kept-alive.\n\n var depth = 0;\n var inactive = false;\n\n while (parent && parent._routerRoot !== parent) {\n var vnodeData = parent.$vnode && parent.$vnode.data;\n\n if (vnodeData) {\n if (vnodeData.routerView) {\n depth++;\n }\n\n if (vnodeData.keepAlive && parent._inactive) {\n inactive = true;\n }\n }\n\n parent = parent.$parent;\n }\n\n data.routerViewDepth = depth; // render previous view if the tree is inactive and kept-alive\n\n if (inactive) {\n return h(cache[name], data, children);\n }\n\n var matched = route.matched[depth]; // render empty node if no matched route\n\n if (!matched) {\n cache[name] = null;\n return h();\n }\n\n var component = cache[name] = matched.components[name]; // attach instance registration hook\n // this will be called in the instance's injected lifecycle hooks\n\n data.registerRouteInstance = function (vm, val) {\n // val could be undefined for unregistration\n var current = matched.instances[name];\n\n if (val && current !== vm || !val && current === vm) {\n matched.instances[name] = val;\n }\n } // also register instance in prepatch hook\n // in case the same component instance is reused across different routes\n ;\n\n (data.hook || (data.hook = {})).prepatch = function (_, vnode) {\n matched.instances[name] = vnode.componentInstance;\n }; // register instance in init hook\n // in case kept-alive component be actived when routes changed\n\n\n data.hook.init = function (vnode) {\n if (vnode.data.keepAlive && vnode.componentInstance && vnode.componentInstance !== matched.instances[name]) {\n matched.instances[name] = vnode.componentInstance;\n }\n }; // resolve props\n\n\n var propsToPass = data.props = resolveProps(route, matched.props && matched.props[name]);\n\n if (propsToPass) {\n // clone to prevent mutation\n propsToPass = data.props = extend({}, propsToPass); // pass non-declared props as attrs\n\n var attrs = data.attrs = data.attrs || {};\n\n for (var key in propsToPass) {\n if (!component.props || !(key in component.props)) {\n attrs[key] = propsToPass[key];\n delete propsToPass[key];\n }\n }\n }\n\n return h(component, data, children);\n }\n};\n\nfunction resolveProps(route, config) {\n switch (typeof config) {\n case 'undefined':\n return;\n\n case 'object':\n return config;\n\n case 'function':\n return config(route);\n\n case 'boolean':\n return config ? route.params : undefined;\n\n default:\n if (true) {\n warn(false, \"props in \\\"\" + route.path + \"\\\" is a \" + typeof config + \", \" + \"expecting an object, function or boolean.\");\n }\n\n }\n}\n/* */\n\n\nvar encodeReserveRE = /[!'()*]/g;\n\nvar encodeReserveReplacer = function (c) {\n return '%' + c.charCodeAt(0).toString(16);\n};\n\nvar commaRE = /%2C/g; // fixed encodeURIComponent which is more conformant to RFC3986:\n// - escapes [!'()*]\n// - preserve commas\n\nvar encode = function (str) {\n return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');\n};\n\nvar decode = decodeURIComponent;\n\nfunction resolveQuery(query, extraQuery, _parseQuery) {\n if (extraQuery === void 0) extraQuery = {};\n var parse = _parseQuery || parseQuery;\n var parsedQuery;\n\n try {\n parsedQuery = parse(query || '');\n } catch (e) {\n true && warn(false, e.message);\n parsedQuery = {};\n }\n\n for (var key in extraQuery) {\n parsedQuery[key] = extraQuery[key];\n }\n\n return parsedQuery;\n}\n\nfunction parseQuery(query) {\n var res = {};\n query = query.trim().replace(/^(\\?|#|&)/, '');\n\n if (!query) {\n return res;\n }\n\n query.split('&').forEach(function (param) {\n var parts = param.replace(/\\+/g, ' ').split('=');\n var key = decode(parts.shift());\n var val = parts.length > 0 ? decode(parts.join('=')) : null;\n\n if (res[key] === undefined) {\n res[key] = val;\n } else if (Array.isArray(res[key])) {\n res[key].push(val);\n } else {\n res[key] = [res[key], val];\n }\n });\n return res;\n}\n\nfunction stringifyQuery(obj) {\n var res = obj ? Object.keys(obj).map(function (key) {\n var val = obj[key];\n\n if (val === undefined) {\n return '';\n }\n\n if (val === null) {\n return encode(key);\n }\n\n if (Array.isArray(val)) {\n var result = [];\n val.forEach(function (val2) {\n if (val2 === undefined) {\n return;\n }\n\n if (val2 === null) {\n result.push(encode(key));\n } else {\n result.push(encode(key) + '=' + encode(val2));\n }\n });\n return result.join('&');\n }\n\n return encode(key) + '=' + encode(val);\n }).filter(function (x) {\n return x.length > 0;\n }).join('&') : null;\n return res ? \"?\" + res : '';\n}\n/* */\n\n\nvar trailingSlashRE = /\\/?$/;\n\nfunction createRoute(record, location, redirectedFrom, router) {\n var stringifyQuery = router && router.options.stringifyQuery;\n var query = location.query || {};\n\n try {\n query = clone(query);\n } catch (e) {}\n\n var route = {\n name: location.name || record && record.name,\n meta: record && record.meta || {},\n path: location.path || '/',\n hash: location.hash || '',\n query: query,\n params: location.params || {},\n fullPath: getFullPath(location, stringifyQuery),\n matched: record ? formatMatch(record) : []\n };\n\n if (redirectedFrom) {\n route.redirectedFrom = getFullPath(redirectedFrom, stringifyQuery);\n }\n\n return Object.freeze(route);\n}\n\nfunction clone(value) {\n if (Array.isArray(value)) {\n return value.map(clone);\n } else if (value && typeof value === 'object') {\n var res = {};\n\n for (var key in value) {\n res[key] = clone(value[key]);\n }\n\n return res;\n } else {\n return value;\n }\n} // the starting route that represents the initial state\n\n\nvar START = createRoute(null, {\n path: '/'\n});\n\nfunction formatMatch(record) {\n var res = [];\n\n while (record) {\n res.unshift(record);\n record = record.parent;\n }\n\n return res;\n}\n\nfunction getFullPath(ref, _stringifyQuery) {\n var path = ref.path;\n var query = ref.query;\n if (query === void 0) query = {};\n var hash = ref.hash;\n if (hash === void 0) hash = '';\n var stringify = _stringifyQuery || stringifyQuery;\n return (path || '/') + stringify(query) + hash;\n}\n\nfunction isSameRoute(a, b) {\n if (b === START) {\n return a === b;\n } else if (!b) {\n return false;\n } else if (a.path && b.path) {\n return a.path.replace(trailingSlashRE, '') === b.path.replace(trailingSlashRE, '') && a.hash === b.hash && isObjectEqual(a.query, b.query);\n } else if (a.name && b.name) {\n return a.name === b.name && a.hash === b.hash && isObjectEqual(a.query, b.query) && isObjectEqual(a.params, b.params);\n } else {\n return false;\n }\n}\n\nfunction isObjectEqual(a, b) {\n if (a === void 0) a = {};\n if (b === void 0) b = {}; // handle null value #1566\n\n if (!a || !b) {\n return a === b;\n }\n\n var aKeys = Object.keys(a);\n var bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n\n return aKeys.every(function (key) {\n var aVal = a[key];\n var bVal = b[key]; // check nested equality\n\n if (typeof aVal === 'object' && typeof bVal === 'object') {\n return isObjectEqual(aVal, bVal);\n }\n\n return String(aVal) === String(bVal);\n });\n}\n\nfunction isIncludedRoute(current, target) {\n return current.path.replace(trailingSlashRE, '/').indexOf(target.path.replace(trailingSlashRE, '/')) === 0 && (!target.hash || current.hash === target.hash) && queryIncludes(current.query, target.query);\n}\n\nfunction queryIncludes(current, target) {\n for (var key in target) {\n if (!(key in current)) {\n return false;\n }\n }\n\n return true;\n}\n/* */\n\n\nfunction resolvePath(relative, base, append) {\n var firstChar = relative.charAt(0);\n\n if (firstChar === '/') {\n return relative;\n }\n\n if (firstChar === '?' || firstChar === '#') {\n return base + relative;\n }\n\n var stack = base.split('/'); // remove trailing segment if:\n // - not appending\n // - appending to trailing slash (last segment is empty)\n\n if (!append || !stack[stack.length - 1]) {\n stack.pop();\n } // resolve relative path\n\n\n var segments = relative.replace(/^\\//, '').split('/');\n\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n\n if (segment === '..') {\n stack.pop();\n } else if (segment !== '.') {\n stack.push(segment);\n }\n } // ensure leading slash\n\n\n if (stack[0] !== '') {\n stack.unshift('');\n }\n\n return stack.join('/');\n}\n\nfunction parsePath(path) {\n var hash = '';\n var query = '';\n var hashIndex = path.indexOf('#');\n\n if (hashIndex >= 0) {\n hash = path.slice(hashIndex);\n path = path.slice(0, hashIndex);\n }\n\n var queryIndex = path.indexOf('?');\n\n if (queryIndex >= 0) {\n query = path.slice(queryIndex + 1);\n path = path.slice(0, queryIndex);\n }\n\n return {\n path: path,\n query: query,\n hash: hash\n };\n}\n\nfunction cleanPath(path) {\n return path.replace(/\\/\\//g, '/');\n}\n\nvar isarray = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n/**\n * Expose `pathToRegexp`.\n */\n\n\nvar pathToRegexp_1 = pathToRegexp;\nvar parse_1 = parse;\nvar compile_1 = compile;\nvar tokensToFunction_1 = tokensToFunction;\nvar tokensToRegExp_1 = tokensToRegExp;\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\n\nvar PATH_REGEXP = new RegExp([// Match escaped characters that would otherwise appear in future matches.\n// This allows the user to escape special characters that won't transform.\n'(\\\\\\\\.)', // Match Express-style parameters and un-named parameters with a prefix\n// and optional suffixes. Matches appear as:\n//\n// \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n// \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n// \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n'([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'].join('|'), 'g');\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\n\nfunction parse(str, options) {\n var tokens = [];\n var key = 0;\n var index = 0;\n var path = '';\n var defaultDelimiter = options && options.delimiter || '/';\n var res;\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0];\n var escaped = res[1];\n var offset = res.index;\n path += str.slice(index, offset);\n index = offset + m.length; // Ignore already escaped sequences.\n\n if (escaped) {\n path += escaped[1];\n continue;\n }\n\n var next = str[index];\n var prefix = res[2];\n var name = res[3];\n var capture = res[4];\n var group = res[5];\n var modifier = res[6];\n var asterisk = res[7]; // Push the current path onto the tokens.\n\n if (path) {\n tokens.push(path);\n path = '';\n }\n\n var partial = prefix != null && next != null && next !== prefix;\n var repeat = modifier === '+' || modifier === '*';\n var optional = modifier === '?' || modifier === '*';\n var delimiter = res[2] || defaultDelimiter;\n var pattern = capture || group;\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?'\n });\n } // Match any characters still remaining.\n\n\n if (index < str.length) {\n path += str.substr(index);\n } // If the path exists, push it onto the end.\n\n\n if (path) {\n tokens.push(path);\n }\n\n return tokens;\n}\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\n\n\nfunction compile(str, options) {\n return tokensToFunction(parse(str, options));\n}\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\n\n\nfunction encodeURIComponentPretty(str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\n\n\nfunction encodeAsterisk(str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n/**\n * Expose a method for transforming tokens into the path function.\n */\n\n\nfunction tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length); // Compile all the patterns before compilation.\n\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\n\n\nfunction escapeString(str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1');\n}\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\n\n\nfunction escapeGroup(group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1');\n}\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\n\n\nfunction attachKeys(re, keys) {\n re.keys = keys;\n return re;\n}\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\n\n\nfunction flags(options) {\n return options.sensitive ? '' : 'i';\n}\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\n\n\nfunction regexpToRegexp(path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g);\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n });\n }\n }\n\n return attachKeys(path, keys);\n}\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\n\n\nfunction arrayToRegexp(path, keys, options) {\n var parts = [];\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source);\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));\n return attachKeys(regexp, keys);\n}\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\n\n\nfunction stringToRegexp(path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options);\n}\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\n\n\nfunction tokensToRegExp(tokens, keys, options) {\n if (!isarray(keys)) {\n options =\n /** @type {!Object} */\n keys || options;\n keys = [];\n }\n\n options = options || {};\n var strict = options.strict;\n var end = options.end !== false;\n var route = ''; // Iterate over the tokens and create our regexp string.\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n route += escapeString(token);\n } else {\n var prefix = escapeString(token.prefix);\n var capture = '(?:' + token.pattern + ')';\n keys.push(token);\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*';\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?';\n } else {\n capture = prefix + '(' + capture + ')?';\n }\n } else {\n capture = prefix + '(' + capture + ')';\n }\n\n route += capture;\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/');\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter; // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';\n }\n\n if (end) {\n route += '$';\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys);\n}\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\n\n\nfunction pathToRegexp(path, keys, options) {\n if (!isarray(keys)) {\n options =\n /** @type {!Object} */\n keys || options;\n keys = [];\n }\n\n options = options || {};\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path,\n /** @type {!Array} */\n keys);\n }\n\n if (isarray(path)) {\n return arrayToRegexp(\n /** @type {!Array} */\n path,\n /** @type {!Array} */\n keys, options);\n }\n\n return stringToRegexp(\n /** @type {string} */\n path,\n /** @type {!Array} */\n keys, options);\n}\n\npathToRegexp_1.parse = parse_1;\npathToRegexp_1.compile = compile_1;\npathToRegexp_1.tokensToFunction = tokensToFunction_1;\npathToRegexp_1.tokensToRegExp = tokensToRegExp_1;\n/* */\n// $flow-disable-line\n\nvar regexpCompileCache = Object.create(null);\n\nfunction fillParams(path, params, routeMsg) {\n params = params || {};\n\n try {\n var filler = regexpCompileCache[path] || (regexpCompileCache[path] = pathToRegexp_1.compile(path)); // Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}\n\n if (params.pathMatch) {\n params[0] = params.pathMatch;\n }\n\n return filler(params, {\n pretty: true\n });\n } catch (e) {\n if (true) {\n warn(false, \"missing param for \" + routeMsg + \": \" + e.message);\n }\n\n return '';\n } finally {\n // delete the 0 if it was added\n delete params[0];\n }\n}\n/* */\n\n\nfunction normalizeLocation(raw, current, append, router) {\n var next = typeof raw === 'string' ? {\n path: raw\n } : raw; // named target\n\n if (next._normalized) {\n return next;\n } else if (next.name) {\n return extend({}, raw);\n } // relative params\n\n\n if (!next.path && next.params && current) {\n next = extend({}, next);\n next._normalized = true;\n var params = extend(extend({}, current.params), next.params);\n\n if (current.name) {\n next.name = current.name;\n next.params = params;\n } else if (current.matched.length) {\n var rawPath = current.matched[current.matched.length - 1].path;\n next.path = fillParams(rawPath, params, \"path \" + current.path);\n } else if (true) {\n warn(false, \"relative params navigation requires a current route.\");\n }\n\n return next;\n }\n\n var parsedPath = parsePath(next.path || '');\n var basePath = current && current.path || '/';\n var path = parsedPath.path ? resolvePath(parsedPath.path, basePath, append || next.append) : basePath;\n var query = resolveQuery(parsedPath.query, next.query, router && router.options.parseQuery);\n var hash = next.hash || parsedPath.hash;\n\n if (hash && hash.charAt(0) !== '#') {\n hash = \"#\" + hash;\n }\n\n return {\n _normalized: true,\n path: path,\n query: query,\n hash: hash\n };\n}\n/* */\n// work around weird flow bug\n\n\nvar toTypes = [String, Object];\nvar eventTypes = [String, Array];\n\nvar noop = function () {};\n\nvar Link = {\n name: 'RouterLink',\n props: {\n to: {\n type: toTypes,\n required: true\n },\n tag: {\n type: String,\n default: 'a'\n },\n exact: Boolean,\n append: Boolean,\n replace: Boolean,\n activeClass: String,\n exactActiveClass: String,\n event: {\n type: eventTypes,\n default: 'click'\n }\n },\n render: function render(h) {\n var this$1 = this;\n var router = this.$router;\n var current = this.$route;\n var ref = router.resolve(this.to, current, this.append);\n var location = ref.location;\n var route = ref.route;\n var href = ref.href;\n var classes = {};\n var globalActiveClass = router.options.linkActiveClass;\n var globalExactActiveClass = router.options.linkExactActiveClass; // Support global empty active class\n\n var activeClassFallback = globalActiveClass == null ? 'router-link-active' : globalActiveClass;\n var exactActiveClassFallback = globalExactActiveClass == null ? 'router-link-exact-active' : globalExactActiveClass;\n var activeClass = this.activeClass == null ? activeClassFallback : this.activeClass;\n var exactActiveClass = this.exactActiveClass == null ? exactActiveClassFallback : this.exactActiveClass;\n var compareTarget = route.redirectedFrom ? createRoute(null, normalizeLocation(route.redirectedFrom), null, router) : route;\n classes[exactActiveClass] = isSameRoute(current, compareTarget);\n classes[activeClass] = this.exact ? classes[exactActiveClass] : isIncludedRoute(current, compareTarget);\n\n var handler = function (e) {\n if (guardEvent(e)) {\n if (this$1.replace) {\n router.replace(location, noop);\n } else {\n router.push(location, noop);\n }\n }\n };\n\n var on = {\n click: guardEvent\n };\n\n if (Array.isArray(this.event)) {\n this.event.forEach(function (e) {\n on[e] = handler;\n });\n } else {\n on[this.event] = handler;\n }\n\n var data = {\n class: classes\n };\n var scopedSlot = !this.$scopedSlots.$hasNormal && this.$scopedSlots.default && this.$scopedSlots.default({\n href: href,\n route: route,\n navigate: handler,\n isActive: classes[activeClass],\n isExactActive: classes[exactActiveClass]\n });\n\n if (scopedSlot) {\n if (scopedSlot.length === 1) {\n return scopedSlot[0];\n } else if (scopedSlot.length > 1 || !scopedSlot.length) {\n if (true) {\n warn(false, \"RouterLink with to=\\\"\" + this.props.to + \"\\\" is trying to use a scoped slot but it didn't provide exactly one child.\");\n }\n\n return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot);\n }\n }\n\n if (this.tag === 'a') {\n data.on = on;\n data.attrs = {\n href: href\n };\n } else {\n // find the first child and apply listener and href\n var a = findAnchor(this.$slots.default);\n\n if (a) {\n // in case the is a static node\n a.isStatic = false;\n var aData = a.data = extend({}, a.data);\n aData.on = aData.on || {}; // transform existing events in both objects into arrays so we can push later\n\n for (var event in aData.on) {\n var handler$1 = aData.on[event];\n\n if (event in on) {\n aData.on[event] = Array.isArray(handler$1) ? handler$1 : [handler$1];\n }\n } // append new listeners for router-link\n\n\n for (var event$1 in on) {\n if (event$1 in aData.on) {\n // on[event] is always a function\n aData.on[event$1].push(on[event$1]);\n } else {\n aData.on[event$1] = handler;\n }\n }\n\n var aAttrs = a.data.attrs = extend({}, a.data.attrs);\n aAttrs.href = href;\n } else {\n // doesn't have child, apply listener to self\n data.on = on;\n }\n }\n\n return h(this.tag, data, this.$slots.default);\n }\n};\n\nfunction guardEvent(e) {\n // don't redirect with control keys\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) {\n return;\n } // don't redirect when preventDefault called\n\n\n if (e.defaultPrevented) {\n return;\n } // don't redirect on right click\n\n\n if (e.button !== undefined && e.button !== 0) {\n return;\n } // don't redirect if `target=\"_blank\"`\n\n\n if (e.currentTarget && e.currentTarget.getAttribute) {\n var target = e.currentTarget.getAttribute('target');\n\n if (/\\b_blank\\b/i.test(target)) {\n return;\n }\n } // this may be a Weex event which doesn't have this method\n\n\n if (e.preventDefault) {\n e.preventDefault();\n }\n\n return true;\n}\n\nfunction findAnchor(children) {\n if (children) {\n var child;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (child.tag === 'a') {\n return child;\n }\n\n if (child.children && (child = findAnchor(child.children))) {\n return child;\n }\n }\n }\n}\n\nvar _Vue;\n\nfunction install(Vue) {\n if (install.installed && _Vue === Vue) {\n return;\n }\n\n install.installed = true;\n _Vue = Vue;\n\n var isDef = function (v) {\n return v !== undefined;\n };\n\n var registerInstance = function (vm, callVal) {\n var i = vm.$options._parentVnode;\n\n if (isDef(i) && isDef(i = i.data) && isDef(i = i.registerRouteInstance)) {\n i(vm, callVal);\n }\n };\n\n Vue.mixin({\n beforeCreate: function beforeCreate() {\n if (isDef(this.$options.router)) {\n this._routerRoot = this;\n this._router = this.$options.router;\n\n this._router.init(this);\n\n Vue.util.defineReactive(this, '_route', this._router.history.current);\n } else {\n this._routerRoot = this.$parent && this.$parent._routerRoot || this;\n }\n\n registerInstance(this, this);\n },\n destroyed: function destroyed() {\n registerInstance(this);\n }\n });\n Object.defineProperty(Vue.prototype, '$router', {\n get: function get() {\n return this._routerRoot._router;\n }\n });\n Object.defineProperty(Vue.prototype, '$route', {\n get: function get() {\n return this._routerRoot._route;\n }\n });\n Vue.component('RouterView', View);\n Vue.component('RouterLink', Link);\n var strats = Vue.config.optionMergeStrategies; // use the same hook merging strategy for route hooks\n\n strats.beforeRouteEnter = strats.beforeRouteLeave = strats.beforeRouteUpdate = strats.created;\n}\n/* */\n\n\nvar inBrowser = typeof window !== 'undefined';\n/* */\n\nfunction createRouteMap(routes, oldPathList, oldPathMap, oldNameMap) {\n // the path list is used to control path matching priority\n var pathList = oldPathList || []; // $flow-disable-line\n\n var pathMap = oldPathMap || Object.create(null); // $flow-disable-line\n\n var nameMap = oldNameMap || Object.create(null);\n routes.forEach(function (route) {\n addRouteRecord(pathList, pathMap, nameMap, route);\n }); // ensure wildcard routes are always at the end\n\n for (var i = 0, l = pathList.length; i < l; i++) {\n if (pathList[i] === '*') {\n pathList.push(pathList.splice(i, 1)[0]);\n l--;\n i--;\n }\n }\n\n if (true) {\n // warn if routes do not include leading slashes\n var found = pathList // check for missing leading slash\n .filter(function (path) {\n return path && path.charAt(0) !== '*' && path.charAt(0) !== '/';\n });\n\n if (found.length > 0) {\n var pathNames = found.map(function (path) {\n return \"- \" + path;\n }).join('\\n');\n warn(false, \"Non-nested routes must include a leading slash character. Fix the following routes: \\n\" + pathNames);\n }\n }\n\n return {\n pathList: pathList,\n pathMap: pathMap,\n nameMap: nameMap\n };\n}\n\nfunction addRouteRecord(pathList, pathMap, nameMap, route, parent, matchAs) {\n var path = route.path;\n var name = route.name;\n\n if (true) {\n assert(path != null, \"\\\"path\\\" is required in a route configuration.\");\n assert(typeof route.component !== 'string', \"route config \\\"component\\\" for path: \" + String(path || name) + \" cannot be a \" + \"string id. Use an actual component instead.\");\n }\n\n var pathToRegexpOptions = route.pathToRegexpOptions || {};\n var normalizedPath = normalizePath(path, parent, pathToRegexpOptions.strict);\n\n if (typeof route.caseSensitive === 'boolean') {\n pathToRegexpOptions.sensitive = route.caseSensitive;\n }\n\n var record = {\n path: normalizedPath,\n regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),\n components: route.components || {\n default: route.component\n },\n instances: {},\n name: name,\n parent: parent,\n matchAs: matchAs,\n redirect: route.redirect,\n beforeEnter: route.beforeEnter,\n meta: route.meta || {},\n props: route.props == null ? {} : route.components ? route.props : {\n default: route.props\n }\n };\n\n if (route.children) {\n // Warn if route is named, does not redirect and has a default child route.\n // If users navigate to this route by name, the default child will\n // not be rendered (GH Issue #629)\n if (true) {\n if (route.name && !route.redirect && route.children.some(function (child) {\n return /^\\/?$/.test(child.path);\n })) {\n warn(false, \"Named Route '\" + route.name + \"' has a default child route. \" + \"When navigating to this named route (:to=\\\"{name: '\" + route.name + \"'\\\"), \" + \"the default child route will not be rendered. Remove the name from \" + \"this route and use the name of the default child route for named \" + \"links instead.\");\n }\n }\n\n route.children.forEach(function (child) {\n var childMatchAs = matchAs ? cleanPath(matchAs + \"/\" + child.path) : undefined;\n addRouteRecord(pathList, pathMap, nameMap, child, record, childMatchAs);\n });\n }\n\n if (!pathMap[record.path]) {\n pathList.push(record.path);\n pathMap[record.path] = record;\n }\n\n if (route.alias !== undefined) {\n var aliases = Array.isArray(route.alias) ? route.alias : [route.alias];\n\n for (var i = 0; i < aliases.length; ++i) {\n var alias = aliases[i];\n\n if ( true && alias === path) {\n warn(false, \"Found an alias with the same value as the path: \\\"\" + path + \"\\\". You have to remove that alias. It will be ignored in development.\"); // skip in dev to make it work\n\n continue;\n }\n\n var aliasRoute = {\n path: alias,\n children: route.children\n };\n addRouteRecord(pathList, pathMap, nameMap, aliasRoute, parent, record.path || '/' // matchAs\n );\n }\n }\n\n if (name) {\n if (!nameMap[name]) {\n nameMap[name] = record;\n } else if ( true && !matchAs) {\n warn(false, \"Duplicate named routes definition: \" + \"{ name: \\\"\" + name + \"\\\", path: \\\"\" + record.path + \"\\\" }\");\n }\n }\n}\n\nfunction compileRouteRegex(path, pathToRegexpOptions) {\n var regex = pathToRegexp_1(path, [], pathToRegexpOptions);\n\n if (true) {\n var keys = Object.create(null);\n regex.keys.forEach(function (key) {\n warn(!keys[key.name], \"Duplicate param keys in route with path: \\\"\" + path + \"\\\"\");\n keys[key.name] = true;\n });\n }\n\n return regex;\n}\n\nfunction normalizePath(path, parent, strict) {\n if (!strict) {\n path = path.replace(/\\/$/, '');\n }\n\n if (path[0] === '/') {\n return path;\n }\n\n if (parent == null) {\n return path;\n }\n\n return cleanPath(parent.path + \"/\" + path);\n}\n/* */\n\n\nfunction createMatcher(routes, router) {\n var ref = createRouteMap(routes);\n var pathList = ref.pathList;\n var pathMap = ref.pathMap;\n var nameMap = ref.nameMap;\n\n function addRoutes(routes) {\n createRouteMap(routes, pathList, pathMap, nameMap);\n }\n\n function match(raw, currentRoute, redirectedFrom) {\n var location = normalizeLocation(raw, currentRoute, false, router);\n var name = location.name;\n\n if (name) {\n var record = nameMap[name];\n\n if (true) {\n warn(record, \"Route with name '\" + name + \"' does not exist\");\n }\n\n if (!record) {\n return _createRoute(null, location);\n }\n\n var paramNames = record.regex.keys.filter(function (key) {\n return !key.optional;\n }).map(function (key) {\n return key.name;\n });\n\n if (typeof location.params !== 'object') {\n location.params = {};\n }\n\n if (currentRoute && typeof currentRoute.params === 'object') {\n for (var key in currentRoute.params) {\n if (!(key in location.params) && paramNames.indexOf(key) > -1) {\n location.params[key] = currentRoute.params[key];\n }\n }\n }\n\n location.path = fillParams(record.path, location.params, \"named route \\\"\" + name + \"\\\"\");\n return _createRoute(record, location, redirectedFrom);\n } else if (location.path) {\n location.params = {};\n\n for (var i = 0; i < pathList.length; i++) {\n var path = pathList[i];\n var record$1 = pathMap[path];\n\n if (matchRoute(record$1.regex, location.path, location.params)) {\n return _createRoute(record$1, location, redirectedFrom);\n }\n }\n } // no match\n\n\n return _createRoute(null, location);\n }\n\n function redirect(record, location) {\n var originalRedirect = record.redirect;\n var redirect = typeof originalRedirect === 'function' ? originalRedirect(createRoute(record, location, null, router)) : originalRedirect;\n\n if (typeof redirect === 'string') {\n redirect = {\n path: redirect\n };\n }\n\n if (!redirect || typeof redirect !== 'object') {\n if (true) {\n warn(false, \"invalid redirect option: \" + JSON.stringify(redirect));\n }\n\n return _createRoute(null, location);\n }\n\n var re = redirect;\n var name = re.name;\n var path = re.path;\n var query = location.query;\n var hash = location.hash;\n var params = location.params;\n query = re.hasOwnProperty('query') ? re.query : query;\n hash = re.hasOwnProperty('hash') ? re.hash : hash;\n params = re.hasOwnProperty('params') ? re.params : params;\n\n if (name) {\n // resolved named direct\n var targetRecord = nameMap[name];\n\n if (true) {\n assert(targetRecord, \"redirect failed: named route \\\"\" + name + \"\\\" not found.\");\n }\n\n return match({\n _normalized: true,\n name: name,\n query: query,\n hash: hash,\n params: params\n }, undefined, location);\n } else if (path) {\n // 1. resolve relative redirect\n var rawPath = resolveRecordPath(path, record); // 2. resolve params\n\n var resolvedPath = fillParams(rawPath, params, \"redirect route with path \\\"\" + rawPath + \"\\\"\"); // 3. rematch with existing query and hash\n\n return match({\n _normalized: true,\n path: resolvedPath,\n query: query,\n hash: hash\n }, undefined, location);\n } else {\n if (true) {\n warn(false, \"invalid redirect option: \" + JSON.stringify(redirect));\n }\n\n return _createRoute(null, location);\n }\n }\n\n function alias(record, location, matchAs) {\n var aliasedPath = fillParams(matchAs, location.params, \"aliased route with path \\\"\" + matchAs + \"\\\"\");\n var aliasedMatch = match({\n _normalized: true,\n path: aliasedPath\n });\n\n if (aliasedMatch) {\n var matched = aliasedMatch.matched;\n var aliasedRecord = matched[matched.length - 1];\n location.params = aliasedMatch.params;\n return _createRoute(aliasedRecord, location);\n }\n\n return _createRoute(null, location);\n }\n\n function _createRoute(record, location, redirectedFrom) {\n if (record && record.redirect) {\n return redirect(record, redirectedFrom || location);\n }\n\n if (record && record.matchAs) {\n return alias(record, location, record.matchAs);\n }\n\n return createRoute(record, location, redirectedFrom, router);\n }\n\n return {\n match: match,\n addRoutes: addRoutes\n };\n}\n\nfunction matchRoute(regex, path, params) {\n var m = path.match(regex);\n\n if (!m) {\n return false;\n } else if (!params) {\n return true;\n }\n\n for (var i = 1, len = m.length; i < len; ++i) {\n var key = regex.keys[i - 1];\n var val = typeof m[i] === 'string' ? decodeURIComponent(m[i]) : m[i];\n\n if (key) {\n // Fix #1994: using * with props: true generates a param named 0\n params[key.name || 'pathMatch'] = val;\n }\n }\n\n return true;\n}\n\nfunction resolveRecordPath(path, record) {\n return resolvePath(path, record.parent ? record.parent.path : '/', true);\n}\n/* */\n// use User Timing api (if present) for more accurate key precision\n\n\nvar Time = inBrowser && window.performance && window.performance.now ? window.performance : Date;\n\nfunction genStateKey() {\n return Time.now().toFixed(3);\n}\n\nvar _key = genStateKey();\n\nfunction getStateKey() {\n return _key;\n}\n\nfunction setStateKey(key) {\n return _key = key;\n}\n/* */\n\n\nvar positionStore = Object.create(null);\n\nfunction setupScroll() {\n // Fix for #1585 for Firefox\n // Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678\n // Fix for #2774 Support for apps loaded from Windows file shares not mapped to network drives: replaced location.origin with\n // window.location.protocol + '//' + window.location.host\n // location.host contains the port and location.hostname doesn't\n var protocolAndPath = window.location.protocol + '//' + window.location.host;\n var absolutePath = window.location.href.replace(protocolAndPath, '');\n window.history.replaceState({\n key: getStateKey()\n }, '', absolutePath);\n window.addEventListener('popstate', function (e) {\n saveScrollPosition();\n\n if (e.state && e.state.key) {\n setStateKey(e.state.key);\n }\n });\n}\n\nfunction handleScroll(router, to, from, isPop) {\n if (!router.app) {\n return;\n }\n\n var behavior = router.options.scrollBehavior;\n\n if (!behavior) {\n return;\n }\n\n if (true) {\n assert(typeof behavior === 'function', \"scrollBehavior must be a function\");\n } // wait until re-render finishes before scrolling\n\n\n router.app.$nextTick(function () {\n var position = getScrollPosition();\n var shouldScroll = behavior.call(router, to, from, isPop ? position : null);\n\n if (!shouldScroll) {\n return;\n }\n\n if (typeof shouldScroll.then === 'function') {\n shouldScroll.then(function (shouldScroll) {\n scrollToPosition(shouldScroll, position);\n }).catch(function (err) {\n if (true) {\n assert(false, err.toString());\n }\n });\n } else {\n scrollToPosition(shouldScroll, position);\n }\n });\n}\n\nfunction saveScrollPosition() {\n var key = getStateKey();\n\n if (key) {\n positionStore[key] = {\n x: window.pageXOffset,\n y: window.pageYOffset\n };\n }\n}\n\nfunction getScrollPosition() {\n var key = getStateKey();\n\n if (key) {\n return positionStore[key];\n }\n}\n\nfunction getElementPosition(el, offset) {\n var docEl = document.documentElement;\n var docRect = docEl.getBoundingClientRect();\n var elRect = el.getBoundingClientRect();\n return {\n x: elRect.left - docRect.left - offset.x,\n y: elRect.top - docRect.top - offset.y\n };\n}\n\nfunction isValidPosition(obj) {\n return isNumber(obj.x) || isNumber(obj.y);\n}\n\nfunction normalizePosition(obj) {\n return {\n x: isNumber(obj.x) ? obj.x : window.pageXOffset,\n y: isNumber(obj.y) ? obj.y : window.pageYOffset\n };\n}\n\nfunction normalizeOffset(obj) {\n return {\n x: isNumber(obj.x) ? obj.x : 0,\n y: isNumber(obj.y) ? obj.y : 0\n };\n}\n\nfunction isNumber(v) {\n return typeof v === 'number';\n}\n\nvar hashStartsWithNumberRE = /^#\\d/;\n\nfunction scrollToPosition(shouldScroll, position) {\n var isObject = typeof shouldScroll === 'object';\n\n if (isObject && typeof shouldScroll.selector === 'string') {\n // getElementById would still fail if the selector contains a more complicated query like #main[data-attr]\n // but at the same time, it doesn't make much sense to select an element with an id and an extra selector\n var el = hashStartsWithNumberRE.test(shouldScroll.selector) // $flow-disable-line\n ? document.getElementById(shouldScroll.selector.slice(1)) // $flow-disable-line\n : document.querySelector(shouldScroll.selector);\n\n if (el) {\n var offset = shouldScroll.offset && typeof shouldScroll.offset === 'object' ? shouldScroll.offset : {};\n offset = normalizeOffset(offset);\n position = getElementPosition(el, offset);\n } else if (isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n } else if (isObject && isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n\n if (position) {\n window.scrollTo(position.x, position.y);\n }\n}\n/* */\n\n\nvar supportsPushState = inBrowser && function () {\n var ua = window.navigator.userAgent;\n\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n\n return window.history && 'pushState' in window.history;\n}();\n\nfunction pushState(url, replace) {\n saveScrollPosition(); // try...catch the pushState call to get around Safari\n // DOM Exception 18 where it limits to 100 pushState calls\n\n var history = window.history;\n\n try {\n if (replace) {\n history.replaceState({\n key: getStateKey()\n }, '', url);\n } else {\n history.pushState({\n key: setStateKey(genStateKey())\n }, '', url);\n }\n } catch (e) {\n window.location[replace ? 'replace' : 'assign'](url);\n }\n}\n\nfunction replaceState(url) {\n pushState(url, true);\n}\n/* */\n\n\nfunction runQueue(queue, fn, cb) {\n var step = function (index) {\n if (index >= queue.length) {\n cb();\n } else {\n if (queue[index]) {\n fn(queue[index], function () {\n step(index + 1);\n });\n } else {\n step(index + 1);\n }\n }\n };\n\n step(0);\n}\n/* */\n\n\nfunction resolveAsyncComponents(matched) {\n return function (to, from, next) {\n var hasAsync = false;\n var pending = 0;\n var error = null;\n flatMapComponents(matched, function (def, _, match, key) {\n // if it's a function and doesn't have cid attached,\n // assume it's an async component resolve function.\n // we are not using Vue's default async resolving mechanism because\n // we want to halt the navigation until the incoming component has been\n // resolved.\n if (typeof def === 'function' && def.cid === undefined) {\n hasAsync = true;\n pending++;\n var resolve = once(function (resolvedDef) {\n if (isESModule(resolvedDef)) {\n resolvedDef = resolvedDef.default;\n } // save resolved on async factory in case it's used elsewhere\n\n\n def.resolved = typeof resolvedDef === 'function' ? resolvedDef : _Vue.extend(resolvedDef);\n match.components[key] = resolvedDef;\n pending--;\n\n if (pending <= 0) {\n next();\n }\n });\n var reject = once(function (reason) {\n var msg = \"Failed to resolve async component \" + key + \": \" + reason;\n true && warn(false, msg);\n\n if (!error) {\n error = isError(reason) ? reason : new Error(msg);\n next(error);\n }\n });\n var res;\n\n try {\n res = def(resolve, reject);\n } catch (e) {\n reject(e);\n }\n\n if (res) {\n if (typeof res.then === 'function') {\n res.then(resolve, reject);\n } else {\n // new syntax in Vue 2.3\n var comp = res.component;\n\n if (comp && typeof comp.then === 'function') {\n comp.then(resolve, reject);\n }\n }\n }\n }\n });\n\n if (!hasAsync) {\n next();\n }\n };\n}\n\nfunction flatMapComponents(matched, fn) {\n return flatten(matched.map(function (m) {\n return Object.keys(m.components).map(function (key) {\n return fn(m.components[key], m.instances[key], m, key);\n });\n }));\n}\n\nfunction flatten(arr) {\n return Array.prototype.concat.apply([], arr);\n}\n\nvar hasSymbol = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\n\nfunction isESModule(obj) {\n return obj.__esModule || hasSymbol && obj[Symbol.toStringTag] === 'Module';\n} // in Webpack 2, require.ensure now also returns a Promise\n// so the resolve/reject functions may get called an extra time\n// if the user uses an arrow function shorthand that happens to\n// return that Promise.\n\n\nfunction once(fn) {\n var called = false;\n return function () {\n var args = [],\n len = arguments.length;\n\n while (len--) args[len] = arguments[len];\n\n if (called) {\n return;\n }\n\n called = true;\n return fn.apply(this, args);\n };\n}\n\nvar NavigationDuplicated =\n/*@__PURE__*/\nfunction (Error) {\n function NavigationDuplicated(normalizedLocation) {\n Error.call(this);\n this.name = this._name = 'NavigationDuplicated'; // passing the message to super() doesn't seem to work in the transpiled version\n\n this.message = \"Navigating to current location (\\\"\" + normalizedLocation.fullPath + \"\\\") is not allowed\"; // add a stack property so services like Sentry can correctly display it\n\n Object.defineProperty(this, 'stack', {\n value: new Error().stack,\n writable: true,\n configurable: true\n }); // we could also have used\n // Error.captureStackTrace(this, this.constructor)\n // but it only exists on node and chrome\n }\n\n if (Error) NavigationDuplicated.__proto__ = Error;\n NavigationDuplicated.prototype = Object.create(Error && Error.prototype);\n NavigationDuplicated.prototype.constructor = NavigationDuplicated;\n return NavigationDuplicated;\n}(Error); // support IE9\n\n\nNavigationDuplicated._name = 'NavigationDuplicated';\n/* */\n\nvar History = function History(router, base) {\n this.router = router;\n this.base = normalizeBase(base); // start with a route object that stands for \"nowhere\"\n\n this.current = START;\n this.pending = null;\n this.ready = false;\n this.readyCbs = [];\n this.readyErrorCbs = [];\n this.errorCbs = [];\n};\n\nHistory.prototype.listen = function listen(cb) {\n this.cb = cb;\n};\n\nHistory.prototype.onReady = function onReady(cb, errorCb) {\n if (this.ready) {\n cb();\n } else {\n this.readyCbs.push(cb);\n\n if (errorCb) {\n this.readyErrorCbs.push(errorCb);\n }\n }\n};\n\nHistory.prototype.onError = function onError(errorCb) {\n this.errorCbs.push(errorCb);\n};\n\nHistory.prototype.transitionTo = function transitionTo(location, onComplete, onAbort) {\n var this$1 = this;\n var route = this.router.match(location, this.current);\n this.confirmTransition(route, function () {\n this$1.updateRoute(route);\n onComplete && onComplete(route);\n this$1.ensureURL(); // fire ready cbs once\n\n if (!this$1.ready) {\n this$1.ready = true;\n this$1.readyCbs.forEach(function (cb) {\n cb(route);\n });\n }\n }, function (err) {\n if (onAbort) {\n onAbort(err);\n }\n\n if (err && !this$1.ready) {\n this$1.ready = true;\n this$1.readyErrorCbs.forEach(function (cb) {\n cb(err);\n });\n }\n });\n};\n\nHistory.prototype.confirmTransition = function confirmTransition(route, onComplete, onAbort) {\n var this$1 = this;\n var current = this.current;\n\n var abort = function (err) {\n // after merging https://github.com/vuejs/vue-router/pull/2771 we\n // When the user navigates through history through back/forward buttons\n // we do not want to throw the error. We only throw it if directly calling\n // push/replace. That's why it's not included in isError\n if (!isExtendedError(NavigationDuplicated, err) && isError(err)) {\n if (this$1.errorCbs.length) {\n this$1.errorCbs.forEach(function (cb) {\n cb(err);\n });\n } else {\n warn(false, 'uncaught error during route navigation:');\n console.error(err);\n }\n }\n\n onAbort && onAbort(err);\n };\n\n if (isSameRoute(route, current) && // in the case the route map has been dynamically appended to\n route.matched.length === current.matched.length) {\n this.ensureURL();\n return abort(new NavigationDuplicated(route));\n }\n\n var ref = resolveQueue(this.current.matched, route.matched);\n var updated = ref.updated;\n var deactivated = ref.deactivated;\n var activated = ref.activated;\n var queue = [].concat( // in-component leave guards\n extractLeaveGuards(deactivated), // global before hooks\n this.router.beforeHooks, // in-component update hooks\n extractUpdateHooks(updated), // in-config enter guards\n activated.map(function (m) {\n return m.beforeEnter;\n }), // async components\n resolveAsyncComponents(activated));\n this.pending = route;\n\n var iterator = function (hook, next) {\n if (this$1.pending !== route) {\n return abort();\n }\n\n try {\n hook(route, current, function (to) {\n if (to === false || isError(to)) {\n // next(false) -> abort navigation, ensure current URL\n this$1.ensureURL(true);\n abort(to);\n } else if (typeof to === 'string' || typeof to === 'object' && (typeof to.path === 'string' || typeof to.name === 'string')) {\n // next('/') or next({ path: '/' }) -> redirect\n abort();\n\n if (typeof to === 'object' && to.replace) {\n this$1.replace(to);\n } else {\n this$1.push(to);\n }\n } else {\n // confirm transition and pass on the value\n next(to);\n }\n });\n } catch (e) {\n abort(e);\n }\n };\n\n runQueue(queue, iterator, function () {\n var postEnterCbs = [];\n\n var isValid = function () {\n return this$1.current === route;\n }; // wait until async components are resolved before\n // extracting in-component enter guards\n\n\n var enterGuards = extractEnterGuards(activated, postEnterCbs, isValid);\n var queue = enterGuards.concat(this$1.router.resolveHooks);\n runQueue(queue, iterator, function () {\n if (this$1.pending !== route) {\n return abort();\n }\n\n this$1.pending = null;\n onComplete(route);\n\n if (this$1.router.app) {\n this$1.router.app.$nextTick(function () {\n postEnterCbs.forEach(function (cb) {\n cb();\n });\n });\n }\n });\n });\n};\n\nHistory.prototype.updateRoute = function updateRoute(route) {\n var prev = this.current;\n this.current = route;\n this.cb && this.cb(route);\n this.router.afterHooks.forEach(function (hook) {\n hook && hook(route, prev);\n });\n};\n\nfunction normalizeBase(base) {\n if (!base) {\n if (inBrowser) {\n // respect tag\n var baseEl = document.querySelector('base');\n base = baseEl && baseEl.getAttribute('href') || '/'; // strip full URL origin\n\n base = base.replace(/^https?:\\/\\/[^\\/]+/, '');\n } else {\n base = '/';\n }\n } // make sure there's the starting slash\n\n\n if (base.charAt(0) !== '/') {\n base = '/' + base;\n } // remove trailing slash\n\n\n return base.replace(/\\/$/, '');\n}\n\nfunction resolveQueue(current, next) {\n var i;\n var max = Math.max(current.length, next.length);\n\n for (i = 0; i < max; i++) {\n if (current[i] !== next[i]) {\n break;\n }\n }\n\n return {\n updated: next.slice(0, i),\n activated: next.slice(i),\n deactivated: current.slice(i)\n };\n}\n\nfunction extractGuards(records, name, bind, reverse) {\n var guards = flatMapComponents(records, function (def, instance, match, key) {\n var guard = extractGuard(def, name);\n\n if (guard) {\n return Array.isArray(guard) ? guard.map(function (guard) {\n return bind(guard, instance, match, key);\n }) : bind(guard, instance, match, key);\n }\n });\n return flatten(reverse ? guards.reverse() : guards);\n}\n\nfunction extractGuard(def, key) {\n if (typeof def !== 'function') {\n // extend now so that global mixins are applied.\n def = _Vue.extend(def);\n }\n\n return def.options[key];\n}\n\nfunction extractLeaveGuards(deactivated) {\n return extractGuards(deactivated, 'beforeRouteLeave', bindGuard, true);\n}\n\nfunction extractUpdateHooks(updated) {\n return extractGuards(updated, 'beforeRouteUpdate', bindGuard);\n}\n\nfunction bindGuard(guard, instance) {\n if (instance) {\n return function boundRouteGuard() {\n return guard.apply(instance, arguments);\n };\n }\n}\n\nfunction extractEnterGuards(activated, cbs, isValid) {\n return extractGuards(activated, 'beforeRouteEnter', function (guard, _, match, key) {\n return bindEnterGuard(guard, match, key, cbs, isValid);\n });\n}\n\nfunction bindEnterGuard(guard, match, key, cbs, isValid) {\n return function routeEnterGuard(to, from, next) {\n return guard(to, from, function (cb) {\n if (typeof cb === 'function') {\n cbs.push(function () {\n // #750\n // if a router-view is wrapped with an out-in transition,\n // the instance may not have been registered at this time.\n // we will need to poll for registration until current route\n // is no longer valid.\n poll(cb, match.instances, key, isValid);\n });\n }\n\n next(cb);\n });\n };\n}\n\nfunction poll(cb, // somehow flow cannot infer this is a function\ninstances, key, isValid) {\n if (instances[key] && !instances[key]._isBeingDestroyed // do not reuse being destroyed instance\n ) {\n cb(instances[key]);\n } else if (isValid()) {\n setTimeout(function () {\n poll(cb, instances, key, isValid);\n }, 16);\n }\n}\n/* */\n\n\nvar HTML5History =\n/*@__PURE__*/\nfunction (History) {\n function HTML5History(router, base) {\n var this$1 = this;\n History.call(this, router, base);\n var expectScroll = router.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll) {\n setupScroll();\n }\n\n var initLocation = getLocation(this.base);\n window.addEventListener('popstate', function (e) {\n var current = this$1.current; // Avoiding first `popstate` event dispatched in some browsers but first\n // history route not updated since async guard at the same time.\n\n var location = getLocation(this$1.base);\n\n if (this$1.current === START && location === initLocation) {\n return;\n }\n\n this$1.transitionTo(location, function (route) {\n if (supportsScroll) {\n handleScroll(router, route, current, true);\n }\n });\n });\n }\n\n if (History) HTML5History.__proto__ = History;\n HTML5History.prototype = Object.create(History && History.prototype);\n HTML5History.prototype.constructor = HTML5History;\n\n HTML5History.prototype.go = function go(n) {\n window.history.go(n);\n };\n\n HTML5History.prototype.push = function push(location, onComplete, onAbort) {\n var this$1 = this;\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n pushState(cleanPath(this$1.base + route.fullPath));\n handleScroll(this$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.replace = function replace(location, onComplete, onAbort) {\n var this$1 = this;\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n replaceState(cleanPath(this$1.base + route.fullPath));\n handleScroll(this$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.ensureURL = function ensureURL(push) {\n if (getLocation(this.base) !== this.current.fullPath) {\n var current = cleanPath(this.base + this.current.fullPath);\n push ? pushState(current) : replaceState(current);\n }\n };\n\n HTML5History.prototype.getCurrentLocation = function getCurrentLocation() {\n return getLocation(this.base);\n };\n\n return HTML5History;\n}(History);\n\nfunction getLocation(base) {\n var path = decodeURI(window.location.pathname);\n\n if (base && path.indexOf(base) === 0) {\n path = path.slice(base.length);\n }\n\n return (path || '/') + window.location.search + window.location.hash;\n}\n/* */\n\n\nvar HashHistory =\n/*@__PURE__*/\nfunction (History) {\n function HashHistory(router, base, fallback) {\n History.call(this, router, base); // check history fallback deeplinking\n\n if (fallback && checkFallback(this.base)) {\n return;\n }\n\n ensureSlash();\n }\n\n if (History) HashHistory.__proto__ = History;\n HashHistory.prototype = Object.create(History && History.prototype);\n HashHistory.prototype.constructor = HashHistory; // this is delayed until the app mounts\n // to avoid the hashchange listener being fired too early\n\n HashHistory.prototype.setupListeners = function setupListeners() {\n var this$1 = this;\n var router = this.router;\n var expectScroll = router.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll) {\n setupScroll();\n }\n\n window.addEventListener(supportsPushState ? 'popstate' : 'hashchange', function () {\n var current = this$1.current;\n\n if (!ensureSlash()) {\n return;\n }\n\n this$1.transitionTo(getHash(), function (route) {\n if (supportsScroll) {\n handleScroll(this$1.router, route, current, true);\n }\n\n if (!supportsPushState) {\n replaceHash(route.fullPath);\n }\n });\n });\n };\n\n HashHistory.prototype.push = function push(location, onComplete, onAbort) {\n var this$1 = this;\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n pushHash(route.fullPath);\n handleScroll(this$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HashHistory.prototype.replace = function replace(location, onComplete, onAbort) {\n var this$1 = this;\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n replaceHash(route.fullPath);\n handleScroll(this$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HashHistory.prototype.go = function go(n) {\n window.history.go(n);\n };\n\n HashHistory.prototype.ensureURL = function ensureURL(push) {\n var current = this.current.fullPath;\n\n if (getHash() !== current) {\n push ? pushHash(current) : replaceHash(current);\n }\n };\n\n HashHistory.prototype.getCurrentLocation = function getCurrentLocation() {\n return getHash();\n };\n\n return HashHistory;\n}(History);\n\nfunction checkFallback(base) {\n var location = getLocation(base);\n\n if (!/^\\/#/.test(location)) {\n window.location.replace(cleanPath(base + '/#' + location));\n return true;\n }\n}\n\nfunction ensureSlash() {\n var path = getHash();\n\n if (path.charAt(0) === '/') {\n return true;\n }\n\n replaceHash('/' + path);\n return false;\n}\n\nfunction getHash() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var index = href.indexOf('#'); // empty path\n\n if (index < 0) {\n return '';\n }\n\n href = href.slice(index + 1); // decode the hash but not the search or hash\n // as search(query) is already decoded\n // https://github.com/vuejs/vue-router/issues/2708\n\n var searchIndex = href.indexOf('?');\n\n if (searchIndex < 0) {\n var hashIndex = href.indexOf('#');\n\n if (hashIndex > -1) {\n href = decodeURI(href.slice(0, hashIndex)) + href.slice(hashIndex);\n } else {\n href = decodeURI(href);\n }\n } else {\n if (searchIndex > -1) {\n href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);\n }\n }\n\n return href;\n}\n\nfunction getUrl(path) {\n var href = window.location.href;\n var i = href.indexOf('#');\n var base = i >= 0 ? href.slice(0, i) : href;\n return base + \"#\" + path;\n}\n\nfunction pushHash(path) {\n if (supportsPushState) {\n pushState(getUrl(path));\n } else {\n window.location.hash = path;\n }\n}\n\nfunction replaceHash(path) {\n if (supportsPushState) {\n replaceState(getUrl(path));\n } else {\n window.location.replace(getUrl(path));\n }\n}\n/* */\n\n\nvar AbstractHistory =\n/*@__PURE__*/\nfunction (History) {\n function AbstractHistory(router, base) {\n History.call(this, router, base);\n this.stack = [];\n this.index = -1;\n }\n\n if (History) AbstractHistory.__proto__ = History;\n AbstractHistory.prototype = Object.create(History && History.prototype);\n AbstractHistory.prototype.constructor = AbstractHistory;\n\n AbstractHistory.prototype.push = function push(location, onComplete, onAbort) {\n var this$1 = this;\n this.transitionTo(location, function (route) {\n this$1.stack = this$1.stack.slice(0, this$1.index + 1).concat(route);\n this$1.index++;\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n AbstractHistory.prototype.replace = function replace(location, onComplete, onAbort) {\n var this$1 = this;\n this.transitionTo(location, function (route) {\n this$1.stack = this$1.stack.slice(0, this$1.index).concat(route);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n AbstractHistory.prototype.go = function go(n) {\n var this$1 = this;\n var targetIndex = this.index + n;\n\n if (targetIndex < 0 || targetIndex >= this.stack.length) {\n return;\n }\n\n var route = this.stack[targetIndex];\n this.confirmTransition(route, function () {\n this$1.index = targetIndex;\n this$1.updateRoute(route);\n }, function (err) {\n if (isExtendedError(NavigationDuplicated, err)) {\n this$1.index = targetIndex;\n }\n });\n };\n\n AbstractHistory.prototype.getCurrentLocation = function getCurrentLocation() {\n var current = this.stack[this.stack.length - 1];\n return current ? current.fullPath : '/';\n };\n\n AbstractHistory.prototype.ensureURL = function ensureURL() {// noop\n };\n\n return AbstractHistory;\n}(History);\n/* */\n\n\nvar VueRouter = function VueRouter(options) {\n if (options === void 0) options = {};\n this.app = null;\n this.apps = [];\n this.options = options;\n this.beforeHooks = [];\n this.resolveHooks = [];\n this.afterHooks = [];\n this.matcher = createMatcher(options.routes || [], this);\n var mode = options.mode || 'hash';\n this.fallback = mode === 'history' && !supportsPushState && options.fallback !== false;\n\n if (this.fallback) {\n mode = 'hash';\n }\n\n if (!inBrowser) {\n mode = 'abstract';\n }\n\n this.mode = mode;\n\n switch (mode) {\n case 'history':\n this.history = new HTML5History(this, options.base);\n break;\n\n case 'hash':\n this.history = new HashHistory(this, options.base, this.fallback);\n break;\n\n case 'abstract':\n this.history = new AbstractHistory(this, options.base);\n break;\n\n default:\n if (true) {\n assert(false, \"invalid mode: \" + mode);\n }\n\n }\n};\n\nvar prototypeAccessors = {\n currentRoute: {\n configurable: true\n }\n};\n\nVueRouter.prototype.match = function match(raw, current, redirectedFrom) {\n return this.matcher.match(raw, current, redirectedFrom);\n};\n\nprototypeAccessors.currentRoute.get = function () {\n return this.history && this.history.current;\n};\n\nVueRouter.prototype.init = function init(app\n/* Vue component instance */\n) {\n var this$1 = this;\n true && assert(install.installed, \"not installed. Make sure to call `Vue.use(VueRouter)` \" + \"before creating root instance.\");\n this.apps.push(app); // set up app destroyed handler\n // https://github.com/vuejs/vue-router/issues/2639\n\n app.$once('hook:destroyed', function () {\n // clean out app from this.apps array once destroyed\n var index = this$1.apps.indexOf(app);\n\n if (index > -1) {\n this$1.apps.splice(index, 1);\n } // ensure we still have a main app or null if no apps\n // we do not release the router so it can be reused\n\n\n if (this$1.app === app) {\n this$1.app = this$1.apps[0] || null;\n }\n }); // main app previously initialized\n // return as we don't need to set up new history listener\n\n if (this.app) {\n return;\n }\n\n this.app = app;\n var history = this.history;\n\n if (history instanceof HTML5History) {\n history.transitionTo(history.getCurrentLocation());\n } else if (history instanceof HashHistory) {\n var setupHashListener = function () {\n history.setupListeners();\n };\n\n history.transitionTo(history.getCurrentLocation(), setupHashListener, setupHashListener);\n }\n\n history.listen(function (route) {\n this$1.apps.forEach(function (app) {\n app._route = route;\n });\n });\n};\n\nVueRouter.prototype.beforeEach = function beforeEach(fn) {\n return registerHook(this.beforeHooks, fn);\n};\n\nVueRouter.prototype.beforeResolve = function beforeResolve(fn) {\n return registerHook(this.resolveHooks, fn);\n};\n\nVueRouter.prototype.afterEach = function afterEach(fn) {\n return registerHook(this.afterHooks, fn);\n};\n\nVueRouter.prototype.onReady = function onReady(cb, errorCb) {\n this.history.onReady(cb, errorCb);\n};\n\nVueRouter.prototype.onError = function onError(errorCb) {\n this.history.onError(errorCb);\n};\n\nVueRouter.prototype.push = function push(location, onComplete, onAbort) {\n var this$1 = this; // $flow-disable-line\n\n if (!onComplete && !onAbort && typeof Promise !== 'undefined') {\n return new Promise(function (resolve, reject) {\n this$1.history.push(location, resolve, reject);\n });\n } else {\n this.history.push(location, onComplete, onAbort);\n }\n};\n\nVueRouter.prototype.replace = function replace(location, onComplete, onAbort) {\n var this$1 = this; // $flow-disable-line\n\n if (!onComplete && !onAbort && typeof Promise !== 'undefined') {\n return new Promise(function (resolve, reject) {\n this$1.history.replace(location, resolve, reject);\n });\n } else {\n this.history.replace(location, onComplete, onAbort);\n }\n};\n\nVueRouter.prototype.go = function go(n) {\n this.history.go(n);\n};\n\nVueRouter.prototype.back = function back() {\n this.go(-1);\n};\n\nVueRouter.prototype.forward = function forward() {\n this.go(1);\n};\n\nVueRouter.prototype.getMatchedComponents = function getMatchedComponents(to) {\n var route = to ? to.matched ? to : this.resolve(to).route : this.currentRoute;\n\n if (!route) {\n return [];\n }\n\n return [].concat.apply([], route.matched.map(function (m) {\n return Object.keys(m.components).map(function (key) {\n return m.components[key];\n });\n }));\n};\n\nVueRouter.prototype.resolve = function resolve(to, current, append) {\n current = current || this.history.current;\n var location = normalizeLocation(to, current, append, this);\n var route = this.match(location, current);\n var fullPath = route.redirectedFrom || route.fullPath;\n var base = this.history.base;\n var href = createHref(base, fullPath, this.mode);\n return {\n location: location,\n route: route,\n href: href,\n // for backwards compat\n normalizedTo: location,\n resolved: route\n };\n};\n\nVueRouter.prototype.addRoutes = function addRoutes(routes) {\n this.matcher.addRoutes(routes);\n\n if (this.history.current !== START) {\n this.history.transitionTo(this.history.getCurrentLocation());\n }\n};\n\nObject.defineProperties(VueRouter.prototype, prototypeAccessors);\n\nfunction registerHook(list, fn) {\n list.push(fn);\n return function () {\n var i = list.indexOf(fn);\n\n if (i > -1) {\n list.splice(i, 1);\n }\n };\n}\n\nfunction createHref(base, fullPath, mode) {\n var path = mode === 'hash' ? '#' + fullPath : fullPath;\n return base ? cleanPath(base + '/' + path) : path;\n}\n\nVueRouter.install = install;\nVueRouter.version = '3.1.3';\n\nif (inBrowser && window.Vue) {\n window.Vue.use(VueRouter);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (VueRouter);\n\n//# sourceURL=webpack:///./node_modules/vue-router/dist/vue-router.esm.js?"); /***/ }), @@ -981,7 +981,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/*!\n * vue-router v3.0.6\n /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("/* WEBPACK VAR INJECTION */(function(global, setImmediate) {/*!\n * Vue.js v2.6.10\n * (c) 2014-2019 Evan You\n * Released under the MIT License.\n */\n(function (global, factory) {\n true ? module.exports = factory() : undefined;\n})(this, function () {\n 'use strict';\n /* */\n\n var emptyObject = Object.freeze({}); // These helpers produce better VM code in JS engines due to their\n // explicitness and function inlining.\n\n function isUndef(v) {\n return v === undefined || v === null;\n }\n\n function isDef(v) {\n return v !== undefined && v !== null;\n }\n\n function isTrue(v) {\n return v === true;\n }\n\n function isFalse(v) {\n return v === false;\n }\n /**\n * Check if value is primitive.\n */\n\n\n function isPrimitive(value) {\n return typeof value === 'string' || typeof value === 'number' || // $flow-disable-line\n typeof value === 'symbol' || typeof value === 'boolean';\n }\n /**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\n\n\n function isObject(obj) {\n return obj !== null && typeof obj === 'object';\n }\n /**\n * Get the raw type string of a value, e.g., [object Object].\n */\n\n\n var _toString = Object.prototype.toString;\n\n function toRawType(value) {\n return _toString.call(value).slice(8, -1);\n }\n /**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\n\n\n function isPlainObject(obj) {\n return _toString.call(obj) === '[object Object]';\n }\n\n function isRegExp(v) {\n return _toString.call(v) === '[object RegExp]';\n }\n /**\n * Check if val is a valid array index.\n */\n\n\n function isValidArrayIndex(val) {\n var n = parseFloat(String(val));\n return n >= 0 && Math.floor(n) === n && isFinite(val);\n }\n\n function isPromise(val) {\n return isDef(val) && typeof val.then === 'function' && typeof val.catch === 'function';\n }\n /**\n * Convert a value to a string that is actually rendered.\n */\n\n\n function toString(val) {\n return val == null ? '' : Array.isArray(val) || isPlainObject(val) && val.toString === _toString ? JSON.stringify(val, null, 2) : String(val);\n }\n /**\n * Convert an input value to a number for persistence.\n * If the conversion fails, return original string.\n */\n\n\n function toNumber(val) {\n var n = parseFloat(val);\n return isNaN(n) ? val : n;\n }\n /**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\n\n\n function makeMap(str, expectsLowerCase) {\n var map = Object.create(null);\n var list = str.split(',');\n\n for (var i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n\n return expectsLowerCase ? function (val) {\n return map[val.toLowerCase()];\n } : function (val) {\n return map[val];\n };\n }\n /**\n * Check if a tag is a built-in tag.\n */\n\n\n var isBuiltInTag = makeMap('slot,component', true);\n /**\n * Check if an attribute is a reserved attribute.\n */\n\n var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n /**\n * Remove an item from an array.\n */\n\n function remove(arr, item) {\n if (arr.length) {\n var index = arr.indexOf(item);\n\n if (index > -1) {\n return arr.splice(index, 1);\n }\n }\n }\n /**\n * Check whether an object has the property.\n */\n\n\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n function hasOwn(obj, key) {\n return hasOwnProperty.call(obj, key);\n }\n /**\n * Create a cached version of a pure function.\n */\n\n\n function cached(fn) {\n var cache = Object.create(null);\n return function cachedFn(str) {\n var hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n }\n /**\n * Camelize a hyphen-delimited string.\n */\n\n\n var camelizeRE = /-(\\w)/g;\n var camelize = cached(function (str) {\n return str.replace(camelizeRE, function (_, c) {\n return c ? c.toUpperCase() : '';\n });\n });\n /**\n * Capitalize a string.\n */\n\n var capitalize = cached(function (str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n });\n /**\n * Hyphenate a camelCase string.\n */\n\n var hyphenateRE = /\\B([A-Z])/g;\n var hyphenate = cached(function (str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase();\n });\n /**\n * Simple bind polyfill for environments that do not support it,\n * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n * since native bind is now performant enough in most browsers.\n * But removing it would mean breaking code that was able to run in\n * PhantomJS 1.x, so this must be kept for backward compatibility.\n */\n\n /* istanbul ignore next */\n\n function polyfillBind(fn, ctx) {\n function boundFn(a) {\n var l = arguments.length;\n return l ? l > 1 ? fn.apply(ctx, arguments) : fn.call(ctx, a) : fn.call(ctx);\n }\n\n boundFn._length = fn.length;\n return boundFn;\n }\n\n function nativeBind(fn, ctx) {\n return fn.bind(ctx);\n }\n\n var bind = Function.prototype.bind ? nativeBind : polyfillBind;\n /**\n * Convert an Array-like object to a real Array.\n */\n\n function toArray(list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n\n while (i--) {\n ret[i] = list[i + start];\n }\n\n return ret;\n }\n /**\n * Mix properties into target object.\n */\n\n\n function extend(to, _from) {\n for (var key in _from) {\n to[key] = _from[key];\n }\n\n return to;\n }\n /**\n * Merge an Array of Objects into a single Object.\n */\n\n\n function toObject(arr) {\n var res = {};\n\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n\n return res;\n }\n /* eslint-disable no-unused-vars */\n\n /**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n */\n\n\n function noop(a, b, c) {}\n /**\n * Always return false.\n */\n\n\n var no = function (a, b, c) {\n return false;\n };\n /* eslint-enable no-unused-vars */\n\n /**\n * Return the same value.\n */\n\n\n var identity = function (_) {\n return _;\n };\n /**\n * Generate a string containing static keys from compiler modules.\n */\n\n\n function genStaticKeys(modules) {\n return modules.reduce(function (keys, m) {\n return keys.concat(m.staticKeys || []);\n }, []).join(',');\n }\n /**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\n\n\n function looseEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i]);\n });\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime();\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key]);\n });\n } else {\n /* istanbul ignore next */\n return false;\n }\n } catch (e) {\n /* istanbul ignore next */\n return false;\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b);\n } else {\n return false;\n }\n }\n /**\n * Return the first index at which a loosely equal value can be\n * found in the array (if value is a plain object, the array must\n * contain an object of the same shape), or -1 if it is not present.\n */\n\n\n function looseIndexOf(arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) {\n return i;\n }\n }\n\n return -1;\n }\n /**\n * Ensure a function is called only once.\n */\n\n\n function once(fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n };\n }\n\n var SSR_ATTR = 'data-server-rendered';\n var ASSET_TYPES = ['component', 'directive', 'filter'];\n var LIFECYCLE_HOOKS = ['beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUpdate', 'updated', 'beforeDestroy', 'destroyed', 'activated', 'deactivated', 'errorCaptured', 'serverPrefetch'];\n /* */\n\n var config = {\n /**\n * Option merge strategies (used in core/util/options)\n */\n // $flow-disable-line\n optionMergeStrategies: Object.create(null),\n\n /**\n * Whether to suppress warnings.\n */\n silent: false,\n\n /**\n * Show production mode tip message on boot?\n */\n productionTip: \"development\" !== 'production',\n\n /**\n * Whether to enable devtools\n */\n devtools: \"development\" !== 'production',\n\n /**\n * Whether to record perf\n */\n performance: false,\n\n /**\n * Error handler for watcher errors\n */\n errorHandler: null,\n\n /**\n * Warn handler for watcher warns\n */\n warnHandler: null,\n\n /**\n * Ignore certain custom elements\n */\n ignoredElements: [],\n\n /**\n * Custom user key aliases for v-on\n */\n // $flow-disable-line\n keyCodes: Object.create(null),\n\n /**\n * Check if a tag is reserved so that it cannot be registered as a\n * component. This is platform-dependent and may be overwritten.\n */\n isReservedTag: no,\n\n /**\n * Check if an attribute is reserved so that it cannot be used as a component\n * prop. This is platform-dependent and may be overwritten.\n */\n isReservedAttr: no,\n\n /**\n * Check if a tag is an unknown element.\n * Platform-dependent.\n */\n isUnknownElement: no,\n\n /**\n * Get the namespace of an element\n */\n getTagNamespace: noop,\n\n /**\n * Parse the real tag name for the specific platform.\n */\n parsePlatformTagName: identity,\n\n /**\n * Check if an attribute must be bound using property, e.g. value\n * Platform-dependent.\n */\n mustUseProp: no,\n\n /**\n * Perform updates asynchronously. Intended to be used by Vue Test Utils\n * This will significantly reduce performance if set to false.\n */\n async: true,\n\n /**\n * Exposed for legacy reasons\n */\n _lifecycleHooks: LIFECYCLE_HOOKS\n };\n /* */\n\n /**\n * unicode letters used for parsing html tags, component names and property paths.\n * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n */\n\n var unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n /**\n * Check if a string starts with $ or _\n */\n\n function isReserved(str) {\n var c = (str + '').charCodeAt(0);\n return c === 0x24 || c === 0x5F;\n }\n /**\n * Define a property.\n */\n\n\n function def(obj, key, val, enumerable) {\n Object.defineProperty(obj, key, {\n value: val,\n enumerable: !!enumerable,\n writable: true,\n configurable: true\n });\n }\n /**\n * Parse simple path.\n */\n\n\n var bailRE = new RegExp(\"[^\" + unicodeRegExp.source + \".$_\\\\d]\");\n\n function parsePath(path) {\n if (bailRE.test(path)) {\n return;\n }\n\n var segments = path.split('.');\n return function (obj) {\n for (var i = 0; i < segments.length; i++) {\n if (!obj) {\n return;\n }\n\n obj = obj[segments[i]];\n }\n\n return obj;\n };\n }\n /* */\n // can we use __proto__?\n\n\n var hasProto = '__proto__' in {}; // Browser environment sniffing\n\n var inBrowser = typeof window !== 'undefined';\n var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;\n var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();\n var UA = inBrowser && window.navigator.userAgent.toLowerCase();\n var isIE = UA && /msie|trident/.test(UA);\n var isIE9 = UA && UA.indexOf('msie 9.0') > 0;\n var isEdge = UA && UA.indexOf('edge/') > 0;\n var isAndroid = UA && UA.indexOf('android') > 0 || weexPlatform === 'android';\n var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA) || weexPlatform === 'ios';\n var isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\n var isPhantomJS = UA && /phantomjs/.test(UA);\n var isFF = UA && UA.match(/firefox\\/(\\d+)/); // Firefox has a \"watch\" function on Object.prototype...\n\n var nativeWatch = {}.watch;\n var supportsPassive = false;\n\n if (inBrowser) {\n try {\n var opts = {};\n Object.defineProperty(opts, 'passive', {\n get: function get() {\n /* istanbul ignore next */\n supportsPassive = true;\n }\n }); // https://github.com/facebook/flow/issues/285\n\n window.addEventListener('test-passive', null, opts);\n } catch (e) {}\n } // this needs to be lazy-evaled because vue may be required before\n // vue-server-renderer can set VUE_ENV\n\n\n var _isServer;\n\n var isServerRendering = function () {\n if (_isServer === undefined) {\n /* istanbul ignore if */\n if (!inBrowser && !inWeex && typeof global !== 'undefined') {\n // detect presence of vue-server-renderer and avoid\n // Webpack shimming the process\n _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';\n } else {\n _isServer = false;\n }\n }\n\n return _isServer;\n }; // detect devtools\n\n\n var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n /* istanbul ignore next */\n\n function isNative(Ctor) {\n return typeof Ctor === 'function' && /native code/.test(Ctor.toString());\n }\n\n var hasSymbol = typeof Symbol !== 'undefined' && isNative(Symbol) && typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\n var _Set;\n /* istanbul ignore if */\n // $flow-disable-line\n\n\n if (typeof Set !== 'undefined' && isNative(Set)) {\n // use native Set when available.\n _Set = Set;\n } else {\n // a non-standard Set polyfill that only works with primitive keys.\n _Set =\n /*@__PURE__*/\n function () {\n function Set() {\n this.set = Object.create(null);\n }\n\n Set.prototype.has = function has(key) {\n return this.set[key] === true;\n };\n\n Set.prototype.add = function add(key) {\n this.set[key] = true;\n };\n\n Set.prototype.clear = function clear() {\n this.set = Object.create(null);\n };\n\n return Set;\n }();\n }\n /* */\n\n\n var warn = noop;\n var tip = noop;\n var generateComponentTrace = noop; // work around flow check\n\n var formatComponentName = noop;\n {\n var hasConsole = typeof console !== 'undefined';\n var classifyRE = /(?:^|[-_])(\\w)/g;\n\n var classify = function (str) {\n return str.replace(classifyRE, function (c) {\n return c.toUpperCase();\n }).replace(/[-_]/g, '');\n };\n\n warn = function (msg, vm) {\n var trace = vm ? generateComponentTrace(vm) : '';\n\n if (config.warnHandler) {\n config.warnHandler.call(null, msg, vm, trace);\n } else if (hasConsole && !config.silent) {\n console.error(\"[Vue warn]: \" + msg + trace);\n }\n };\n\n tip = function (msg, vm) {\n if (hasConsole && !config.silent) {\n console.warn(\"[Vue tip]: \" + msg + (vm ? generateComponentTrace(vm) : ''));\n }\n };\n\n formatComponentName = function (vm, includeFile) {\n if (vm.$root === vm) {\n return '';\n }\n\n var options = typeof vm === 'function' && vm.cid != null ? vm.options : vm._isVue ? vm.$options || vm.constructor.options : vm;\n var name = options.name || options._componentTag;\n var file = options.__file;\n\n if (!name && file) {\n var match = file.match(/([^/\\\\]+)\\.vue$/);\n name = match && match[1];\n }\n\n return (name ? \"<\" + classify(name) + \">\" : \"\") + (file && includeFile !== false ? \" at \" + file : '');\n };\n\n var repeat = function (str, n) {\n var res = '';\n\n while (n) {\n if (n % 2 === 1) {\n res += str;\n }\n\n if (n > 1) {\n str += str;\n }\n\n n >>= 1;\n }\n\n return res;\n };\n\n generateComponentTrace = function (vm) {\n if (vm._isVue && vm.$parent) {\n var tree = [];\n var currentRecursiveSequence = 0;\n\n while (vm) {\n if (tree.length > 0) {\n var last = tree[tree.length - 1];\n\n if (last.constructor === vm.constructor) {\n currentRecursiveSequence++;\n vm = vm.$parent;\n continue;\n } else if (currentRecursiveSequence > 0) {\n tree[tree.length - 1] = [last, currentRecursiveSequence];\n currentRecursiveSequence = 0;\n }\n }\n\n tree.push(vm);\n vm = vm.$parent;\n }\n\n return '\\n\\nfound in\\n\\n' + tree.map(function (vm, i) {\n return \"\" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm) ? formatComponentName(vm[0]) + \"... (\" + vm[1] + \" recursive calls)\" : formatComponentName(vm));\n }).join('\\n');\n } else {\n return \"\\n\\n(found in \" + formatComponentName(vm) + \")\";\n }\n };\n }\n /* */\n\n var uid = 0;\n /**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\n\n var Dep = function Dep() {\n this.id = uid++;\n this.subs = [];\n };\n\n Dep.prototype.addSub = function addSub(sub) {\n this.subs.push(sub);\n };\n\n Dep.prototype.removeSub = function removeSub(sub) {\n remove(this.subs, sub);\n };\n\n Dep.prototype.depend = function depend() {\n if (Dep.target) {\n Dep.target.addDep(this);\n }\n };\n\n Dep.prototype.notify = function notify() {\n // stabilize the subscriber list first\n var subs = this.subs.slice();\n\n if (!config.async) {\n // subs aren't sorted in scheduler if not running async\n // we need to sort them now to make sure they fire in correct\n // order\n subs.sort(function (a, b) {\n return a.id - b.id;\n });\n }\n\n for (var i = 0, l = subs.length; i < l; i++) {\n subs[i].update();\n }\n }; // The current target watcher being evaluated.\n // This is globally unique because only one watcher\n // can be evaluated at a time.\n\n\n Dep.target = null;\n var targetStack = [];\n\n function pushTarget(target) {\n targetStack.push(target);\n Dep.target = target;\n }\n\n function popTarget() {\n targetStack.pop();\n Dep.target = targetStack[targetStack.length - 1];\n }\n /* */\n\n\n var VNode = function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {\n this.tag = tag;\n this.data = data;\n this.children = children;\n this.text = text;\n this.elm = elm;\n this.ns = undefined;\n this.context = context;\n this.fnContext = undefined;\n this.fnOptions = undefined;\n this.fnScopeId = undefined;\n this.key = data && data.key;\n this.componentOptions = componentOptions;\n this.componentInstance = undefined;\n this.parent = undefined;\n this.raw = false;\n this.isStatic = false;\n this.isRootInsert = true;\n this.isComment = false;\n this.isCloned = false;\n this.isOnce = false;\n this.asyncFactory = asyncFactory;\n this.asyncMeta = undefined;\n this.isAsyncPlaceholder = false;\n };\n\n var prototypeAccessors = {\n child: {\n configurable: true\n }\n }; // DEPRECATED: alias for componentInstance for backwards compat.\n\n /* istanbul ignore next */\n\n prototypeAccessors.child.get = function () {\n return this.componentInstance;\n };\n\n Object.defineProperties(VNode.prototype, prototypeAccessors);\n\n var createEmptyVNode = function (text) {\n if (text === void 0) text = '';\n var node = new VNode();\n node.text = text;\n node.isComment = true;\n return node;\n };\n\n function createTextVNode(val) {\n return new VNode(undefined, undefined, undefined, String(val));\n } // optimized shallow clone\n // used for static nodes and slot nodes because they may be reused across\n // multiple renders, cloning them avoids errors when DOM manipulations rely\n // on their elm reference.\n\n\n function cloneVNode(vnode) {\n var cloned = new VNode(vnode.tag, vnode.data, // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned;\n }\n /*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\n\n var arrayProto = Array.prototype;\n var arrayMethods = Object.create(arrayProto);\n var methodsToPatch = ['push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse'];\n /**\n * Intercept mutating methods and emit events\n */\n\n methodsToPatch.forEach(function (method) {\n // cache original method\n var original = arrayProto[method];\n def(arrayMethods, method, function mutator() {\n var args = [],\n len = arguments.length;\n\n while (len--) args[len] = arguments[len];\n\n var result = original.apply(this, args);\n var ob = this.__ob__;\n var inserted;\n\n switch (method) {\n case 'push':\n case 'unshift':\n inserted = args;\n break;\n\n case 'splice':\n inserted = args.slice(2);\n break;\n }\n\n if (inserted) {\n ob.observeArray(inserted);\n } // notify change\n\n\n ob.dep.notify();\n return result;\n });\n });\n /* */\n\n var arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n /**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\n\n var shouldObserve = true;\n\n function toggleObserving(value) {\n shouldObserve = value;\n }\n /**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\n\n\n var Observer = function Observer(value) {\n this.value = value;\n this.dep = new Dep();\n this.vmCount = 0;\n def(value, '__ob__', this);\n\n if (Array.isArray(value)) {\n if (hasProto) {\n protoAugment(value, arrayMethods);\n } else {\n copyAugment(value, arrayMethods, arrayKeys);\n }\n\n this.observeArray(value);\n } else {\n this.walk(value);\n }\n };\n /**\n * Walk through all properties and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\n\n\n Observer.prototype.walk = function walk(obj) {\n var keys = Object.keys(obj);\n\n for (var i = 0; i < keys.length; i++) {\n defineReactive$$1(obj, keys[i]);\n }\n };\n /**\n * Observe a list of Array items.\n */\n\n\n Observer.prototype.observeArray = function observeArray(items) {\n for (var i = 0, l = items.length; i < l; i++) {\n observe(items[i]);\n }\n }; // helpers\n\n /**\n * Augment a target Object or Array by intercepting\n * the prototype chain using __proto__\n */\n\n\n function protoAugment(target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }\n /**\n * Augment a target Object or Array by defining\n * hidden properties.\n */\n\n /* istanbul ignore next */\n\n\n function copyAugment(target, src, keys) {\n for (var i = 0, l = keys.length; i < l; i++) {\n var key = keys[i];\n def(target, key, src[key]);\n }\n }\n /**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\n\n\n function observe(value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return;\n }\n\n var ob;\n\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (shouldObserve && !isServerRendering() && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue) {\n ob = new Observer(value);\n }\n\n if (asRootData && ob) {\n ob.vmCount++;\n }\n\n return ob;\n }\n /**\n * Define a reactive property on an Object.\n */\n\n\n function defineReactive$$1(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n var property = Object.getOwnPropertyDescriptor(obj, key);\n\n if (property && property.configurable === false) {\n return;\n } // cater for pre-defined getter/setters\n\n\n var getter = property && property.get;\n var setter = property && property.set;\n\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n\n if (Dep.target) {\n dep.depend();\n\n if (childOb) {\n childOb.dep.depend();\n\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n\n\n if (customSetter) {\n customSetter();\n } // #7981: for accessor properties without setter\n\n\n if (getter && !setter) {\n return;\n }\n\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n }\n /**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\n\n\n function set(target, key, val) {\n if (isUndef(target) || isPrimitive(target)) {\n warn(\"Cannot set reactive property on undefined, null, or primitive value: \" + target);\n }\n\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val;\n }\n\n if (key in target && !(key in Object.prototype)) {\n target[key] = val;\n return val;\n }\n\n var ob = target.__ob__;\n\n if (target._isVue || ob && ob.vmCount) {\n warn('Avoid adding reactive properties to a Vue instance or its root $data ' + 'at runtime - declare it upfront in the data option.');\n return val;\n }\n\n if (!ob) {\n target[key] = val;\n return val;\n }\n\n defineReactive$$1(ob.value, key, val);\n ob.dep.notify();\n return val;\n }\n /**\n * Delete a property and trigger change if necessary.\n */\n\n\n function del(target, key) {\n if (isUndef(target) || isPrimitive(target)) {\n warn(\"Cannot delete reactive property on undefined, null, or primitive value: \" + target);\n }\n\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return;\n }\n\n var ob = target.__ob__;\n\n if (target._isVue || ob && ob.vmCount) {\n warn('Avoid deleting properties on a Vue instance or its root $data ' + '- just set it to null.');\n return;\n }\n\n if (!hasOwn(target, key)) {\n return;\n }\n\n delete target[key];\n\n if (!ob) {\n return;\n }\n\n ob.dep.notify();\n }\n /**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\n\n\n function dependArray(value) {\n for (var e = void 0, i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n }\n /* */\n\n /**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\n\n\n var strats = config.optionMergeStrategies;\n /**\n * Options with restrictions\n */\n\n {\n strats.el = strats.propsData = function (parent, child, vm, key) {\n if (!vm) {\n warn(\"option \\\"\" + key + \"\\\" can only be used during instance \" + 'creation with the `new` keyword.');\n }\n\n return defaultStrat(parent, child);\n };\n }\n /**\n * Helper that recursively merges two data objects together.\n */\n\n function mergeData(to, from) {\n if (!from) {\n return to;\n }\n\n var key, toVal, fromVal;\n var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i]; // in case the object is already observed...\n\n if (key === '__ob__') {\n continue;\n }\n\n toVal = to[key];\n fromVal = from[key];\n\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (toVal !== fromVal && isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n\n return to;\n }\n /**\n * Data\n */\n\n\n function mergeDataOrFn(parentVal, childVal, vm) {\n if (!vm) {\n // in a Vue.extend merge, both should be functions\n if (!childVal) {\n return parentVal;\n }\n\n if (!parentVal) {\n return childVal;\n } // when parentVal & childVal are both present,\n // we need to return a function that returns the\n // merged result of both functions... no need to\n // check if parentVal is a function here because\n // it has to be a function to pass previous merges.\n\n\n return function mergedDataFn() {\n return mergeData(typeof childVal === 'function' ? childVal.call(this, this) : childVal, typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal);\n };\n } else {\n return function mergedInstanceDataFn() {\n // instance merge\n var instanceData = typeof childVal === 'function' ? childVal.call(vm, vm) : childVal;\n var defaultData = typeof parentVal === 'function' ? parentVal.call(vm, vm) : parentVal;\n\n if (instanceData) {\n return mergeData(instanceData, defaultData);\n } else {\n return defaultData;\n }\n };\n }\n }\n\n strats.data = function (parentVal, childVal, vm) {\n if (!vm) {\n if (childVal && typeof childVal !== 'function') {\n warn('The \"data\" option should be a function ' + 'that returns a per-instance value in component ' + 'definitions.', vm);\n return parentVal;\n }\n\n return mergeDataOrFn(parentVal, childVal);\n }\n\n return mergeDataOrFn(parentVal, childVal, vm);\n };\n /**\n * Hooks and props are merged as arrays.\n */\n\n\n function mergeHook(parentVal, childVal) {\n var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;\n return res ? dedupeHooks(res) : res;\n }\n\n function dedupeHooks(hooks) {\n var res = [];\n\n for (var i = 0; i < hooks.length; i++) {\n if (res.indexOf(hooks[i]) === -1) {\n res.push(hooks[i]);\n }\n }\n\n return res;\n }\n\n LIFECYCLE_HOOKS.forEach(function (hook) {\n strats[hook] = mergeHook;\n });\n /**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\n\n function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n }\n\n ASSET_TYPES.forEach(function (type) {\n strats[type + 's'] = mergeAssets;\n });\n /**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\n\n strats.watch = function (parentVal, childVal, vm, key) {\n // work around Firefox's Object.prototype.watch...\n if (parentVal === nativeWatch) {\n parentVal = undefined;\n }\n\n if (childVal === nativeWatch) {\n childVal = undefined;\n }\n /* istanbul ignore if */\n\n\n if (!childVal) {\n return Object.create(parentVal || null);\n }\n\n {\n assertObjectType(key, childVal, vm);\n }\n\n if (!parentVal) {\n return childVal;\n }\n\n var ret = {};\n extend(ret, parentVal);\n\n for (var key$1 in childVal) {\n var parent = ret[key$1];\n var child = childVal[key$1];\n\n if (parent && !Array.isArray(parent)) {\n parent = [parent];\n }\n\n ret[key$1] = parent ? parent.concat(child) : Array.isArray(child) ? child : [child];\n }\n\n return ret;\n };\n /**\n * Other object hashes.\n */\n\n\n strats.props = strats.methods = strats.inject = strats.computed = function (parentVal, childVal, vm, key) {\n if (childVal && \"development\" !== 'production') {\n assertObjectType(key, childVal, vm);\n }\n\n if (!parentVal) {\n return childVal;\n }\n\n var ret = Object.create(null);\n extend(ret, parentVal);\n\n if (childVal) {\n extend(ret, childVal);\n }\n\n return ret;\n };\n\n strats.provide = mergeDataOrFn;\n /**\n * Default strategy.\n */\n\n var defaultStrat = function (parentVal, childVal) {\n return childVal === undefined ? parentVal : childVal;\n };\n /**\n * Validate component names\n */\n\n\n function checkComponents(options) {\n for (var key in options.components) {\n validateComponentName(key);\n }\n }\n\n function validateComponentName(name) {\n if (!new RegExp(\"^[a-zA-Z][\\\\-\\\\.0-9_\" + unicodeRegExp.source + \"]*$\").test(name)) {\n warn('Invalid component name: \"' + name + '\". Component names ' + 'should conform to valid custom element name in html5 specification.');\n }\n\n if (isBuiltInTag(name) || config.isReservedTag(name)) {\n warn('Do not use built-in or reserved HTML elements as component ' + 'id: ' + name);\n }\n }\n /**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\n\n\n function normalizeProps(options, vm) {\n var props = options.props;\n\n if (!props) {\n return;\n }\n\n var res = {};\n var i, val, name;\n\n if (Array.isArray(props)) {\n i = props.length;\n\n while (i--) {\n val = props[i];\n\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = {\n type: null\n };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val) ? val : {\n type: val\n };\n }\n } else {\n warn(\"Invalid value for option \\\"props\\\": expected an Array or an Object, \" + \"but got \" + toRawType(props) + \".\", vm);\n }\n\n options.props = res;\n }\n /**\n * Normalize all injections into Object-based format\n */\n\n\n function normalizeInject(options, vm) {\n var inject = options.inject;\n\n if (!inject) {\n return;\n }\n\n var normalized = options.inject = {};\n\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = {\n from: inject[i]\n };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val) ? extend({\n from: key\n }, val) : {\n from: val\n };\n }\n } else {\n warn(\"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" + \"but got \" + toRawType(inject) + \".\", vm);\n }\n }\n /**\n * Normalize raw function directives into object format.\n */\n\n\n function normalizeDirectives(options) {\n var dirs = options.directives;\n\n if (dirs) {\n for (var key in dirs) {\n var def$$1 = dirs[key];\n\n if (typeof def$$1 === 'function') {\n dirs[key] = {\n bind: def$$1,\n update: def$$1\n };\n }\n }\n }\n }\n\n function assertObjectType(name, value, vm) {\n if (!isPlainObject(value)) {\n warn(\"Invalid value for option \\\"\" + name + \"\\\": expected an Object, \" + \"but got \" + toRawType(value) + \".\", vm);\n }\n }\n /**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\n\n\n function mergeOptions(parent, child, vm) {\n {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child); // Apply extends and mixins on the child options,\n // but only if it is a raw options object that isn't\n // the result of another mergeOptions call.\n // Only merged options has the _base property.\n\n if (!child._base) {\n if (child.extends) {\n parent = mergeOptions(parent, child.extends, vm);\n }\n\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n }\n\n var options = {};\n var key;\n\n for (key in parent) {\n mergeField(key);\n }\n\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n\n return options;\n }\n /**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\n\n\n function resolveAsset(options, type, id, warnMissing) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return;\n }\n\n var assets = options[type]; // check local registration variations first\n\n if (hasOwn(assets, id)) {\n return assets[id];\n }\n\n var camelizedId = camelize(id);\n\n if (hasOwn(assets, camelizedId)) {\n return assets[camelizedId];\n }\n\n var PascalCaseId = capitalize(camelizedId);\n\n if (hasOwn(assets, PascalCaseId)) {\n return assets[PascalCaseId];\n } // fallback to prototype chain\n\n\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n\n if (warnMissing && !res) {\n warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n }\n\n return res;\n }\n /* */\n\n\n function validateProp(key, propOptions, propsData, vm) {\n var prop = propOptions[key];\n var absent = !hasOwn(propsData, key);\n var value = propsData[key]; // boolean casting\n\n var booleanIndex = getTypeIndex(Boolean, prop.type);\n\n if (booleanIndex > -1) {\n if (absent && !hasOwn(prop, 'default')) {\n value = false;\n } else if (value === '' || value === hyphenate(key)) {\n // only cast empty string / same name to boolean if\n // boolean has higher priority\n var stringIndex = getTypeIndex(String, prop.type);\n\n if (stringIndex < 0 || booleanIndex < stringIndex) {\n value = true;\n }\n }\n } // check default value\n\n\n if (value === undefined) {\n value = getPropDefaultValue(vm, prop, key); // since the default value is a fresh copy,\n // make sure to observe it.\n\n var prevShouldObserve = shouldObserve;\n toggleObserving(true);\n observe(value);\n toggleObserving(prevShouldObserve);\n }\n\n {\n assertProp(prop, key, value, vm, absent);\n }\n return value;\n }\n /**\n * Get the default value of a prop.\n */\n\n\n function getPropDefaultValue(vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined;\n }\n\n var def = prop.default; // warn against non-factory defaults for Object & Array\n\n if (isObject(def)) {\n warn('Invalid default value for prop \"' + key + '\": ' + 'Props with type Object/Array must use a factory function ' + 'to return the default value.', vm);\n } // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n\n\n if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && vm._props[key] !== undefined) {\n return vm._props[key];\n } // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n\n\n return typeof def === 'function' && getType(prop.type) !== 'Function' ? def.call(vm) : def;\n }\n /**\n * Assert whether a prop is valid.\n */\n\n\n function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n\n if (value == null && !prop.required) {\n return;\n }\n\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n\n if (!valid) {\n warn(getInvalidTypeMessage(name, value, expectedTypes), vm);\n return;\n }\n\n var validator = prop.validator;\n\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n }\n\n var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;\n\n function assertType(value, type) {\n var valid;\n var expectedType = getType(type);\n\n if (simpleCheckRE.test(expectedType)) {\n var t = typeof value;\n valid = t === expectedType.toLowerCase(); // for primitive wrapper objects\n\n if (!valid && t === 'object') {\n valid = value instanceof type;\n }\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n\n return {\n valid: valid,\n expectedType: expectedType\n };\n }\n /**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\n\n\n function getType(fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : '';\n }\n\n function isSameType(a, b) {\n return getType(a) === getType(b);\n }\n\n function getTypeIndex(type, expectedTypes) {\n if (!Array.isArray(expectedTypes)) {\n return isSameType(expectedTypes, type) ? 0 : -1;\n }\n\n for (var i = 0, len = expectedTypes.length; i < len; i++) {\n if (isSameType(expectedTypes[i], type)) {\n return i;\n }\n }\n\n return -1;\n }\n\n function getInvalidTypeMessage(name, value, expectedTypes) {\n var message = \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" + \" Expected \" + expectedTypes.map(capitalize).join(', ');\n var expectedType = expectedTypes[0];\n var receivedType = toRawType(value);\n var expectedValue = styleValue(value, expectedType);\n var receivedValue = styleValue(value, receivedType); // check if we need to specify expected value\n\n if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {\n message += \" with value \" + expectedValue;\n }\n\n message += \", got \" + receivedType + \" \"; // check if we need to specify received value\n\n if (isExplicable(receivedType)) {\n message += \"with value \" + receivedValue + \".\";\n }\n\n return message;\n }\n\n function styleValue(value, type) {\n if (type === 'String') {\n return \"\\\"\" + value + \"\\\"\";\n } else if (type === 'Number') {\n return \"\" + Number(value);\n } else {\n return \"\" + value;\n }\n }\n\n function isExplicable(value) {\n var explicitTypes = ['string', 'number', 'boolean'];\n return explicitTypes.some(function (elem) {\n return value.toLowerCase() === elem;\n });\n }\n\n function isBoolean() {\n var args = [],\n len = arguments.length;\n\n while (len--) args[len] = arguments[len];\n\n return args.some(function (elem) {\n return elem.toLowerCase() === 'boolean';\n });\n }\n /* */\n\n\n function handleError(err, vm, info) {\n // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n // See: https://github.com/vuejs/vuex/issues/1505\n pushTarget();\n\n try {\n if (vm) {\n var cur = vm;\n\n while (cur = cur.$parent) {\n var hooks = cur.$options.errorCaptured;\n\n if (hooks) {\n for (var i = 0; i < hooks.length; i++) {\n try {\n var capture = hooks[i].call(cur, err, vm, info) === false;\n\n if (capture) {\n return;\n }\n } catch (e) {\n globalHandleError(e, cur, 'errorCaptured hook');\n }\n }\n }\n }\n }\n\n globalHandleError(err, vm, info);\n } finally {\n popTarget();\n }\n }\n\n function invokeWithErrorHandling(handler, context, args, vm, info) {\n var res;\n\n try {\n res = args ? handler.apply(context, args) : handler.call(context);\n\n if (res && !res._isVue && isPromise(res) && !res._handled) {\n res.catch(function (e) {\n return handleError(e, vm, info + \" (Promise/async)\");\n }); // issue #9511\n // avoid catch triggering multiple times when nested calls\n\n res._handled = true;\n }\n } catch (e) {\n handleError(e, vm, info);\n }\n\n return res;\n }\n\n function globalHandleError(err, vm, info) {\n if (config.errorHandler) {\n try {\n return config.errorHandler.call(null, err, vm, info);\n } catch (e) {\n // if the user intentionally throws the original error in the handler,\n // do not log it twice\n if (e !== err) {\n logError(e, null, 'config.errorHandler');\n }\n }\n }\n\n logError(err, vm, info);\n }\n\n function logError(err, vm, info) {\n {\n warn(\"Error in \" + info + \": \\\"\" + err.toString() + \"\\\"\", vm);\n }\n /* istanbul ignore else */\n\n if ((inBrowser || inWeex) && typeof console !== 'undefined') {\n console.error(err);\n } else {\n throw err;\n }\n }\n /* */\n\n\n var isUsingMicroTask = false;\n var callbacks = [];\n var pending = false;\n\n function flushCallbacks() {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks.length = 0;\n\n for (var i = 0; i < copies.length; i++) {\n copies[i]();\n }\n } // Here we have async deferring wrappers using microtasks.\n // In 2.5 we used (macro) tasks (in combination with microtasks).\n // However, it has subtle problems when state is changed right before repaint\n // (e.g. #6813, out-in transitions).\n // Also, using (macro) tasks in event handler would cause some weird behaviors\n // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n // So we now use microtasks everywhere, again.\n // A major drawback of this tradeoff is that there are some scenarios\n // where microtasks have too high a priority and fire in between supposedly\n // sequential events (e.g. #4521, #6690, which have workarounds)\n // or even between bubbling of the same event (#6566).\n\n\n var timerFunc; // The nextTick behavior leverages the microtask queue, which can be accessed\n // via either native Promise.then or MutationObserver.\n // MutationObserver has wider support, however it is seriously bugged in\n // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n // completely stops working after triggering a few times... so, if native\n // Promise is available, we will use it:\n\n /* istanbul ignore next, $flow-disable-line */\n\n if (typeof Promise !== 'undefined' && isNative(Promise)) {\n var p = Promise.resolve();\n\n timerFunc = function () {\n p.then(flushCallbacks); // In problematic UIWebViews, Promise.then doesn't completely break, but\n // it can get stuck in a weird state where callbacks are pushed into the\n // microtask queue but the queue isn't being flushed, until the browser\n // needs to do some other work, e.g. handle a timer. Therefore we can\n // \"force\" the microtask queue to be flushed by adding an empty timer.\n\n if (isIOS) {\n setTimeout(noop);\n }\n };\n\n isUsingMicroTask = true;\n } else if (!isIE && typeof MutationObserver !== 'undefined' && (isNative(MutationObserver) || // PhantomJS and iOS 7.x\n MutationObserver.toString() === '[object MutationObserverConstructor]')) {\n // Use MutationObserver where native Promise is not available,\n // e.g. PhantomJS, iOS7, Android 4.4\n // (#6466 MutationObserver is unreliable in IE11)\n var counter = 1;\n var observer = new MutationObserver(flushCallbacks);\n var textNode = document.createTextNode(String(counter));\n observer.observe(textNode, {\n characterData: true\n });\n\n timerFunc = function () {\n counter = (counter + 1) % 2;\n textNode.data = String(counter);\n };\n\n isUsingMicroTask = true;\n } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n // Fallback to setImmediate.\n // Techinically it leverages the (macro) task queue,\n // but it is still a better choice than setTimeout.\n timerFunc = function () {\n setImmediate(flushCallbacks);\n };\n } else {\n // Fallback to setTimeout.\n timerFunc = function () {\n setTimeout(flushCallbacks, 0);\n };\n }\n\n function nextTick(cb, ctx) {\n var _resolve;\n\n callbacks.push(function () {\n if (cb) {\n try {\n cb.call(ctx);\n } catch (e) {\n handleError(e, ctx, 'nextTick');\n }\n } else if (_resolve) {\n _resolve(ctx);\n }\n });\n\n if (!pending) {\n pending = true;\n timerFunc();\n } // $flow-disable-line\n\n\n if (!cb && typeof Promise !== 'undefined') {\n return new Promise(function (resolve) {\n _resolve = resolve;\n });\n }\n }\n /* */\n\n\n var mark;\n var measure;\n {\n var perf = inBrowser && window.performance;\n /* istanbul ignore if */\n\n if (perf && perf.mark && perf.measure && perf.clearMarks && perf.clearMeasures) {\n mark = function (tag) {\n return perf.mark(tag);\n };\n\n measure = function (name, startTag, endTag) {\n perf.measure(name, startTag, endTag);\n perf.clearMarks(startTag);\n perf.clearMarks(endTag); // perf.clearMeasures(name)\n };\n }\n }\n /* not type checking this file because flow doesn't play well with Proxy */\n\n var initProxy;\n {\n var allowedGlobals = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' + 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' + 'require' // for Webpack/Browserify\n );\n\n var warnNonPresent = function (target, key) {\n warn(\"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" + 'referenced during render. Make sure that this property is reactive, ' + 'either in the data option, or for class-based components, by ' + 'initializing the property. ' + 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);\n };\n\n var warnReservedPrefix = function (target, key) {\n warn(\"Property \\\"\" + key + \"\\\" must be accessed with \\\"$data.\" + key + \"\\\" because \" + 'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' + 'prevent conflicts with Vue internals' + 'See: https://vuejs.org/v2/api/#data', target);\n };\n\n var hasProxy = typeof Proxy !== 'undefined' && isNative(Proxy);\n\n if (hasProxy) {\n var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n config.keyCodes = new Proxy(config.keyCodes, {\n set: function set(target, key, value) {\n if (isBuiltInModifier(key)) {\n warn(\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key);\n return false;\n } else {\n target[key] = value;\n return true;\n }\n }\n });\n }\n\n var hasHandler = {\n has: function has(target, key) {\n var has = key in target;\n var isAllowed = allowedGlobals(key) || typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data);\n\n if (!has && !isAllowed) {\n if (key in target.$data) {\n warnReservedPrefix(target, key);\n } else {\n warnNonPresent(target, key);\n }\n }\n\n return has || !isAllowed;\n }\n };\n var getHandler = {\n get: function get(target, key) {\n if (typeof key === 'string' && !(key in target)) {\n if (key in target.$data) {\n warnReservedPrefix(target, key);\n } else {\n warnNonPresent(target, key);\n }\n }\n\n return target[key];\n }\n };\n\n initProxy = function initProxy(vm) {\n if (hasProxy) {\n // determine which proxy handler to use\n var options = vm.$options;\n var handlers = options.render && options.render._withStripped ? getHandler : hasHandler;\n vm._renderProxy = new Proxy(vm, handlers);\n } else {\n vm._renderProxy = vm;\n }\n };\n }\n /* */\n\n var seenObjects = new _Set();\n /**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\n\n function traverse(val) {\n _traverse(val, seenObjects);\n\n seenObjects.clear();\n }\n\n function _traverse(val, seen) {\n var i, keys;\n var isA = Array.isArray(val);\n\n if (!isA && !isObject(val) || Object.isFrozen(val) || val instanceof VNode) {\n return;\n }\n\n if (val.__ob__) {\n var depId = val.__ob__.dep.id;\n\n if (seen.has(depId)) {\n return;\n }\n\n seen.add(depId);\n }\n\n if (isA) {\n i = val.length;\n\n while (i--) {\n _traverse(val[i], seen);\n }\n } else {\n keys = Object.keys(val);\n i = keys.length;\n\n while (i--) {\n _traverse(val[keys[i]], seen);\n }\n }\n }\n /* */\n\n\n var normalizeEvent = cached(function (name) {\n var passive = name.charAt(0) === '&';\n name = passive ? name.slice(1) : name;\n var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n\n name = once$$1 ? name.slice(1) : name;\n var capture = name.charAt(0) === '!';\n name = capture ? name.slice(1) : name;\n return {\n name: name,\n once: once$$1,\n capture: capture,\n passive: passive\n };\n });\n\n function createFnInvoker(fns, vm) {\n function invoker() {\n var arguments$1 = arguments;\n var fns = invoker.fns;\n\n if (Array.isArray(fns)) {\n var cloned = fns.slice();\n\n for (var i = 0; i < cloned.length; i++) {\n invokeWithErrorHandling(cloned[i], null, arguments$1, vm, \"v-on handler\");\n }\n } else {\n // return handler return value for single handlers\n return invokeWithErrorHandling(fns, null, arguments, vm, \"v-on handler\");\n }\n }\n\n invoker.fns = fns;\n return invoker;\n }\n\n function updateListeners(on, oldOn, add, remove$$1, createOnceHandler, vm) {\n var name, def$$1, cur, old, event;\n\n for (name in on) {\n def$$1 = cur = on[name];\n old = oldOn[name];\n event = normalizeEvent(name);\n\n if (isUndef(cur)) {\n warn(\"Invalid handler for event \\\"\" + event.name + \"\\\": got \" + String(cur), vm);\n } else if (isUndef(old)) {\n if (isUndef(cur.fns)) {\n cur = on[name] = createFnInvoker(cur, vm);\n }\n\n if (isTrue(event.once)) {\n cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n }\n\n add(event.name, cur, event.capture, event.passive, event.params);\n } else if (cur !== old) {\n old.fns = cur;\n on[name] = old;\n }\n }\n\n for (name in oldOn) {\n if (isUndef(on[name])) {\n event = normalizeEvent(name);\n remove$$1(event.name, oldOn[name], event.capture);\n }\n }\n }\n /* */\n\n\n function mergeVNodeHook(def, hookKey, hook) {\n if (def instanceof VNode) {\n def = def.data.hook || (def.data.hook = {});\n }\n\n var invoker;\n var oldHook = def[hookKey];\n\n function wrappedHook() {\n hook.apply(this, arguments); // important: remove merged hook to ensure it's called only once\n // and prevent memory leak\n\n remove(invoker.fns, wrappedHook);\n }\n\n if (isUndef(oldHook)) {\n // no existing hook\n invoker = createFnInvoker([wrappedHook]);\n } else {\n /* istanbul ignore if */\n if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n // already a merged invoker\n invoker = oldHook;\n invoker.fns.push(wrappedHook);\n } else {\n // existing plain hook\n invoker = createFnInvoker([oldHook, wrappedHook]);\n }\n }\n\n invoker.merged = true;\n def[hookKey] = invoker;\n }\n /* */\n\n\n function extractPropsFromVNodeData(data, Ctor, tag) {\n // we are only extracting raw values here.\n // validation and default values are handled in the child\n // component itself.\n var propOptions = Ctor.options.props;\n\n if (isUndef(propOptions)) {\n return;\n }\n\n var res = {};\n var attrs = data.attrs;\n var props = data.props;\n\n if (isDef(attrs) || isDef(props)) {\n for (var key in propOptions) {\n var altKey = hyphenate(key);\n {\n var keyInLowerCase = key.toLowerCase();\n\n if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {\n tip(\"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" + formatComponentName(tag || Ctor) + \", but the declared prop name is\" + \" \\\"\" + key + \"\\\". \" + \"Note that HTML attributes are case-insensitive and camelCased \" + \"props need to use their kebab-case equivalents when using in-DOM \" + \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\");\n }\n }\n checkProp(res, props, key, altKey, true) || checkProp(res, attrs, key, altKey, false);\n }\n }\n\n return res;\n }\n\n function checkProp(res, hash, key, altKey, preserve) {\n if (isDef(hash)) {\n if (hasOwn(hash, key)) {\n res[key] = hash[key];\n\n if (!preserve) {\n delete hash[key];\n }\n\n return true;\n } else if (hasOwn(hash, altKey)) {\n res[key] = hash[altKey];\n\n if (!preserve) {\n delete hash[altKey];\n }\n\n return true;\n }\n }\n\n return false;\n }\n /* */\n // The template compiler attempts to minimize the need for normalization by\n // statically analyzing the template at compile time.\n //\n // For plain HTML markup, normalization can be completely skipped because the\n // generated render function is guaranteed to return Array. There are\n // two cases where extra normalization is needed:\n // 1. When the children contains components - because a functional component\n // may return an Array instead of a single root. In this case, just a simple\n // normalization is needed - if any child is an Array, we flatten the whole\n // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n // because functional components already normalize their own children.\n\n\n function simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n\n return children;\n } // 2. When the children contains constructs that always generated nested Arrays,\n // e.g.