Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/ui/vue3/router/dist/ |
Upload File : |
{"version":3,"file":"vue-router.bundle.js","sources":["../src/vue-router.js"],"sourcesContent":["/*!\n * vue-router v4.4.4\n * (c) 2024 Eduardo San Martin Morote\n * @license MIT\n *\n * @source: https://unpkg.com/vue-router@4.4.4/dist/vue-router.esm-browser.js\n */\n\n/**\n * Modify list for integration with Bitrix Framework:\n * - remove import '@vue/devtools-api', add function setupDevtoolsPlugin\n */\n\nimport { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, shallowReactive, nextTick } from 'ui.vue3';\n\nfunction getDevtoolsGlobalHook() {\n\treturn getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget() {\n\t// @ts-ignore\n\treturn typeof navigator !== 'undefined'\n\t? window\n\t: typeof global !== 'undefined'\n\t\t? global\n\t\t: {};\n}\n\nconst HOOK_SETUP = 'devtools-plugin:setup';\n\nfunction setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n\tconst hook = getDevtoolsGlobalHook();\n\tif (hook) {\n\t\thook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n\t}\n\telse {\n\t\tconst target = getTarget();\n\t\tconst list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n\t\tlist.push({\n\t\t\tpluginDescriptor,\n\t\t\tsetupFn\n\t\t});\n\t}\n}\n\n// origin-start\n\nconst isBrowser = typeof document !== 'undefined';\n\n/**\n * Allows differentiating lazy components from functional components and vue-class-component\n * @internal\n *\n * @param component\n */\nfunction isRouteComponent(component) {\n\treturn (typeof component === 'object' ||\n\t\t'displayName' in component ||\n\t\t'props' in component ||\n\t\t'__vccOpts' in component);\n}\nfunction isESModule(obj) {\n\treturn (obj.__esModule ||\n\t\tobj[Symbol.toStringTag] === 'Module' ||\n\t\t// support CF with dynamic imports that do not\n\t\t// add the Module string tag\n\t\t(obj.default && isRouteComponent(obj.default)));\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n\tconst newParams = {};\n\tfor (const key in params) {\n\t\tconst value = params[key];\n\t\tnewParams[key] = isArray(value)\n\t\t\t? value.map(fn)\n\t\t\t: fn(value);\n\t}\n\treturn newParams;\n}\nconst noop = () => { };\n/**\n * Typesafe alternative to Array.isArray\n * https://github.com/microsoft/TypeScript/pull/48228\n */\nconst isArray = Array.isArray;\n\nfunction warn(msg) {\n\t// avoid using ...args as it breaks in older Edge builds\n\tconst args = Array.from(arguments).slice(1);\n\tconsole.warn.apply(console, ['[Vue Router warn]: ' + msg].concat(args));\n}\n\n/**\n * Encoding Rules (? = Space)\n * - Path: ? \" < > # ? { }\n * - Query: ? \" < > # & =\n * - Hash: ? \" < > `\n *\n * On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\n * defines some extra characters to be encoded. Most browsers do not encode them\n * in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\n * also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)\n * plus `-._~`. This extra safety should be applied to query by patching the\n * string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\n * should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\n * into a `/` if directly typed in. The _backtick_ (`````) should also be\n * encoded everywhere because some browsers like FF encode it when directly\n * written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\n */\n\t// const EXTRA_RESERVED_RE = /[!'()*]/g\n\t// const encodeReservedReplacer = (c: string) => '%' + c.charCodeAt(0).toString(16)\nconst HASH_RE = /#/g; // %23\nconst AMPERSAND_RE = /&/g; // %26\nconst SLASH_RE = /\\//g; // %2F\nconst EQUAL_RE = /=/g; // %3D\nconst IM_RE = /\\?/g; // %3F\nconst PLUS_RE = /\\+/g; // %2B\n/**\n * NOTE: It's not clear to me if we should encode the + symbol in queries, it\n * seems to be less flexible than not doing so and I can't find out the legacy\n * systems requiring this for regular requests like text/html. In the standard,\n * the encoding of the plus character is only mentioned for\n * application/x-www-form-urlencoded\n * (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\n * leave the plus character as is in queries. To be more flexible, we allow the\n * plus character on the query, but it can also be manually encoded by the user.\n *\n * Resources:\n * - https://url.spec.whatwg.org/#urlencoded-parsing\n * - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\n */\nconst ENC_BRACKET_OPEN_RE = /%5B/g; // [\nconst ENC_BRACKET_CLOSE_RE = /%5D/g; // ]\nconst ENC_CARET_RE = /%5E/g; // ^\nconst ENC_BACKTICK_RE = /%60/g; // `\nconst ENC_CURLY_OPEN_RE = /%7B/g; // {\nconst ENC_PIPE_RE = /%7C/g; // |\nconst ENC_CURLY_CLOSE_RE = /%7D/g; // }\nconst ENC_SPACE_RE = /%20/g; // }\n/**\n * Encode characters that need to be encoded on the path, search and hash\n * sections of the URL.\n *\n * @internal\n * @param text - string to encode\n * @returns encoded string\n */\nfunction commonEncode(text) {\n\treturn encodeURI('' + text)\n\t\t.replace(ENC_PIPE_RE, '|')\n\t\t.replace(ENC_BRACKET_OPEN_RE, '[')\n\t\t.replace(ENC_BRACKET_CLOSE_RE, ']');\n}\n/**\n * Encode characters that need to be encoded on the hash section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeHash(text) {\n\treturn commonEncode(text)\n\t\t.replace(ENC_CURLY_OPEN_RE, '{')\n\t\t.replace(ENC_CURLY_CLOSE_RE, '}')\n\t\t.replace(ENC_CARET_RE, '^');\n}\n/**\n * Encode characters that need to be encoded query values on the query\n * section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeQueryValue(text) {\n\treturn (commonEncode(text)\n\t\t// Encode the space as +, encode the + to differentiate it from the space\n\t\t.replace(PLUS_RE, '%2B')\n\t\t.replace(ENC_SPACE_RE, '+')\n\t\t.replace(HASH_RE, '%23')\n\t\t.replace(AMPERSAND_RE, '%26')\n\t\t.replace(ENC_BACKTICK_RE, '`')\n\t\t.replace(ENC_CURLY_OPEN_RE, '{')\n\t\t.replace(ENC_CURLY_CLOSE_RE, '}')\n\t\t.replace(ENC_CARET_RE, '^'));\n}\n/**\n * Like `encodeQueryValue` but also encodes the `=` character.\n *\n * @param text - string to encode\n */\nfunction encodeQueryKey(text) {\n\treturn encodeQueryValue(text).replace(EQUAL_RE, '%3D');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodePath(text) {\n\treturn commonEncode(text).replace(HASH_RE, '%23').replace(IM_RE, '%3F');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL as a\n * param. This function encodes everything {@link encodePath} does plus the\n * slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\n * string instead.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeParam(text) {\n\treturn text == null ? '' : encodePath(text).replace(SLASH_RE, '%2F');\n}\n/**\n * Decode text using `decodeURIComponent`. Returns the original text if it\n * fails.\n *\n * @param text - string to decode\n * @returns decoded string\n */\nfunction decode(text) {\n\ttry {\n\t\treturn decodeURIComponent('' + text);\n\t}\n\tcatch (err) {\n\t\twarn(`Error decoding \"${text}\". Using original value`);\n\t}\n\treturn '' + text;\n}\n\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, '');\n/**\n * Transforms a URI into a normalized history location\n *\n * @param parseQuery\n * @param location - URI to normalize\n * @param currentLocation - current absolute location. Allows resolving relative\n * paths. Must start with `/`. Defaults to `/`\n * @returns a normalized history location\n */\nfunction parseURL(parseQuery, location, currentLocation = '/') {\n\tlet path, query = {}, searchString = '', hash = '';\n\t// Could use URL and URLSearchParams but IE 11 doesn't support it\n\t// TODO: move to new URL()\n\tconst hashPos = location.indexOf('#');\n\tlet searchPos = location.indexOf('?');\n\t// the hash appears before the search, so it's not part of the search string\n\tif (hashPos < searchPos && hashPos >= 0) {\n\t\tsearchPos = -1;\n\t}\n\tif (searchPos > -1) {\n\t\tpath = location.slice(0, searchPos);\n\t\tsearchString = location.slice(searchPos + 1, hashPos > -1 ? hashPos : location.length);\n\t\tquery = parseQuery(searchString);\n\t}\n\tif (hashPos > -1) {\n\t\tpath = path || location.slice(0, hashPos);\n\t\t// keep the # character\n\t\thash = location.slice(hashPos, location.length);\n\t}\n\t// no search and no query\n\tpath = resolveRelativePath(path != null ? path : location, currentLocation);\n\t// empty path means a relative query or hash `?foo=f`, `#thing`\n\treturn {\n\t\tfullPath: path + (searchString && '?') + searchString + hash,\n\t\tpath,\n\t\tquery,\n\t\thash: decode(hash),\n\t};\n}\n/**\n * Stringifies a URL object\n *\n * @param stringifyQuery\n * @param location\n */\nfunction stringifyURL(stringifyQuery, location) {\n\tconst query = location.query ? stringifyQuery(location.query) : '';\n\treturn location.path + (query && '?') + query + (location.hash || '');\n}\n/**\n * Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.\n *\n * @param pathname - location.pathname\n * @param base - base to strip off\n */\nfunction stripBase(pathname, base) {\n\t// no base or base is not found at the beginning\n\tif (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n\t\treturn pathname;\n\treturn pathname.slice(base.length) || '/';\n}\n/**\n * Checks if two RouteLocation are equal. This means that both locations are\n * pointing towards the same {@link RouteRecord} and that all `params`, `query`\n * parameters and `hash` are the same\n *\n * @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.\n * @param a - first {@link RouteLocation}\n * @param b - second {@link RouteLocation}\n */\nfunction isSameRouteLocation(stringifyQuery, a, b) {\n\tconst aLastIndex = a.matched.length - 1;\n\tconst bLastIndex = b.matched.length - 1;\n\treturn (aLastIndex > -1 &&\n\t\taLastIndex === bLastIndex &&\n\t\tisSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) &&\n\t\tisSameRouteLocationParams(a.params, b.params) &&\n\t\tstringifyQuery(a.query) === stringifyQuery(b.query) &&\n\t\ta.hash === b.hash);\n}\n/**\n * Check if two `RouteRecords` are equal. Takes into account aliases: they are\n * considered equal to the `RouteRecord` they are aliasing.\n *\n * @param a - first {@link RouteRecord}\n * @param b - second {@link RouteRecord}\n */\nfunction isSameRouteRecord(a, b) {\n\t// since the original record has an undefined value for aliasOf\n\t// but all aliases point to the original record, this will always compare\n\t// the original record\n\treturn (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n\tif (Object.keys(a).length !== Object.keys(b).length)\n\t\treturn false;\n\tfor (const key in a) {\n\t\tif (!isSameRouteLocationParamsValue(a[key], b[key]))\n\t\t\treturn false;\n\t}\n\treturn true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n\treturn isArray(a)\n\t\t? isEquivalentArray(a, b)\n\t\t: isArray(b)\n\t\t\t? isEquivalentArray(b, a)\n\t\t\t: a === b;\n}\n/**\n * Check if two arrays are the same or if an array with one single entry is the\n * same as another primitive value. Used to check query and parameters\n *\n * @param a - array of values\n * @param b - array of values or a single value\n */\nfunction isEquivalentArray(a, b) {\n\treturn isArray(b)\n\t\t? a.length === b.length && a.every((value, i) => value === b[i])\n\t\t: a.length === 1 && a[0] === b;\n}\n/**\n * Resolves a relative path that starts with `.`.\n *\n * @param to - path location we are resolving\n * @param from - currentLocation.path, should start with `/`\n */\nfunction resolveRelativePath(to, from) {\n\tif (to.startsWith('/'))\n\t\treturn to;\n\tif (!from.startsWith('/')) {\n\t\twarn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n\t\treturn to;\n\t}\n\tif (!to)\n\t\treturn from;\n\tconst fromSegments = from.split('/');\n\tconst toSegments = to.split('/');\n\tconst lastToSegment = toSegments[toSegments.length - 1];\n\t// make . and ./ the same (../ === .., ../../ === ../..)\n\t// this is the same behavior as new URL()\n\tif (lastToSegment === '..' || lastToSegment === '.') {\n\t\ttoSegments.push('');\n\t}\n\tlet position = fromSegments.length - 1;\n\tlet toPosition;\n\tlet segment;\n\tfor (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n\t\tsegment = toSegments[toPosition];\n\t\t// we stay on the same position\n\t\tif (segment === '.')\n\t\t\tcontinue;\n\t\t// go up in the from array\n\t\tif (segment === '..') {\n\t\t\t// we can't go below zero, but we still need to increment toPosition\n\t\t\tif (position > 1)\n\t\t\t\tposition--;\n\t\t\t// continue\n\t\t}\n\t\t// we reached a non-relative path, we stop here\n\t\telse\n\t\t\tbreak;\n\t}\n\treturn (fromSegments.slice(0, position).join('/') +\n\t\t'/' +\n\t\ttoSegments.slice(toPosition).join('/'));\n}\n/**\n * Initial route location where the router is. Can be used in navigation guards\n * to differentiate the initial navigation.\n *\n * @example\n * ```js\n * import { START_LOCATION } from 'vue-router'\n *\n * router.beforeEach((to, from) => {\n * if (from === START_LOCATION) {\n * // initial navigation\n * }\n * })\n * ```\n */\nconst START_LOCATION_NORMALIZED = {\n\tpath: '/',\n\t// TODO: could we use a symbol in the future?\n\tname: undefined,\n\tparams: {},\n\tquery: {},\n\thash: '',\n\tfullPath: '/',\n\tmatched: [],\n\tmeta: {},\n\tredirectedFrom: undefined,\n};\n\nvar NavigationType;\n(function (NavigationType) {\n\tNavigationType[\"pop\"] = \"pop\";\n\tNavigationType[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function (NavigationDirection) {\n\tNavigationDirection[\"back\"] = \"back\";\n\tNavigationDirection[\"forward\"] = \"forward\";\n\tNavigationDirection[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\n/**\n * Starting location for Histories\n */\nconst START = '';\n// Generic utils\n/**\n * Normalizes a base by removing any trailing slash and reading the base tag if\n * present.\n *\n * @param base - base to normalize\n */\nfunction normalizeBase(base) {\n\tif (!base) {\n\t\tif (isBrowser) {\n\t\t\t// respect <base> tag\n\t\t\tconst baseEl = document.querySelector('base');\n\t\t\tbase = (baseEl && baseEl.getAttribute('href')) || '/';\n\t\t\t// strip full URL origin\n\t\t\tbase = base.replace(/^\\w+:\\/\\/[^\\/]+/, '');\n\t\t}\n\t\telse {\n\t\t\tbase = '/';\n\t\t}\n\t}\n\t// ensure leading slash when it was removed by the regex above avoid leading\n\t// slash with hash because the file could be read from the disk like file://\n\t// and the leading slash would cause problems\n\tif (base[0] !== '/' && base[0] !== '#')\n\t\tbase = '/' + base;\n\t// remove the trailing slash so all other method can just do `base + fullPath`\n\t// to build an href\n\treturn removeTrailingSlash(base);\n}\n// remove any character before the hash\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location) {\n\treturn base.replace(BEFORE_HASH_RE, '#') + location;\n}\n\nfunction getElementPosition(el, offset) {\n\tconst docRect = document.documentElement.getBoundingClientRect();\n\tconst elRect = el.getBoundingClientRect();\n\treturn {\n\t\tbehavior: offset.behavior,\n\t\tleft: elRect.left - docRect.left - (offset.left || 0),\n\t\ttop: elRect.top - docRect.top - (offset.top || 0),\n\t};\n}\nconst computeScrollPosition = () => ({\n\tleft: window.scrollX,\n\ttop: window.scrollY,\n});\nfunction scrollToPosition(position) {\n\tlet scrollToOptions;\n\tif ('el' in position) {\n\t\tconst positionEl = position.el;\n\t\tconst isIdSelector = typeof positionEl === 'string' && positionEl.startsWith('#');\n\t\t/**\n\t\t * `id`s can accept pretty much any characters, including CSS combinators\n\t\t * like `>` or `~`. It's still possible to retrieve elements using\n\t\t * `document.getElementById('~')` but it needs to be escaped when using\n\t\t * `document.querySelector('#\\\\~')` for it to be valid. The only\n\t\t * requirements for `id`s are them to be unique on the page and to not be\n\t\t * empty (`id=\"\"`). Because of that, when passing an id selector, it should\n\t\t * be properly escaped for it to work with `querySelector`. We could check\n\t\t * for the id selector to be simple (no CSS combinators `+ >~`) but that\n\t\t * would make things inconsistent since they are valid characters for an\n\t\t * `id` but would need to be escaped when using `querySelector`, breaking\n\t\t * their usage and ending up in no selector returned. Selectors need to be\n\t\t * escaped:\n\t\t *\n\t\t * - `#1-thing` becomes `#\\31 -thing`\n\t\t * - `#with~symbols` becomes `#with\\\\~symbols`\n\t\t *\n\t\t * - More information about the topic can be found at\n\t\t * https://mathiasbynens.be/notes/html5-id-class.\n\t\t * - Practical example: https://mathiasbynens.be/demo/html5-id\n\t\t */\n\t\tif (typeof position.el === 'string') {\n\t\t\tif (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n\t\t\t\ttry {\n\t\t\t\t\tconst foundEl = document.querySelector(position.el);\n\t\t\t\t\tif (isIdSelector && foundEl) {\n\t\t\t\t\t\twarn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n\t\t\t\t\t\t// return to avoid other warnings\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (err) {\n\t\t\t\t\twarn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n\t\t\t\t\t// return to avoid other warnings\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst el = typeof positionEl === 'string'\n\t\t\t? isIdSelector\n\t\t\t\t? document.getElementById(positionEl.slice(1))\n\t\t\t\t: document.querySelector(positionEl)\n\t\t\t: positionEl;\n\t\tif (!el) {\n\t\t\twarn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n\t\t\treturn;\n\t\t}\n\t\tscrollToOptions = getElementPosition(el, position);\n\t}\n\telse {\n\t\tscrollToOptions = position;\n\t}\n\tif ('scrollBehavior' in document.documentElement.style)\n\t\twindow.scrollTo(scrollToOptions);\n\telse {\n\t\twindow.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);\n\t}\n}\nfunction getScrollKey(path, delta) {\n\tconst position = history.state ? history.state.position - delta : -1;\n\treturn position + path;\n}\nconst scrollPositions = new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n\tscrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n\tconst scroll = scrollPositions.get(key);\n\t// consume it so it's not used again\n\tscrollPositions.delete(key);\n\treturn scroll;\n}\n// TODO: RFC about how to save scroll position\n/**\n * ScrollBehavior instance used by the router to compute and restore the scroll\n * position when navigating.\n */\n\t// export interface ScrollHandler<ScrollPositionEntry extends HistoryStateValue, ScrollPosition extends ScrollPositionEntry> {\n\t// // returns a scroll position that can be saved in history\n\t// compute(): ScrollPositionEntry\n\t// // can take an extended ScrollPositionEntry\n\t// scroll(position: ScrollPosition): void\n\t// }\n\t// export const scrollHandler: ScrollHandler<ScrollPosition> = {\n\t// compute: computeScroll,\n\t// scroll: scrollToPosition,\n\t// }\n\nlet createBaseLocation = () => location.protocol + '//' + location.host;\n/**\n * Creates a normalized history location from a window.location object\n * @param base - The base path\n * @param location - The window.location object\n */\nfunction createCurrentLocation(base, location) {\n\tconst { pathname, search, hash } = location;\n\t// allows hash bases like #, /#, #/, #!, #!/, /#!/, or even /folder#end\n\tconst hashPos = base.indexOf('#');\n\tif (hashPos > -1) {\n\t\tlet slicePos = hash.includes(base.slice(hashPos))\n\t\t\t? base.slice(hashPos).length\n\t\t\t: 1;\n\t\tlet pathFromHash = hash.slice(slicePos);\n\t\t// prepend the starting slash to hash so the url starts with /#\n\t\tif (pathFromHash[0] !== '/')\n\t\t\tpathFromHash = '/' + pathFromHash;\n\t\treturn stripBase(pathFromHash, '');\n\t}\n\tconst path = stripBase(pathname, base);\n\treturn path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n\tlet listeners = [];\n\tlet teardowns = [];\n\t// TODO: should it be a stack? a Dict. Check if the popstate listener\n\t// can trigger twice\n\tlet pauseState = null;\n\tconst popStateHandler = ({ state, }) => {\n\t\tconst to = createCurrentLocation(base, location);\n\t\tconst from = currentLocation.value;\n\t\tconst fromState = historyState.value;\n\t\tlet delta = 0;\n\t\tif (state) {\n\t\t\tcurrentLocation.value = to;\n\t\t\thistoryState.value = state;\n\t\t\t// ignore the popstate and reset the pauseState\n\t\t\tif (pauseState && pauseState === from) {\n\t\t\t\tpauseState = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdelta = fromState ? state.position - fromState.position : 0;\n\t\t}\n\t\telse {\n\t\t\treplace(to);\n\t\t}\n\t\t// Here we could also revert the navigation by calling history.go(-delta)\n\t\t// this listener will have to be adapted to not trigger again and to wait for the url\n\t\t// to be updated before triggering the listeners. Some kind of validation function would also\n\t\t// need to be passed to the listeners so the navigation can be accepted\n\t\t// call all listeners\n\t\tlisteners.forEach(listener => {\n\t\t\tlistener(currentLocation.value, from, {\n\t\t\t\tdelta,\n\t\t\t\ttype: NavigationType.pop,\n\t\t\t\tdirection: delta\n\t\t\t\t\t? delta > 0\n\t\t\t\t\t\t? NavigationDirection.forward\n\t\t\t\t\t\t: NavigationDirection.back\n\t\t\t\t\t: NavigationDirection.unknown,\n\t\t\t});\n\t\t});\n\t};\n\tfunction pauseListeners() {\n\t\tpauseState = currentLocation.value;\n\t}\n\tfunction listen(callback) {\n\t\t// set up the listener and prepare teardown callbacks\n\t\tlisteners.push(callback);\n\t\tconst teardown = () => {\n\t\t\tconst index = listeners.indexOf(callback);\n\t\t\tif (index > -1)\n\t\t\t\tlisteners.splice(index, 1);\n\t\t};\n\t\tteardowns.push(teardown);\n\t\treturn teardown;\n\t}\n\tfunction beforeUnloadListener() {\n\t\tconst { history } = window;\n\t\tif (!history.state)\n\t\t\treturn;\n\t\thistory.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), '');\n\t}\n\tfunction destroy() {\n\t\tfor (const teardown of teardowns)\n\t\t\tteardown();\n\t\tteardowns = [];\n\t\twindow.removeEventListener('popstate', popStateHandler);\n\t\twindow.removeEventListener('beforeunload', beforeUnloadListener);\n\t}\n\t// set up the listeners and prepare teardown callbacks\n\twindow.addEventListener('popstate', popStateHandler);\n\t// TODO: could we use 'pagehide' or 'visibilitychange' instead?\n\t// https://developer.chrome.com/blog/page-lifecycle-api/\n\twindow.addEventListener('beforeunload', beforeUnloadListener, {\n\t\tpassive: true,\n\t});\n\treturn {\n\t\tpauseListeners,\n\t\tlisten,\n\t\tdestroy,\n\t};\n}\n/**\n * Creates a state object\n */\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n\treturn {\n\t\tback,\n\t\tcurrent,\n\t\tforward,\n\t\treplaced,\n\t\tposition: window.history.length,\n\t\tscroll: computeScroll ? computeScrollPosition() : null,\n\t};\n}\nfunction useHistoryStateNavigation(base) {\n\tconst { history, location } = window;\n\t// private variables\n\tconst currentLocation = {\n\t\tvalue: createCurrentLocation(base, location),\n\t};\n\tconst historyState = { value: history.state };\n\t// build current history entry as this is a fresh navigation\n\tif (!historyState.value) {\n\t\tchangeLocation(currentLocation.value, {\n\t\t\tback: null,\n\t\t\tcurrent: currentLocation.value,\n\t\t\tforward: null,\n\t\t\t// the length is off by one, we need to decrease it\n\t\t\tposition: history.length - 1,\n\t\t\treplaced: true,\n\t\t\t// don't add a scroll as the user may have an anchor, and we want\n\t\t\t// scrollBehavior to be triggered without a saved position\n\t\t\tscroll: null,\n\t\t}, true);\n\t}\n\tfunction changeLocation(to, state, replace) {\n\t\t/**\n\t\t * if a base tag is provided, and we are on a normal domain, we have to\n\t\t * respect the provided `base` attribute because pushState() will use it and\n\t\t * potentially erase anything before the `#` like at\n\t\t * https://github.com/vuejs/router/issues/685 where a base of\n\t\t * `/folder/#` but a base of `/` would erase the `/folder/` section. If\n\t\t * there is no host, the `<base>` tag makes no sense and if there isn't a\n\t\t * base tag we can just use everything after the `#`.\n\t\t */\n\t\tconst hashIndex = base.indexOf('#');\n\t\tconst url = hashIndex > -1\n\t\t\t? (location.host && document.querySelector('base')\n\t\t\t? base\n\t\t\t: base.slice(hashIndex)) + to\n\t\t\t: createBaseLocation() + base + to;\n\t\ttry {\n\t\t\t// BROWSER QUIRK\n\t\t\t// NOTE: Safari throws a SecurityError when calling this function 100 times in 30 seconds\n\t\t\thistory[replace ? 'replaceState' : 'pushState'](state, '', url);\n\t\t\thistoryState.value = state;\n\t\t}\n\t\tcatch (err) {\n\t\t\t{\n\t\t\t\twarn('Error with push/replace State', err);\n\t\t\t}\n\t\t\t// Force the navigation, this also resets the call count\n\t\t\tlocation[replace ? 'replace' : 'assign'](url);\n\t\t}\n\t}\n\tfunction replace(to, data) {\n\t\tconst state = assign({}, history.state, buildState(historyState.value.back,\n\t\t\t// keep back and forward entries but override current position\n\t\t\tto, historyState.value.forward, true), data, { position: historyState.value.position });\n\t\tchangeLocation(to, state, true);\n\t\tcurrentLocation.value = to;\n\t}\n\tfunction push(to, data) {\n\t\t// Add to current entry the information of where we are going\n\t\t// as well as saving the current position\n\t\tconst currentState = assign({},\n\t\t\t// use current history state to gracefully handle a wrong call to\n\t\t\t// history.replaceState\n\t\t\t// https://github.com/vuejs/router/issues/366\n\t\t\thistoryState.value, history.state, {\n\t\t\t\tforward: to,\n\t\t\t\tscroll: computeScrollPosition(),\n\t\t\t});\n\t\tif (!history.state) {\n\t\t\twarn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\n` +\n\t\t\t\t`history.replaceState(history.state, '', url)\\n\\n` +\n\t\t\t\t`You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`);\n\t\t}\n\t\tchangeLocation(currentState.current, currentState, true);\n\t\tconst state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n\t\tchangeLocation(to, state, false);\n\t\tcurrentLocation.value = to;\n\t}\n\treturn {\n\t\tlocation: currentLocation,\n\t\tstate: historyState,\n\t\tpush,\n\t\treplace,\n\t};\n}\n/**\n * Creates an HTML5 history. Most common history for single page applications.\n *\n * @param base -\n */\nfunction createWebHistory(base) {\n\tbase = normalizeBase(base);\n\tconst historyNavigation = useHistoryStateNavigation(base);\n\tconst historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n\tfunction go(delta, triggerListeners = true) {\n\t\tif (!triggerListeners)\n\t\t\thistoryListeners.pauseListeners();\n\t\thistory.go(delta);\n\t}\n\tconst routerHistory = assign({\n\t\t// it's overridden right after\n\t\tlocation: '',\n\t\tbase,\n\t\tgo,\n\t\tcreateHref: createHref.bind(null, base),\n\t}, historyNavigation, historyListeners);\n\tObject.defineProperty(routerHistory, 'location', {\n\t\tenumerable: true,\n\t\tget: () => historyNavigation.location.value,\n\t});\n\tObject.defineProperty(routerHistory, 'state', {\n\t\tenumerable: true,\n\t\tget: () => historyNavigation.state.value,\n\t});\n\treturn routerHistory;\n}\n\n/**\n * Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\n * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\n *\n * @param base - Base applied to all urls, defaults to '/'\n * @returns a history object that can be passed to the router constructor\n */\nfunction createMemoryHistory(base = '') {\n\tlet listeners = [];\n\tlet queue = [START];\n\tlet position = 0;\n\tbase = normalizeBase(base);\n\tfunction setLocation(location) {\n\t\tposition++;\n\t\tif (position !== queue.length) {\n\t\t\t// we are in the middle, we remove everything from here in the queue\n\t\t\tqueue.splice(position);\n\t\t}\n\t\tqueue.push(location);\n\t}\n\tfunction triggerListeners(to, from, { direction, delta }) {\n\t\tconst info = {\n\t\t\tdirection,\n\t\t\tdelta,\n\t\t\ttype: NavigationType.pop,\n\t\t};\n\t\tfor (const callback of listeners) {\n\t\t\tcallback(to, from, info);\n\t\t}\n\t}\n\tconst routerHistory = {\n\t\t// rewritten by Object.defineProperty\n\t\tlocation: START,\n\t\t// TODO: should be kept in queue\n\t\tstate: {},\n\t\tbase,\n\t\tcreateHref: createHref.bind(null, base),\n\t\treplace(to) {\n\t\t\t// remove current entry and decrement position\n\t\t\tqueue.splice(position--, 1);\n\t\t\tsetLocation(to);\n\t\t},\n\t\tpush(to, data) {\n\t\t\tsetLocation(to);\n\t\t},\n\t\tlisten(callback) {\n\t\t\tlisteners.push(callback);\n\t\t\treturn () => {\n\t\t\t\tconst index = listeners.indexOf(callback);\n\t\t\t\tif (index > -1)\n\t\t\t\t\tlisteners.splice(index, 1);\n\t\t\t};\n\t\t},\n\t\tdestroy() {\n\t\t\tlisteners = [];\n\t\t\tqueue = [START];\n\t\t\tposition = 0;\n\t\t},\n\t\tgo(delta, shouldTrigger = true) {\n\t\t\tconst from = this.location;\n\t\t\tconst direction =\n\t\t\t\t// we are considering delta === 0 going forward, but in abstract mode\n\t\t\t\t// using 0 for the delta doesn't make sense like it does in html5 where\n\t\t\t\t// it reloads the page\n\t\t\t\tdelta < 0 ? NavigationDirection.back : NavigationDirection.forward;\n\t\t\tposition = Math.max(0, Math.min(position + delta, queue.length - 1));\n\t\t\tif (shouldTrigger) {\n\t\t\t\ttriggerListeners(this.location, from, {\n\t\t\t\t\tdirection,\n\t\t\t\t\tdelta,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t};\n\tObject.defineProperty(routerHistory, 'location', {\n\t\tenumerable: true,\n\t\tget: () => queue[position],\n\t});\n\treturn routerHistory;\n}\n\n/**\n * Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to\n * handle any URL is not possible.\n *\n * @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag\n * in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\n * calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything\n * after the `#`).\n *\n * @example\n * ```js\n * // at https://example.com/folder\n * createWebHashHistory() // gives a url of `https://example.com/folder#`\n * createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\n * // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\n * createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\n * // you should avoid doing this because it changes the original url and breaks copying urls\n * createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\n *\n * // at file:///usr/etc/folder/index.html\n * // for locations with no `host`, the base is ignored\n * createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\n * ```\n */\nfunction createWebHashHistory(base) {\n\t// Make sure this implementation is fine in terms of encoding, specially for IE11\n\t// for `file://`, directly use the pathname and ignore the base\n\t// location.pathname contains an initial `/` even at the root: `https://example.com`\n\tbase = location.host ? base || location.pathname + location.search : '';\n\t// allow the user to provide a `#` in the middle: `/base/#/app`\n\tif (!base.includes('#'))\n\t\tbase += '#';\n\tif (!base.endsWith('#/') && !base.endsWith('#')) {\n\t\twarn(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, '#')}\".`);\n\t}\n\treturn createWebHistory(base);\n}\n\nfunction isRouteLocation(route) {\n\treturn typeof route === 'string' || (route && typeof route === 'object');\n}\nfunction isRouteName(name) {\n\treturn typeof name === 'string' || typeof name === 'symbol';\n}\n\nconst NavigationFailureSymbol = Symbol('navigation failure' );\n/**\n * Enumeration with all possible types for navigation failures. Can be passed to\n * {@link isNavigationFailure} to check for specific failures.\n */\nvar NavigationFailureType;\n(function (NavigationFailureType) {\n\t/**\n\t * An aborted navigation is a navigation that failed because a navigation\n\t * guard returned `false` or called `next(false)`\n\t */\n\tNavigationFailureType[NavigationFailureType[\"aborted\"] = 4] = \"aborted\";\n\t/**\n\t * A cancelled navigation is a navigation that failed because a more recent\n\t * navigation finished started (not necessarily finished).\n\t */\n\tNavigationFailureType[NavigationFailureType[\"cancelled\"] = 8] = \"cancelled\";\n\t/**\n\t * A duplicated navigation is a navigation that failed because it was\n\t * initiated while already being at the exact same location.\n\t */\n\tNavigationFailureType[NavigationFailureType[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\n// DEV only debug messages\nconst ErrorTypeMessages = {\n\t[1 /* ErrorTypes.MATCHER_NOT_FOUND */]({ location, currentLocation }) {\n\t\treturn `No match for\\n ${JSON.stringify(location)}${currentLocation\n\t\t\t? '\\nwhile being at\\n' + JSON.stringify(currentLocation)\n\t\t\t: ''}`;\n\t},\n\t[2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */]({ from, to, }) {\n\t\treturn `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n\t},\n\t[4 /* ErrorTypes.NAVIGATION_ABORTED */]({ from, to }) {\n\t\treturn `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n\t},\n\t[8 /* ErrorTypes.NAVIGATION_CANCELLED */]({ from, to }) {\n\t\treturn `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n\t},\n\t[16 /* ErrorTypes.NAVIGATION_DUPLICATED */]({ from, to }) {\n\t\treturn `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n\t},\n};\n/**\n * Creates a typed NavigationFailure object.\n * @internal\n * @param type - NavigationFailureType\n * @param params - { from, to }\n */\nfunction createRouterError(type, params) {\n\t// keep full error messages in cjs versions\n\t{\n\t\treturn assign(new Error(ErrorTypeMessages[type](params)), {\n\t\t\ttype,\n\t\t\t[NavigationFailureSymbol]: true,\n\t\t}, params);\n\t}\n}\nfunction isNavigationFailure(error, type) {\n\treturn (error instanceof Error &&\n\t\tNavigationFailureSymbol in error &&\n\t\t(type == null || !!(error.type & type)));\n}\nconst propertiesToLog = ['params', 'query', 'hash'];\nfunction stringifyRoute(to) {\n\tif (typeof to === 'string')\n\t\treturn to;\n\tif (to.path != null)\n\t\treturn to.path;\n\tconst location = {};\n\tfor (const key of propertiesToLog) {\n\t\tif (key in to)\n\t\t\tlocation[key] = to[key];\n\t}\n\treturn JSON.stringify(location, null, 2);\n}\n\n// default pattern for a param: non-greedy everything but /\nconst BASE_PARAM_PATTERN = '[^/]+?';\nconst BASE_PATH_PARSER_OPTIONS = {\n\tsensitive: false,\n\tstrict: false,\n\tstart: true,\n\tend: true,\n};\n// Special Regex characters that must be escaped in static tokens\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\n/**\n * Creates a path parser from an array of Segments (a segment is an array of Tokens)\n *\n * @param segments - array of segments returned by tokenizePath\n * @param extraOptions - optional options for the regexp\n * @returns a PathParser\n */\nfunction tokensToParser(segments, extraOptions) {\n\tconst options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n\t// the amount of scores is the same as the length of segments except for the root segment \"/\"\n\tconst score = [];\n\t// the regexp as a string\n\tlet pattern = options.start ? '^' : '';\n\t// extracted keys\n\tconst keys = [];\n\tfor (const segment of segments) {\n\t\t// the root segment needs special treatment\n\t\tconst segmentScores = segment.length ? [] : [90 /* PathScore.Root */];\n\t\t// allow trailing slash\n\t\tif (options.strict && !segment.length)\n\t\t\tpattern += '/';\n\t\tfor (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n\t\t\tconst token = segment[tokenIndex];\n\t\t\t// resets the score if we are inside a sub-segment /:a-other-:b\n\t\t\tlet subSegmentScore = 40 /* PathScore.Segment */ +\n\t\t\t\t(options.sensitive ? 0.25 /* PathScore.BonusCaseSensitive */ : 0);\n\t\t\tif (token.type === 0 /* TokenType.Static */) {\n\t\t\t\t// prepend the slash if we are starting a new segment\n\t\t\t\tif (!tokenIndex)\n\t\t\t\t\tpattern += '/';\n\t\t\t\tpattern += token.value.replace(REGEX_CHARS_RE, '\\\\$&');\n\t\t\t\tsubSegmentScore += 40 /* PathScore.Static */;\n\t\t\t}\n\t\t\telse if (token.type === 1 /* TokenType.Param */) {\n\t\t\t\tconst { value, repeatable, optional, regexp } = token;\n\t\t\t\tkeys.push({\n\t\t\t\t\tname: value,\n\t\t\t\t\trepeatable,\n\t\t\t\t\toptional,\n\t\t\t\t});\n\t\t\t\tconst re = regexp ? regexp : BASE_PARAM_PATTERN;\n\t\t\t\t// the user provided a custom regexp /:id(\\\\d+)\n\t\t\t\tif (re !== BASE_PARAM_PATTERN) {\n\t\t\t\t\tsubSegmentScore += 10 /* PathScore.BonusCustomRegExp */;\n\t\t\t\t\t// make sure the regexp is valid before using it\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnew RegExp(`(${re})`);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (err) {\n\t\t\t\t\t\tthrow new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` +\n\t\t\t\t\t\t\terr.message);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// when we repeat we must take care of the repeating leading slash\n\t\t\t\tlet subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\n\t\t\t\t// prepend the slash if we are starting a new segment\n\t\t\t\tif (!tokenIndex)\n\t\t\t\t\tsubPattern =\n\t\t\t\t\t\t// avoid an optional / if there are more segments e.g. /:p?-static\n\t\t\t\t\t\t// or /:p?-:p2\n\t\t\t\t\t\toptional && segment.length < 2\n\t\t\t\t\t\t\t? `(?:/${subPattern})`\n\t\t\t\t\t\t\t: '/' + subPattern;\n\t\t\t\tif (optional)\n\t\t\t\t\tsubPattern += '?';\n\t\t\t\tpattern += subPattern;\n\t\t\t\tsubSegmentScore += 20 /* PathScore.Dynamic */;\n\t\t\t\tif (optional)\n\t\t\t\t\tsubSegmentScore += -8 /* PathScore.BonusOptional */;\n\t\t\t\tif (repeatable)\n\t\t\t\t\tsubSegmentScore += -20 /* PathScore.BonusRepeatable */;\n\t\t\t\tif (re === '.*')\n\t\t\t\t\tsubSegmentScore += -50 /* PathScore.BonusWildcard */;\n\t\t\t}\n\t\t\tsegmentScores.push(subSegmentScore);\n\t\t}\n\t\t// an empty array like /home/ -> [[{home}], []]\n\t\t// if (!segment.length) pattern += '/'\n\t\tscore.push(segmentScores);\n\t}\n\t// only apply the strict bonus to the last score\n\tif (options.strict && options.end) {\n\t\tconst i = score.length - 1;\n\t\tscore[i][score[i].length - 1] += 0.7000000000000001 /* PathScore.BonusStrict */;\n\t}\n\t// TODO: dev only warn double trailing slash\n\tif (!options.strict)\n\t\tpattern += '/?';\n\tif (options.end)\n\t\tpattern += '$';\n\t// allow paths like /dynamic to only match dynamic or dynamic/... but not dynamic_something_else\n\telse if (options.strict)\n\t\tpattern += '(?:/|$)';\n\tconst re = new RegExp(pattern, options.sensitive ? '' : 'i');\n\tfunction parse(path) {\n\t\tconst match = path.match(re);\n\t\tconst params = {};\n\t\tif (!match)\n\t\t\treturn null;\n\t\tfor (let i = 1; i < match.length; i++) {\n\t\t\tconst value = match[i] || '';\n\t\t\tconst key = keys[i - 1];\n\t\t\tparams[key.name] = value && key.repeatable ? value.split('/') : value;\n\t\t}\n\t\treturn params;\n\t}\n\tfunction stringify(params) {\n\t\tlet path = '';\n\t\t// for optional parameters to allow to be empty\n\t\tlet avoidDuplicatedSlash = false;\n\t\tfor (const segment of segments) {\n\t\t\tif (!avoidDuplicatedSlash || !path.endsWith('/'))\n\t\t\t\tpath += '/';\n\t\t\tavoidDuplicatedSlash = false;\n\t\t\tfor (const token of segment) {\n\t\t\t\tif (token.type === 0 /* TokenType.Static */) {\n\t\t\t\t\tpath += token.value;\n\t\t\t\t}\n\t\t\t\telse if (token.type === 1 /* TokenType.Param */) {\n\t\t\t\t\tconst { value, repeatable, optional } = token;\n\t\t\t\t\tconst param = value in params ? params[value] : '';\n\t\t\t\t\tif (isArray(param) && !repeatable) {\n\t\t\t\t\t\tthrow new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n\t\t\t\t\t}\n\t\t\t\t\tconst text = isArray(param)\n\t\t\t\t\t\t? param.join('/')\n\t\t\t\t\t\t: param;\n\t\t\t\t\tif (!text) {\n\t\t\t\t\t\tif (optional) {\n\t\t\t\t\t\t\t// if we have more than one optional param like /:a?-static we don't need to care about the optional param\n\t\t\t\t\t\t\tif (segment.length < 2) {\n\t\t\t\t\t\t\t\t// remove the last slash as we could be at the end\n\t\t\t\t\t\t\t\tif (path.endsWith('/'))\n\t\t\t\t\t\t\t\t\tpath = path.slice(0, -1);\n\t\t\t\t\t\t\t\t// do not append a slash on the next iteration\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tavoidDuplicatedSlash = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new Error(`Missing required param \"${value}\"`);\n\t\t\t\t\t}\n\t\t\t\t\tpath += text;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// avoid empty path when we have multiple optional params\n\t\treturn path || '/';\n\t}\n\treturn {\n\t\tre,\n\t\tscore,\n\t\tkeys,\n\t\tparse,\n\t\tstringify,\n\t};\n}\n/**\n * Compares an array of numbers as used in PathParser.score and returns a\n * number. This function can be used to `sort` an array\n *\n * @param a - first array of numbers\n * @param b - second array of numbers\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n * should be sorted first\n */\nfunction compareScoreArray(a, b) {\n\tlet i = 0;\n\twhile (i < a.length && i < b.length) {\n\t\tconst diff = b[i] - a[i];\n\t\t// only keep going if diff === 0\n\t\tif (diff)\n\t\t\treturn diff;\n\t\ti++;\n\t}\n\t// if the last subsegment was Static, the shorter segments should be sorted first\n\t// otherwise sort the longest segment first\n\tif (a.length < b.length) {\n\t\treturn a.length === 1 && a[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n\t\t\t? -1\n\t\t\t: 1;\n\t}\n\telse if (a.length > b.length) {\n\t\treturn b.length === 1 && b[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n\t\t\t? 1\n\t\t\t: -1;\n\t}\n\treturn 0;\n}\n/**\n * Compare function that can be used with `sort` to sort an array of PathParser\n *\n * @param a - first PathParser\n * @param b - second PathParser\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n */\nfunction comparePathParserScore(a, b) {\n\tlet i = 0;\n\tconst aScore = a.score;\n\tconst bScore = b.score;\n\twhile (i < aScore.length && i < bScore.length) {\n\t\tconst comp = compareScoreArray(aScore[i], bScore[i]);\n\t\t// do not return if both are equal\n\t\tif (comp)\n\t\t\treturn comp;\n\t\ti++;\n\t}\n\tif (Math.abs(bScore.length - aScore.length) === 1) {\n\t\tif (isLastScoreNegative(aScore))\n\t\t\treturn 1;\n\t\tif (isLastScoreNegative(bScore))\n\t\t\treturn -1;\n\t}\n\t// if a and b share the same score entries but b has more, sort b first\n\treturn bScore.length - aScore.length;\n\t// this is the ternary version\n\t// return aScore.length < bScore.length\n\t// ? 1\n\t// : aScore.length > bScore.length\n\t// ? -1\n\t// : 0\n}\n/**\n * This allows detecting splats at the end of a path: /home/:id(.*)*\n *\n * @param score - score to check\n * @returns true if the last entry is negative\n */\nfunction isLastScoreNegative(score) {\n\tconst last = score[score.length - 1];\n\treturn score.length > 0 && last[last.length - 1] < 0;\n}\n\nconst ROOT_TOKEN = {\n\ttype: 0 /* TokenType.Static */,\n\tvalue: '',\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\n// After some profiling, the cache seems to be unnecessary because tokenizePath\n// (the slowest part of adding a route) is very fast\n// const tokenCache = new Map<string, Token[][]>()\nfunction tokenizePath(path) {\n\tif (!path)\n\t\treturn [[]];\n\tif (path === '/')\n\t\treturn [[ROOT_TOKEN]];\n\tif (!path.startsWith('/')) {\n\t\tthrow new Error(`Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".`\n\t\t);\n\t}\n\t// if (tokenCache.has(path)) return tokenCache.get(path)!\n\tfunction crash(message) {\n\t\tthrow new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n\t}\n\tlet state = 0 /* TokenizerState.Static */;\n\tlet previousState = state;\n\tconst tokens = [];\n\t// the segment will always be valid because we get into the initial state\n\t// with the leading /\n\tlet segment;\n\tfunction finalizeSegment() {\n\t\tif (segment)\n\t\t\ttokens.push(segment);\n\t\tsegment = [];\n\t}\n\t// index on the path\n\tlet i = 0;\n\t// char at index\n\tlet char;\n\t// buffer of the value read\n\tlet buffer = '';\n\t// custom regexp for a param\n\tlet customRe = '';\n\tfunction consumeBuffer() {\n\t\tif (!buffer)\n\t\t\treturn;\n\t\tif (state === 0 /* TokenizerState.Static */) {\n\t\t\tsegment.push({\n\t\t\t\ttype: 0 /* TokenType.Static */,\n\t\t\t\tvalue: buffer,\n\t\t\t});\n\t\t}\n\t\telse if (state === 1 /* TokenizerState.Param */ ||\n\t\t\tstate === 2 /* TokenizerState.ParamRegExp */ ||\n\t\t\tstate === 3 /* TokenizerState.ParamRegExpEnd */) {\n\t\t\tif (segment.length > 1 && (char === '*' || char === '+'))\n\t\t\t\tcrash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n\t\t\tsegment.push({\n\t\t\t\ttype: 1 /* TokenType.Param */,\n\t\t\t\tvalue: buffer,\n\t\t\t\tregexp: customRe,\n\t\t\t\trepeatable: char === '*' || char === '+',\n\t\t\t\toptional: char === '*' || char === '?',\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tcrash('Invalid state to consume buffer');\n\t\t}\n\t\tbuffer = '';\n\t}\n\tfunction addCharToBuffer() {\n\t\tbuffer += char;\n\t}\n\twhile (i < path.length) {\n\t\tchar = path[i++];\n\t\tif (char === '\\\\' && state !== 2 /* TokenizerState.ParamRegExp */) {\n\t\t\tpreviousState = state;\n\t\t\tstate = 4 /* TokenizerState.EscapeNext */;\n\t\t\tcontinue;\n\t\t}\n\t\tswitch (state) {\n\t\t\tcase 0 /* TokenizerState.Static */:\n\t\t\t\tif (char === '/') {\n\t\t\t\t\tif (buffer) {\n\t\t\t\t\t\tconsumeBuffer();\n\t\t\t\t\t}\n\t\t\t\t\tfinalizeSegment();\n\t\t\t\t}\n\t\t\t\telse if (char === ':') {\n\t\t\t\t\tconsumeBuffer();\n\t\t\t\t\tstate = 1 /* TokenizerState.Param */;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\taddCharToBuffer();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4 /* TokenizerState.EscapeNext */:\n\t\t\t\taddCharToBuffer();\n\t\t\t\tstate = previousState;\n\t\t\t\tbreak;\n\t\t\tcase 1 /* TokenizerState.Param */:\n\t\t\t\tif (char === '(') {\n\t\t\t\t\tstate = 2 /* TokenizerState.ParamRegExp */;\n\t\t\t\t}\n\t\t\t\telse if (VALID_PARAM_RE.test(char)) {\n\t\t\t\t\taddCharToBuffer();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tconsumeBuffer();\n\t\t\t\t\tstate = 0 /* TokenizerState.Static */;\n\t\t\t\t\t// go back one character if we were not modifying\n\t\t\t\t\tif (char !== '*' && char !== '?' && char !== '+')\n\t\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2 /* TokenizerState.ParamRegExp */:\n\t\t\t\t// TODO: is it worth handling nested regexp? like :p(?:prefix_([^/]+)_suffix)\n\t\t\t\t// it already works by escaping the closing )\n\t\t\t\t// https://paths.esm.dev/?p=AAMeJbiAwQEcDKbAoAAkP60PG2R6QAvgNaA6AFACM2ABuQBB#\n\t\t\t\t// is this really something people need since you can also write\n\t\t\t\t// /prefix_:p()_suffix\n\t\t\t\tif (char === ')') {\n\t\t\t\t\t// handle the escaped )\n\t\t\t\t\tif (customRe[customRe.length - 1] == '\\\\')\n\t\t\t\t\t\tcustomRe = customRe.slice(0, -1) + char;\n\t\t\t\t\telse\n\t\t\t\t\t\tstate = 3 /* TokenizerState.ParamRegExpEnd */;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcustomRe += char;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3 /* TokenizerState.ParamRegExpEnd */:\n\t\t\t\t// same as finalizing a param\n\t\t\t\tconsumeBuffer();\n\t\t\t\tstate = 0 /* TokenizerState.Static */;\n\t\t\t\t// go back one character if we were not modifying\n\t\t\t\tif (char !== '*' && char !== '?' && char !== '+')\n\t\t\t\t\ti--;\n\t\t\t\tcustomRe = '';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcrash('Unknown state');\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif (state === 2 /* TokenizerState.ParamRegExp */)\n\t\tcrash(`Unfinished custom RegExp for param \"${buffer}\"`);\n\tconsumeBuffer();\n\tfinalizeSegment();\n\t// tokenCache.set(path, tokens)\n\treturn tokens;\n}\n\nfunction createRouteRecordMatcher(record, parent, options) {\n\tconst parser = tokensToParser(tokenizePath(record.path), options);\n\t// warn against params with the same name\n\t{\n\t\tconst existingKeys = new Set();\n\t\tfor (const key of parser.keys) {\n\t\t\tif (existingKeys.has(key.name))\n\t\t\t\twarn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n\t\t\texistingKeys.add(key.name);\n\t\t}\n\t}\n\tconst matcher = assign(parser, {\n\t\trecord,\n\t\tparent,\n\t\t// these needs to be populated by the parent\n\t\tchildren: [],\n\t\talias: [],\n\t});\n\tif (parent) {\n\t\t// both are aliases or both are not aliases\n\t\t// we don't want to mix them because the order is used when\n\t\t// passing originalRecord in Matcher.addRoute\n\t\tif (!matcher.record.aliasOf === !parent.record.aliasOf)\n\t\t\tparent.children.push(matcher);\n\t}\n\treturn matcher;\n}\n\n/**\n * Creates a Router Matcher.\n *\n * @internal\n * @param routes - array of initial routes\n * @param globalOptions - global route options\n */\nfunction createRouterMatcher(routes, globalOptions) {\n\t// normalized ordered array of matchers\n\tconst matchers = [];\n\tconst matcherMap = new Map();\n\tglobalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n\tfunction getRecordMatcher(name) {\n\t\treturn matcherMap.get(name);\n\t}\n\tfunction addRoute(record, parent, originalRecord) {\n\t\t// used later on to remove by name\n\t\tconst isRootAdd = !originalRecord;\n\t\tconst mainNormalizedRecord = normalizeRouteRecord(record);\n\t\t{\n\t\t\tcheckChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n\t\t}\n\t\t// we might be the child of an alias\n\t\tmainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n\t\tconst options = mergeOptions(globalOptions, record);\n\t\t// generate an array of records to correctly handle aliases\n\t\tconst normalizedRecords = [\n\t\t\tmainNormalizedRecord,\n\t\t];\n\t\tif ('alias' in record) {\n\t\t\tconst aliases = typeof record.alias === 'string' ? [record.alias] : record.alias;\n\t\t\tfor (const alias of aliases) {\n\t\t\t\tnormalizedRecords.push(assign({}, mainNormalizedRecord, {\n\t\t\t\t\t// this allows us to hold a copy of the `components` option\n\t\t\t\t\t// so that async components cache is hold on the original record\n\t\t\t\t\tcomponents: originalRecord\n\t\t\t\t\t\t? originalRecord.record.components\n\t\t\t\t\t\t: mainNormalizedRecord.components,\n\t\t\t\t\tpath: alias,\n\t\t\t\t\t// we might be the child of an alias\n\t\t\t\t\taliasOf: originalRecord\n\t\t\t\t\t\t? originalRecord.record\n\t\t\t\t\t\t: mainNormalizedRecord,\n\t\t\t\t\t// the aliases are always of the same kind as the original since they\n\t\t\t\t\t// are defined on the same record\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t\tlet matcher;\n\t\tlet originalMatcher;\n\t\tfor (const normalizedRecord of normalizedRecords) {\n\t\t\tconst { path } = normalizedRecord;\n\t\t\t// Build up the path for nested routes if the child isn't an absolute\n\t\t\t// route. Only add the / delimiter if the child path isn't empty and if the\n\t\t\t// parent path doesn't have a trailing slash\n\t\t\tif (parent && path[0] !== '/') {\n\t\t\t\tconst parentPath = parent.record.path;\n\t\t\t\tconst connectingSlash = parentPath[parentPath.length - 1] === '/' ? '' : '/';\n\t\t\t\tnormalizedRecord.path =\n\t\t\t\t\tparent.record.path + (path && connectingSlash + path);\n\t\t\t}\n\t\t\tif (normalizedRecord.path === '*') {\n\t\t\t\tthrow new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\n' +\n\t\t\t\t\t'See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.');\n\t\t\t}\n\t\t\t// create the object beforehand, so it can be passed to children\n\t\t\tmatcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n\t\t\tif (parent && path[0] === '/')\n\t\t\t\tcheckMissingParamsInAbsolutePath(matcher, parent);\n\t\t\t// if we are an alias we must tell the original record that we exist,\n\t\t\t// so we can be removed\n\t\t\tif (originalRecord) {\n\t\t\t\toriginalRecord.alias.push(matcher);\n\t\t\t\t{\n\t\t\t\t\tcheckSameParams(originalRecord, matcher);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// otherwise, the first record is the original and others are aliases\n\t\t\t\toriginalMatcher = originalMatcher || matcher;\n\t\t\t\tif (originalMatcher !== matcher)\n\t\t\t\t\toriginalMatcher.alias.push(matcher);\n\t\t\t\t// remove the route if named and only for the top record (avoid in nested calls)\n\t\t\t\t// this works because the original record is the first one\n\t\t\t\tif (isRootAdd && record.name && !isAliasRecord(matcher))\n\t\t\t\t\tremoveRoute(record.name);\n\t\t\t}\n\t\t\t// Avoid adding a record that doesn't display anything. This allows passing through records without a component to\n\t\t\t// not be reached and pass through the catch all route\n\t\t\tif (isMatchable(matcher)) {\n\t\t\t\tinsertMatcher(matcher);\n\t\t\t}\n\t\t\tif (mainNormalizedRecord.children) {\n\t\t\t\tconst children = mainNormalizedRecord.children;\n\t\t\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\t\t\taddRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if there was no original record, then the first one was not an alias and all\n\t\t\t// other aliases (if any) need to reference this record when adding children\n\t\t\toriginalRecord = originalRecord || matcher;\n\t\t\t// TODO: add normalized records for more flexibility\n\t\t\t// if (parent && isAliasRecord(originalRecord)) {\n\t\t\t// parent.children.push(originalRecord)\n\t\t\t// }\n\t\t}\n\t\treturn originalMatcher\n\t\t\t? () => {\n\t\t\t\t// since other matchers are aliases, they should be removed by the original matcher\n\t\t\t\tremoveRoute(originalMatcher);\n\t\t\t}\n\t\t\t: noop;\n\t}\n\tfunction removeRoute(matcherRef) {\n\t\tif (isRouteName(matcherRef)) {\n\t\t\tconst matcher = matcherMap.get(matcherRef);\n\t\t\tif (matcher) {\n\t\t\t\tmatcherMap.delete(matcherRef);\n\t\t\t\tmatchers.splice(matchers.indexOf(matcher), 1);\n\t\t\t\tmatcher.children.forEach(removeRoute);\n\t\t\t\tmatcher.alias.forEach(removeRoute);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tconst index = matchers.indexOf(matcherRef);\n\t\t\tif (index > -1) {\n\t\t\t\tmatchers.splice(index, 1);\n\t\t\t\tif (matcherRef.record.name)\n\t\t\t\t\tmatcherMap.delete(matcherRef.record.name);\n\t\t\t\tmatcherRef.children.forEach(removeRoute);\n\t\t\t\tmatcherRef.alias.forEach(removeRoute);\n\t\t\t}\n\t\t}\n\t}\n\tfunction getRoutes() {\n\t\treturn matchers;\n\t}\n\tfunction insertMatcher(matcher) {\n\t\tconst index = findInsertionIndex(matcher, matchers);\n\t\tmatchers.splice(index, 0, matcher);\n\t\t// only add the original record to the name map\n\t\tif (matcher.record.name && !isAliasRecord(matcher))\n\t\t\tmatcherMap.set(matcher.record.name, matcher);\n\t}\n\tfunction resolve(location, currentLocation) {\n\t\tlet matcher;\n\t\tlet params = {};\n\t\tlet path;\n\t\tlet name;\n\t\tif ('name' in location && location.name) {\n\t\t\tmatcher = matcherMap.get(location.name);\n\t\t\tif (!matcher)\n\t\t\t\tthrow createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n\t\t\t\t\tlocation,\n\t\t\t\t});\n\t\t\t// warn if the user is passing invalid params so they can debug it better when they get removed\n\t\t\t{\n\t\t\t\tconst invalidParams = Object.keys(location.params || {}).filter(paramName => !matcher.keys.find(k => k.name === paramName));\n\t\t\t\tif (invalidParams.length) {\n\t\t\t\t\twarn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n\t\t\t\t}\n\t\t\t}\n\t\t\tname = matcher.record.name;\n\t\t\tparams = assign(\n\t\t\t\t// paramsFromLocation is a new object\n\t\t\t\tparamsFromLocation(currentLocation.params,\n\t\t\t\t\t// only keep params that exist in the resolved location\n\t\t\t\t\t// only keep optional params coming from a parent record\n\t\t\t\t\tmatcher.keys\n\t\t\t\t\t\t.filter(k => !k.optional)\n\t\t\t\t\t\t.concat(matcher.parent ? matcher.parent.keys.filter(k => k.optional) : [])\n\t\t\t\t\t\t.map(k => k.name)),\n\t\t\t\t// discard any existing params in the current location that do not exist here\n\t\t\t\t// #1497 this ensures better active/exact matching\n\t\t\t\tlocation.params &&\n\t\t\t\tparamsFromLocation(location.params, matcher.keys.map(k => k.name)));\n\t\t\t// throws if cannot be stringified\n\t\t\tpath = matcher.stringify(params);\n\t\t}\n\t\telse if (location.path != null) {\n\t\t\t// no need to resolve the path with the matcher as it was provided\n\t\t\t// this also allows the user to control the encoding\n\t\t\tpath = location.path;\n\t\t\tif (!path.startsWith('/')) {\n\t\t\t\twarn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n\t\t\t}\n\t\t\tmatcher = matchers.find(m => m.re.test(path));\n\t\t\t// matcher should have a value after the loop\n\t\t\tif (matcher) {\n\t\t\t\t// we know the matcher works because we tested the regexp\n\t\t\t\tparams = matcher.parse(path);\n\t\t\t\tname = matcher.record.name;\n\t\t\t}\n\t\t\t// location is a relative path\n\t\t}\n\t\telse {\n\t\t\t// match by name or path of current route\n\t\t\tmatcher = currentLocation.name\n\t\t\t\t? matcherMap.get(currentLocation.name)\n\t\t\t\t: matchers.find(m => m.re.test(currentLocation.path));\n\t\t\tif (!matcher)\n\t\t\t\tthrow createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n\t\t\t\t\tlocation,\n\t\t\t\t\tcurrentLocation,\n\t\t\t\t});\n\t\t\tname = matcher.record.name;\n\t\t\t// since we are navigating to the same location, we don't need to pick the\n\t\t\t// params like when `name` is provided\n\t\t\tparams = assign({}, currentLocation.params, location.params);\n\t\t\tpath = matcher.stringify(params);\n\t\t}\n\t\tconst matched = [];\n\t\tlet parentMatcher = matcher;\n\t\twhile (parentMatcher) {\n\t\t\t// reversed order so parents are at the beginning\n\t\t\tmatched.unshift(parentMatcher.record);\n\t\t\tparentMatcher = parentMatcher.parent;\n\t\t}\n\t\treturn {\n\t\t\tname,\n\t\t\tpath,\n\t\t\tparams,\n\t\t\tmatched,\n\t\t\tmeta: mergeMetaFields(matched),\n\t\t};\n\t}\n\t// add initial routes\n\troutes.forEach(route => addRoute(route));\n\tfunction clearRoutes() {\n\t\tmatchers.length = 0;\n\t\tmatcherMap.clear();\n\t}\n\treturn {\n\t\taddRoute,\n\t\tresolve,\n\t\tremoveRoute,\n\t\tclearRoutes,\n\t\tgetRoutes,\n\t\tgetRecordMatcher,\n\t};\n}\nfunction paramsFromLocation(params, keys) {\n\tconst newParams = {};\n\tfor (const key of keys) {\n\t\tif (key in params)\n\t\t\tnewParams[key] = params[key];\n\t}\n\treturn newParams;\n}\n/**\n * Normalizes a RouteRecordRaw. Creates a copy\n *\n * @param record\n * @returns the normalized version\n */\nfunction normalizeRouteRecord(record) {\n\treturn {\n\t\tpath: record.path,\n\t\tredirect: record.redirect,\n\t\tname: record.name,\n\t\tmeta: record.meta || {},\n\t\taliasOf: undefined,\n\t\tbeforeEnter: record.beforeEnter,\n\t\tprops: normalizeRecordProps(record),\n\t\tchildren: record.children || [],\n\t\tinstances: {},\n\t\tleaveGuards: new Set(),\n\t\tupdateGuards: new Set(),\n\t\tenterCallbacks: {},\n\t\tmods: {},\n\t\tcomponents: 'components' in record\n\t\t\t? record.components || null\n\t\t\t: record.component && { default: record.component },\n\t};\n}\n/**\n * Normalize the optional `props` in a record to always be an object similar to\n * components. Also accept a boolean for components.\n * @param record\n */\nfunction normalizeRecordProps(record) {\n\tconst propsObject = {};\n\t// props does not exist on redirect records, but we can set false directly\n\tconst props = record.props || false;\n\tif ('component' in record) {\n\t\tpropsObject.default = props;\n\t}\n\telse {\n\t\t// NOTE: we could also allow a function to be applied to every component.\n\t\t// Would need user feedback for use cases\n\t\tfor (const name in record.components)\n\t\t\tpropsObject[name] = typeof props === 'object' ? props[name] : props;\n\t}\n\treturn propsObject;\n}\n/**\n * Checks if a record or any of its parent is an alias\n * @param record\n */\nfunction isAliasRecord(record) {\n\twhile (record) {\n\t\tif (record.record.aliasOf)\n\t\t\treturn true;\n\t\trecord = record.parent;\n\t}\n\treturn false;\n}\n/**\n * Merge meta fields of an array of records\n *\n * @param matched - array of matched records\n */\nfunction mergeMetaFields(matched) {\n\treturn matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n\tconst options = {};\n\tfor (const key in defaults) {\n\t\toptions[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n\t}\n\treturn options;\n}\nfunction isSameParam(a, b) {\n\treturn (a.name === b.name &&\n\t\ta.optional === b.optional &&\n\t\ta.repeatable === b.repeatable);\n}\n/**\n * Check if a path and its alias have the same required params\n *\n * @param a - original record\n * @param b - alias record\n */\nfunction checkSameParams(a, b) {\n\tfor (const key of a.keys) {\n\t\tif (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n\t\t\treturn warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n\t}\n\tfor (const key of b.keys) {\n\t\tif (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n\t\t\treturn warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n\t}\n}\n/**\n * A route with a name and a child with an empty path without a name should warn when adding the route\n *\n * @param mainNormalizedRecord - RouteRecordNormalized\n * @param parent - RouteRecordMatcher\n */\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n\tif (parent &&\n\t\tparent.record.name &&\n\t\t!mainNormalizedRecord.name &&\n\t\t!mainNormalizedRecord.path) {\n\t\twarn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n\t}\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n\tfor (const key of parent.keys) {\n\t\tif (!record.keys.find(isSameParam.bind(null, key)))\n\t\t\treturn warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n\t}\n}\n/**\n * Performs a binary search to find the correct insertion index for a new matcher.\n *\n * Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,\n * with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.\n *\n * @param matcher - new matcher to be inserted\n * @param matchers - existing matchers\n */\nfunction findInsertionIndex(matcher, matchers) {\n\t// First phase: binary search based on score\n\tlet lower = 0;\n\tlet upper = matchers.length;\n\twhile (lower !== upper) {\n\t\tconst mid = (lower + upper) >> 1;\n\t\tconst sortOrder = comparePathParserScore(matcher, matchers[mid]);\n\t\tif (sortOrder < 0) {\n\t\t\tupper = mid;\n\t\t}\n\t\telse {\n\t\t\tlower = mid + 1;\n\t\t}\n\t}\n\t// Second phase: check for an ancestor with the same score\n\tconst insertionAncestor = getInsertionAncestor(matcher);\n\tif (insertionAncestor) {\n\t\tupper = matchers.lastIndexOf(insertionAncestor, upper - 1);\n\t\tif (upper < 0) {\n\t\t\t// This should never happen\n\t\t\twarn(`Finding ancestor route \"${insertionAncestor.record.path}\" failed for \"${matcher.record.path}\"`);\n\t\t}\n\t}\n\treturn upper;\n}\nfunction getInsertionAncestor(matcher) {\n\tlet ancestor = matcher;\n\twhile ((ancestor = ancestor.parent)) {\n\t\tif (isMatchable(ancestor) &&\n\t\t\tcomparePathParserScore(matcher, ancestor) === 0) {\n\t\t\treturn ancestor;\n\t\t}\n\t}\n\treturn;\n}\n/**\n * Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without\n * a component, or name, or redirect, are just used to group other routes.\n * @param matcher\n * @param matcher.record record of the matcher\n * @returns\n */\nfunction isMatchable({ record }) {\n\treturn !!(record.name ||\n\t\t(record.components && Object.keys(record.components).length) ||\n\t\trecord.redirect);\n}\n\n/**\n * Transforms a queryString into a {@link LocationQuery} object. Accept both, a\n * version with the leading `?` and without Should work as URLSearchParams\n\n * @internal\n *\n * @param search - search string to parse\n * @returns a query object\n */\nfunction parseQuery(search) {\n\tconst query = {};\n\t// avoid creating an object with an empty key and empty value\n\t// because of split('&')\n\tif (search === '' || search === '?')\n\t\treturn query;\n\tconst hasLeadingIM = search[0] === '?';\n\tconst searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');\n\tfor (let i = 0; i < searchParams.length; ++i) {\n\t\t// pre decode the + into space\n\t\tconst searchParam = searchParams[i].replace(PLUS_RE, ' ');\n\t\t// allow the = character\n\t\tconst eqPos = searchParam.indexOf('=');\n\t\tconst key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n\t\tconst value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n\t\tif (key in query) {\n\t\t\t// an extra variable for ts types\n\t\t\tlet currentValue = query[key];\n\t\t\tif (!isArray(currentValue)) {\n\t\t\t\tcurrentValue = query[key] = [currentValue];\n\t\t\t}\n\t\t\tcurrentValue.push(value);\n\t\t}\n\t\telse {\n\t\t\tquery[key] = value;\n\t\t}\n\t}\n\treturn query;\n}\n/**\n * Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\n * doesn't prepend a `?`\n *\n * @internal\n *\n * @param query - query object to stringify\n * @returns string version of the query without the leading `?`\n */\nfunction stringifyQuery(query) {\n\tlet search = '';\n\tfor (let key in query) {\n\t\tconst value = query[key];\n\t\tkey = encodeQueryKey(key);\n\t\tif (value == null) {\n\t\t\t// only null adds the value\n\t\t\tif (value !== undefined) {\n\t\t\t\tsearch += (search.length ? '&' : '') + key;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\t// keep null values\n\t\tconst values = isArray(value)\n\t\t\t? value.map(v => v && encodeQueryValue(v))\n\t\t\t: [value && encodeQueryValue(value)];\n\t\tvalues.forEach(value => {\n\t\t\t// skip undefined values in arrays as if they were not present\n\t\t\t// smaller code than using filter\n\t\t\tif (value !== undefined) {\n\t\t\t\t// only append & with non-empty search\n\t\t\t\tsearch += (search.length ? '&' : '') + key;\n\t\t\t\tif (value != null)\n\t\t\t\t\tsearch += '=' + value;\n\t\t\t}\n\t\t});\n\t}\n\treturn search;\n}\n/**\n * Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\n * numbers into strings, removing keys with an undefined value and replacing\n * undefined with null in arrays\n *\n * @param query - query object to normalize\n * @returns a normalized query object\n */\nfunction normalizeQuery(query) {\n\tconst normalizedQuery = {};\n\tfor (const key in query) {\n\t\tconst value = query[key];\n\t\tif (value !== undefined) {\n\t\t\tnormalizedQuery[key] = isArray(value)\n\t\t\t\t? value.map(v => (v == null ? null : '' + v))\n\t\t\t\t: value == null\n\t\t\t\t\t? value\n\t\t\t\t\t: '' + value;\n\t\t}\n\t}\n\treturn normalizedQuery;\n}\n\n/**\n * RouteRecord being rendered by the closest ancestor Router View. Used for\n * `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\n * Location Matched\n *\n * @internal\n */\nconst matchedRouteKey = Symbol('router view location matched' );\n/**\n * Allows overriding the router view depth to control which component in\n * `matched` is rendered. rvd stands for Router View Depth\n *\n * @internal\n */\nconst viewDepthKey = Symbol('router view depth' );\n/**\n * Allows overriding the router instance returned by `useRouter` in tests. r\n * stands for router\n *\n * @internal\n */\nconst routerKey = Symbol('router' );\n/**\n * Allows overriding the current route returned by `useRoute` in tests. rl\n * stands for route location\n *\n * @internal\n */\nconst routeLocationKey = Symbol('route location' );\n/**\n * Allows overriding the current route used by router-view. Internally this is\n * used when the `route` prop is passed.\n *\n * @internal\n */\nconst routerViewLocationKey = Symbol('router view location' );\n\n/**\n * Create a list of callbacks that can be reset. Used to create before and after navigation guards list\n */\nfunction useCallbacks() {\n\tlet handlers = [];\n\tfunction add(handler) {\n\t\thandlers.push(handler);\n\t\treturn () => {\n\t\t\tconst i = handlers.indexOf(handler);\n\t\t\tif (i > -1)\n\t\t\t\thandlers.splice(i, 1);\n\t\t};\n\t}\n\tfunction reset() {\n\t\thandlers = [];\n\t}\n\treturn {\n\t\tadd,\n\t\tlist: () => handlers.slice(),\n\t\treset,\n\t};\n}\n\nfunction registerGuard(record, name, guard) {\n\tconst removeFromList = () => {\n\t\trecord[name].delete(guard);\n\t};\n\tonUnmounted(removeFromList);\n\tonDeactivated(removeFromList);\n\tonActivated(() => {\n\t\trecord[name].add(guard);\n\t});\n\trecord[name].add(guard);\n}\n/**\n * Add a navigation guard that triggers whenever the component for the current\n * location is about to be left. Similar to {@link beforeRouteLeave} but can be\n * used in any component. The guard is removed when the component is unmounted.\n *\n * @param leaveGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteLeave(leaveGuard) {\n\tif (!getCurrentInstance()) {\n\t\twarn('getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function');\n\t\treturn;\n\t}\n\tconst activeRecord = inject(matchedRouteKey,\n\t\t// to avoid warning\n\t\t{}).value;\n\tif (!activeRecord) {\n\t\twarn('No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');\n\t\treturn;\n\t}\n\tregisterGuard(activeRecord, 'leaveGuards', leaveGuard);\n}\n/**\n * Add a navigation guard that triggers whenever the current location is about\n * to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\n * component. The guard is removed when the component is unmounted.\n *\n * @param updateGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteUpdate(updateGuard) {\n\tif (!getCurrentInstance()) {\n\t\twarn('getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function');\n\t\treturn;\n\t}\n\tconst activeRecord = inject(matchedRouteKey,\n\t\t// to avoid warning\n\t\t{}).value;\n\tif (!activeRecord) {\n\t\twarn('No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');\n\t\treturn;\n\t}\n\tregisterGuard(activeRecord, 'updateGuards', updateGuard);\n}\nfunction guardToPromiseFn(guard, to, from, record, name, runWithContext = fn => fn()) {\n\t// keep a reference to the enterCallbackArray to prevent pushing callbacks if a new navigation took place\n\tconst enterCallbackArray = record &&\n\t\t// name is defined if record is because of the function overload\n\t\t(record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n\treturn () => new Promise((resolve, reject) => {\n\t\tconst next = (valid) => {\n\t\t\tif (valid === false) {\n\t\t\t\treject(createRouterError(4 /* ErrorTypes.NAVIGATION_ABORTED */, {\n\t\t\t\t\tfrom,\n\t\t\t\t\tto,\n\t\t\t\t}));\n\t\t\t}\n\t\t\telse if (valid instanceof Error) {\n\t\t\t\treject(valid);\n\t\t\t}\n\t\t\telse if (isRouteLocation(valid)) {\n\t\t\t\treject(createRouterError(2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */, {\n\t\t\t\t\tfrom: to,\n\t\t\t\t\tto: valid,\n\t\t\t\t}));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (enterCallbackArray &&\n\t\t\t\t\t// since enterCallbackArray is truthy, both record and name also are\n\t\t\t\t\trecord.enterCallbacks[name] === enterCallbackArray &&\n\t\t\t\t\ttypeof valid === 'function') {\n\t\t\t\t\tenterCallbackArray.push(valid);\n\t\t\t\t}\n\t\t\t\tresolve();\n\t\t\t}\n\t\t};\n\t\t// wrapping with Promise.resolve allows it to work with both async and sync guards\n\t\tconst guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, canOnlyBeCalledOnce(next, to, from) ));\n\t\tlet guardCall = Promise.resolve(guardReturn);\n\t\tif (guard.length < 3)\n\t\t\tguardCall = guardCall.then(next);\n\t\tif (guard.length > 2) {\n\t\t\tconst message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : ''}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n\t\t\tif (typeof guardReturn === 'object' && 'then' in guardReturn) {\n\t\t\t\tguardCall = guardCall.then(resolvedValue => {\n\t\t\t\t\t// @ts-expect-error: _called is added at canOnlyBeCalledOnce\n\t\t\t\t\tif (!next._called) {\n\t\t\t\t\t\twarn(message);\n\t\t\t\t\t\treturn Promise.reject(new Error('Invalid navigation guard'));\n\t\t\t\t\t}\n\t\t\t\t\treturn resolvedValue;\n\t\t\t\t});\n\t\t\t}\n\t\t\telse if (guardReturn !== undefined) {\n\t\t\t\t// @ts-expect-error: _called is added at canOnlyBeCalledOnce\n\t\t\t\tif (!next._called) {\n\t\t\t\t\twarn(message);\n\t\t\t\t\treject(new Error('Invalid navigation guard'));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tguardCall.catch(err => reject(err));\n\t});\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n\tlet called = 0;\n\treturn function () {\n\t\tif (called++ === 1)\n\t\t\twarn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n\t\t// @ts-expect-error: we put it in the original one because it's easier to check\n\t\tnext._called = true;\n\t\tif (called === 1)\n\t\t\tnext.apply(null, arguments);\n\t};\n}\nfunction extractComponentsGuards(matched, guardType, to, from, runWithContext = fn => fn()) {\n\tconst guards = [];\n\tfor (const record of matched) {\n\t\tif (!record.components && !record.children.length) {\n\t\t\twarn(`Record with path \"${record.path}\" is either missing a \"component(s)\"` +\n\t\t\t\t` or \"children\" property.`);\n\t\t}\n\t\tfor (const name in record.components) {\n\t\t\tlet rawComponent = record.components[name];\n\t\t\t{\n\t\t\t\tif (!rawComponent ||\n\t\t\t\t\t(typeof rawComponent !== 'object' &&\n\t\t\t\t\t\ttypeof rawComponent !== 'function')) {\n\t\t\t\t\twarn(`Component \"${name}\" in record with path \"${record.path}\" is not` +\n\t\t\t\t\t\t` a valid component. Received \"${String(rawComponent)}\".`);\n\t\t\t\t\t// throw to ensure we stop here but warn to ensure the message isn't\n\t\t\t\t\t// missed by the user\n\t\t\t\t\tthrow new Error('Invalid route component');\n\t\t\t\t}\n\t\t\t\telse if ('then' in rawComponent) {\n\t\t\t\t\t// warn if user wrote import('/component.vue') instead of () =>\n\t\t\t\t\t// import('./component.vue')\n\t\t\t\t\twarn(`Component \"${name}\" in record with path \"${record.path}\" is a ` +\n\t\t\t\t\t\t`Promise instead of a function that returns a Promise. Did you ` +\n\t\t\t\t\t\t`write \"import('./MyPage.vue')\" instead of ` +\n\t\t\t\t\t\t`\"() => import('./MyPage.vue')\" ? This will break in ` +\n\t\t\t\t\t\t`production if not fixed.`);\n\t\t\t\t\tconst promise = rawComponent;\n\t\t\t\t\trawComponent = () => promise;\n\t\t\t\t}\n\t\t\t\telse if (rawComponent.__asyncLoader &&\n\t\t\t\t\t// warn only once per component\n\t\t\t\t\t!rawComponent.__warnedDefineAsync) {\n\t\t\t\t\trawComponent.__warnedDefineAsync = true;\n\t\t\t\t\twarn(`Component \"${name}\" in record with path \"${record.path}\" is defined ` +\n\t\t\t\t\t\t`using \"defineAsyncComponent()\". ` +\n\t\t\t\t\t\t`Write \"() => import('./MyPage.vue')\" instead of ` +\n\t\t\t\t\t\t`\"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// skip update and leave guards if the route component is not mounted\n\t\t\tif (guardType !== 'beforeRouteEnter' && !record.instances[name])\n\t\t\t\tcontinue;\n\t\t\tif (isRouteComponent(rawComponent)) {\n\t\t\t\t// __vccOpts is added by vue-class-component and contain the regular options\n\t\t\t\tconst options = rawComponent.__vccOpts || rawComponent;\n\t\t\t\tconst guard = options[guardType];\n\t\t\t\tguard &&\n\t\t\t\tguards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// start requesting the chunk already\n\t\t\t\tlet componentPromise = rawComponent();\n\t\t\t\tif (!('catch' in componentPromise)) {\n\t\t\t\t\twarn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n\t\t\t\t\tcomponentPromise = Promise.resolve(componentPromise);\n\t\t\t\t}\n\t\t\t\tguards.push(() => componentPromise.then(resolved => {\n\t\t\t\t\tif (!resolved)\n\t\t\t\t\t\tthrow new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`);\n\t\t\t\t\tconst resolvedComponent = isESModule(resolved)\n\t\t\t\t\t\t? resolved.default\n\t\t\t\t\t\t: resolved;\n\t\t\t\t\t// keep the resolved module for plugins like data loaders\n\t\t\t\t\trecord.mods[name] = resolved;\n\t\t\t\t\t// replace the function with the resolved component\n\t\t\t\t\t// cannot be null or undefined because we went into the for loop\n\t\t\t\t\trecord.components[name] = resolvedComponent;\n\t\t\t\t\t// __vccOpts is added by vue-class-component and contain the regular options\n\t\t\t\t\tconst options = resolvedComponent.__vccOpts || resolvedComponent;\n\t\t\t\t\tconst guard = options[guardType];\n\t\t\t\t\treturn (guard &&\n\t\t\t\t\t\tguardToPromiseFn(guard, to, from, record, name, runWithContext)());\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}\n\treturn guards;\n}\n/**\n * Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.\n *\n * @param route - resolved route to load\n */\nfunction loadRouteLocation(route) {\n\treturn route.matched.every(record => record.redirect)\n\t\t? Promise.reject(new Error('Cannot load a route that redirects.'))\n\t\t: Promise.all(route.matched.map(record => record.components &&\n\t\t\tPromise.all(Object.keys(record.components).reduce((promises, name) => {\n\t\t\t\tconst rawComponent = record.components[name];\n\t\t\t\tif (typeof rawComponent === 'function' &&\n\t\t\t\t\t!('displayName' in rawComponent)) {\n\t\t\t\t\tpromises.push(rawComponent().then(resolved => {\n\t\t\t\t\t\tif (!resolved)\n\t\t\t\t\t\t\treturn Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\n\t\t\t\t\t\tconst resolvedComponent = isESModule(resolved)\n\t\t\t\t\t\t\t? resolved.default\n\t\t\t\t\t\t\t: resolved;\n\t\t\t\t\t\t// keep the resolved module for plugins like data loaders\n\t\t\t\t\t\trecord.mods[name] = resolved;\n\t\t\t\t\t\t// replace the function with the resolved component\n\t\t\t\t\t\t// cannot be null or undefined because we went into the for loop\n\t\t\t\t\t\trecord.components[name] = resolvedComponent;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\treturn promises;\n\t\t\t}, [])))).then(() => route);\n}\n\n// TODO: we could allow currentRoute as a prop to expose `isActive` and\n// `isExactActive` behavior should go through an RFC\n/**\n * Returns the internal behavior of a {@link RouterLink} without the rendering part.\n *\n * @param props - a `to` location and an optional `replace` flag\n */\nfunction useLink(props) {\n\tconst router = inject(routerKey);\n\tconst currentRoute = inject(routeLocationKey);\n\tlet hasPrevious = false;\n\tlet previousTo = null;\n\tconst route = computed(() => {\n\t\tconst to = unref(props.to);\n\t\tif ((!hasPrevious || to !== previousTo)) {\n\t\t\tif (!isRouteLocation(to)) {\n\t\t\t\tif (hasPrevious) {\n\t\t\t\t\twarn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- previous to:`, previousTo, `\\n- props:`, props);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\twarn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- props:`, props);\n\t\t\t\t}\n\t\t\t}\n\t\t\tpreviousTo = to;\n\t\t\thasPrevious = true;\n\t\t}\n\t\treturn router.resolve(to);\n\t});\n\tconst activeRecordIndex = computed(() => {\n\t\tconst { matched } = route.value;\n\t\tconst { length } = matched;\n\t\tconst routeMatched = matched[length - 1];\n\t\tconst currentMatched = currentRoute.matched;\n\t\tif (!routeMatched || !currentMatched.length)\n\t\t\treturn -1;\n\t\tconst index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n\t\tif (index > -1)\n\t\t\treturn index;\n\t\t// possible parent record\n\t\tconst parentRecordPath = getOriginalPath(matched[length - 2]);\n\t\treturn (\n\t\t\t// we are dealing with nested routes\n\t\t\tlength > 1 &&\n\t\t\t// if the parent and matched route have the same path, this link is\n\t\t\t// referring to the empty child. Or we currently are on a different\n\t\t\t// child of the same parent\n\t\t\tgetOriginalPath(routeMatched) === parentRecordPath &&\n\t\t\t// avoid comparing the child with its parent\n\t\t\tcurrentMatched[currentMatched.length - 1].path !== parentRecordPath\n\t\t\t\t? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2]))\n\t\t\t\t: index);\n\t});\n\tconst isActive = computed(() => activeRecordIndex.value > -1 &&\n\t\tincludesParams(currentRoute.params, route.value.params));\n\tconst isExactActive = computed(() => activeRecordIndex.value > -1 &&\n\t\tactiveRecordIndex.value === currentRoute.matched.length - 1 &&\n\t\tisSameRouteLocationParams(currentRoute.params, route.value.params));\n\tfunction navigate(e = {}) {\n\t\tif (guardEvent(e)) {\n\t\t\treturn router[unref(props.replace) ? 'replace' : 'push'](unref(props.to)\n\t\t\t\t// avoid uncaught errors are they are logged anyway\n\t\t\t).catch(noop);\n\t\t}\n\t\treturn Promise.resolve();\n\t}\n\t// devtools only\n\tif (isBrowser) {\n\t\tconst instance = getCurrentInstance();\n\t\tif (instance) {\n\t\t\tconst linkContextDevtools = {\n\t\t\t\troute: route.value,\n\t\t\t\tisActive: isActive.value,\n\t\t\t\tisExactActive: isExactActive.value,\n\t\t\t\terror: null,\n\t\t\t};\n\t\t\t// @ts-expect-error: this is internal\n\t\t\tinstance.__vrl_devtools = instance.__vrl_devtools || [];\n\t\t\t// @ts-expect-error: this is internal\n\t\t\tinstance.__vrl_devtools.push(linkContextDevtools);\n\t\t\twatchEffect(() => {\n\t\t\t\tlinkContextDevtools.route = route.value;\n\t\t\t\tlinkContextDevtools.isActive = isActive.value;\n\t\t\t\tlinkContextDevtools.isExactActive = isExactActive.value;\n\t\t\t\tlinkContextDevtools.error = isRouteLocation(unref(props.to))\n\t\t\t\t\t? null\n\t\t\t\t\t: 'Invalid \"to\" value';\n\t\t\t}, { flush: 'post' });\n\t\t}\n\t}\n\t/**\n\t * NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\n\t */\n\treturn {\n\t\troute,\n\t\thref: computed(() => route.value.href),\n\t\tisActive,\n\t\tisExactActive,\n\t\tnavigate,\n\t};\n}\nconst RouterLinkImpl = /*#__PURE__*/ defineComponent({\n\tname: 'RouterLink',\n\tcompatConfig: { MODE: 3 },\n\tprops: {\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\trequired: true,\n\t\t},\n\t\treplace: Boolean,\n\t\tactiveClass: String,\n\t\t// inactiveClass: String,\n\t\texactActiveClass: String,\n\t\tcustom: Boolean,\n\t\tariaCurrentValue: {\n\t\t\ttype: String,\n\t\t\tdefault: 'page',\n\t\t},\n\t},\n\tuseLink,\n\tsetup(props, { slots }) {\n\t\tconst link = reactive(useLink(props));\n\t\tconst { options } = inject(routerKey);\n\t\tconst elClass = computed(() => ({\n\t\t\t[getLinkClass(props.activeClass, options.linkActiveClass, 'router-link-active')]: link.isActive,\n\t\t\t// [getLinkClass(\n\t\t\t// props.inactiveClass,\n\t\t\t// options.linkInactiveClass,\n\t\t\t// 'router-link-inactive'\n\t\t\t// )]: !link.isExactActive,\n\t\t\t[getLinkClass(props.exactActiveClass, options.linkExactActiveClass, 'router-link-exact-active')]: link.isExactActive,\n\t\t}));\n\t\treturn () => {\n\t\t\tconst children = slots.default && slots.default(link);\n\t\t\treturn props.custom\n\t\t\t\t? children\n\t\t\t\t: h('a', {\n\t\t\t\t\t'aria-current': link.isExactActive\n\t\t\t\t\t\t? props.ariaCurrentValue\n\t\t\t\t\t\t: null,\n\t\t\t\t\thref: link.href,\n\t\t\t\t\t// this would override user added attrs but Vue will still add\n\t\t\t\t\t// the listener, so we end up triggering both\n\t\t\t\t\tonClick: link.navigate,\n\t\t\t\t\tclass: elClass.value,\n\t\t\t\t}, children);\n\t\t};\n\t},\n});\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to render a link that triggers a navigation on click.\n */\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n\t// don't redirect with control keys\n\tif (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n\t\treturn;\n\t// don't redirect when preventDefault called\n\tif (e.defaultPrevented)\n\t\treturn;\n\t// don't redirect on right click\n\tif (e.button !== undefined && e.button !== 0)\n\t\treturn;\n\t// don't redirect if `target=\"_blank\"`\n\t// @ts-expect-error getAttribute does exist\n\tif (e.currentTarget && e.currentTarget.getAttribute) {\n\t\t// @ts-expect-error getAttribute exists\n\t\tconst target = e.currentTarget.getAttribute('target');\n\t\tif (/\\b_blank\\b/i.test(target))\n\t\t\treturn;\n\t}\n\t// this may be a Weex event which doesn't have this method\n\tif (e.preventDefault)\n\t\te.preventDefault();\n\treturn true;\n}\nfunction includesParams(outer, inner) {\n\tfor (const key in inner) {\n\t\tconst innerValue = inner[key];\n\t\tconst outerValue = outer[key];\n\t\tif (typeof innerValue === 'string') {\n\t\t\tif (innerValue !== outerValue)\n\t\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tif (!isArray(outerValue) ||\n\t\t\t\touterValue.length !== innerValue.length ||\n\t\t\t\tinnerValue.some((value, i) => value !== outerValue[i]))\n\t\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n/**\n * Get the original path value of a record by following its aliasOf\n * @param record\n */\nfunction getOriginalPath(record) {\n\treturn record ? (record.aliasOf ? record.aliasOf.path : record.path) : '';\n}\n/**\n * Utility class to get the active class based on defaults.\n * @param propClass\n * @param globalClass\n * @param defaultClass\n */\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null\n\t? propClass\n\t: globalClass != null\n\t\t? globalClass\n\t\t: defaultClass;\n\nconst RouterViewImpl = /*#__PURE__*/ defineComponent({\n\tname: 'RouterView',\n\t// #674 we manually inherit them\n\tinheritAttrs: false,\n\tprops: {\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: 'default',\n\t\t},\n\t\troute: Object,\n\t},\n\t// Better compat for @vue/compat users\n\t// https://github.com/vuejs/router/issues/1315\n\tcompatConfig: { MODE: 3 },\n\tsetup(props, { attrs, slots }) {\n\t\twarnDeprecatedUsage();\n\t\tconst injectedRoute = inject(routerViewLocationKey);\n\t\tconst routeToDisplay = computed(() => props.route || injectedRoute.value);\n\t\tconst injectedDepth = inject(viewDepthKey, 0);\n\t\t// The depth changes based on empty components option, which allows passthrough routes e.g. routes with children\n\t\t// that are used to reuse the `path` property\n\t\tconst depth = computed(() => {\n\t\t\tlet initialDepth = unref(injectedDepth);\n\t\t\tconst { matched } = routeToDisplay.value;\n\t\t\tlet matchedRoute;\n\t\t\twhile ((matchedRoute = matched[initialDepth]) &&\n\t\t\t!matchedRoute.components) {\n\t\t\t\tinitialDepth++;\n\t\t\t}\n\t\t\treturn initialDepth;\n\t\t});\n\t\tconst matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n\t\tprovide(viewDepthKey, computed(() => depth.value + 1));\n\t\tprovide(matchedRouteKey, matchedRouteRef);\n\t\tprovide(routerViewLocationKey, routeToDisplay);\n\t\tconst viewRef = ref();\n\t\t// watch at the same time the component instance, the route record we are\n\t\t// rendering, and the name\n\t\twatch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n\t\t\t// copy reused instances\n\t\t\tif (to) {\n\t\t\t\t// this will update the instance for new instances as well as reused\n\t\t\t\t// instances when navigating to a new route\n\t\t\t\tto.instances[name] = instance;\n\t\t\t\t// the component instance is reused for a different route or name, so\n\t\t\t\t// we copy any saved update or leave guards. With async setup, the\n\t\t\t\t// mounting component will mount before the matchedRoute changes,\n\t\t\t\t// making instance === oldInstance, so we check if guards have been\n\t\t\t\t// added before. This works because we remove guards when\n\t\t\t\t// unmounting/deactivating components\n\t\t\t\tif (from && from !== to && instance && instance === oldInstance) {\n\t\t\t\t\tif (!to.leaveGuards.size) {\n\t\t\t\t\t\tto.leaveGuards = from.leaveGuards;\n\t\t\t\t\t}\n\t\t\t\t\tif (!to.updateGuards.size) {\n\t\t\t\t\t\tto.updateGuards = from.updateGuards;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// trigger beforeRouteEnter next callbacks\n\t\t\tif (instance &&\n\t\t\t\tto &&\n\t\t\t\t// if there is no instance but to and from are the same this might be\n\t\t\t\t// the first visit\n\t\t\t\t(!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n\t\t\t\t(to.enterCallbacks[name] || []).forEach(callback => callback(instance));\n\t\t\t}\n\t\t}, { flush: 'post' });\n\t\treturn () => {\n\t\t\tconst route = routeToDisplay.value;\n\t\t\t// we need the value at the time we render because when we unmount, we\n\t\t\t// navigated to a different location so the value is different\n\t\t\tconst currentName = props.name;\n\t\t\tconst matchedRoute = matchedRouteRef.value;\n\t\t\tconst ViewComponent = matchedRoute && matchedRoute.components[currentName];\n\t\t\tif (!ViewComponent) {\n\t\t\t\treturn normalizeSlot(slots.default, { Component: ViewComponent, route });\n\t\t\t}\n\t\t\t// props from route configuration\n\t\t\tconst routePropsOption = matchedRoute.props[currentName];\n\t\t\tconst routeProps = routePropsOption\n\t\t\t\t? routePropsOption === true\n\t\t\t\t\t? route.params\n\t\t\t\t\t: typeof routePropsOption === 'function'\n\t\t\t\t\t\t? routePropsOption(route)\n\t\t\t\t\t\t: routePropsOption\n\t\t\t\t: null;\n\t\t\tconst onVnodeUnmounted = vnode => {\n\t\t\t\t// remove the instance reference to prevent leak\n\t\t\t\tif (vnode.component.isUnmounted) {\n\t\t\t\t\tmatchedRoute.instances[currentName] = null;\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst component = h(ViewComponent, assign({}, routeProps, attrs, {\n\t\t\t\tonVnodeUnmounted,\n\t\t\t\tref: viewRef,\n\t\t\t}));\n\t\t\tif (isBrowser &&\n\t\t\t\tcomponent.ref) {\n\t\t\t\t// TODO: can display if it's an alias, its props\n\t\t\t\tconst info = {\n\t\t\t\t\tdepth: depth.value,\n\t\t\t\t\tname: matchedRoute.name,\n\t\t\t\t\tpath: matchedRoute.path,\n\t\t\t\t\tmeta: matchedRoute.meta,\n\t\t\t\t};\n\t\t\t\tconst internalInstances = isArray(component.ref)\n\t\t\t\t\t? component.ref.map(r => r.i)\n\t\t\t\t\t: [component.ref.i];\n\t\t\t\tinternalInstances.forEach(instance => {\n\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\tinstance.__vrv_devtools = info;\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t// pass the vnode to the slot as a prop.\n\t\t\t\t// h and <component :is=\"...\"> both accept vnodes\n\t\t\t\tnormalizeSlot(slots.default, { Component: component, route }) ||\n\t\t\t\tcomponent);\n\t\t};\n\t},\n});\nfunction normalizeSlot(slot, data) {\n\tif (!slot)\n\t\treturn null;\n\tconst slotContent = slot(data);\n\treturn slotContent.length === 1 ? slotContent[0] : slotContent;\n}\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to display the current route the user is at.\n */\nconst RouterView = RouterViewImpl;\n// warn against deprecated usage with <transition> & <keep-alive>\n// due to functional component being no longer eager in Vue 3\nfunction warnDeprecatedUsage() {\n\tconst instance = getCurrentInstance();\n\tconst parentName = instance.parent && instance.parent.type.name;\n\tconst parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n\tif (parentName &&\n\t\t(parentName === 'KeepAlive' || parentName.includes('Transition')) &&\n\t\ttypeof parentSubTreeType === 'object' &&\n\t\tparentSubTreeType.name === 'RouterView') {\n\t\tconst comp = parentName === 'KeepAlive' ? 'keep-alive' : 'transition';\n\t\twarn(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.\\n` +\n\t\t\t`Use slot props instead:\\n\\n` +\n\t\t\t`<router-view v-slot=\"{ Component }\">\\n` +\n\t\t\t` <${comp}>\\n` +\n\t\t\t` <component :is=\"Component\" />\\n` +\n\t\t\t` </${comp}>\\n` +\n\t\t\t`</router-view>`);\n\t}\n}\n\n/**\n * Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\n *\n * @param routeLocation - routeLocation to format\n * @param tooltip - optional tooltip\n * @returns a copy of the routeLocation\n */\nfunction formatRouteLocation(routeLocation, tooltip) {\n\tconst copy = assign({}, routeLocation, {\n\t\t// remove variables that can contain vue instances\n\t\tmatched: routeLocation.matched.map(matched => omit(matched, ['instances', 'children', 'aliasOf'])),\n\t});\n\treturn {\n\t\t_custom: {\n\t\t\ttype: null,\n\t\t\treadOnly: true,\n\t\t\tdisplay: routeLocation.fullPath,\n\t\t\ttooltip,\n\t\t\tvalue: copy,\n\t\t},\n\t};\n}\nfunction formatDisplay(display) {\n\treturn {\n\t\t_custom: {\n\t\t\tdisplay,\n\t\t},\n\t};\n}\n// to support multiple router instances\nlet routerId = 0;\nfunction addDevtools(app, router, matcher) {\n\t// Take over router.beforeEach and afterEach\n\t// make sure we are not registering the devtool twice\n\tif (router.__hasDevtools)\n\t\treturn;\n\trouter.__hasDevtools = true;\n\t// increment to support multiple router instances\n\tconst id = routerId++;\n\tsetupDevtoolsPlugin({\n\t\tid: 'org.vuejs.router' + (id ? '.' + id : ''),\n\t\tlabel: 'Vue Router',\n\t\tpackageName: 'vue-router',\n\t\thomepage: 'https://router.vuejs.org',\n\t\tlogo: 'https://router.vuejs.org/logo.png',\n\t\tcomponentStateTypes: ['Routing'],\n\t\tapp,\n\t}, api => {\n\t\tif (typeof api.now !== 'function') {\n\t\t\tconsole.warn('[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\n\t\t}\n\t\t// display state added by the router\n\t\tapi.on.inspectComponent((payload, ctx) => {\n\t\t\tif (payload.instanceData) {\n\t\t\t\tpayload.instanceData.state.push({\n\t\t\t\t\ttype: 'Routing',\n\t\t\t\t\tkey: '$route',\n\t\t\t\t\teditable: false,\n\t\t\t\t\tvalue: formatRouteLocation(router.currentRoute.value, 'Current Route'),\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\t// mark router-link as active and display tags on router views\n\t\tapi.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n\t\t\tif (componentInstance.__vrv_devtools) {\n\t\t\t\tconst info = componentInstance.__vrv_devtools;\n\t\t\t\tnode.tags.push({\n\t\t\t\t\tlabel: (info.name ? `${info.name.toString()}: ` : '') + info.path,\n\t\t\t\t\ttextColor: 0,\n\t\t\t\t\ttooltip: 'This component is rendered by <router-view>',\n\t\t\t\t\tbackgroundColor: PINK_500,\n\t\t\t\t});\n\t\t\t}\n\t\t\t// if multiple useLink are used\n\t\t\tif (isArray(componentInstance.__vrl_devtools)) {\n\t\t\t\tcomponentInstance.__devtoolsApi = api;\n\t\t\t\tcomponentInstance.__vrl_devtools.forEach(devtoolsData => {\n\t\t\t\t\tlet label = devtoolsData.route.path;\n\t\t\t\t\tlet backgroundColor = ORANGE_400;\n\t\t\t\t\tlet tooltip = '';\n\t\t\t\t\tlet textColor = 0;\n\t\t\t\t\tif (devtoolsData.error) {\n\t\t\t\t\t\tlabel = devtoolsData.error;\n\t\t\t\t\t\tbackgroundColor = RED_100;\n\t\t\t\t\t\ttextColor = RED_700;\n\t\t\t\t\t}\n\t\t\t\t\telse if (devtoolsData.isExactActive) {\n\t\t\t\t\t\tbackgroundColor = LIME_500;\n\t\t\t\t\t\ttooltip = 'This is exactly active';\n\t\t\t\t\t}\n\t\t\t\t\telse if (devtoolsData.isActive) {\n\t\t\t\t\t\tbackgroundColor = BLUE_600;\n\t\t\t\t\t\ttooltip = 'This link is active';\n\t\t\t\t\t}\n\t\t\t\t\tnode.tags.push({\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\ttextColor,\n\t\t\t\t\t\ttooltip,\n\t\t\t\t\t\tbackgroundColor,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\twatch(router.currentRoute, () => {\n\t\t\t// refresh active state\n\t\t\trefreshRoutesView();\n\t\t\tapi.notifyComponentUpdate();\n\t\t\tapi.sendInspectorTree(routerInspectorId);\n\t\t\tapi.sendInspectorState(routerInspectorId);\n\t\t});\n\t\tconst navigationsLayerId = 'router:navigations:' + id;\n\t\tapi.addTimelineLayer({\n\t\t\tid: navigationsLayerId,\n\t\t\tlabel: `Router${id ? ' ' + id : ''} Navigations`,\n\t\t\tcolor: 0x40a8c4,\n\t\t});\n\t\t// const errorsLayerId = 'router:errors'\n\t\t// api.addTimelineLayer({\n\t\t// id: errorsLayerId,\n\t\t// label: 'Router Errors',\n\t\t// color: 0xea5455,\n\t\t// })\n\t\trouter.onError((error, to) => {\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttitle: 'Error during Navigation',\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\tlogType: 'error',\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\tdata: { error },\n\t\t\t\t\tgroupId: to.meta.__navigationId,\n\t\t\t\t},\n\t\t\t});\n\t\t});\n\t\t// attached to `meta` and used to group events\n\t\tlet navigationId = 0;\n\t\trouter.beforeEach((to, from) => {\n\t\t\tconst data = {\n\t\t\t\tguard: formatDisplay('beforeEach'),\n\t\t\t\tfrom: formatRouteLocation(from, 'Current Location during this navigation'),\n\t\t\t\tto: formatRouteLocation(to, 'Target location'),\n\t\t\t};\n\t\t\t// Used to group navigations together, hide from devtools\n\t\t\tObject.defineProperty(to.meta, '__navigationId', {\n\t\t\t\tvalue: navigationId++,\n\t\t\t});\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\ttitle: 'Start of navigation',\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\tdata,\n\t\t\t\t\tgroupId: to.meta.__navigationId,\n\t\t\t\t},\n\t\t\t});\n\t\t});\n\t\trouter.afterEach((to, from, failure) => {\n\t\t\tconst data = {\n\t\t\t\tguard: formatDisplay('afterEach'),\n\t\t\t};\n\t\t\tif (failure) {\n\t\t\t\tdata.failure = {\n\t\t\t\t\t_custom: {\n\t\t\t\t\t\ttype: Error,\n\t\t\t\t\t\treadOnly: true,\n\t\t\t\t\t\tdisplay: failure ? failure.message : '',\n\t\t\t\t\t\ttooltip: 'Navigation Failure',\n\t\t\t\t\t\tvalue: failure,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\tdata.status = formatDisplay('?');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdata.status = formatDisplay('?');\n\t\t\t}\n\t\t\t// we set here to have the right order\n\t\t\tdata.from = formatRouteLocation(from, 'Current Location during this navigation');\n\t\t\tdata.to = formatRouteLocation(to, 'Target location');\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttitle: 'End of navigation',\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\tdata,\n\t\t\t\t\tlogType: failure ? 'warning' : 'default',\n\t\t\t\t\tgroupId: to.meta.__navigationId,\n\t\t\t\t},\n\t\t\t});\n\t\t});\n\t\t/**\n\t\t * Inspector of Existing routes\n\t\t */\n\t\tconst routerInspectorId = 'router-inspector:' + id;\n\t\tapi.addInspector({\n\t\t\tid: routerInspectorId,\n\t\t\tlabel: 'Routes' + (id ? ' ' + id : ''),\n\t\t\ticon: 'book',\n\t\t\ttreeFilterPlaceholder: 'Search routes',\n\t\t});\n\t\tfunction refreshRoutesView() {\n\t\t\t// the routes view isn't active\n\t\t\tif (!activeRoutesPayload)\n\t\t\t\treturn;\n\t\t\tconst payload = activeRoutesPayload;\n\t\t\t// children routes will appear as nested\n\t\t\tlet routes = matcher.getRoutes().filter(route => !route.parent ||\n\t\t\t\t// these routes have a parent with no component which will not appear in the view\n\t\t\t\t// therefore we still need to include them\n\t\t\t\t!route.parent.record.components);\n\t\t\t// reset match state to false\n\t\t\troutes.forEach(resetMatchStateOnRouteRecord);\n\t\t\t// apply a match state if there is a payload\n\t\t\tif (payload.filter) {\n\t\t\t\troutes = routes.filter(route =>\n\t\t\t\t\t// save matches state based on the payload\n\t\t\t\t\tisRouteMatching(route, payload.filter.toLowerCase()));\n\t\t\t}\n\t\t\t// mark active routes\n\t\t\troutes.forEach(route => markRouteRecordActive(route, router.currentRoute.value));\n\t\t\tpayload.rootNodes = routes.map(formatRouteRecordForInspector);\n\t\t}\n\t\tlet activeRoutesPayload;\n\t\tapi.on.getInspectorTree(payload => {\n\t\t\tactiveRoutesPayload = payload;\n\t\t\tif (payload.app === app && payload.inspectorId === routerInspectorId) {\n\t\t\t\trefreshRoutesView();\n\t\t\t}\n\t\t});\n\t\t/**\n\t\t * Display information about the currently selected route record\n\t\t */\n\t\tapi.on.getInspectorState(payload => {\n\t\t\tif (payload.app === app && payload.inspectorId === routerInspectorId) {\n\t\t\t\tconst routes = matcher.getRoutes();\n\t\t\t\tconst route = routes.find(route => route.record.__vd_id === payload.nodeId);\n\t\t\t\tif (route) {\n\t\t\t\t\tpayload.state = {\n\t\t\t\t\t\toptions: formatRouteRecordMatcherForStateInspector(route),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tapi.sendInspectorTree(routerInspectorId);\n\t\tapi.sendInspectorState(routerInspectorId);\n\t});\n}\nfunction modifierForKey(key) {\n\tif (key.optional) {\n\t\treturn key.repeatable ? '*' : '?';\n\t}\n\telse {\n\t\treturn key.repeatable ? '+' : '';\n\t}\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n\tconst { record } = route;\n\tconst fields = [\n\t\t{ editable: false, key: 'path', value: record.path },\n\t];\n\tif (record.name != null) {\n\t\tfields.push({\n\t\t\teditable: false,\n\t\t\tkey: 'name',\n\t\t\tvalue: record.name,\n\t\t});\n\t}\n\tfields.push({ editable: false, key: 'regexp', value: route.re });\n\tif (route.keys.length) {\n\t\tfields.push({\n\t\t\teditable: false,\n\t\t\tkey: 'keys',\n\t\t\tvalue: {\n\t\t\t\t_custom: {\n\t\t\t\t\ttype: null,\n\t\t\t\t\treadOnly: true,\n\t\t\t\t\tdisplay: route.keys\n\t\t\t\t\t\t.map(key => `${key.name}${modifierForKey(key)}`)\n\t\t\t\t\t\t.join(' '),\n\t\t\t\t\ttooltip: 'Param keys',\n\t\t\t\t\tvalue: route.keys,\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\tif (record.redirect != null) {\n\t\tfields.push({\n\t\t\teditable: false,\n\t\t\tkey: 'redirect',\n\t\t\tvalue: record.redirect,\n\t\t});\n\t}\n\tif (route.alias.length) {\n\t\tfields.push({\n\t\t\teditable: false,\n\t\t\tkey: 'aliases',\n\t\t\tvalue: route.alias.map(alias => alias.record.path),\n\t\t});\n\t}\n\tif (Object.keys(route.record.meta).length) {\n\t\tfields.push({\n\t\t\teditable: false,\n\t\t\tkey: 'meta',\n\t\t\tvalue: route.record.meta,\n\t\t});\n\t}\n\tfields.push({\n\t\tkey: 'score',\n\t\teditable: false,\n\t\tvalue: {\n\t\t\t_custom: {\n\t\t\t\ttype: null,\n\t\t\t\treadOnly: true,\n\t\t\t\tdisplay: route.score.map(score => score.join(', ')).join(' | '),\n\t\t\t\ttooltip: 'Score used to sort routes',\n\t\t\t\tvalue: route.score,\n\t\t\t},\n\t\t},\n\t});\n\treturn fields;\n}\n/**\n * Extracted from tailwind palette\n */\nconst PINK_500 = 0xec4899;\nconst BLUE_600 = 0x2563eb;\nconst LIME_500 = 0x84cc16;\nconst CYAN_400 = 0x22d3ee;\nconst ORANGE_400 = 0xfb923c;\n// const GRAY_100 = 0xf4f4f5\nconst DARK = 0x666666;\nconst RED_100 = 0xfee2e2;\nconst RED_700 = 0xb91c1c;\nfunction formatRouteRecordForInspector(route) {\n\tconst tags = [];\n\tconst { record } = route;\n\tif (record.name != null) {\n\t\ttags.push({\n\t\t\tlabel: String(record.name),\n\t\t\ttextColor: 0,\n\t\t\tbackgroundColor: CYAN_400,\n\t\t});\n\t}\n\tif (record.aliasOf) {\n\t\ttags.push({\n\t\t\tlabel: 'alias',\n\t\t\ttextColor: 0,\n\t\t\tbackgroundColor: ORANGE_400,\n\t\t});\n\t}\n\tif (route.__vd_match) {\n\t\ttags.push({\n\t\t\tlabel: 'matches',\n\t\t\ttextColor: 0,\n\t\t\tbackgroundColor: PINK_500,\n\t\t});\n\t}\n\tif (route.__vd_exactActive) {\n\t\ttags.push({\n\t\t\tlabel: 'exact',\n\t\t\ttextColor: 0,\n\t\t\tbackgroundColor: LIME_500,\n\t\t});\n\t}\n\tif (route.__vd_active) {\n\t\ttags.push({\n\t\t\tlabel: 'active',\n\t\t\ttextColor: 0,\n\t\t\tbackgroundColor: BLUE_600,\n\t\t});\n\t}\n\tif (record.redirect) {\n\t\ttags.push({\n\t\t\tlabel: typeof record.redirect === 'string'\n\t\t\t\t? `redirect: ${record.redirect}`\n\t\t\t\t: 'redirects',\n\t\t\ttextColor: 0xffffff,\n\t\t\tbackgroundColor: DARK,\n\t\t});\n\t}\n\t// add an id to be able to select it. Using the `path` is not possible because\n\t// empty path children would collide with their parents\n\tlet id = record.__vd_id;\n\tif (id == null) {\n\t\tid = String(routeRecordId++);\n\t\trecord.__vd_id = id;\n\t}\n\treturn {\n\t\tid,\n\t\tlabel: record.path,\n\t\ttags,\n\t\tchildren: route.children.map(formatRouteRecordForInspector),\n\t};\n}\n// incremental id for route records and inspector state\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n\t// no route will be active if matched is empty\n\t// reset the matching state\n\tconst isExactActive = currentRoute.matched.length &&\n\t\tisSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n\troute.__vd_exactActive = route.__vd_active = isExactActive;\n\tif (!isExactActive) {\n\t\troute.__vd_active = currentRoute.matched.some(match => isSameRouteRecord(match, route.record));\n\t}\n\troute.children.forEach(childRoute => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n\troute.__vd_match = false;\n\troute.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n\tconst found = String(route.re).match(EXTRACT_REGEXP_RE);\n\troute.__vd_match = false;\n\tif (!found || found.length < 3) {\n\t\treturn false;\n\t}\n\t// use a regexp without $ at the end to match nested routes better\n\tconst nonEndingRE = new RegExp(found[1].replace(/\\$$/, ''), found[2]);\n\tif (nonEndingRE.test(filter)) {\n\t\t// mark children as matches\n\t\troute.children.forEach(child => isRouteMatching(child, filter));\n\t\t// exception case: `/`\n\t\tif (route.record.path !== '/' || filter === '/') {\n\t\t\troute.__vd_match = route.re.test(filter);\n\t\t\treturn true;\n\t\t}\n\t\t// hide the / route\n\t\treturn false;\n\t}\n\tconst path = route.record.path.toLowerCase();\n\tconst decodedPath = decode(path);\n\t// also allow partial matching on the path\n\tif (!filter.startsWith('/') &&\n\t\t(decodedPath.includes(filter) || path.includes(filter)))\n\t\treturn true;\n\tif (decodedPath.startsWith(filter) || path.startsWith(filter))\n\t\treturn true;\n\tif (route.record.name && String(route.record.name).includes(filter))\n\t\treturn true;\n\treturn route.children.some(child => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n\tconst ret = {};\n\tfor (const key in obj) {\n\t\tif (!keys.includes(key)) {\n\t\t\t// @ts-expect-error\n\t\t\tret[key] = obj[key];\n\t\t}\n\t}\n\treturn ret;\n}\n\n/**\n * Creates a Router instance that can be used by a Vue app.\n *\n * @param options - {@link RouterOptions}\n */\nfunction createRouter(options) {\n\tconst matcher = createRouterMatcher(options.routes, options);\n\tconst parseQuery$1 = options.parseQuery || parseQuery;\n\tconst stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n\tconst routerHistory = options.history;\n\tif (!routerHistory)\n\t\tthrow new Error('Provide the \"history\" option when calling \"createRouter()\":' +\n\t\t\t' https://router.vuejs.org/api/interfaces/RouterOptions.html#history');\n\tconst beforeGuards = useCallbacks();\n\tconst beforeResolveGuards = useCallbacks();\n\tconst afterGuards = useCallbacks();\n\tconst currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n\tlet pendingLocation = START_LOCATION_NORMALIZED;\n\t// leave the scrollRestoration if no scrollBehavior is provided\n\tif (isBrowser && options.scrollBehavior && 'scrollRestoration' in history) {\n\t\thistory.scrollRestoration = 'manual';\n\t}\n\tconst normalizeParams = applyToParams.bind(null, paramValue => '' + paramValue);\n\tconst encodeParams = applyToParams.bind(null, encodeParam);\n\tconst decodeParams =\n\t\t// @ts-expect-error: intentionally avoid the type check\n\t\tapplyToParams.bind(null, decode);\n\tfunction addRoute(parentOrRoute, route) {\n\t\tlet parent;\n\t\tlet record;\n\t\tif (isRouteName(parentOrRoute)) {\n\t\t\tparent = matcher.getRecordMatcher(parentOrRoute);\n\t\t\tif (!parent) {\n\t\t\t\twarn(`Parent route \"${String(parentOrRoute)}\" not found when adding child route`, route);\n\t\t\t}\n\t\t\trecord = route;\n\t\t}\n\t\telse {\n\t\t\trecord = parentOrRoute;\n\t\t}\n\t\treturn matcher.addRoute(record, parent);\n\t}\n\tfunction removeRoute(name) {\n\t\tconst recordMatcher = matcher.getRecordMatcher(name);\n\t\tif (recordMatcher) {\n\t\t\tmatcher.removeRoute(recordMatcher);\n\t\t}\n\t\telse {\n\t\t\twarn(`Cannot remove non-existent route \"${String(name)}\"`);\n\t\t}\n\t}\n\tfunction getRoutes() {\n\t\treturn matcher.getRoutes().map(routeMatcher => routeMatcher.record);\n\t}\n\tfunction hasRoute(name) {\n\t\treturn !!matcher.getRecordMatcher(name);\n\t}\n\tfunction resolve(rawLocation, currentLocation) {\n\t\t// const resolve: Router['resolve'] = (rawLocation: RouteLocationRaw, currentLocation) => {\n\t\t// const objectLocation = routerLocationAsObject(rawLocation)\n\t\t// we create a copy to modify it later\n\t\tcurrentLocation = assign({}, currentLocation || currentRoute.value);\n\t\tif (typeof rawLocation === 'string') {\n\t\t\tconst locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n\t\t\tconst matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n\t\t\tconst href = routerHistory.createHref(locationNormalized.fullPath);\n\t\t\t{\n\t\t\t\tif (href.startsWith('//'))\n\t\t\t\t\twarn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n\t\t\t\telse if (!matchedRoute.matched.length) {\n\t\t\t\t\twarn(`No match found for location with path \"${rawLocation}\"`);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// locationNormalized is always a new object\n\t\t\treturn assign(locationNormalized, matchedRoute, {\n\t\t\t\tparams: decodeParams(matchedRoute.params),\n\t\t\t\thash: decode(locationNormalized.hash),\n\t\t\t\tredirectedFrom: undefined,\n\t\t\t\thref,\n\t\t\t});\n\t\t}\n\t\tif (!isRouteLocation(rawLocation)) {\n\t\t\twarn(`router.resolve() was passed an invalid location. This will fail in production.\\n- Location:`, rawLocation);\n\t\t\treturn resolve({});\n\t\t}\n\t\tlet matcherLocation;\n\t\t// path could be relative in object as well\n\t\tif (rawLocation.path != null) {\n\t\t\tif ('params' in rawLocation &&\n\t\t\t\t!('name' in rawLocation) &&\n\t\t\t\t// @ts-expect-error: the type is never\n\t\t\t\tObject.keys(rawLocation.params).length) {\n\t\t\t\twarn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n\t\t\t}\n\t\t\tmatcherLocation = assign({}, rawLocation, {\n\t\t\t\tpath: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path,\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\t// remove any nullish param\n\t\t\tconst targetParams = assign({}, rawLocation.params);\n\t\t\tfor (const key in targetParams) {\n\t\t\t\tif (targetParams[key] == null) {\n\t\t\t\t\tdelete targetParams[key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// pass encoded values to the matcher, so it can produce encoded path and fullPath\n\t\t\tmatcherLocation = assign({}, rawLocation, {\n\t\t\t\tparams: encodeParams(targetParams),\n\t\t\t});\n\t\t\t// current location params are decoded, we need to encode them in case the\n\t\t\t// matcher merges the params\n\t\t\tcurrentLocation.params = encodeParams(currentLocation.params);\n\t\t}\n\t\tconst matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n\t\tconst hash = rawLocation.hash || '';\n\t\tif (hash && !hash.startsWith('#')) {\n\t\t\twarn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n\t\t}\n\t\t// the matcher might have merged current location params, so\n\t\t// we need to run the decoding again\n\t\tmatchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n\t\tconst fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n\t\t\thash: encodeHash(hash),\n\t\t\tpath: matchedRoute.path,\n\t\t}));\n\t\tconst href = routerHistory.createHref(fullPath);\n\t\t{\n\t\t\tif (href.startsWith('//')) {\n\t\t\t\twarn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n\t\t\t}\n\t\t\telse if (!matchedRoute.matched.length) {\n\t\t\t\twarn(`No match found for location with path \"${rawLocation.path != null ? rawLocation.path : rawLocation}\"`);\n\t\t\t}\n\t\t}\n\t\treturn assign({\n\t\t\tfullPath,\n\t\t\t// keep the hash encoded so fullPath is effectively path + encodedQuery +\n\t\t\t// hash\n\t\t\thash,\n\t\t\tquery:\n\t\t\t// if the user is using a custom query lib like qs, we might have\n\t\t\t// nested objects, so we keep the query as is, meaning it can contain\n\t\t\t// numbers at `$route.query`, but at the point, the user will have to\n\t\t\t// use their own type anyway.\n\t\t\t// https://github.com/vuejs/router/issues/328#issuecomment-649481567\n\t\t\t\tstringifyQuery$1 === stringifyQuery\n\t\t\t\t\t? normalizeQuery(rawLocation.query)\n\t\t\t\t\t: (rawLocation.query || {}),\n\t\t}, matchedRoute, {\n\t\t\tredirectedFrom: undefined,\n\t\t\thref,\n\t\t});\n\t}\n\tfunction locationAsObject(to) {\n\t\treturn typeof to === 'string'\n\t\t\t? parseURL(parseQuery$1, to, currentRoute.value.path)\n\t\t\t: assign({}, to);\n\t}\n\tfunction checkCanceledNavigation(to, from) {\n\t\tif (pendingLocation !== to) {\n\t\t\treturn createRouterError(8 /* ErrorTypes.NAVIGATION_CANCELLED */, {\n\t\t\t\tfrom,\n\t\t\t\tto,\n\t\t\t});\n\t\t}\n\t}\n\tfunction push(to) {\n\t\treturn pushWithRedirect(to);\n\t}\n\tfunction replace(to) {\n\t\treturn push(assign(locationAsObject(to), { replace: true }));\n\t}\n\tfunction handleRedirectRecord(to) {\n\t\tconst lastMatched = to.matched[to.matched.length - 1];\n\t\tif (lastMatched && lastMatched.redirect) {\n\t\t\tconst { redirect } = lastMatched;\n\t\t\tlet newTargetLocation = typeof redirect === 'function' ? redirect(to) : redirect;\n\t\t\tif (typeof newTargetLocation === 'string') {\n\t\t\t\tnewTargetLocation =\n\t\t\t\t\tnewTargetLocation.includes('?') || newTargetLocation.includes('#')\n\t\t\t\t\t\t? (newTargetLocation = locationAsObject(newTargetLocation))\n\t\t\t\t\t\t: // force empty params\n\t\t\t\t\t\t{ path: newTargetLocation };\n\t\t\t\t// @ts-expect-error: force empty params when a string is passed to let\n\t\t\t\t// the router parse them again\n\t\t\t\tnewTargetLocation.params = {};\n\t\t\t}\n\t\t\tif (newTargetLocation.path == null &&\n\t\t\t\t!('name' in newTargetLocation)) {\n\t\t\t\twarn(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n\t\t\t\tthrow new Error('Invalid redirect');\n\t\t\t}\n\t\t\treturn assign({\n\t\t\t\tquery: to.query,\n\t\t\t\thash: to.hash,\n\t\t\t\t// avoid transferring params if the redirect has a path\n\t\t\t\tparams: newTargetLocation.path != null ? {} : to.params,\n\t\t\t}, newTargetLocation);\n\t\t}\n\t}\n\tfunction pushWithRedirect(to, redirectedFrom) {\n\t\tconst targetLocation = (pendingLocation = resolve(to));\n\t\tconst from = currentRoute.value;\n\t\tconst data = to.state;\n\t\tconst force = to.force;\n\t\t// to could be a string where `replace` is a function\n\t\tconst replace = to.replace === true;\n\t\tconst shouldRedirect = handleRedirectRecord(targetLocation);\n\t\tif (shouldRedirect)\n\t\t\treturn pushWithRedirect(assign(locationAsObject(shouldRedirect), {\n\t\t\t\t\tstate: typeof shouldRedirect === 'object'\n\t\t\t\t\t\t? assign({}, data, shouldRedirect.state)\n\t\t\t\t\t\t: data,\n\t\t\t\t\tforce,\n\t\t\t\t\treplace,\n\t\t\t\t}),\n\t\t\t\t// keep original redirectedFrom if it exists\n\t\t\t\tredirectedFrom || targetLocation);\n\t\t// if it was a redirect we already called `pushWithRedirect` above\n\t\tconst toLocation = targetLocation;\n\t\ttoLocation.redirectedFrom = redirectedFrom;\n\t\tlet failure;\n\t\tif (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n\t\t\tfailure = createRouterError(16 /* ErrorTypes.NAVIGATION_DUPLICATED */, { to: toLocation, from });\n\t\t\t// trigger scroll to allow scrolling to the same anchor\n\t\t\thandleScroll(from, from,\n\t\t\t\t// this is a push, the only way for it to be triggered from a\n\t\t\t\t// history.listen is with a redirect, which makes it become a push\n\t\t\t\ttrue,\n\t\t\t\t// This cannot be the first navigation because the initial location\n\t\t\t\t// cannot be manually navigated to\n\t\t\t\tfalse);\n\t\t}\n\t\treturn (failure ? Promise.resolve(failure) : navigate(toLocation, from))\n\t\t\t.catch((error) => isNavigationFailure(error)\n\t\t\t\t? // navigation redirects still mark the router as ready\n\t\t\t\tisNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)\n\t\t\t\t\t? error\n\t\t\t\t\t: markAsReady(error) // also returns the error\n\t\t\t\t: // reject any unknown error\n\t\t\t\ttriggerError(error, toLocation, from))\n\t\t\t.then((failure) => {\n\t\t\t\tif (failure) {\n\t\t\t\t\tif (isNavigationFailure(failure, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n\t\t\t\t\t\tif (// we are redirecting to the same location we were already at\n\t\t\t\t\t\t\tisSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) &&\n\t\t\t\t\t\t\t// and we have done it a couple of times\n\t\t\t\t\t\t\tredirectedFrom &&\n\t\t\t\t\t\t\t// @ts-expect-error: added only in dev\n\t\t\t\t\t\t\t(redirectedFrom._count = redirectedFrom._count\n\t\t\t\t\t\t\t\t? // @ts-expect-error\n\t\t\t\t\t\t\t\tredirectedFrom._count + 1\n\t\t\t\t\t\t\t\t: 1) > 30) {\n\t\t\t\t\t\t\twarn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n\t\t\t\t\t\t\treturn Promise.reject(new Error('Infinite redirect in navigation guard'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn pushWithRedirect(\n\t\t\t\t\t\t\t// keep options\n\t\t\t\t\t\t\tassign({\n\t\t\t\t\t\t\t\t// preserve an existing replacement but allow the redirect to override it\n\t\t\t\t\t\t\t\treplace,\n\t\t\t\t\t\t\t}, locationAsObject(failure.to), {\n\t\t\t\t\t\t\t\tstate: typeof failure.to === 'object'\n\t\t\t\t\t\t\t\t\t? assign({}, data, failure.to.state)\n\t\t\t\t\t\t\t\t\t: data,\n\t\t\t\t\t\t\t\tforce,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t// preserve the original redirectedFrom if any\n\t\t\t\t\t\t\tredirectedFrom || toLocation);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// if we fail we don't finalize the navigation\n\t\t\t\t\tfailure = finalizeNavigation(toLocation, from, true, replace, data);\n\t\t\t\t}\n\t\t\t\ttriggerAfterEach(toLocation, from, failure);\n\t\t\t\treturn failure;\n\t\t\t});\n\t}\n\t/**\n\t * Helper to reject and skip all navigation guards if a new navigation happened\n\t * @param to\n\t * @param from\n\t */\n\tfunction checkCanceledNavigationAndReject(to, from) {\n\t\tconst error = checkCanceledNavigation(to, from);\n\t\treturn error ? Promise.reject(error) : Promise.resolve();\n\t}\n\tfunction runWithContext(fn) {\n\t\tconst app = installedApps.values().next().value;\n\t\t// support Vue < 3.3\n\t\treturn app && typeof app.runWithContext === 'function'\n\t\t\t? app.runWithContext(fn)\n\t\t\t: fn();\n\t}\n\t// TODO: refactor the whole before guards by internally using router.beforeEach\n\tfunction navigate(to, from) {\n\t\tlet guards;\n\t\tconst [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n\t\t// all components here have been resolved once because we are leaving\n\t\tguards = extractComponentsGuards(leavingRecords.reverse(), 'beforeRouteLeave', to, from);\n\t\t// leavingRecords is already reversed\n\t\tfor (const record of leavingRecords) {\n\t\t\trecord.leaveGuards.forEach(guard => {\n\t\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t\t});\n\t\t}\n\t\tconst canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n\t\tguards.push(canceledNavigationCheck);\n\t\t// run the queue of per route beforeRouteLeave guards\n\t\treturn (runGuardQueue(guards)\n\t\t\t.then(() => {\n\t\t\t\t// check global guards beforeEach\n\t\t\t\tguards = [];\n\t\t\t\tfor (const guard of beforeGuards.list()) {\n\t\t\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t\t\t}\n\t\t\t\tguards.push(canceledNavigationCheck);\n\t\t\t\treturn runGuardQueue(guards);\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\t// check in components beforeRouteUpdate\n\t\t\t\tguards = extractComponentsGuards(updatingRecords, 'beforeRouteUpdate', to, from);\n\t\t\t\tfor (const record of updatingRecords) {\n\t\t\t\t\trecord.updateGuards.forEach(guard => {\n\t\t\t\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tguards.push(canceledNavigationCheck);\n\t\t\t\t// run the queue of per route beforeEnter guards\n\t\t\t\treturn runGuardQueue(guards);\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\t// check the route beforeEnter\n\t\t\t\tguards = [];\n\t\t\t\tfor (const record of enteringRecords) {\n\t\t\t\t\t// do not trigger beforeEnter on reused views\n\t\t\t\t\tif (record.beforeEnter) {\n\t\t\t\t\t\tif (isArray(record.beforeEnter)) {\n\t\t\t\t\t\t\tfor (const beforeEnter of record.beforeEnter)\n\t\t\t\t\t\t\t\tguards.push(guardToPromiseFn(beforeEnter, to, from));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tguards.push(guardToPromiseFn(record.beforeEnter, to, from));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tguards.push(canceledNavigationCheck);\n\t\t\t\t// run the queue of per route beforeEnter guards\n\t\t\t\treturn runGuardQueue(guards);\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\t// NOTE: at this point to.matched is normalized and does not contain any () => Promise<Component>\n\t\t\t\t// clear existing enterCallbacks, these are added by extractComponentsGuards\n\t\t\t\tto.matched.forEach(record => (record.enterCallbacks = {}));\n\t\t\t\t// check in-component beforeRouteEnter\n\t\t\t\tguards = extractComponentsGuards(enteringRecords, 'beforeRouteEnter', to, from, runWithContext);\n\t\t\t\tguards.push(canceledNavigationCheck);\n\t\t\t\t// run the queue of per route beforeEnter guards\n\t\t\t\treturn runGuardQueue(guards);\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\t// check global guards beforeResolve\n\t\t\t\tguards = [];\n\t\t\t\tfor (const guard of beforeResolveGuards.list()) {\n\t\t\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t\t\t}\n\t\t\t\tguards.push(canceledNavigationCheck);\n\t\t\t\treturn runGuardQueue(guards);\n\t\t\t})\n\t\t\t// catch any navigation canceled\n\t\t\t.catch(err => isNavigationFailure(err, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)\n\t\t\t\t? err\n\t\t\t\t: Promise.reject(err)));\n\t}\n\tfunction triggerAfterEach(to, from, failure) {\n\t\t// navigation is confirmed, call afterGuards\n\t\t// TODO: wrap with error handlers\n\t\tafterGuards\n\t\t\t.list()\n\t\t\t.forEach(guard => runWithContext(() => guard(to, from, failure)));\n\t}\n\t/**\n\t * - Cleans up any navigation guards\n\t * - Changes the url if necessary\n\t * - Calls the scrollBehavior\n\t */\n\tfunction finalizeNavigation(toLocation, from, isPush, replace, data) {\n\t\t// a more recent navigation took place\n\t\tconst error = checkCanceledNavigation(toLocation, from);\n\t\tif (error)\n\t\t\treturn error;\n\t\t// only consider as push if it's not the first navigation\n\t\tconst isFirstNavigation = from === START_LOCATION_NORMALIZED;\n\t\tconst state = !isBrowser ? {} : history.state;\n\t\t// change URL only if the user did a push/replace and if it's not the initial navigation because\n\t\t// it's just reflecting the url\n\t\tif (isPush) {\n\t\t\t// on the initial navigation, we want to reuse the scroll position from\n\t\t\t// history state if it exists\n\t\t\tif (replace || isFirstNavigation)\n\t\t\t\trouterHistory.replace(toLocation.fullPath, assign({\n\t\t\t\t\tscroll: isFirstNavigation && state && state.scroll,\n\t\t\t\t}, data));\n\t\t\telse\n\t\t\t\trouterHistory.push(toLocation.fullPath, data);\n\t\t}\n\t\t// accept current navigation\n\t\tcurrentRoute.value = toLocation;\n\t\thandleScroll(toLocation, from, isPush, isFirstNavigation);\n\t\tmarkAsReady();\n\t}\n\tlet removeHistoryListener;\n\t// attach listener to history to trigger navigations\n\tfunction setupListeners() {\n\t\t// avoid setting up listeners twice due to an invalid first navigation\n\t\tif (removeHistoryListener)\n\t\t\treturn;\n\t\tremoveHistoryListener = routerHistory.listen((to, _from, info) => {\n\t\t\tif (!router.listening)\n\t\t\t\treturn;\n\t\t\t// cannot be a redirect route because it was in history\n\t\t\tconst toLocation = resolve(to);\n\t\t\t// due to dynamic routing, and to hash history with manual navigation\n\t\t\t// (manually changing the url or calling history.hash = '#/somewhere'),\n\t\t\t// there could be a redirect record in history\n\t\t\tconst shouldRedirect = handleRedirectRecord(toLocation);\n\t\t\tif (shouldRedirect) {\n\t\t\t\tpushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpendingLocation = toLocation;\n\t\t\tconst from = currentRoute.value;\n\t\t\t// TODO: should be moved to web history?\n\t\t\tif (isBrowser) {\n\t\t\t\tsaveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n\t\t\t}\n\t\t\tnavigate(toLocation, from)\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tif (isNavigationFailure(error, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n\t\t\t\t\t\treturn error;\n\t\t\t\t\t}\n\t\t\t\t\tif (isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n\t\t\t\t\t\t// Here we could call if (info.delta) routerHistory.go(-info.delta,\n\t\t\t\t\t\t// false) but this is bug prone as we have no way to wait the\n\t\t\t\t\t\t// navigation to be finished before calling pushWithRedirect. Using\n\t\t\t\t\t\t// a setTimeout of 16ms seems to work but there is no guarantee for\n\t\t\t\t\t\t// it to work on every browser. So instead we do not restore the\n\t\t\t\t\t\t// history entry and trigger a new navigation as requested by the\n\t\t\t\t\t\t// navigation guard.\n\t\t\t\t\t\t// the error is already handled by router.push we just want to avoid\n\t\t\t\t\t\t// logging the error\n\t\t\t\t\t\tpushWithRedirect(error.to, toLocation\n\t\t\t\t\t\t\t// avoid an uncaught rejection, let push call triggerError\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.then(failure => {\n\t\t\t\t\t\t\t\t// manual change in hash history #916 ending up in the URL not\n\t\t\t\t\t\t\t\t// changing, but it was changed by the manual url change, so we\n\t\t\t\t\t\t\t\t// need to manually change it ourselves\n\t\t\t\t\t\t\t\tif (isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ |\n\t\t\t\t\t\t\t\t\t\t16 /* ErrorTypes.NAVIGATION_DUPLICATED */) &&\n\t\t\t\t\t\t\t\t\t!info.delta &&\n\t\t\t\t\t\t\t\t\tinfo.type === NavigationType.pop) {\n\t\t\t\t\t\t\t\t\trouterHistory.go(-1, false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.catch(noop);\n\t\t\t\t\t\t// avoid the then branch\n\t\t\t\t\t\treturn Promise.reject();\n\t\t\t\t\t}\n\t\t\t\t\t// do not restore history on unknown direction\n\t\t\t\t\tif (info.delta) {\n\t\t\t\t\t\trouterHistory.go(-info.delta, false);\n\t\t\t\t\t}\n\t\t\t\t\t// unrecognized error, transfer to the global handler\n\t\t\t\t\treturn triggerError(error, toLocation, from);\n\t\t\t\t})\n\t\t\t\t.then((failure) => {\n\t\t\t\t\tfailure =\n\t\t\t\t\t\tfailure ||\n\t\t\t\t\t\tfinalizeNavigation(\n\t\t\t\t\t\t\t// after navigation, all matched components are resolved\n\t\t\t\t\t\t\ttoLocation, from, false);\n\t\t\t\t\t// revert the navigation\n\t\t\t\t\tif (failure) {\n\t\t\t\t\t\tif (info.delta &&\n\t\t\t\t\t\t\t// a new navigation has been triggered, so we do not want to revert, that will change the current history\n\t\t\t\t\t\t\t// entry while a different route is displayed\n\t\t\t\t\t\t\t!isNavigationFailure(failure, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n\t\t\t\t\t\t\trouterHistory.go(-info.delta, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (info.type === NavigationType.pop &&\n\t\t\t\t\t\t\tisNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 16 /* ErrorTypes.NAVIGATION_DUPLICATED */)) {\n\t\t\t\t\t\t\t// manual change in hash history #916\n\t\t\t\t\t\t\t// it's like a push but lacks the information of the direction\n\t\t\t\t\t\t\trouterHistory.go(-1, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttriggerAfterEach(toLocation, from, failure);\n\t\t\t\t})\n\t\t\t\t// avoid warnings in the console about uncaught rejections, they are logged by triggerErrors\n\t\t\t\t.catch(noop);\n\t\t});\n\t}\n\t// Initialization and Errors\n\tlet readyHandlers = useCallbacks();\n\tlet errorListeners = useCallbacks();\n\tlet ready;\n\t/**\n\t * Trigger errorListeners added via onError and throws the error as well\n\t *\n\t * @param error - error to throw\n\t * @param to - location we were navigating to when the error happened\n\t * @param from - location we were navigating from when the error happened\n\t * @returns the error as a rejected promise\n\t */\n\tfunction triggerError(error, to, from) {\n\t\tmarkAsReady(error);\n\t\tconst list = errorListeners.list();\n\t\tif (list.length) {\n\t\t\tlist.forEach(handler => handler(error, to, from));\n\t\t}\n\t\telse {\n\t\t\t{\n\t\t\t\twarn('uncaught error during route navigation:');\n\t\t\t}\n\t\t\tconsole.error(error);\n\t\t}\n\t\t// reject the error no matter there were error listeners or not\n\t\treturn Promise.reject(error);\n\t}\n\tfunction isReady() {\n\t\tif (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n\t\t\treturn Promise.resolve();\n\t\treturn new Promise((resolve, reject) => {\n\t\t\treadyHandlers.add([resolve, reject]);\n\t\t});\n\t}\n\tfunction markAsReady(err) {\n\t\tif (!ready) {\n\t\t\t// still not ready if an error happened\n\t\t\tready = !err;\n\t\t\tsetupListeners();\n\t\t\treadyHandlers\n\t\t\t\t.list()\n\t\t\t\t.forEach(([resolve, reject]) => (err ? reject(err) : resolve()));\n\t\t\treadyHandlers.reset();\n\t\t}\n\t\treturn err;\n\t}\n\t// Scroll behavior\n\tfunction handleScroll(to, from, isPush, isFirstNavigation) {\n\t\tconst { scrollBehavior } = options;\n\t\tif (!isBrowser || !scrollBehavior)\n\t\t\treturn Promise.resolve();\n\t\tconst scrollPosition = (!isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0))) ||\n\t\t\t((isFirstNavigation || !isPush) &&\n\t\t\t\thistory.state &&\n\t\t\t\thistory.state.scroll) ||\n\t\t\tnull;\n\t\treturn nextTick()\n\t\t\t.then(() => scrollBehavior(to, from, scrollPosition))\n\t\t\t.then(position => position && scrollToPosition(position))\n\t\t\t.catch(err => triggerError(err, to, from));\n\t}\n\tconst go = (delta) => routerHistory.go(delta);\n\tlet started;\n\tconst installedApps = new Set();\n\tconst router = {\n\t\tcurrentRoute,\n\t\tlistening: true,\n\t\taddRoute,\n\t\tremoveRoute,\n\t\tclearRoutes: matcher.clearRoutes,\n\t\thasRoute,\n\t\tgetRoutes,\n\t\tresolve,\n\t\toptions,\n\t\tpush,\n\t\treplace,\n\t\tgo,\n\t\tback: () => go(-1),\n\t\tforward: () => go(1),\n\t\tbeforeEach: beforeGuards.add,\n\t\tbeforeResolve: beforeResolveGuards.add,\n\t\tafterEach: afterGuards.add,\n\t\tonError: errorListeners.add,\n\t\tisReady,\n\t\tinstall(app) {\n\t\t\tconst router = this;\n\t\t\tapp.component('RouterLink', RouterLink);\n\t\t\tapp.component('RouterView', RouterView);\n\t\t\tapp.config.globalProperties.$router = router;\n\t\t\tObject.defineProperty(app.config.globalProperties, '$route', {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => unref(currentRoute),\n\t\t\t});\n\t\t\t// this initial navigation is only necessary on client, on server it doesn't\n\t\t\t// make sense because it will create an extra unnecessary navigation and could\n\t\t\t// lead to problems\n\t\t\tif (isBrowser &&\n\t\t\t\t// used for the initial navigation client side to avoid pushing\n\t\t\t\t// multiple times when the router is used in multiple apps\n\t\t\t\t!started &&\n\t\t\t\tcurrentRoute.value === START_LOCATION_NORMALIZED) {\n\t\t\t\t// see above\n\t\t\t\tstarted = true;\n\t\t\t\tpush(routerHistory.location).catch(err => {\n\t\t\t\t\twarn('Unexpected error when starting the router:', err);\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst reactiveRoute = {};\n\t\t\tfor (const key in START_LOCATION_NORMALIZED) {\n\t\t\t\tObject.defineProperty(reactiveRoute, key, {\n\t\t\t\t\tget: () => currentRoute.value[key],\n\t\t\t\t\tenumerable: true,\n\t\t\t\t});\n\t\t\t}\n\t\t\tapp.provide(routerKey, router);\n\t\t\tapp.provide(routeLocationKey, shallowReactive(reactiveRoute));\n\t\t\tapp.provide(routerViewLocationKey, currentRoute);\n\t\t\tconst unmountApp = app.unmount;\n\t\t\tinstalledApps.add(app);\n\t\t\tapp.unmount = function () {\n\t\t\t\tinstalledApps.delete(app);\n\t\t\t\t// the router is not attached to an app anymore\n\t\t\t\tif (installedApps.size < 1) {\n\t\t\t\t\t// invalidate the current navigation\n\t\t\t\t\tpendingLocation = START_LOCATION_NORMALIZED;\n\t\t\t\t\tremoveHistoryListener && removeHistoryListener();\n\t\t\t\t\tremoveHistoryListener = null;\n\t\t\t\t\tcurrentRoute.value = START_LOCATION_NORMALIZED;\n\t\t\t\t\tstarted = false;\n\t\t\t\t\tready = false;\n\t\t\t\t}\n\t\t\t\tunmountApp();\n\t\t\t};\n\t\t\t// TODO: this probably needs to be updated so it can be used by vue-termui\n\t\t\tif (isBrowser) {\n\t\t\t\taddDevtools(app, router, matcher);\n\t\t\t}\n\t\t},\n\t};\n\t// TODO: type this as NavigationGuardReturn or similar instead of any\n\tfunction runGuardQueue(guards) {\n\t\treturn guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n\t}\n\treturn router;\n}\nfunction extractChangingRecords(to, from) {\n\tconst leavingRecords = [];\n\tconst updatingRecords = [];\n\tconst enteringRecords = [];\n\tconst len = Math.max(from.matched.length, to.matched.length);\n\tfor (let i = 0; i < len; i++) {\n\t\tconst recordFrom = from.matched[i];\n\t\tif (recordFrom) {\n\t\t\tif (to.matched.find(record => isSameRouteRecord(record, recordFrom)))\n\t\t\t\tupdatingRecords.push(recordFrom);\n\t\t\telse\n\t\t\t\tleavingRecords.push(recordFrom);\n\t\t}\n\t\tconst recordTo = to.matched[i];\n\t\tif (recordTo) {\n\t\t\t// the type doesn't matter because we are comparing per reference\n\t\t\tif (!from.matched.find(record => isSameRouteRecord(record, recordTo))) {\n\t\t\t\tenteringRecords.push(recordTo);\n\t\t\t}\n\t\t}\n\t}\n\treturn [leavingRecords, updatingRecords, enteringRecords];\n}\n\n/**\n * Returns the router instance. Equivalent to using `$router` inside\n * templates.\n */\nfunction useRouter() {\n\treturn inject(routerKey);\n}\n/**\n * Returns the current route location. Equivalent to using `$route` inside\n * templates.\n */\nfunction useRoute(_name) {\n\treturn inject(routeLocationKey);\n}\n\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };\n// origin-end"],"names":["getDevtoolsGlobalHook","getTarget","__VUE_DEVTOOLS_GLOBAL_HOOK__","navigator","window","global","HOOK_SETUP","setupDevtoolsPlugin","pluginDescriptor","setupFn","hook","emit","target","list","__VUE_DEVTOOLS_PLUGINS__","push","isBrowser","document","isRouteComponent","component","isESModule","obj","__esModule","Symbol","toStringTag","default","assign","Object","applyToParams","fn","params","newParams","key","value","isArray","map","noop","Array","warn","msg","args","from","arguments","slice","console","apply","concat","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","text","encodeURI","replace","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","decodeURIComponent","err","TRAILING_SLASH_RE","removeTrailingSlash","path","parseURL","parseQuery","location","currentLocation","query","searchString","hash","hashPos","indexOf","searchPos","length","resolveRelativePath","fullPath","stringifyURL","stringifyQuery","stripBase","pathname","base","toLowerCase","startsWith","isSameRouteLocation","a","b","aLastIndex","matched","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","aliasOf","keys","isSameRouteLocationParamsValue","isEquivalentArray","every","i","to","fromSegments","split","toSegments","lastToSegment","position","toPosition","segment","join","START_LOCATION_NORMALIZED","name","undefined","meta","redirectedFrom","NavigationType","NavigationDirection","START","normalizeBase","baseEl","querySelector","getAttribute","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","documentElement","getBoundingClientRect","elRect","behavior","left","top","computeScrollPosition","scrollX","scrollY","scrollToPosition","scrollToOptions","positionEl","isIdSelector","getElementById","foundEl","style","scrollTo","getScrollKey","delta","history","state","scrollPositions","Map","saveScrollPosition","scrollPosition","set","getSavedScrollPosition","scroll","get","delete","createBaseLocation","protocol","host","createCurrentLocation","search","slicePos","includes","pathFromHash","useHistoryListeners","historyState","listeners","teardowns","pauseState","popStateHandler","fromState","forEach","listener","type","pop","direction","forward","back","unknown","pauseListeners","listen","callback","teardown","index","splice","beforeUnloadListener","replaceState","destroy","removeEventListener","addEventListener","passive","buildState","current","replaced","computeScroll","useHistoryStateNavigation","changeLocation","hashIndex","url","data","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","bind","defineProperty","enumerable","createMemoryHistory","queue","setLocation","info","shouldTrigger","Math","max","min","createWebHashHistory","endsWith","isRouteLocation","route","isRouteName","NavigationFailureSymbol","NavigationFailureType","ErrorTypeMessages","JSON","stringify","stringifyRoute","createRouterError","Error","isNavigationFailure","error","propertiesToLog","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","sensitive","strict","start","end","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","options","score","pattern","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re","message","subPattern","RegExp","parse","match","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","abs","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","test","createRouteRecordMatcher","record","parent","parser","existingKeys","Set","has","add","matcher","children","alias","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","checkChildMissingNameWithEmptyPath","normalizedRecords","aliases","components","originalMatcher","normalizedRecord","parentPath","connectingSlash","checkMissingParamsInAbsolutePath","checkSameParams","isAliasRecord","removeRoute","isMatchable","insertMatcher","matcherRef","getRoutes","findInsertionIndex","resolve","invalidParams","filter","paramName","find","k","paramsFromLocation","m","parentMatcher","unshift","mergeMetaFields","clearRoutes","clear","redirect","beforeEnter","props","normalizeRecordProps","instances","leaveGuards","updateGuards","enterCallbacks","mods","propsObject","reduce","defaults","partialOptions","isSameParam","String","lower","upper","mid","sortOrder","insertionAncestor","getInsertionAncestor","lastIndexOf","ancestor","hasLeadingIM","searchParams","searchParam","eqPos","currentValue","values","v","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","handler","reset","registerGuard","guard","removeFromList","onUnmounted","onDeactivated","onActivated","onBeforeRouteLeave","leaveGuard","getCurrentInstance","activeRecord","inject","onBeforeRouteUpdate","updateGuard","guardToPromiseFn","runWithContext","enterCallbackArray","Promise","reject","next","valid","guardReturn","call","canOnlyBeCalledOnce","guardCall","then","toString","resolvedValue","_called","catch","called","extractComponentsGuards","guardType","guards","rawComponent","promise","__asyncLoader","__warnedDefineAsync","__vccOpts","componentPromise","resolved","resolvedComponent","loadRouteLocation","all","promises","useLink","router","currentRoute","hasPrevious","previousTo","computed","unref","activeRecordIndex","routeMatched","currentMatched","findIndex","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","instance","linkContextDevtools","__vrl_devtools","watchEffect","flush","href","RouterLinkImpl","defineComponent","compatConfig","MODE","required","Boolean","activeClass","exactActiveClass","custom","ariaCurrentValue","setup","slots","link","reactive","elClass","getLinkClass","linkActiveClass","linkExactActiveClass","h","onClick","class","RouterLink","metaKey","altKey","ctrlKey","shiftKey","defaultPrevented","button","currentTarget","preventDefault","outer","inner","innerValue","outerValue","some","propClass","globalClass","defaultClass","RouterViewImpl","inheritAttrs","attrs","warnDeprecatedUsage","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","provide","viewRef","ref","watch","oldInstance","oldName","size","currentName","ViewComponent","normalizeSlot","Component","routePropsOption","routeProps","onVnodeUnmounted","vnode","isUnmounted","internalInstances","r","__vrv_devtools","slot","slotContent","RouterView","parentName","parentSubTreeType","subTree","formatRouteLocation","routeLocation","tooltip","copy","omit","_custom","readOnly","display","formatDisplay","routerId","addDevtools","app","__hasDevtools","id","label","packageName","homepage","logo","componentStateTypes","api","now","on","inspectComponent","payload","ctx","instanceData","editable","visitComponentTree","treeNode","node","componentInstance","tags","textColor","backgroundColor","PINK_500","__devtoolsApi","devtoolsData","ORANGE_400","RED_100","RED_700","LIME_500","BLUE_600","refreshRoutesView","notifyComponentUpdate","sendInspectorTree","routerInspectorId","sendInspectorState","navigationsLayerId","addTimelineLayer","color","onError","addTimelineEvent","layerId","event","title","subtitle","logType","time","groupId","__navigationId","navigationId","beforeEach","afterEach","failure","status","addInspector","icon","treeFilterPlaceholder","activeRoutesPayload","resetMatchStateOnRouteRecord","isRouteMatching","markRouteRecordActive","rootNodes","formatRouteRecordForInspector","getInspectorTree","inspectorId","getInspectorState","__vd_id","nodeId","formatRouteRecordMatcherForStateInspector","modifierForKey","fields","CYAN_400","DARK","__vd_match","__vd_exactActive","__vd_active","routeRecordId","EXTRACT_REGEXP_RE","childRoute","found","nonEndingRE","child","decodedPath","ret","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","shallowRef","pendingLocation","scrollBehavior","scrollRestoration","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matcherLocation","targetParams","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","newTargetLocation","targetLocation","force","shouldRedirect","toLocation","handleScroll","markAsReady","triggerError","_count","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","reverse","canceledNavigationCheck","runGuardQueue","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","listening","readyHandlers","errorListeners","ready","isReady","nextTick","started","beforeResolve","install","config","globalProperties","$router","reactiveRoute","shallowReactive","unmountApp","unmount","len","recordFrom","recordTo","useRouter","useRoute","_name"],"mappings":";;;;;;CAAA;CACA;CACA;CACA;CACA;CACA;CACA;CASA,SAASA,qBAAqB,GAAG;GAChC,OAAOC,SAAS,EAAE,CAACC,4BAA4B;CAChD;CACA,SAASD,SAAS,GAAG;;GAEpB,OAAO,OAAOE,SAAS,KAAK,WAAW,GACrCC,MAAM,GACN,OAAOC,MAAM,KAAK,WAAW,GAC5BA,MAAM,GACN,EAAE;CACN;CAEA,MAAMC,UAAU,GAAG,uBAAuB;CAE1C,SAASC,mBAAmB,CAACC,gBAAgB,EAAEC,OAAO,EAAE;GACvD,MAAMC,IAAI,GAAGV,qBAAqB,EAAE;GACpC,IAAIU,IAAI,EAAE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