| | |
| | | /*! |
| | | * vue-router v3.5.2 |
| | | * (c) 2021 Evan You |
| | | * vue-router v3.5.4 |
| | | * (c) 2022 Evan You |
| | | * @license MIT |
| | | */ |
| | | /* */ |
| | |
| | | } |
| | | |
| | | function warn (condition, message) { |
| | | if (process.env.NODE_ENV !== 'production' && !condition) { |
| | | if (!condition) { |
| | | typeof console !== 'undefined' && console.warn(("[vue-router] " + message)); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | function cleanPath (path) { |
| | | return path.replace(/\/\//g, '/') |
| | | return path.replace(/\/(?:\s*\/)+/g, '/') |
| | | } |
| | | |
| | | var isarray = Array.isArray || function (arr) { |
| | |
| | | warn( |
| | | false, |
| | | "Named Route '" + (route.name) + "' has a default child route. " + |
| | | "When navigating to this named route (:to=\"{name: '" + (route.name) + "'\"), " + |
| | | "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." |
| | |
| | | cb(err); |
| | | }); |
| | | } else { |
| | | warn(false, 'uncaught error during route navigation:'); |
| | | if (process.env.NODE_ENV !== 'production') { |
| | | warn(false, 'uncaught error during route navigation:'); |
| | | } |
| | | console.error(err); |
| | | } |
| | | } |
| | |
| | | route.matched[lastRouteIndex] === current.matched[lastCurrentIndex] |
| | | ) { |
| | | this.ensureURL(); |
| | | if (route.hash) { |
| | | handleScroll(this.router, current, route, false); |
| | | } |
| | | return abort(createNavigationDuplicatedError(current, route)) |
| | | } |
| | | |
| | |
| | | var VueRouter = function VueRouter (options) { |
| | | if ( options === void 0 ) options = {}; |
| | | |
| | | if (process.env.NODE_ENV !== 'production') { |
| | | warn(this instanceof VueRouter, "Router must be called with the new operator."); |
| | | } |
| | | this.app = null; |
| | | this.apps = []; |
| | | this.options = options; |
| | |
| | | } |
| | | |
| | | VueRouter.install = install; |
| | | VueRouter.version = '3.5.2'; |
| | | VueRouter.version = '3.5.4'; |
| | | VueRouter.isNavigationFailure = isNavigationFailure; |
| | | VueRouter.NavigationFailureType = NavigationFailureType; |
| | | VueRouter.START_LOCATION = START; |