Socket
Socket
Sign inDemoInstall

vue-router

Package Overview
Dependencies
Maintainers
1
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-router - npm Package Compare versions

Comparing version 2.5.3 to 2.6.0

122

dist/vue-router.common.js
/**
* vue-router v2.5.3
* vue-router v2.6.0
* (c) 2017 Evan You

@@ -50,3 +50,3 @@ * @license MIT

var inactive = false;
while (parent) {
while (parent && parent._routerRoot !== parent) {
if (parent.$vnode && parent.$vnode.data.routerView) {

@@ -202,3 +202,3 @@ depth++;

var result = [];
val.slice().forEach(function (val2) {
val.forEach(function (val2) {
if (val2 === undefined) {

@@ -307,3 +307,11 @@ return

}
return aKeys.every(function (key) { return String(a[key]) === String(b[key]); })
return aKeys.every(function (key) {
var aVal = a[key];
var bVal = b[key];
// check nested equality
if (typeof aVal === 'object' && typeof bVal === 'object') {
return isObjectEqual(aVal, bVal)
}
return String(aVal) === String(bVal)
})
}

@@ -439,3 +447,3 @@

// don't redirect with control keys
if (e.metaKey || e.ctrlKey || e.shiftKey) { return }
if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) { return }
// don't redirect when preventDefault called

@@ -480,10 +488,2 @@ if (e.defaultPrevented) { return }

Object.defineProperty(Vue.prototype, '$router', {
get: function get () { return this.$root._router }
});
Object.defineProperty(Vue.prototype, '$route', {
get: function get () { return this.$root._route }
});
var isDef = function (v) { return v !== undefined; };

@@ -501,5 +501,8 @@

if (isDef(this.$options.router)) {
this._routerRoot = this;
this._router = this.$options.router;
this._router.init(this);
Vue.util.defineReactive(this, '_route', this._router.history.current);
} else {
this._routerRoot = (this.$parent && this.$parent._routerRoot) || this;
}

@@ -513,2 +516,10 @@ registerInstance(this, this);

Object.defineProperty(Vue.prototype, '$router', {
get: function get () { return this._routerRoot._router }
});
Object.defineProperty(Vue.prototype, '$route', {
get: function get () { return this._routerRoot._route }
});
Vue.component('router-view', View);

@@ -1106,5 +1117,11 @@ Vue.component('router-link', Link);

var normalizedPath = normalizePath(path, parent);
var pathToRegexpOptions = route.pathToRegexpOptions || {};
if (typeof route.caseSensitive === 'boolean') {
pathToRegexpOptions.sensitive = route.caseSensitive;
}
var record = {
path: normalizedPath,
regex: compileRouteRegex(normalizedPath),
regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),
components: route.components || { default: route.component },

@@ -1126,7 +1143,7 @@ instances: {},

if (route.children) {
// Warn if route is named and has a default child route.
// Warn if route is named, does not redirect and has a default child route.
// If users navigate to this route by name, the default child will
// not be rendered (GH Issue #629)
if (process.env.NODE_ENV !== 'production') {
if (route.name && route.children.some(function (child) { return /^\/?$/.test(child.path); })) {
if (route.name && !route.redirect && route.children.some(function (child) { return /^\/?$/.test(child.path); })) {
warn(

@@ -1151,17 +1168,20 @@ false,

if (route.alias !== undefined) {
if (Array.isArray(route.alias)) {
route.alias.forEach(function (alias) {
var aliasRoute = {
path: alias,
children: route.children
};
addRouteRecord(pathList, pathMap, nameMap, aliasRoute, parent, record.path);
});
} else {
var aliases = Array.isArray(route.alias)
? route.alias
: [route.alias];
aliases.forEach(function (alias) {
var aliasRoute = {
path: route.alias,
path: alias,
children: route.children
};
addRouteRecord(pathList, pathMap, nameMap, aliasRoute, parent, record.path);
}
addRouteRecord(
pathList,
pathMap,
nameMap,
aliasRoute,
parent,
record.path || '/' // matchAs
);
});
}

@@ -1187,4 +1207,4 @@

function compileRouteRegex (path) {
var regex = index(path);
function compileRouteRegex (path, pathToRegexpOptions) {
var regex = index(path, [], pathToRegexpOptions);
if (process.env.NODE_ENV !== 'production') {

@@ -1230,3 +1250,3 @@ var keys = {};

next.params = params;
} else if (current.matched) {
} else if (current.matched.length) {
var rawPath = current.matched[current.matched.length - 1].path;

@@ -1301,2 +1321,3 @@ next.path = fillParams(rawPath, params, ("path " + (current.path)));

}
if (!record) { return _createRoute(null, location) }
var paramNames = record.regex.keys

@@ -1512,3 +1533,5 @@ .filter(function (key) { return !key.optional; })

if (el) {
position = getElementPosition(el);
var offset = shouldScroll.offset && typeof shouldScroll.offset === 'object' ? shouldScroll.offset : {};
offset = normalizeOffset(offset);
position = getElementPosition(el, offset);
} else if (isValidPosition(shouldScroll)) {

@@ -1544,3 +1567,3 @@ position = normalizePosition(shouldScroll);

function getElementPosition (el) {
function getElementPosition (el, offset) {
var docEl = document.documentElement;

@@ -1550,4 +1573,4 @@ var docRect = docEl.getBoundingClientRect();

return {
x: elRect.left - docRect.left,
y: elRect.top - docRect.top
x: elRect.left - docRect.left - offset.x,
y: elRect.top - docRect.top - offset.y
}

@@ -1567,2 +1590,9 @@ }

function normalizeOffset (obj) {
return {
x: isNumber(obj.x) ? obj.x : 0,
y: isNumber(obj.y) ? obj.y : 0
}
}
function isNumber (v) {

@@ -1820,2 +1850,4 @@ return typeof v === 'number'

base = (baseEl && baseEl.getAttribute('href')) || '/';
// strip full URL origin
base = base.replace(/^https?:\/\/[^\/]+/, '');
} else {

@@ -2031,5 +2063,8 @@ base = '/';

return function () {
var args = [], len = arguments.length;
while ( len-- ) args[ len ] = arguments[ len ];
if (called) { return }
called = true;
return fn.apply(this, arguments)
return fn.apply(this, args)
}

@@ -2058,5 +2093,6 @@ }

window.addEventListener('popstate', function (e) {
var current = this$1.current;
this$1.transitionTo(getLocation(this$1.base), function (route) {
if (expectScroll) {
handleScroll(router, route, this$1.current, true);
handleScroll(router, route, current, true);
}

@@ -2217,6 +2253,6 @@ });

function replaceHash (path) {
var i = window.location.href.indexOf('#');
window.location.replace(
window.location.href.slice(0, i >= 0 ? i : 0) + '#' + path
);
var href = window.location.href;
var i = href.indexOf('#');
var base = i >= 0 ? href.slice(0, i) : href;
window.location.replace((base + "#" + path));
}

@@ -2297,3 +2333,3 @@

var mode = options.mode || 'hash';
this.fallback = mode === 'history' && !supportsPushState;
this.fallback = mode === 'history' && !supportsPushState && options.fallback !== false;
if (this.fallback) {

@@ -2482,3 +2518,3 @@ mode = 'hash';

VueRouter.install = install;
VueRouter.version = '2.5.3';
VueRouter.version = '2.6.0';

@@ -2485,0 +2521,0 @@ if (inBrowser && window.Vue) {

/**
* vue-router v2.5.3
* vue-router v2.6.0
* (c) 2017 Evan You

@@ -48,3 +48,3 @@ * @license MIT

var inactive = false;
while (parent) {
while (parent && parent._routerRoot !== parent) {
if (parent.$vnode && parent.$vnode.data.routerView) {

@@ -200,3 +200,3 @@ depth++;

var result = [];
val.slice().forEach(function (val2) {
val.forEach(function (val2) {
if (val2 === undefined) {

@@ -305,3 +305,11 @@ return

}
return aKeys.every(function (key) { return String(a[key]) === String(b[key]); })
return aKeys.every(function (key) {
var aVal = a[key];
var bVal = b[key];
// check nested equality
if (typeof aVal === 'object' && typeof bVal === 'object') {
return isObjectEqual(aVal, bVal)
}
return String(aVal) === String(bVal)
})
}

@@ -437,3 +445,3 @@

// don't redirect with control keys
if (e.metaKey || e.ctrlKey || e.shiftKey) { return }
if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) { return }
// don't redirect when preventDefault called

@@ -478,10 +486,2 @@ if (e.defaultPrevented) { return }

Object.defineProperty(Vue.prototype, '$router', {
get: function get () { return this.$root._router }
});
Object.defineProperty(Vue.prototype, '$route', {
get: function get () { return this.$root._route }
});
var isDef = function (v) { return v !== undefined; };

@@ -499,5 +499,8 @@

if (isDef(this.$options.router)) {
this._routerRoot = this;
this._router = this.$options.router;
this._router.init(this);
Vue.util.defineReactive(this, '_route', this._router.history.current);
} else {
this._routerRoot = (this.$parent && this.$parent._routerRoot) || this;
}

@@ -511,2 +514,10 @@ registerInstance(this, this);

Object.defineProperty(Vue.prototype, '$router', {
get: function get () { return this._routerRoot._router }
});
Object.defineProperty(Vue.prototype, '$route', {
get: function get () { return this._routerRoot._route }
});
Vue.component('router-view', View);

@@ -1104,5 +1115,11 @@ Vue.component('router-link', Link);

var normalizedPath = normalizePath(path, parent);
var pathToRegexpOptions = route.pathToRegexpOptions || {};
if (typeof route.caseSensitive === 'boolean') {
pathToRegexpOptions.sensitive = route.caseSensitive;
}
var record = {
path: normalizedPath,
regex: compileRouteRegex(normalizedPath),
regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),
components: route.components || { default: route.component },

@@ -1124,7 +1141,7 @@ instances: {},

if (route.children) {
// Warn if route is named and has a default child route.
// Warn if route is named, does not redirect and has a default child route.
// If users navigate to this route by name, the default child will
// not be rendered (GH Issue #629)
if (process.env.NODE_ENV !== 'production') {
if (route.name && route.children.some(function (child) { return /^\/?$/.test(child.path); })) {
if (route.name && !route.redirect && route.children.some(function (child) { return /^\/?$/.test(child.path); })) {
warn(

@@ -1149,17 +1166,20 @@ false,

if (route.alias !== undefined) {
if (Array.isArray(route.alias)) {
route.alias.forEach(function (alias) {
var aliasRoute = {
path: alias,
children: route.children
};
addRouteRecord(pathList, pathMap, nameMap, aliasRoute, parent, record.path);
});
} else {
var aliases = Array.isArray(route.alias)
? route.alias
: [route.alias];
aliases.forEach(function (alias) {
var aliasRoute = {
path: route.alias,
path: alias,
children: route.children
};
addRouteRecord(pathList, pathMap, nameMap, aliasRoute, parent, record.path);
}
addRouteRecord(
pathList,
pathMap,
nameMap,
aliasRoute,
parent,
record.path || '/' // matchAs
);
});
}

@@ -1185,4 +1205,4 @@

function compileRouteRegex (path) {
var regex = index(path);
function compileRouteRegex (path, pathToRegexpOptions) {
var regex = index(path, [], pathToRegexpOptions);
if (process.env.NODE_ENV !== 'production') {

@@ -1228,3 +1248,3 @@ var keys = {};

next.params = params;
} else if (current.matched) {
} else if (current.matched.length) {
var rawPath = current.matched[current.matched.length - 1].path;

@@ -1299,2 +1319,3 @@ next.path = fillParams(rawPath, params, ("path " + (current.path)));

}
if (!record) { return _createRoute(null, location) }
var paramNames = record.regex.keys

@@ -1510,3 +1531,5 @@ .filter(function (key) { return !key.optional; })

if (el) {
position = getElementPosition(el);
var offset = shouldScroll.offset && typeof shouldScroll.offset === 'object' ? shouldScroll.offset : {};
offset = normalizeOffset(offset);
position = getElementPosition(el, offset);
} else if (isValidPosition(shouldScroll)) {

@@ -1542,3 +1565,3 @@ position = normalizePosition(shouldScroll);

function getElementPosition (el) {
function getElementPosition (el, offset) {
var docEl = document.documentElement;

@@ -1548,4 +1571,4 @@ var docRect = docEl.getBoundingClientRect();

return {
x: elRect.left - docRect.left,
y: elRect.top - docRect.top
x: elRect.left - docRect.left - offset.x,
y: elRect.top - docRect.top - offset.y
}

@@ -1565,2 +1588,9 @@ }

function normalizeOffset (obj) {
return {
x: isNumber(obj.x) ? obj.x : 0,
y: isNumber(obj.y) ? obj.y : 0
}
}
function isNumber (v) {

@@ -1818,2 +1848,4 @@ return typeof v === 'number'

base = (baseEl && baseEl.getAttribute('href')) || '/';
// strip full URL origin
base = base.replace(/^https?:\/\/[^\/]+/, '');
} else {

@@ -2029,5 +2061,8 @@ base = '/';

return function () {
var args = [], len = arguments.length;
while ( len-- ) args[ len ] = arguments[ len ];
if (called) { return }
called = true;
return fn.apply(this, arguments)
return fn.apply(this, args)
}

@@ -2056,5 +2091,6 @@ }

window.addEventListener('popstate', function (e) {
var current = this$1.current;
this$1.transitionTo(getLocation(this$1.base), function (route) {
if (expectScroll) {
handleScroll(router, route, this$1.current, true);
handleScroll(router, route, current, true);
}

@@ -2215,6 +2251,6 @@ });

function replaceHash (path) {
var i = window.location.href.indexOf('#');
window.location.replace(
window.location.href.slice(0, i >= 0 ? i : 0) + '#' + path
);
var href = window.location.href;
var i = href.indexOf('#');
var base = i >= 0 ? href.slice(0, i) : href;
window.location.replace((base + "#" + path));
}

@@ -2295,3 +2331,3 @@

var mode = options.mode || 'hash';
this.fallback = mode === 'history' && !supportsPushState;
this.fallback = mode === 'history' && !supportsPushState && options.fallback !== false;
if (this.fallback) {

@@ -2480,3 +2516,3 @@ mode = 'hash';

VueRouter.install = install;
VueRouter.version = '2.5.3';
VueRouter.version = '2.6.0';

@@ -2483,0 +2519,0 @@ if (inBrowser && window.Vue) {

/**
* vue-router v2.5.3
* vue-router v2.6.0
* (c) 2017 Evan You

@@ -54,3 +54,3 @@ * @license MIT

var inactive = false;
while (parent) {
while (parent && parent._routerRoot !== parent) {
if (parent.$vnode && parent.$vnode.data.routerView) {

@@ -206,3 +206,3 @@ depth++;

var result = [];
val.slice().forEach(function (val2) {
val.forEach(function (val2) {
if (val2 === undefined) {

@@ -311,3 +311,11 @@ return

}
return aKeys.every(function (key) { return String(a[key]) === String(b[key]); })
return aKeys.every(function (key) {
var aVal = a[key];
var bVal = b[key];
// check nested equality
if (typeof aVal === 'object' && typeof bVal === 'object') {
return isObjectEqual(aVal, bVal)
}
return String(aVal) === String(bVal)
})
}

@@ -443,3 +451,3 @@

// don't redirect with control keys
if (e.metaKey || e.ctrlKey || e.shiftKey) { return }
if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) { return }
// don't redirect when preventDefault called

@@ -484,10 +492,2 @@ if (e.defaultPrevented) { return }

Object.defineProperty(Vue.prototype, '$router', {
get: function get () { return this.$root._router }
});
Object.defineProperty(Vue.prototype, '$route', {
get: function get () { return this.$root._route }
});
var isDef = function (v) { return v !== undefined; };

@@ -505,5 +505,8 @@

if (isDef(this.$options.router)) {
this._routerRoot = this;
this._router = this.$options.router;
this._router.init(this);
Vue.util.defineReactive(this, '_route', this._router.history.current);
} else {
this._routerRoot = (this.$parent && this.$parent._routerRoot) || this;
}

@@ -517,2 +520,10 @@ registerInstance(this, this);

Object.defineProperty(Vue.prototype, '$router', {
get: function get () { return this._routerRoot._router }
});
Object.defineProperty(Vue.prototype, '$route', {
get: function get () { return this._routerRoot._route }
});
Vue.component('router-view', View);

@@ -1110,5 +1121,11 @@ Vue.component('router-link', Link);

var normalizedPath = normalizePath(path, parent);
var pathToRegexpOptions = route.pathToRegexpOptions || {};
if (typeof route.caseSensitive === 'boolean') {
pathToRegexpOptions.sensitive = route.caseSensitive;
}
var record = {
path: normalizedPath,
regex: compileRouteRegex(normalizedPath),
regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),
components: route.components || { default: route.component },

@@ -1130,7 +1147,7 @@ instances: {},

if (route.children) {
// Warn if route is named and has a default child route.
// Warn if route is named, does not redirect and has a default child route.
// If users navigate to this route by name, the default child will
// not be rendered (GH Issue #629)
{
if (route.name && route.children.some(function (child) { return /^\/?$/.test(child.path); })) {
if (route.name && !route.redirect && route.children.some(function (child) { return /^\/?$/.test(child.path); })) {
warn(

@@ -1155,17 +1172,20 @@ false,

if (route.alias !== undefined) {
if (Array.isArray(route.alias)) {
route.alias.forEach(function (alias) {
var aliasRoute = {
path: alias,
children: route.children
};
addRouteRecord(pathList, pathMap, nameMap, aliasRoute, parent, record.path);
});
} else {
var aliases = Array.isArray(route.alias)
? route.alias
: [route.alias];
aliases.forEach(function (alias) {
var aliasRoute = {
path: route.alias,
path: alias,
children: route.children
};
addRouteRecord(pathList, pathMap, nameMap, aliasRoute, parent, record.path);
}
addRouteRecord(
pathList,
pathMap,
nameMap,
aliasRoute,
parent,
record.path || '/' // matchAs
);
});
}

@@ -1191,4 +1211,4 @@

function compileRouteRegex (path) {
var regex = index(path);
function compileRouteRegex (path, pathToRegexpOptions) {
var regex = index(path, [], pathToRegexpOptions);
{

@@ -1234,3 +1254,3 @@ var keys = {};

next.params = params;
} else if (current.matched) {
} else if (current.matched.length) {
var rawPath = current.matched[current.matched.length - 1].path;

@@ -1305,2 +1325,3 @@ next.path = fillParams(rawPath, params, ("path " + (current.path)));

}
if (!record) { return _createRoute(null, location) }
var paramNames = record.regex.keys

@@ -1516,3 +1537,5 @@ .filter(function (key) { return !key.optional; })

if (el) {
position = getElementPosition(el);
var offset = shouldScroll.offset && typeof shouldScroll.offset === 'object' ? shouldScroll.offset : {};
offset = normalizeOffset(offset);
position = getElementPosition(el, offset);
} else if (isValidPosition(shouldScroll)) {

@@ -1548,3 +1571,3 @@ position = normalizePosition(shouldScroll);

function getElementPosition (el) {
function getElementPosition (el, offset) {
var docEl = document.documentElement;

@@ -1554,4 +1577,4 @@ var docRect = docEl.getBoundingClientRect();

return {
x: elRect.left - docRect.left,
y: elRect.top - docRect.top
x: elRect.left - docRect.left - offset.x,
y: elRect.top - docRect.top - offset.y
}

@@ -1571,2 +1594,9 @@ }

function normalizeOffset (obj) {
return {
x: isNumber(obj.x) ? obj.x : 0,
y: isNumber(obj.y) ? obj.y : 0
}
}
function isNumber (v) {

@@ -1824,2 +1854,4 @@ return typeof v === 'number'

base = (baseEl && baseEl.getAttribute('href')) || '/';
// strip full URL origin
base = base.replace(/^https?:\/\/[^\/]+/, '');
} else {

@@ -2035,5 +2067,8 @@ base = '/';

return function () {
var args = [], len = arguments.length;
while ( len-- ) args[ len ] = arguments[ len ];
if (called) { return }
called = true;
return fn.apply(this, arguments)
return fn.apply(this, args)
}

@@ -2062,5 +2097,6 @@ }

window.addEventListener('popstate', function (e) {
var current = this$1.current;
this$1.transitionTo(getLocation(this$1.base), function (route) {
if (expectScroll) {
handleScroll(router, route, this$1.current, true);
handleScroll(router, route, current, true);
}

@@ -2221,6 +2257,6 @@ });

function replaceHash (path) {
var i = window.location.href.indexOf('#');
window.location.replace(
window.location.href.slice(0, i >= 0 ? i : 0) + '#' + path
);
var href = window.location.href;
var i = href.indexOf('#');
var base = i >= 0 ? href.slice(0, i) : href;
window.location.replace((base + "#" + path));
}

@@ -2301,3 +2337,3 @@

var mode = options.mode || 'hash';
this.fallback = mode === 'history' && !supportsPushState;
this.fallback = mode === 'history' && !supportsPushState && options.fallback !== false;
if (this.fallback) {

@@ -2486,3 +2522,3 @@ mode = 'hash';

VueRouter.install = install;
VueRouter.version = '2.5.3';
VueRouter.version = '2.6.0';

@@ -2489,0 +2525,0 @@ if (inBrowser && window.Vue) {

/**
* vue-router v2.5.3
* vue-router v2.6.0
* (c) 2017 Evan You
* @license MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueRouter=e()}(this,function(){"use strict";function t(t,e){}function e(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0}}function n(t,e,n){void 0===e&&(e={});var o,i=n||r;try{o=i(t||"")}catch(t){o={}}for(var a in e){var u=e[a];o[a]=Array.isArray(u)?u.slice():u}return o}function r(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=$t(n.shift()),o=n.length>0?$t(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e}function o(t){var e=t?Object.keys(t).map(function(e){var n=t[e];if(void 0===n)return"";if(null===n)return _t(e);if(Array.isArray(n)){var r=[];return n.slice().forEach(function(t){void 0!==t&&(null===t?r.push(_t(e)):r.push(_t(e)+"="+_t(t)))}),r.join("&")}return _t(e)+"="+_t(n)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}function i(t,e,n,r){var o=r&&r.options.stringifyQuery,i={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:e.query||{},params:e.params||{},fullPath:u(e,o),matched:t?a(t):[]};return n&&(i.redirectedFrom=u(n,o)),Object.freeze(i)}function a(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function u(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var i=t.hash;void 0===i&&(i="");var a=e||o;return(n||"/")+a(r)+i}function c(t,e){return e===qt?t===e:!!e&&(t.path&&e.path?t.path.replace(St,"")===e.path.replace(St,"")&&t.hash===e.hash&&s(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&s(t.query,e.query)&&s(t.params,e.params)))}function s(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(n){return String(t[n])===String(e[n])})}function p(t,e){return 0===t.path.replace(St,"/").indexOf(e.path.replace(St,"/"))&&(!e.hash||t.hash===e.hash)&&f(t.query,e.query)}function f(t,e){for(var n in e)if(!(n in t))return!1;return!0}function h(t){if(!(t.metaKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function l(t){if(t)for(var e,n=0;n<t.length;n++){if(e=t[n],"a"===e.tag)return e;if(e.children&&(e=l(e.children)))return e}}function d(t){if(!d.installed){d.installed=!0,Rt=t,Object.defineProperty(t.prototype,"$router",{get:function(){return this.$root._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this.$root._route}});var e=function(t){return void 0!==t},n=function(t,n){var r=t.$options._parentVnode;e(r)&&e(r=r.data)&&e(r=r.registerRouteInstance)&&r(t,n)};t.mixin({beforeCreate:function(){e(this.$options.router)&&(this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)),n(this,this)},destroyed:function(){n(this)}}),t.component("router-view",Ct),t.component("router-link",Ut);var r=t.config.optionMergeStrategies;r.beforeRouteEnter=r.beforeRouteLeave=r.created}}function y(t,e,n){var r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;var o=e.split("/");n&&o[o.length-1]||o.pop();for(var i=t.replace(/^\//,"").split("/"),a=0;a<i.length;a++){var u=i[a];".."===u?o.pop():"."!==u&&o.push(u)}return""!==o[0]&&o.unshift(""),o.join("/")}function v(t){var e="",n="",r=t.indexOf("#");r>=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}function m(t){return t.replace(/\/\//g,"/")}function g(t,e){for(var n,r=[],o=0,i=0,a="",u=e&&e.delimiter||"/";null!=(n=Dt.exec(t));){var c=n[0],s=n[1],p=n.index;if(a+=t.slice(i,p),i=p+c.length,s)a+=s[1];else{var f=t[i],h=n[2],l=n[3],d=n[4],y=n[5],v=n[6],m=n[7];a&&(r.push(a),a="");var g=null!=h&&null!=f&&f!==h,w="+"===v||"*"===v,b="?"===v||"*"===v,x=n[2]||u,k=d||y;r.push({name:l||o++,prefix:h||"",delimiter:x,optional:b,repeat:w,partial:g,asterisk:!!m,pattern:k?O(k):m?".*":"[^"+E(x)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&r.push(a),r}function w(t,e){return k(g(t,e))}function b(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function x(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function k(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,r){for(var o="",i=n||{},a=r||{},u=a.pretty?b:encodeURIComponent,c=0;c<t.length;c++){var s=t[c];if("string"!=typeof s){var p,f=i[s.name];if(null==f){if(s.optional){s.partial&&(o+=s.prefix);continue}throw new TypeError('Expected "'+s.name+'" to be defined')}if(It(f)){if(!s.repeat)throw new TypeError('Expected "'+s.name+'" to not repeat, but received `'+JSON.stringify(f)+"`");if(0===f.length){if(s.optional)continue;throw new TypeError('Expected "'+s.name+'" to not be empty')}for(var h=0;h<f.length;h++){if(p=u(f[h]),!e[c].test(p))throw new TypeError('Expected all "'+s.name+'" to match "'+s.pattern+'", but received `'+JSON.stringify(p)+"`");o+=(0===h?s.prefix:s.delimiter)+p}}else{if(p=s.asterisk?x(f):u(f),!e[c].test(p))throw new TypeError('Expected "'+s.name+'" to match "'+s.pattern+'", but received "'+p+'"');o+=s.prefix+p}}else o+=s}return o}}function E(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function O(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function R(t,e){return t.keys=e,t}function C(t){return t.sensitive?"":"i"}function A(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return R(t,e)}function j(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push($(t[o],e,n).source);var i=new RegExp("(?:"+r.join("|")+")",C(n));return R(i,e)}function T(t,e,n){return _(g(t,n),e,n)}function _(t,e,n){It(e)||(n=e||n,e=[]),n=n||{};for(var r=n.strict,o=n.end!==!1,i="",a=0;a<t.length;a++){var u=t[a];if("string"==typeof u)i+=E(u);else{var c=E(u.prefix),s="(?:"+u.pattern+")";e.push(u),u.repeat&&(s+="(?:"+c+s+")*"),s=u.optional?u.partial?c+"("+s+")?":"(?:"+c+"("+s+"))?":c+"("+s+")",i+=s}}var p=E(n.delimiter||"/"),f=i.slice(-p.length)===p;return r||(i=(f?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=o?"$":r&&f?"":"(?="+p+"|$)",R(new RegExp("^"+i,C(n)),e)}function $(t,e,n){return It(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?A(t,e):It(t)?j(t,e,n):T(t,e,n)}function S(t,e,n){try{var r=Kt[t]||(Kt[t]=Vt.compile(t));return r(e||{},{pretty:!0})}catch(t){return""}}function q(t,e,n,r){var o=e||[],i=n||Object.create(null),a=r||Object.create(null);t.forEach(function(t){L(o,i,a,t)});for(var u=0,c=o.length;u<c;u++)"*"===o[u]&&(o.push(o.splice(u,1)[0]),c--,u--);return{pathList:o,pathMap:i,nameMap:a}}function L(t,e,n,r,o,i){var a=r.path,u=r.name,c=U(a,o),s={path:c,regex:P(c),components:r.components||{default:r.component},instances:{},name:u,parent:o,matchAs:i,redirect:r.redirect,beforeEnter:r.beforeEnter,meta:r.meta||{},props:null==r.props?{}:r.components?r.props:{default:r.props}};if(r.children&&r.children.forEach(function(r){var o=i?m(i+"/"+r.path):void 0;L(t,e,n,r,s,o)}),void 0!==r.alias)if(Array.isArray(r.alias))r.alias.forEach(function(i){var a={path:i,children:r.children};L(t,e,n,a,o,s.path)});else{var p={path:r.alias,children:r.children};L(t,e,n,p,o,s.path)}e[s.path]||(t.push(s.path),e[s.path]=s),u&&(n[u]||(n[u]=s))}function P(t){var e=Vt(t);return e}function U(t,e){return t=t.replace(/\/$/,""),"/"===t[0]?t:null==e?t:m(e.path+"/"+t)}function H(t,e,r,o){var i="string"==typeof t?{path:t}:t;if(i.name||i._normalized)return i;if(!i.path&&i.params&&e){i=I({},i),i._normalized=!0;var a=I(I({},e.params),i.params);if(e.name)i.name=e.name,i.params=a;else if(e.matched){var u=e.matched[e.matched.length-1].path;i.path=S(u,a,"path "+e.path)}return i}var c=v(i.path||""),s=e&&e.path||"/",p=c.path?y(c.path,s,r||i.append):s,f=n(c.query,i.query,o&&o.options.parseQuery),h=i.hash||c.hash;return h&&"#"!==h.charAt(0)&&(h="#"+h),{_normalized:!0,path:p,query:f,hash:h}}function I(t,e){for(var n in e)t[n]=e[n];return t}function V(t,e){function n(t){q(t,s,p,f)}function r(t,n,r){var o=H(t,n,!1,e),i=o.name;if(i){var a=f[i],c=a.regex.keys.filter(function(t){return!t.optional}).map(function(t){return t.name});if("object"!=typeof o.params&&(o.params={}),n&&"object"==typeof n.params)for(var h in n.params)!(h in o.params)&&c.indexOf(h)>-1&&(o.params[h]=n.params[h]);if(a)return o.path=S(a.path,o.params,'named route "'+i+'"'),u(a,o,r)}else if(o.path){o.params={};for(var l=0;l<s.length;l++){var d=s[l],y=p[d];if(z(y.regex,o.path,o.params))return u(y,o,r)}}return u(null,o)}function o(t,n){var o=t.redirect,a="function"==typeof o?o(i(t,n,null,e)):o;if("string"==typeof a&&(a={path:a}),!a||"object"!=typeof a)return u(null,n);var c=a,s=c.name,p=c.path,h=n.query,l=n.hash,d=n.params;if(h=c.hasOwnProperty("query")?c.query:h,l=c.hasOwnProperty("hash")?c.hash:l,d=c.hasOwnProperty("params")?c.params:d,s){f[s];return r({_normalized:!0,name:s,query:h,hash:l,params:d},void 0,n)}if(p){var y=M(p,t),v=S(y,d,'redirect route with path "'+y+'"');return r({_normalized:!0,path:v,query:h,hash:l},void 0,n)}return u(null,n)}function a(t,e,n){var o=S(n,e.params,'aliased route with path "'+n+'"'),i=r({_normalized:!0,path:o});if(i){var a=i.matched,c=a[a.length-1];return e.params=i.params,u(c,e)}return u(null,e)}function u(t,n,r){return t&&t.redirect?o(t,r||n):t&&t.matchAs?a(t,n,t.matchAs):i(t,n,r,e)}var c=q(t),s=c.pathList,p=c.pathMap,f=c.nameMap;return{match:r,addRoutes:n}}function z(t,e,n){var r=e.match(t);if(!r)return!1;if(!n)return!0;for(var o=1,i=r.length;o<i;++o){var a=t.keys[o-1],u="string"==typeof r[o]?decodeURIComponent(r[o]):r[o];a&&(n[a.name]=u)}return!0}function M(t,e){return y(t,e.parent?e.parent.path:"/",!0)}function B(){window.addEventListener("popstate",function(t){D(),t.state&&t.state.key&&G(t.state.key)})}function F(t,e,n,r){if(t.app){var o=t.options.scrollBehavior;o&&t.app.$nextTick(function(){var t=K(),i=o(e,n,r?t:null);if(i){var a="object"==typeof i;if(a&&"string"==typeof i.selector){var u=document.querySelector(i.selector);u?t=J(u):N(i)&&(t=Q(i))}else a&&N(i)&&(t=Q(i));t&&window.scrollTo(t.x,t.y)}})}}function D(){var t=W();t&&(Jt[t]={x:window.pageXOffset,y:window.pageYOffset})}function K(){var t=W();if(t)return Jt[t]}function J(t){var e=document.documentElement,n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:r.left-n.left,y:r.top-n.top}}function N(t){return X(t.x)||X(t.y)}function Q(t){return{x:X(t.x)?t.x:window.pageXOffset,y:X(t.y)?t.y:window.pageYOffset}}function X(t){return"number"==typeof t}function Y(){return Qt.now().toFixed(3)}function W(){return Xt}function G(t){Xt=t}function Z(t,e){D();var n=window.history;try{e?n.replaceState({key:Xt},"",t):(Xt=Y(),n.pushState({key:Xt},"",t))}catch(n){window.location[e?"replace":"assign"](t)}}function tt(t){Z(t,!0)}function et(t,e,n){var r=function(o){o>=t.length?n():t[o]?e(t[o],function(){r(o+1)}):r(o+1)};r(0)}function nt(t){if(!t)if(Ht){var e=document.querySelector("base");t=e&&e.getAttribute("href")||"/"}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function rt(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n<r&&t[n]===e[n];n++);return{updated:e.slice(0,n),activated:e.slice(n),deactivated:t.slice(n)}}function ot(t,e,n,r){var o=lt(t,function(t,r,o,i){var a=it(t,e);if(a)return Array.isArray(a)?a.map(function(t){return n(t,r,o,i)}):n(a,r,o,i)});return dt(r?o.reverse():o)}function it(t,e){return"function"!=typeof t&&(t=Rt.extend(t)),t.options[e]}function at(t){return ot(t,"beforeRouteLeave",ct,!0)}function ut(t){return ot(t,"beforeRouteUpdate",ct)}function ct(t,e){if(e)return function(){return t.apply(e,arguments)}}function st(t,e,n){return ot(t,"beforeRouteEnter",function(t,r,o,i){return pt(t,o,i,e,n)})}function pt(t,e,n,r,o){return function(i,a,u){return t(i,a,function(t){u(t),"function"==typeof t&&r.push(function(){ft(t,e.instances,n,o)})})}}function ft(t,e,n,r){e[n]?t(e[n]):r()&&setTimeout(function(){ft(t,e,n,r)},16)}function ht(t){return function(e,n,r){var o=!1,i=0,a=null;lt(t,function(t,e,n,u){if("function"==typeof t&&void 0===t.cid){o=!0,i++;var c,s=yt(function(e){t.resolved="function"==typeof e?e:Rt.extend(e),n.components[u]=e,i--,i<=0&&r()}),p=yt(function(t){var e="Failed to resolve async component "+u+": "+t;a||(a=vt(t)?t:new Error(e),r(a))});try{c=t(s,p)}catch(t){p(t)}if(c)if("function"==typeof c.then)c.then(s,p);else{var f=c.component;f&&"function"==typeof f.then&&f.then(s,p)}}}),o||r()}}function lt(t,e){return dt(t.map(function(t){return Object.keys(t.components).map(function(n){return e(t.components[n],t.instances[n],t,n)})}))}function dt(t){return Array.prototype.concat.apply([],t)}function yt(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}function vt(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function mt(t){var e=window.location.pathname;return t&&0===e.indexOf(t)&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}function gt(t){var e=mt(t);if(!/^\/#/.test(e))return window.location.replace(m(t+"/#"+e)),!0}function wt(){var t=bt();return"/"===t.charAt(0)||(kt("/"+t),!1)}function bt(){var t=window.location.href,e=t.indexOf("#");return e===-1?"":t.slice(e+1)}function xt(t){window.location.hash=t}function kt(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)}function Et(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Ot(t,e,n){var r="hash"===n?"#"+e:e;return t?m(t+"/"+r):r}var Rt,Ct={name:"router-view",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,n){var r=n.props,o=n.children,i=n.parent,a=n.data;a.routerView=!0;for(var u=i.$createElement,c=r.name,s=i.$route,p=i._routerViewCache||(i._routerViewCache={}),f=0,h=!1;i;)i.$vnode&&i.$vnode.data.routerView&&f++,i._inactive&&(h=!0),i=i.$parent;if(a.routerViewDepth=f,h)return u(p[c],a,o);var l=s.matched[f];if(!l)return p[c]=null,u();var d=p[c]=l.components[c];return a.registerRouteInstance=function(t,e){var n=l.instances[c];(e&&n!==t||!e&&n===t)&&(l.instances[c]=e)},(a.hook||(a.hook={})).prepatch=function(t,e){l.instances[c]=e.componentInstance},a.props=e(s,l.props&&l.props[c]),u(d,a,o)}},At=/[!'()*]/g,jt=function(t){return"%"+t.charCodeAt(0).toString(16)},Tt=/%2C/g,_t=function(t){return encodeURIComponent(t).replace(At,jt).replace(Tt,",")},$t=decodeURIComponent,St=/\/?$/,qt=i(null,{path:"/"}),Lt=[String,Object],Pt=[String,Array],Ut={name:"router-link",props:{to:{type:Lt,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:Pt,default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,o=n.resolve(this.to,r,this.append),a=o.location,u=o.route,s=o.href,f={},d=n.options.linkActiveClass,y=n.options.linkExactActiveClass,v=null==d?"router-link-active":d,m=null==y?"router-link-exact-active":y,g=null==this.activeClass?v:this.activeClass,w=null==this.exactActiveClass?m:this.exactActiveClass,b=a.path?i(null,a,null,n):u;f[w]=c(r,b),f[g]=this.exact?f[w]:p(r,b);var x=function(t){h(t)&&(e.replace?n.replace(a):n.push(a))},k={click:h};Array.isArray(this.event)?this.event.forEach(function(t){k[t]=x}):k[this.event]=x;var E={class:f};if("a"===this.tag)E.on=k,E.attrs={href:s};else{var O=l(this.$slots.default);if(O){O.isStatic=!1;var R=Rt.util.extend,C=O.data=R({},O.data);C.on=k;var A=O.data.attrs=R({},O.data.attrs);A.href=s}else E.on=k}return t(this.tag,E,this.$slots.default)}},Ht="undefined"!=typeof window,It=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},Vt=$,zt=g,Mt=w,Bt=k,Ft=_,Dt=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");Vt.parse=zt,Vt.compile=Mt,Vt.tokensToFunction=Bt,Vt.tokensToRegExp=Ft;var Kt=Object.create(null),Jt=Object.create(null),Nt=Ht&&function(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")===-1&&t.indexOf("Android 4.0")===-1||t.indexOf("Mobile Safari")===-1||t.indexOf("Chrome")!==-1||t.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)}(),Qt=Ht&&window.performance&&window.performance.now?window.performance:Date,Xt=Y(),Yt=function(t,e){this.router=t,this.base=nt(e),this.current=qt,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};Yt.prototype.listen=function(t){this.cb=t},Yt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Yt.prototype.onError=function(t){this.errorCbs.push(t)},Yt.prototype.transitionTo=function(t,e,n){var r=this,o=this.router.match(t,this.current);this.confirmTransition(o,function(){r.updateRoute(o),e&&e(o),r.ensureURL(),r.ready||(r.ready=!0,r.readyCbs.forEach(function(t){t(o)}))},function(t){n&&n(t),t&&!r.ready&&(r.ready=!0,r.readyErrorCbs.forEach(function(e){e(t)}))})},Yt.prototype.confirmTransition=function(e,n,r){var o=this,i=this.current,a=function(e){vt(e)&&(o.errorCbs.length?o.errorCbs.forEach(function(t){t(e)}):(t(!1,"uncaught error during route navigation:"),console.error(e))),r&&r(e)};if(c(e,i)&&e.matched.length===i.matched.length)return this.ensureURL(),a();var u=rt(this.current.matched,e.matched),s=u.updated,p=u.deactivated,f=u.activated,h=[].concat(at(p),this.router.beforeHooks,ut(s),f.map(function(t){return t.beforeEnter}),ht(f));this.pending=e;var l=function(t,n){if(o.pending!==e)return a();try{t(e,i,function(t){t===!1||vt(t)?(o.ensureURL(!0),a(t)):"string"==typeof t||"object"==typeof t&&("string"==typeof t.path||"string"==typeof t.name)?(a(),"object"==typeof t&&t.replace?o.replace(t):o.push(t)):n(t)})}catch(t){a(t)}};et(h,l,function(){var t=[],r=function(){return o.current===e},i=st(f,t,r),u=i.concat(o.router.resolveHooks);et(u,l,function(){return o.pending!==e?a():(o.pending=null,n(e),void(o.router.app&&o.router.app.$nextTick(function(){t.forEach(function(t){t()})})))})})},Yt.prototype.updateRoute=function(t){var e=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(function(n){n&&n(t,e)})};var Wt=function(t){function e(e,n){var r=this;t.call(this,e,n);var o=e.options.scrollBehavior;o&&B(),window.addEventListener("popstate",function(t){r.transitionTo(mt(r.base),function(t){o&&F(e,t,r.current,!0)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,function(t){Z(m(r.base+t.fullPath)),F(r.router,t,i,!1),e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,function(t){tt(m(r.base+t.fullPath)),F(r.router,t,i,!1),e&&e(t)},n)},e.prototype.ensureURL=function(t){if(mt(this.base)!==this.current.fullPath){var e=m(this.base+this.current.fullPath);t?Z(e):tt(e)}},e.prototype.getCurrentLocation=function(){return mt(this.base)},e}(Yt),Gt=function(t){function e(e,n,r){t.call(this,e,n),r&&gt(this.base)||wt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;window.addEventListener("hashchange",function(){wt()&&t.transitionTo(bt(),function(t){kt(t.fullPath)})})},e.prototype.push=function(t,e,n){this.transitionTo(t,function(t){xt(t.fullPath),e&&e(t)},n)},e.prototype.replace=function(t,e,n){this.transitionTo(t,function(t){kt(t.fullPath),e&&e(t)},n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;bt()!==e&&(t?xt(e):kt(e))},e.prototype.getCurrentLocation=function(){return bt()},e}(Yt),Zt=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)},n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){e.index=n,e.updateRoute(r)})}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Yt),te=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=V(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!Nt,this.fallback&&(e="hash"),Ht||(e="abstract"),this.mode=e,e){case"history":this.history=new Wt(this,t.base);break;case"hash":this.history=new Gt(this,t.base,this.fallback);break;case"abstract":this.history=new Zt(this,t.base)}},ee={currentRoute:{}};return te.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},ee.currentRoute.get=function(){return this.history&&this.history.current},te.prototype.init=function(t){var e=this;if(this.apps.push(t),!this.app){this.app=t;var n=this.history;if(n instanceof Wt)n.transitionTo(n.getCurrentLocation());else if(n instanceof Gt){var r=function(){n.setupListeners()};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen(function(t){e.apps.forEach(function(e){e._route=t})})}},te.prototype.beforeEach=function(t){return Et(this.beforeHooks,t)},te.prototype.beforeResolve=function(t){return Et(this.resolveHooks,t)},te.prototype.afterEach=function(t){return Et(this.afterHooks,t)},te.prototype.onReady=function(t,e){this.history.onReady(t,e)},te.prototype.onError=function(t){this.history.onError(t)},te.prototype.push=function(t,e,n){this.history.push(t,e,n)},te.prototype.replace=function(t,e,n){this.history.replace(t,e,n)},te.prototype.go=function(t){this.history.go(t)},te.prototype.back=function(){this.go(-1)},te.prototype.forward=function(){this.go(1)},te.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},te.prototype.resolve=function(t,e,n){var r=H(t,e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath,a=this.history.base,u=Ot(a,i,this.mode);return{location:r,route:o,href:u,normalizedTo:r,resolved:o}},te.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==qt&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(te.prototype,ee),te.install=d,te.version="2.5.3",Ht&&window.Vue&&window.Vue.use(te),te});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueRouter=e()}(this,function(){"use strict";function t(t,e){}function e(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0}}function r(t,e,r){void 0===e&&(e={});var o,i=r||n;try{o=i(t||"")}catch(t){o={}}for(var a in e){var u=e[a];o[a]=Array.isArray(u)?u.slice():u}return o}function n(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var r=t.replace(/\+/g," ").split("="),n=$t(r.shift()),o=r.length>0?$t(r.join("=")):null;void 0===e[n]?e[n]=o:Array.isArray(e[n])?e[n].push(o):e[n]=[e[n],o]}),e):e}function o(t){var e=t?Object.keys(t).map(function(e){var r=t[e];if(void 0===r)return"";if(null===r)return Tt(e);if(Array.isArray(r)){var n=[];return r.forEach(function(t){void 0!==t&&(null===t?n.push(Tt(e)):n.push(Tt(e)+"="+Tt(t)))}),n.join("&")}return Tt(e)+"="+Tt(r)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}function i(t,e,r,n){var o=n&&n.options.stringifyQuery,i={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:e.query||{},params:e.params||{},fullPath:u(e,o),matched:t?a(t):[]};return r&&(i.redirectedFrom=u(r,o)),Object.freeze(i)}function a(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function u(t,e){var r=t.path,n=t.query;void 0===n&&(n={});var i=t.hash;void 0===i&&(i="");var a=e||o;return(r||"/")+a(n)+i}function c(t,e){return e===qt?t===e:!!e&&(t.path&&e.path?t.path.replace(St,"")===e.path.replace(St,"")&&t.hash===e.hash&&s(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&s(t.query,e.query)&&s(t.params,e.params)))}function s(t,e){void 0===t&&(t={}),void 0===e&&(e={});var r=Object.keys(t),n=Object.keys(e);return r.length===n.length&&r.every(function(r){var n=t[r],o=e[r];return"object"==typeof n&&"object"==typeof o?s(n,o):String(n)===String(o)})}function p(t,e){return 0===t.path.replace(St,"/").indexOf(e.path.replace(St,"/"))&&(!e.hash||t.hash===e.hash)&&f(t.query,e.query)}function f(t,e){for(var r in e)if(!(r in t))return!1;return!0}function h(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function l(t){if(t)for(var e,r=0;r<t.length;r++){if("a"===(e=t[r]).tag)return e;if(e.children&&(e=l(e.children)))return e}}function d(t){if(!d.installed){d.installed=!0,Ot=t;var e=function(t){return void 0!==t},r=function(t,r){var n=t.$options._parentVnode;e(n)&&e(n=n.data)&&e(n=n.registerRouteInstance)&&n(t,r)};t.mixin({beforeCreate:function(){e(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this._routerRoot._route}}),t.component("router-view",Ct),t.component("router-link",Ut);var n=t.config.optionMergeStrategies;n.beforeRouteEnter=n.beforeRouteLeave=n.created}}function y(t,e,r){var n=t.charAt(0);if("/"===n)return t;if("?"===n||"#"===n)return e+t;var o=e.split("/");r&&o[o.length-1]||o.pop();for(var i=t.replace(/^\//,"").split("/"),a=0;a<i.length;a++){var u=i[a];".."===u?o.pop():"."!==u&&o.push(u)}return""!==o[0]&&o.unshift(""),o.join("/")}function v(t){var e="",r="",n=t.indexOf("#");n>=0&&(e=t.slice(n),t=t.slice(0,n));var o=t.indexOf("?");return o>=0&&(r=t.slice(o+1),t=t.slice(0,o)),{path:t,query:r,hash:e}}function m(t){return t.replace(/\/\//g,"/")}function g(t,e){for(var r,n=[],o=0,i=0,a="",u=e&&e.delimiter||"/";null!=(r=Ft.exec(t));){var c=r[0],s=r[1],p=r.index;if(a+=t.slice(i,p),i=p+c.length,s)a+=s[1];else{var f=t[i],h=r[2],l=r[3],d=r[4],y=r[5],v=r[6],m=r[7];a&&(n.push(a),a="");var g=null!=h&&null!=f&&f!==h,b="+"===v||"*"===v,w="?"===v||"*"===v,x=r[2]||u,R=d||y;n.push({name:l||o++,prefix:h||"",delimiter:x,optional:w,repeat:b,partial:g,asterisk:!!m,pattern:R?E(R):m?".*":"[^"+k(x)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&n.push(a),n}function b(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function w(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function x(t){for(var e=new Array(t.length),r=0;r<t.length;r++)"object"==typeof t[r]&&(e[r]=new RegExp("^(?:"+t[r].pattern+")$"));return function(r,n){for(var o="",i=r||{},a=(n||{}).pretty?b:encodeURIComponent,u=0;u<t.length;u++){var c=t[u];if("string"!=typeof c){var s,p=i[c.name];if(null==p){if(c.optional){c.partial&&(o+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(It(p)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var f=0;f<p.length;f++){if(s=a(p[f]),!e[u].test(s))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(s)+"`");o+=(0===f?c.prefix:c.delimiter)+s}}else{if(s=c.asterisk?w(p):a(p),!e[u].test(s))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+s+'"');o+=c.prefix+s}}else o+=c}return o}}function k(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function E(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function R(t,e){return t.keys=e,t}function O(t){return t.sensitive?"":"i"}function C(t,e){var r=t.source.match(/\((?!\?)/g);if(r)for(var n=0;n<r.length;n++)e.push({name:n,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return R(t,e)}function A(t,e,r){for(var n=[],o=0;o<t.length;o++)n.push(T(t[o],e,r).source);return R(new RegExp("(?:"+n.join("|")+")",O(r)),e)}function j(t,e,r){return _(g(t,r),e,r)}function _(t,e,r){It(e)||(r=e||r,e=[]);for(var n=(r=r||{}).strict,o=!1!==r.end,i="",a=0;a<t.length;a++){var u=t[a];if("string"==typeof u)i+=k(u);else{var c=k(u.prefix),s="(?:"+u.pattern+")";e.push(u),u.repeat&&(s+="(?:"+c+s+")*"),i+=s=u.optional?u.partial?c+"("+s+")?":"(?:"+c+"("+s+"))?":c+"("+s+")"}}var p=k(r.delimiter||"/"),f=i.slice(-p.length)===p;return n||(i=(f?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=o?"$":n&&f?"":"(?="+p+"|$)",R(new RegExp("^"+i,O(r)),e)}function T(t,e,r){return It(e)||(r=e||r,e=[]),r=r||{},t instanceof RegExp?C(t,e):It(t)?A(t,e,r):j(t,e,r)}function $(t,e,r){try{return(Dt[t]||(Dt[t]=Vt.compile(t)))(e||{},{pretty:!0})}catch(t){return""}}function S(t,e,r,n){var o=e||[],i=r||Object.create(null),a=n||Object.create(null);t.forEach(function(t){q(o,i,a,t)});for(var u=0,c=o.length;u<c;u++)"*"===o[u]&&(o.push(o.splice(u,1)[0]),c--,u--);return{pathList:o,pathMap:i,nameMap:a}}function q(t,e,r,n,o,i){var a=n.path,u=n.name,c=P(a,o),s=n.pathToRegexpOptions||{};"boolean"==typeof n.caseSensitive&&(s.sensitive=n.caseSensitive);var p={path:c,regex:L(c,s),components:n.components||{default:n.component},instances:{},name:u,parent:o,matchAs:i,redirect:n.redirect,beforeEnter:n.beforeEnter,meta:n.meta||{},props:null==n.props?{}:n.components?n.props:{default:n.props}};n.children&&n.children.forEach(function(n){var o=i?m(i+"/"+n.path):void 0;q(t,e,r,n,p,o)}),void 0!==n.alias&&(Array.isArray(n.alias)?n.alias:[n.alias]).forEach(function(i){var a={path:i,children:n.children};q(t,e,r,a,o,p.path||"/")}),e[p.path]||(t.push(p.path),e[p.path]=p),u&&(r[u]||(r[u]=p))}function L(t,e){return Vt(t,[],e)}function P(t,e){return t=t.replace(/\/$/,""),"/"===t[0]?t:null==e?t:m(e.path+"/"+t)}function U(t,e,n,o){var i="string"==typeof t?{path:t}:t;if(i.name||i._normalized)return i;if(!i.path&&i.params&&e){(i=H({},i))._normalized=!0;var a=H(H({},e.params),i.params);if(e.name)i.name=e.name,i.params=a;else if(e.matched.length){var u=e.matched[e.matched.length-1].path;i.path=$(u,a,"path "+e.path)}return i}var c=v(i.path||""),s=e&&e.path||"/",p=c.path?y(c.path,s,n||i.append):s,f=r(c.query,i.query,o&&o.options.parseQuery),h=i.hash||c.hash;return h&&"#"!==h.charAt(0)&&(h="#"+h),{_normalized:!0,path:p,query:f,hash:h}}function H(t,e){for(var r in e)t[r]=e[r];return t}function I(t,e){function r(t,r,n){var o=U(t,r,!1,e),i=o.name;if(i){var u=p[i];if(!u)return a(null,o);var f=u.regex.keys.filter(function(t){return!t.optional}).map(function(t){return t.name});if("object"!=typeof o.params&&(o.params={}),r&&"object"==typeof r.params)for(var h in r.params)!(h in o.params)&&f.indexOf(h)>-1&&(o.params[h]=r.params[h]);if(u)return o.path=$(u.path,o.params,'named route "'+i+'"'),a(u,o,n)}else if(o.path){o.params={};for(var l=0;l<c.length;l++){var d=c[l],y=s[d];if(V(y.regex,o.path,o.params))return a(y,o,n)}}return a(null,o)}function n(t,n){var o=t.redirect,u="function"==typeof o?o(i(t,n,null,e)):o;if("string"==typeof u&&(u={path:u}),!u||"object"!=typeof u)return a(null,n);var c=u,s=c.name,f=c.path,h=n.query,l=n.hash,d=n.params;if(h=c.hasOwnProperty("query")?c.query:h,l=c.hasOwnProperty("hash")?c.hash:l,d=c.hasOwnProperty("params")?c.params:d,s){p[s];return r({_normalized:!0,name:s,query:h,hash:l,params:d},void 0,n)}if(f){var y=z(f,t);return r({_normalized:!0,path:$(y,d,'redirect route with path "'+y+'"'),query:h,hash:l},void 0,n)}return a(null,n)}function o(t,e,n){var o=r({_normalized:!0,path:$(n,e.params,'aliased route with path "'+n+'"')});if(o){var i=o.matched,u=i[i.length-1];return e.params=o.params,a(u,e)}return a(null,e)}function a(t,r,a){return t&&t.redirect?n(t,a||r):t&&t.matchAs?o(t,r,t.matchAs):i(t,r,a,e)}var u=S(t),c=u.pathList,s=u.pathMap,p=u.nameMap;return{match:r,addRoutes:function(t){S(t,c,s,p)}}}function V(t,e,r){var n=e.match(t);if(!n)return!1;if(!r)return!0;for(var o=1,i=n.length;o<i;++o){var a=t.keys[o-1],u="string"==typeof n[o]?decodeURIComponent(n[o]):n[o];a&&(r[a.name]=u)}return!0}function z(t,e){return y(t,e.parent?e.parent.path:"/",!0)}function M(){window.addEventListener("popstate",function(t){F(),t.state&&t.state.key&&G(t.state.key)})}function B(t,e,r,n){if(t.app){var o=t.options.scrollBehavior;o&&t.app.$nextTick(function(){var t=D(),i=o(e,r,n?t:null);if(i){var a="object"==typeof i;if(a&&"string"==typeof i.selector){var u=document.querySelector(i.selector);if(u){var c=i.offset&&"object"==typeof i.offset?i.offset:{};t=K(u,c=Q(c))}else J(i)&&(t=N(i))}else a&&J(i)&&(t=N(i));t&&window.scrollTo(t.x,t.y)}})}}function F(){var t=W();t&&(Kt[t]={x:window.pageXOffset,y:window.pageYOffset})}function D(){var t=W();if(t)return Kt[t]}function K(t,e){var r=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{x:n.left-r.left-e.x,y:n.top-r.top-e.y}}function J(t){return X(t.x)||X(t.y)}function N(t){return{x:X(t.x)?t.x:window.pageXOffset,y:X(t.y)?t.y:window.pageYOffset}}function Q(t){return{x:X(t.x)?t.x:0,y:X(t.y)?t.y:0}}function X(t){return"number"==typeof t}function Y(){return Nt.now().toFixed(3)}function W(){return Qt}function G(t){Qt=t}function Z(t,e){F();var r=window.history;try{e?r.replaceState({key:Qt},"",t):(Qt=Y(),r.pushState({key:Qt},"",t))}catch(r){window.location[e?"replace":"assign"](t)}}function tt(t){Z(t,!0)}function et(t,e,r){var n=function(o){o>=t.length?r():t[o]?e(t[o],function(){n(o+1)}):n(o+1)};n(0)}function rt(t){if(!t)if(Ht){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function nt(t,e){var r,n=Math.max(t.length,e.length);for(r=0;r<n&&t[r]===e[r];r++);return{updated:e.slice(0,r),activated:e.slice(r),deactivated:t.slice(r)}}function ot(t,e,r,n){var o=lt(t,function(t,n,o,i){var a=it(t,e);if(a)return Array.isArray(a)?a.map(function(t){return r(t,n,o,i)}):r(a,n,o,i)});return dt(n?o.reverse():o)}function it(t,e){return"function"!=typeof t&&(t=Ot.extend(t)),t.options[e]}function at(t){return ot(t,"beforeRouteLeave",ct,!0)}function ut(t){return ot(t,"beforeRouteUpdate",ct)}function ct(t,e){if(e)return function(){return t.apply(e,arguments)}}function st(t,e,r){return ot(t,"beforeRouteEnter",function(t,n,o,i){return pt(t,o,i,e,r)})}function pt(t,e,r,n,o){return function(i,a,u){return t(i,a,function(t){u(t),"function"==typeof t&&n.push(function(){ft(t,e.instances,r,o)})})}}function ft(t,e,r,n){e[r]?t(e[r]):n()&&setTimeout(function(){ft(t,e,r,n)},16)}function ht(t){return function(e,r,n){var o=!1,i=0,a=null;lt(t,function(t,e,r,u){if("function"==typeof t&&void 0===t.cid){o=!0,i++;var c,s=yt(function(e){t.resolved="function"==typeof e?e:Ot.extend(e),r.components[u]=e,--i<=0&&n()}),p=yt(function(t){var e="Failed to resolve async component "+u+": "+t;a||(a=vt(t)?t:new Error(e),n(a))});try{c=t(s,p)}catch(t){p(t)}if(c)if("function"==typeof c.then)c.then(s,p);else{var f=c.component;f&&"function"==typeof f.then&&f.then(s,p)}}}),o||n()}}function lt(t,e){return dt(t.map(function(t){return Object.keys(t.components).map(function(r){return e(t.components[r],t.instances[r],t,r)})}))}function dt(t){return Array.prototype.concat.apply([],t)}function yt(t){var e=!1;return function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];if(!e)return e=!0,t.apply(this,r)}}function vt(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function mt(t){var e=window.location.pathname;return t&&0===e.indexOf(t)&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}function gt(t){var e=mt(t);if(!/^\/#/.test(e))return window.location.replace(m(t+"/#"+e)),!0}function bt(){var t=wt();return"/"===t.charAt(0)||(kt("/"+t),!1)}function wt(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.slice(e+1)}function xt(t){window.location.hash=t}function kt(t){var e=window.location.href,r=e.indexOf("#"),n=r>=0?e.slice(0,r):e;window.location.replace(n+"#"+t)}function Et(t,e){return t.push(e),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}function Rt(t,e,r){var n="hash"===r?"#"+e:e;return t?m(t+"/"+n):n}var Ot,Ct={name:"router-view",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,r){var n=r.props,o=r.children,i=r.parent,a=r.data;a.routerView=!0;for(var u=i.$createElement,c=n.name,s=i.$route,p=i._routerViewCache||(i._routerViewCache={}),f=0,h=!1;i&&i._routerRoot!==i;)i.$vnode&&i.$vnode.data.routerView&&f++,i._inactive&&(h=!0),i=i.$parent;if(a.routerViewDepth=f,h)return u(p[c],a,o);var l=s.matched[f];if(!l)return p[c]=null,u();var d=p[c]=l.components[c];return a.registerRouteInstance=function(t,e){var r=l.instances[c];(e&&r!==t||!e&&r===t)&&(l.instances[c]=e)},(a.hook||(a.hook={})).prepatch=function(t,e){l.instances[c]=e.componentInstance},a.props=e(s,l.props&&l.props[c]),u(d,a,o)}},At=/[!'()*]/g,jt=function(t){return"%"+t.charCodeAt(0).toString(16)},_t=/%2C/g,Tt=function(t){return encodeURIComponent(t).replace(At,jt).replace(_t,",")},$t=decodeURIComponent,St=/\/?$/,qt=i(null,{path:"/"}),Lt=[String,Object],Pt=[String,Array],Ut={name:"router-link",props:{to:{type:Lt,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:Pt,default:"click"}},render:function(t){var e=this,r=this.$router,n=this.$route,o=r.resolve(this.to,n,this.append),a=o.location,u=o.route,s=o.href,f={},d=r.options.linkActiveClass,y=r.options.linkExactActiveClass,v=null==d?"router-link-active":d,m=null==y?"router-link-exact-active":y,g=null==this.activeClass?v:this.activeClass,b=null==this.exactActiveClass?m:this.exactActiveClass,w=a.path?i(null,a,null,r):u;f[b]=c(n,w),f[g]=this.exact?f[b]:p(n,w);var x=function(t){h(t)&&(e.replace?r.replace(a):r.push(a))},k={click:h};Array.isArray(this.event)?this.event.forEach(function(t){k[t]=x}):k[this.event]=x;var E={class:f};if("a"===this.tag)E.on=k,E.attrs={href:s};else{var R=l(this.$slots.default);if(R){R.isStatic=!1;var O=Ot.util.extend;(R.data=O({},R.data)).on=k,(R.data.attrs=O({},R.data.attrs)).href=s}else E.on=k}return t(this.tag,E,this.$slots.default)}},Ht="undefined"!=typeof window,It=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},Vt=T,zt=g,Mt=x,Bt=_,Ft=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");Vt.parse=zt,Vt.compile=function(t,e){return x(g(t,e))},Vt.tokensToFunction=Mt,Vt.tokensToRegExp=Bt;var Dt=Object.create(null),Kt=Object.create(null),Jt=Ht&&function(){var t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)}(),Nt=Ht&&window.performance&&window.performance.now?window.performance:Date,Qt=Y(),Xt=function(t,e){this.router=t,this.base=rt(e),this.current=qt,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};Xt.prototype.listen=function(t){this.cb=t},Xt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Xt.prototype.onError=function(t){this.errorCbs.push(t)},Xt.prototype.transitionTo=function(t,e,r){var n=this,o=this.router.match(t,this.current);this.confirmTransition(o,function(){n.updateRoute(o),e&&e(o),n.ensureURL(),n.ready||(n.ready=!0,n.readyCbs.forEach(function(t){t(o)}))},function(t){r&&r(t),t&&!n.ready&&(n.ready=!0,n.readyErrorCbs.forEach(function(e){e(t)}))})},Xt.prototype.confirmTransition=function(e,r,n){var o=this,i=this.current,a=function(e){vt(e)&&(o.errorCbs.length?o.errorCbs.forEach(function(t){t(e)}):(t(!1,"uncaught error during route navigation:"),console.error(e))),n&&n(e)};if(c(e,i)&&e.matched.length===i.matched.length)return this.ensureURL(),a();var u=nt(this.current.matched,e.matched),s=u.updated,p=u.deactivated,f=u.activated,h=[].concat(at(p),this.router.beforeHooks,ut(s),f.map(function(t){return t.beforeEnter}),ht(f));this.pending=e;var l=function(t,r){if(o.pending!==e)return a();try{t(e,i,function(t){!1===t||vt(t)?(o.ensureURL(!0),a(t)):"string"==typeof t||"object"==typeof t&&("string"==typeof t.path||"string"==typeof t.name)?(a(),"object"==typeof t&&t.replace?o.replace(t):o.push(t)):r(t)})}catch(t){a(t)}};et(h,l,function(){var t=[];et(st(f,t,function(){return o.current===e}).concat(o.router.resolveHooks),l,function(){if(o.pending!==e)return a();o.pending=null,r(e),o.router.app&&o.router.app.$nextTick(function(){t.forEach(function(t){t()})})})})},Xt.prototype.updateRoute=function(t){var e=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(function(r){r&&r(t,e)})};var Yt=function(t){function e(e,r){var n=this;t.call(this,e,r);var o=e.options.scrollBehavior;o&&M(),window.addEventListener("popstate",function(t){var r=n.current;n.transitionTo(mt(n.base),function(t){o&&B(e,t,r,!0)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,function(t){Z(m(n.base+t.fullPath)),B(n.router,t,o,!1),e&&e(t)},r)},e.prototype.replace=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,function(t){tt(m(n.base+t.fullPath)),B(n.router,t,o,!1),e&&e(t)},r)},e.prototype.ensureURL=function(t){if(mt(this.base)!==this.current.fullPath){var e=m(this.base+this.current.fullPath);t?Z(e):tt(e)}},e.prototype.getCurrentLocation=function(){return mt(this.base)},e}(Xt),Wt=function(t){function e(e,r,n){t.call(this,e,r),n&&gt(this.base)||bt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;window.addEventListener("hashchange",function(){bt()&&t.transitionTo(wt(),function(t){kt(t.fullPath)})})},e.prototype.push=function(t,e,r){this.transitionTo(t,function(t){xt(t.fullPath),e&&e(t)},r)},e.prototype.replace=function(t,e,r){this.transitionTo(t,function(t){kt(t.fullPath),e&&e(t)},r)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;wt()!==e&&(t?xt(e):kt(e))},e.prototype.getCurrentLocation=function(){return wt()},e}(Xt),Gt=function(t){function e(e,r){t.call(this,e,r),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,r){var n=this;this.transitionTo(t,function(t){n.stack=n.stack.slice(0,n.index+1).concat(t),n.index++,e&&e(t)},r)},e.prototype.replace=function(t,e,r){var n=this;this.transitionTo(t,function(t){n.stack=n.stack.slice(0,n.index).concat(t),e&&e(t)},r)},e.prototype.go=function(t){var e=this,r=this.index+t;if(!(r<0||r>=this.stack.length)){var n=this.stack[r];this.confirmTransition(n,function(){e.index=r,e.updateRoute(n)})}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Xt),Zt=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=I(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!Jt&&!1!==t.fallback,this.fallback&&(e="hash"),Ht||(e="abstract"),this.mode=e,e){case"history":this.history=new Yt(this,t.base);break;case"hash":this.history=new Wt(this,t.base,this.fallback);break;case"abstract":this.history=new Gt(this,t.base)}},te={currentRoute:{}};return Zt.prototype.match=function(t,e,r){return this.matcher.match(t,e,r)},te.currentRoute.get=function(){return this.history&&this.history.current},Zt.prototype.init=function(t){var e=this;if(this.apps.push(t),!this.app){this.app=t;var r=this.history;if(r instanceof Yt)r.transitionTo(r.getCurrentLocation());else if(r instanceof Wt){var n=function(){r.setupListeners()};r.transitionTo(r.getCurrentLocation(),n,n)}r.listen(function(t){e.apps.forEach(function(e){e._route=t})})}},Zt.prototype.beforeEach=function(t){return Et(this.beforeHooks,t)},Zt.prototype.beforeResolve=function(t){return Et(this.resolveHooks,t)},Zt.prototype.afterEach=function(t){return Et(this.afterHooks,t)},Zt.prototype.onReady=function(t,e){this.history.onReady(t,e)},Zt.prototype.onError=function(t){this.history.onError(t)},Zt.prototype.push=function(t,e,r){this.history.push(t,e,r)},Zt.prototype.replace=function(t,e,r){this.history.replace(t,e,r)},Zt.prototype.go=function(t){this.history.go(t)},Zt.prototype.back=function(){this.go(-1)},Zt.prototype.forward=function(){this.go(1)},Zt.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},Zt.prototype.resolve=function(t,e,r){var n=U(t,e||this.history.current,r,this),o=this.match(n,e),i=o.redirectedFrom||o.fullPath;return{location:n,route:o,href:Rt(this.history.base,i,this.mode),normalizedTo:n,resolved:o}},Zt.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==qt&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Zt.prototype,te),Zt.install=d,Zt.version="2.6.0",Ht&&window.Vue&&window.Vue.use(Zt),Zt});
{
"name": "vue-router",
"version": "2.5.3",
"version": "2.6.0",
"description": "Official router for Vue.js 2",

@@ -41,6 +41,5 @@ "author": "Evan You",

"babel-eslint": "^7.2.3",
"babel-loader": "^6.2.4",
"babel-loader": "^7.0.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-es2015-loose": "^8.0.0",
"babel-preset-flow-vue": "^1.0.0",

@@ -53,8 +52,7 @@ "buble": "^0.15.2",

"eslint": "^3.0.1",
"eslint-config-vue": "^2.0.1",
"eslint-plugin-flow-vars": "^0.5.0",
"eslint-plugin-vue": "^2.0.1",
"eslint-plugin-flowtype": "^2.34.0",
"eslint-plugin-vue-libs": "^1.2.0",
"express": "^4.14.0",
"express-urlrewrite": "^1.2.0",
"flow-bin": "^0.45.0",
"flow-bin": "^0.48.0",
"gitbook-plugin-edit-link": "^2.0.2",

@@ -66,4 +64,4 @@ "gitbook-plugin-github": "^3.0.0",

"path-to-regexp": "^1.5.3",
"phantomjs-prebuilt": "^2.1.7",
"rollup": "^0.41.4",
"phantomjs-prebuilt": "^2.1.14",
"rollup": "^0.43.0",
"rollup-plugin-buble": "^0.15.0",

@@ -74,6 +72,6 @@ "rollup-plugin-commonjs": "^8.0.2",

"rollup-plugin-replace": "^1.1.1",
"rollup-watch": "^3.2.2",
"rollup-watch": "^4.0.0",
"selenium-server": "^2.53.1",
"typescript": "^2.0.3",
"uglify-js": "^2.7.0",
"uglify-js": "^3.0.17",
"vue": "^2.3.0",

@@ -80,0 +78,0 @@ "vue-loader": "^12.0.2",

@@ -108,3 +108,3 @@ /* @flow */

// don't redirect with control keys
if (e.metaKey || e.ctrlKey || e.shiftKey) return
if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return
// don't redirect when preventDefault called

@@ -111,0 +111,0 @@ if (e.defaultPrevented) return

@@ -26,3 +26,3 @@ import { warn } from '../util/warn'

let inactive = false
while (parent) {
while (parent && parent._routerRoot !== parent) {
if (parent.$vnode && parent.$vnode.data.routerView) {

@@ -29,0 +29,0 @@ depth++

@@ -39,2 +39,3 @@ /* @flow */

}
if (!record) return _createRoute(null, location)
const paramNames = record.regex.keys

@@ -41,0 +42,0 @@ .filter(key => !key.optional)

@@ -61,5 +61,11 @@ /* @flow */

const normalizedPath = normalizePath(path, parent)
const pathToRegexpOptions: PathToRegexpOptions = route.pathToRegexpOptions || {}
if (typeof route.caseSensitive === 'boolean') {
pathToRegexpOptions.sensitive = route.caseSensitive
}
const record: RouteRecord = {
path: normalizedPath,
regex: compileRouteRegex(normalizedPath),
regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),
components: route.components || { default: route.component },

@@ -81,7 +87,7 @@ instances: {},

if (route.children) {
// Warn if route is named and has a default child route.
// Warn if route is named, does not redirect and has a default child route.
// If users navigate to this route by name, the default child will
// not be rendered (GH Issue #629)
if (process.env.NODE_ENV !== 'production') {
if (route.name && route.children.some(child => /^\/?$/.test(child.path))) {
if (route.name && !route.redirect && route.children.some(child => /^\/?$/.test(child.path))) {
warn(

@@ -106,17 +112,20 @@ false,

if (route.alias !== undefined) {
if (Array.isArray(route.alias)) {
route.alias.forEach(alias => {
const aliasRoute = {
path: alias,
children: route.children
}
addRouteRecord(pathList, pathMap, nameMap, aliasRoute, parent, record.path)
})
} else {
const aliases = Array.isArray(route.alias)
? route.alias
: [route.alias]
aliases.forEach(alias => {
const aliasRoute = {
path: route.alias,
path: alias,
children: route.children
}
addRouteRecord(pathList, pathMap, nameMap, aliasRoute, parent, record.path)
}
addRouteRecord(
pathList,
pathMap,
nameMap,
aliasRoute,
parent,
record.path || '/' // matchAs
)
})
}

@@ -142,4 +151,4 @@

function compileRouteRegex (path: string): RouteRegExp {
const regex = Regexp(path)
function compileRouteRegex (path: string, pathToRegexpOptions: PathToRegexpOptions): RouteRegExp {
const regex = Regexp(path, [], pathToRegexpOptions)
if (process.env.NODE_ENV !== 'production') {

@@ -146,0 +155,0 @@ const keys: any = {}

@@ -196,2 +196,4 @@ /* @flow */

base = (baseEl && baseEl.getAttribute('href')) || '/'
// strip full URL origin
base = base.replace(/^https?:\/\/[^\/]+/, '')
} else {

@@ -410,6 +412,6 @@ base = '/'

let called = false
return function () {
return function (...args) {
if (called) return
called = true
return fn.apply(this, arguments)
return fn.apply(this, args)
}

@@ -416,0 +418,0 @@ }

@@ -93,6 +93,6 @@ /* @flow */

function replaceHash (path) {
const i = window.location.href.indexOf('#')
window.location.replace(
window.location.href.slice(0, i >= 0 ? i : 0) + '#' + path
)
const href = window.location.href
const i = href.indexOf('#')
const base = i >= 0 ? href.slice(0, i) : href
window.location.replace(`${base}#${path}`)
}

@@ -20,5 +20,6 @@ /* @flow */

window.addEventListener('popstate', e => {
const current = this.current
this.transitionTo(getLocation(this.base), route => {
if (expectScroll) {
handleScroll(router, route, this.current, true)
handleScroll(router, route, current, true)
}

@@ -25,0 +26,0 @@ })

@@ -45,3 +45,3 @@ /* @flow */

let mode = options.mode || 'hash'
this.fallback = mode === 'history' && !supportsPushState
this.fallback = mode === 'history' && !supportsPushState && options.fallback !== false
if (this.fallback) {

@@ -48,0 +48,0 @@ mode = 'hash'

@@ -12,10 +12,2 @@ import View from './components/view'

Object.defineProperty(Vue.prototype, '$router', {
get () { return this.$root._router }
})
Object.defineProperty(Vue.prototype, '$route', {
get () { return this.$root._route }
})
const isDef = v => v !== undefined

@@ -33,5 +25,8 @@

if (isDef(this.$options.router)) {
this._routerRoot = this
this._router = this.$options.router
this._router.init(this)
Vue.util.defineReactive(this, '_route', this._router.history.current)
} else {
this._routerRoot = (this.$parent && this.$parent._routerRoot) || this
}

@@ -45,2 +40,10 @@ registerInstance(this, this)

Object.defineProperty(Vue.prototype, '$router', {
get () { return this._routerRoot._router }
})
Object.defineProperty(Vue.prototype, '$route', {
get () { return this._routerRoot._route }
})
Vue.component('router-view', View)

@@ -47,0 +50,0 @@ Vue.component('router-link', Link)

@@ -29,3 +29,3 @@ /* @flow */

next.params = params
} else if (current.matched) {
} else if (current.matched.length) {
const rawPath = current.matched[current.matched.length - 1].path

@@ -32,0 +32,0 @@ next.path = fillParams(rawPath, params, `path ${current.path}`)

@@ -80,3 +80,3 @@ /* @flow */

const result = []
val.slice().forEach(val2 => {
val.forEach(val2 => {
if (val2 === undefined) {

@@ -83,0 +83,0 @@ return

@@ -82,3 +82,11 @@ /* @flow */

}
return aKeys.every(key => String(a[key]) === String(b[key]))
return aKeys.every(key => {
const aVal = a[key]
const bVal = b[key]
// check nested equality
if (typeof aVal === 'object' && typeof bVal === 'object') {
return isObjectEqual(aVal, bVal)
}
return String(aVal) === String(bVal)
})
}

@@ -85,0 +93,0 @@

@@ -48,3 +48,5 @@ /* @flow */

if (el) {
position = getElementPosition(el)
let offset = shouldScroll.offset && typeof shouldScroll.offset === 'object' ? shouldScroll.offset : {}
offset = normalizeOffset(offset)
position = getElementPosition(el, offset)
} else if (isValidPosition(shouldScroll)) {

@@ -80,3 +82,3 @@ position = normalizePosition(shouldScroll)

function getElementPosition (el: Element): Object {
function getElementPosition (el: Element, offset: Object): Object {
const docEl: any = document.documentElement

@@ -86,4 +88,4 @@ const docRect = docEl.getBoundingClientRect()

return {
x: elRect.left - docRect.left,
y: elRect.top - docRect.top
x: elRect.left - docRect.left - offset.x,
y: elRect.top - docRect.top - offset.y
}

@@ -103,4 +105,11 @@ }

function normalizeOffset (obj: Object): Object {
return {
x: isNumber(obj.x) ? obj.x : 0,
y: isNumber(obj.y) ? obj.y : 0
}
}
function isNumber (v: any): boolean {
return typeof v === 'number'
}

@@ -47,7 +47,11 @@ import Vue = require("vue");

type Position = { x: number, y: number };
export interface RouterOptions {
routes?: RouteConfig[];
mode?: RouterMode;
fallback?: boolean;
base?: string;
linkActiveClass?: string;
linkExactActiveClass?: string;
parseQuery?: (query: string) => Object;

@@ -58,4 +62,4 @@ stringifyQuery?: (query: Object) => string;

from: Route,
savedPosition: { x: number, y: number } | undefined
) => { x: number, y: number } | { selector: string } | void;
savedPosition: Position | void
) => Position | { selector: string, offset?: Position } | void;
}

@@ -65,2 +69,8 @@

export interface PathToRegexpOptions {
sensitive?: boolean;
strict?: boolean;
end?: boolean;
}
export interface RouteConfig {

@@ -77,2 +87,4 @@ path: string;

props?: boolean | Object | RoutePropsFunction;
caseSensitive?: boolean;
pathToRegexpOptions?: PathToRegexpOptions;
}

@@ -79,0 +91,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc