businesslens 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/.output/nitro.json +15 -0
  2. package/.output/public/_nuxt/ANTr5GBv.js +1 -0
  3. package/.output/public/_nuxt/B3Z-Zt7l.js +37 -0
  4. package/.output/public/_nuxt/Bd76-HGM.js +1 -0
  5. package/.output/public/_nuxt/Bf4VrETn.js +1 -0
  6. package/.output/public/_nuxt/CR3jGlpM.js +1 -0
  7. package/.output/public/_nuxt/CntoM1kL.js +1 -0
  8. package/.output/public/_nuxt/DogqooqX.js +1 -0
  9. package/.output/public/_nuxt/Zsu92SSr.js +1 -0
  10. package/.output/public/_nuxt/builds/latest.json +1 -0
  11. package/.output/public/_nuxt/builds/meta/e74555da-0c18-4e95-b959-2bdcc538677b.json +1 -0
  12. package/.output/public/_nuxt/default.CRZmPCG_.css +1 -0
  13. package/.output/public/_nuxt/e3lOfLH3.js +1 -0
  14. package/.output/public/_nuxt/entry.SgkJh-3P.css +1 -0
  15. package/.output/public/_nuxt/error-404.CTIGkQtd.css +1 -0
  16. package/.output/public/_nuxt/error-500.CKBWIF4V.css +1 -0
  17. package/.output/public/_nuxt/fCd72uLR.js +1 -0
  18. package/.output/public/_nuxt/inter-cyrillic-ext-wght-normal.BOeWTOD4.woff2 +0 -0
  19. package/.output/public/_nuxt/inter-cyrillic-wght-normal.DqGufNeO.woff2 +0 -0
  20. package/.output/public/_nuxt/inter-greek-ext-wght-normal.DlzME5K_.woff2 +0 -0
  21. package/.output/public/_nuxt/inter-greek-wght-normal.CkhJZR-_.woff2 +0 -0
  22. package/.output/public/_nuxt/inter-latin-ext-wght-normal.DO1Apj_S.woff2 +0 -0
  23. package/.output/public/_nuxt/inter-latin-wght-normal.Dx4kXJAl.woff2 +0 -0
  24. package/.output/public/_nuxt/inter-vietnamese-wght-normal.CBcvBZtf.woff2 +0 -0
  25. package/.output/public/_nuxt/vk0fkBN0.js +1 -0
  26. package/.output/public/_nuxt/zg6VsE4d.js +39 -0
  27. package/.output/public/brand/logo/businesslens-mark.svg +20 -0
  28. package/.output/public/favicon.svg +13 -0
  29. package/.output/server/chunks/_/error-500.mjs +19 -0
  30. package/.output/server/chunks/_/error-500.mjs.map +1 -0
  31. package/.output/server/chunks/_/icons.mjs +6150 -0
  32. package/.output/server/chunks/_/icons.mjs.map +1 -0
  33. package/.output/server/chunks/build/Card-DJ5Lo0Cn.mjs +161 -0
  34. package/.output/server/chunks/build/Card-DJ5Lo0Cn.mjs.map +1 -0
  35. package/.output/server/chunks/build/EntityInspector-fTjbuYoq.mjs +4412 -0
  36. package/.output/server/chunks/build/EntityInspector-fTjbuYoq.mjs.map +1 -0
  37. package/.output/server/chunks/build/Slideover-KOfskX1l.mjs +4226 -0
  38. package/.output/server/chunks/build/Slideover-KOfskX1l.mjs.map +1 -0
  39. package/.output/server/chunks/build/Tooltip-DkxwLaX6.mjs +1338 -0
  40. package/.output/server/chunks/build/Tooltip-DkxwLaX6.mjs.map +1 -0
  41. package/.output/server/chunks/build/client.precomputed.mjs +4 -0
  42. package/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
  43. package/.output/server/chunks/build/default-BJSthw3t.mjs +8999 -0
  44. package/.output/server/chunks/build/default-BJSthw3t.mjs.map +1 -0
  45. package/.output/server/chunks/build/default-styles.BYgqaNao.mjs +8 -0
  46. package/.output/server/chunks/build/default-styles.BYgqaNao.mjs.map +1 -0
  47. package/.output/server/chunks/build/error-404-BOiGLcfP.mjs +96 -0
  48. package/.output/server/chunks/build/error-404-BOiGLcfP.mjs.map +1 -0
  49. package/.output/server/chunks/build/error-404-styles.DA-UkGXW.mjs +8 -0
  50. package/.output/server/chunks/build/error-404-styles.DA-UkGXW.mjs.map +1 -0
  51. package/.output/server/chunks/build/error-500-Bwyw373t.mjs +79 -0
  52. package/.output/server/chunks/build/error-500-Bwyw373t.mjs.map +1 -0
  53. package/.output/server/chunks/build/error-500-styles.De7qbKJ2.mjs +8 -0
  54. package/.output/server/chunks/build/error-500-styles.De7qbKJ2.mjs.map +1 -0
  55. package/.output/server/chunks/build/index-BuhKSZfH.mjs +313 -0
  56. package/.output/server/chunks/build/index-BuhKSZfH.mjs.map +1 -0
  57. package/.output/server/chunks/build/journeys-DHHOyxCM.mjs +244 -0
  58. package/.output/server/chunks/build/journeys-DHHOyxCM.mjs.map +1 -0
  59. package/.output/server/chunks/build/server.mjs +14099 -0
  60. package/.output/server/chunks/build/server.mjs.map +1 -0
  61. package/.output/server/chunks/build/styles.mjs +9 -0
  62. package/.output/server/chunks/build/styles.mjs.map +1 -0
  63. package/.output/server/chunks/build/topology-BJfDB_jA.mjs +295 -0
  64. package/.output/server/chunks/build/topology-BJfDB_jA.mjs.map +1 -0
  65. package/.output/server/chunks/build/useReport-pDAk-ETG.mjs +406 -0
  66. package/.output/server/chunks/build/useReport-pDAk-ETG.mjs.map +1 -0
  67. package/.output/server/chunks/nitro/nitro.mjs +5770 -0
  68. package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
  69. package/.output/server/chunks/routes/api/report.get.mjs +617 -0
  70. package/.output/server/chunks/routes/api/report.get.mjs.map +1 -0
  71. package/.output/server/chunks/routes/renderer.mjs +451 -0
  72. package/.output/server/chunks/routes/renderer.mjs.map +1 -0
  73. package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
  74. package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
  75. package/.output/server/index.mjs +12 -0
  76. package/.output/server/index.mjs.map +1 -0
  77. package/.output/server/node_modules/.nitro/hookable@5.5.3/dist/index.mjs +290 -0
  78. package/.output/server/node_modules/.nitro/hookable@5.5.3/package.json +49 -0
  79. package/.output/server/node_modules/.nitro/hookable@6.1.1/dist/index.mjs +257 -0
  80. package/.output/server/node_modules/.nitro/hookable@6.1.1/package.json +53 -0
  81. package/.output/server/node_modules/@babel/parser/lib/index.js +14599 -0
  82. package/.output/server/node_modules/@babel/parser/package.json +50 -0
  83. package/.output/server/node_modules/@iconify/utils/lib/colors/index.js +295 -0
  84. package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +701 -0
  85. package/.output/server/node_modules/@iconify/utils/lib/css/common.js +75 -0
  86. package/.output/server/node_modules/@iconify/utils/lib/css/format.js +39 -0
  87. package/.output/server/node_modules/@iconify/utils/lib/css/icon.js +47 -0
  88. package/.output/server/node_modules/@iconify/utils/lib/css/icons.js +128 -0
  89. package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +19 -0
  90. package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +13 -0
  91. package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +17 -0
  92. package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +16 -0
  93. package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +30 -0
  94. package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +78 -0
  95. package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +100 -0
  96. package/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +28 -0
  97. package/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +58 -0
  98. package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +48 -0
  99. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +203 -0
  100. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +33 -0
  101. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +132 -0
  102. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +165 -0
  103. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +79 -0
  104. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +92 -0
  105. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +26 -0
  106. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +76 -0
  107. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +66 -0
  108. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +45 -0
  109. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +103 -0
  110. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +36 -0
  111. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +92 -0
  112. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +62 -0
  113. package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +25 -0
  114. package/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +16 -0
  115. package/.output/server/node_modules/@iconify/utils/lib/icon/name.js +57 -0
  116. package/.output/server/node_modules/@iconify/utils/lib/icon/square.js +33 -0
  117. package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +12 -0
  118. package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +125 -0
  119. package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +19 -0
  120. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +25 -0
  121. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +36 -0
  122. package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +91 -0
  123. package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +46 -0
  124. package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +23 -0
  125. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +42 -0
  126. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +123 -0
  127. package/.output/server/node_modules/@iconify/utils/lib/index.js +52 -0
  128. package/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +30 -0
  129. package/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +26 -0
  130. package/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +27 -0
  131. package/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +105 -0
  132. package/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +26 -0
  133. package/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +26 -0
  134. package/.output/server/node_modules/@iconify/utils/lib/misc/title.js +9 -0
  135. package/.output/server/node_modules/@iconify/utils/lib/svg/build.js +113 -0
  136. package/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +31 -0
  137. package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +13 -0
  138. package/.output/server/node_modules/@iconify/utils/lib/svg/html.js +9 -0
  139. package/.output/server/node_modules/@iconify/utils/lib/svg/id.js +41 -0
  140. package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +22 -0
  141. package/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +67 -0
  142. package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +54 -0
  143. package/.output/server/node_modules/@iconify/utils/lib/svg/size.js +27 -0
  144. package/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +7 -0
  145. package/.output/server/node_modules/@iconify/utils/lib/svg/url.js +22 -0
  146. package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +8 -0
  147. package/.output/server/node_modules/@iconify/utils/package.json +119 -0
  148. package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6759 -0
  149. package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
  150. package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
  151. package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
  152. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
  153. package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  154. package/.output/server/node_modules/@vue/devtools-api/dist/index.js +2 -0
  155. package/.output/server/node_modules/@vue/devtools-api/package.json +34 -0
  156. package/.output/server/node_modules/@vue/devtools-kit/dist/index.js +5670 -0
  157. package/.output/server/node_modules/@vue/devtools-kit/package.json +44 -0
  158. package/.output/server/node_modules/@vue/devtools-shared/dist/index.js +239 -0
  159. package/.output/server/node_modules/@vue/devtools-shared/package.json +33 -0
  160. package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1899 -0
  161. package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
  162. package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6940 -0
  163. package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
  164. package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1822 -0
  165. package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
  166. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +896 -0
  167. package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
  168. package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
  169. package/.output/server/node_modules/@vue/shared/package.json +47 -0
  170. package/.output/server/node_modules/@vue-flow/core/dist/vue-flow-core.mjs +10186 -0
  171. package/.output/server/node_modules/@vue-flow/core/package.json +95 -0
  172. package/.output/server/node_modules/ajv/dist/2020.js +55 -0
  173. package/.output/server/node_modules/ajv/dist/ajv.js +50 -0
  174. package/.output/server/node_modules/ajv/dist/compile/codegen/code.js +156 -0
  175. package/.output/server/node_modules/ajv/dist/compile/codegen/index.js +697 -0
  176. package/.output/server/node_modules/ajv/dist/compile/codegen/scope.js +143 -0
  177. package/.output/server/node_modules/ajv/dist/compile/errors.js +123 -0
  178. package/.output/server/node_modules/ajv/dist/compile/index.js +242 -0
  179. package/.output/server/node_modules/ajv/dist/compile/names.js +28 -0
  180. package/.output/server/node_modules/ajv/dist/compile/ref_error.js +12 -0
  181. package/.output/server/node_modules/ajv/dist/compile/resolve.js +155 -0
  182. package/.output/server/node_modules/ajv/dist/compile/rules.js +26 -0
  183. package/.output/server/node_modules/ajv/dist/compile/util.js +178 -0
  184. package/.output/server/node_modules/ajv/dist/compile/validate/applicability.js +19 -0
  185. package/.output/server/node_modules/ajv/dist/compile/validate/boolSchema.js +50 -0
  186. package/.output/server/node_modules/ajv/dist/compile/validate/dataType.js +203 -0
  187. package/.output/server/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
  188. package/.output/server/node_modules/ajv/dist/compile/validate/index.js +520 -0
  189. package/.output/server/node_modules/ajv/dist/compile/validate/keyword.js +124 -0
  190. package/.output/server/node_modules/ajv/dist/compile/validate/subschema.js +81 -0
  191. package/.output/server/node_modules/ajv/dist/core.js +618 -0
  192. package/.output/server/node_modules/ajv/dist/refs/data.json +13 -0
  193. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +30 -0
  194. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +48 -0
  195. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +17 -0
  196. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +51 -0
  197. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  198. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  199. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  200. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +90 -0
  201. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +55 -0
  202. package/.output/server/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
  203. package/.output/server/node_modules/ajv/dist/runtime/equal.js +7 -0
  204. package/.output/server/node_modules/ajv/dist/runtime/ucs2length.js +24 -0
  205. package/.output/server/node_modules/ajv/dist/runtime/uri.js +6 -0
  206. package/.output/server/node_modules/ajv/dist/runtime/validation_error.js +11 -0
  207. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
  208. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
  209. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
  210. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
  211. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -0
  212. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +85 -0
  213. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +11 -0
  214. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
  215. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/index.js +44 -0
  216. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/items.js +52 -0
  217. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/items2020.js +30 -0
  218. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/not.js +26 -0
  219. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -0
  220. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +75 -0
  221. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +12 -0
  222. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/properties.js +54 -0
  223. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +38 -0
  224. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +13 -0
  225. package/.output/server/node_modules/ajv/dist/vocabularies/code.js +131 -0
  226. package/.output/server/node_modules/ajv/dist/vocabularies/core/id.js +10 -0
  227. package/.output/server/node_modules/ajv/dist/vocabularies/core/index.js +16 -0
  228. package/.output/server/node_modules/ajv/dist/vocabularies/core/ref.js +122 -0
  229. package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -0
  230. package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/types.js +9 -0
  231. package/.output/server/node_modules/ajv/dist/vocabularies/draft2020.js +23 -0
  232. package/.output/server/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
  233. package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +30 -0
  234. package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +51 -0
  235. package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/index.js +9 -0
  236. package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +16 -0
  237. package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +10 -0
  238. package/.output/server/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
  239. package/.output/server/node_modules/ajv/dist/vocabularies/format/index.js +6 -0
  240. package/.output/server/node_modules/ajv/dist/vocabularies/metadata.js +18 -0
  241. package/.output/server/node_modules/ajv/dist/vocabularies/next.js +8 -0
  242. package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/index.js +7 -0
  243. package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +40 -0
  244. package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +65 -0
  245. package/.output/server/node_modules/ajv/dist/vocabularies/validation/const.js +25 -0
  246. package/.output/server/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +12 -0
  247. package/.output/server/node_modules/ajv/dist/vocabularies/validation/enum.js +48 -0
  248. package/.output/server/node_modules/ajv/dist/vocabularies/validation/index.js +33 -0
  249. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitContains.js +15 -0
  250. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitItems.js +24 -0
  251. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitLength.js +27 -0
  252. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +27 -0
  253. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +24 -0
  254. package/.output/server/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +26 -0
  255. package/.output/server/node_modules/ajv/dist/vocabularies/validation/pattern.js +24 -0
  256. package/.output/server/node_modules/ajv/dist/vocabularies/validation/required.js +79 -0
  257. package/.output/server/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +64 -0
  258. package/.output/server/node_modules/ajv/package.json +126 -0
  259. package/.output/server/node_modules/ajv-formats/dist/formats.js +208 -0
  260. package/.output/server/node_modules/ajv-formats/dist/index.js +37 -0
  261. package/.output/server/node_modules/ajv-formats/dist/limit.js +69 -0
  262. package/.output/server/node_modules/ajv-formats/package.json +74 -0
  263. package/.output/server/node_modules/birpc/dist/index.mjs +291 -0
  264. package/.output/server/node_modules/birpc/package.json +57 -0
  265. package/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
  266. package/.output/server/node_modules/consola/dist/core.mjs +512 -0
  267. package/.output/server/node_modules/consola/dist/index.mjs +651 -0
  268. package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
  269. package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
  270. package/.output/server/node_modules/consola/package.json +136 -0
  271. package/.output/server/node_modules/devalue/index.js +4 -0
  272. package/.output/server/node_modules/devalue/package.json +40 -0
  273. package/.output/server/node_modules/devalue/src/base64.js +60 -0
  274. package/.output/server/node_modules/devalue/src/constants.js +12 -0
  275. package/.output/server/node_modules/devalue/src/parse.js +283 -0
  276. package/.output/server/node_modules/devalue/src/stringify.js +401 -0
  277. package/.output/server/node_modules/devalue/src/uneval.js +552 -0
  278. package/.output/server/node_modules/devalue/src/utils.js +160 -0
  279. package/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  280. package/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  281. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  282. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  283. package/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  284. package/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  285. package/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
  286. package/.output/server/node_modules/entities/package.json +120 -0
  287. package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  288. package/.output/server/node_modules/estree-walker/package.json +37 -0
  289. package/.output/server/node_modules/fast-deep-equal/index.js +46 -0
  290. package/.output/server/node_modules/fast-deep-equal/package.json +61 -0
  291. package/.output/server/node_modules/fast-uri/index.js +406 -0
  292. package/.output/server/node_modules/fast-uri/lib/schemes.js +267 -0
  293. package/.output/server/node_modules/fast-uri/lib/utils.js +443 -0
  294. package/.output/server/node_modules/fast-uri/package.json +68 -0
  295. package/.output/server/node_modules/json-schema-traverse/index.js +93 -0
  296. package/.output/server/node_modules/json-schema-traverse/package.json +43 -0
  297. package/.output/server/node_modules/perfect-debounce/dist/index.mjs +89 -0
  298. package/.output/server/node_modules/perfect-debounce/package.json +41 -0
  299. package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
  300. package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  301. package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
  302. package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  303. package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  304. package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  305. package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  306. package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  307. package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
  308. package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
  309. package/.output/server/node_modules/source-map-js/package.json +71 -0
  310. package/.output/server/node_modules/source-map-js/source-map.js +8 -0
  311. package/.output/server/node_modules/tailwindcss/dist/chunk-X4GG3EDV.mjs +1 -0
  312. package/.output/server/node_modules/tailwindcss/dist/colors.mjs +1 -0
  313. package/.output/server/node_modules/tailwindcss/package.json +89 -0
  314. package/.output/server/node_modules/ufo/dist/index.mjs +645 -0
  315. package/.output/server/node_modules/ufo/package.json +48 -0
  316. package/.output/server/node_modules/unhead/dist/index.mjs +9 -0
  317. package/.output/server/node_modules/unhead/dist/parser.mjs +508 -0
  318. package/.output/server/node_modules/unhead/dist/plugins.mjs +101 -0
  319. package/.output/server/node_modules/unhead/dist/scripts.mjs +30 -0
  320. package/.output/server/node_modules/unhead/dist/server.mjs +180 -0
  321. package/.output/server/node_modules/unhead/dist/shared/unhead.B3VbJo7Y.mjs +207 -0
  322. package/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
  323. package/.output/server/node_modules/unhead/dist/shared/unhead.BnoAbrHA.mjs +269 -0
  324. package/.output/server/node_modules/unhead/dist/shared/unhead.CaI5ZD4O.mjs +182 -0
  325. package/.output/server/node_modules/unhead/dist/shared/unhead.CbpEuj3y.mjs +71 -0
  326. package/.output/server/node_modules/unhead/dist/shared/unhead.D4vSFytZ.mjs +236 -0
  327. package/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
  328. package/.output/server/node_modules/unhead/dist/shared/unhead.Dh1cQCTe.mjs +44 -0
  329. package/.output/server/node_modules/unhead/dist/shared/unhead.TxTMM7cM.mjs +166 -0
  330. package/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
  331. package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
  332. package/.output/server/node_modules/unhead/package.json +105 -0
  333. package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
  334. package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  335. package/.output/server/node_modules/vue/index.js +7 -0
  336. package/.output/server/node_modules/vue/index.mjs +1 -0
  337. package/.output/server/node_modules/vue/package.json +112 -0
  338. package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
  339. package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +249 -0
  340. package/.output/server/node_modules/vue-bundle-renderer/package.json +57 -0
  341. package/.output/server/node_modules/vue-router/dist/devtools-DCoWQoU_.js +1034 -0
  342. package/.output/server/node_modules/vue-router/dist/useApi-s_02lHjl.js +181 -0
  343. package/.output/server/node_modules/vue-router/dist/vue-router.js +1499 -0
  344. package/.output/server/node_modules/vue-router/package.json +226 -0
  345. package/.output/server/node_modules/vue-router/vue-router.node.mjs +2 -0
  346. package/.output/server/package.json +41 -0
  347. package/README.md +114 -0
  348. package/THIRD_PARTY_NOTICES.md +28 -0
  349. package/bin/businesslens.mjs +181 -0
  350. package/package.json +68 -0
  351. package/packages/report-schema/schemas/report.schema.json +235 -0
  352. package/packages/report-schema/types/index.ts +1 -0
  353. package/packages/report-schema/types/report.ts +101 -0
  354. package/packages/report-schema/validate.mjs +111 -0
@@ -0,0 +1,1499 @@
1
+ /*!
2
+ * vue-router v5.1.0
3
+ * (c) 2026 Eduardo San Martin Morote
4
+ * @license MIT
5
+ */
6
+ import { _ as mergeOptions, a as routerKey, c as NavigationFailureType, d as applyToParams, f as assign, i as routeLocationKey, l as createRouterError, m as isArray, n as useRouter, o as routerViewLocationKey, r as matchedRouteKey, s as viewDepthKey, t as useRoute, u as isNavigationFailure, v as noop, y as isBrowser } from "./useApi-s_02lHjl.js";
7
+ import { C as isSameRouteLocation, E as parseURL, F as warn$1, M as encodeHash, N as encodeParam, O as stringifyURL, S as START_LOCATION_NORMALIZED, T as isSameRouteRecord, _ as saveScrollPosition, a as loadRouteLocation, b as normalizeBase, c as useCallbacks, d as stringifyQuery, f as isRouteLocation, g as getScrollKey, h as getSavedScrollPosition, i as guardToPromiseFn, j as decode, k as stripBase, l as normalizeQuery, m as computeScrollPosition, n as extractChangingRecords, o as onBeforeRouteLeave, p as isRouteName, r as extractComponentsGuards, s as onBeforeRouteUpdate, t as addDevtools, u as parseQuery, v as scrollToPosition, w as isSameRouteLocationParams, y as createHref } from "./devtools-DCoWQoU_.js";
8
+ import { computed, defineComponent, getCurrentInstance, h, inject, nextTick, provide, reactive, ref, shallowReactive, shallowRef, unref, watch, watchEffect } from "vue";
9
+ //#region src/history/html5.ts
10
+ let createBaseLocation = () => location.protocol + "//" + location.host;
11
+ /**
12
+ * Creates a normalized history location from a window.location object
13
+ * @param base - The base path
14
+ * @param location - The window.location object
15
+ */
16
+ function createCurrentLocation(base, location) {
17
+ const { pathname, search, hash } = location;
18
+ const hashPos = base.indexOf("#");
19
+ if (hashPos > -1) {
20
+ let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;
21
+ let pathFromHash = hash.slice(slicePos);
22
+ if (pathFromHash[0] !== "/") pathFromHash = "/" + pathFromHash;
23
+ return stripBase(pathFromHash, "");
24
+ }
25
+ return stripBase(pathname, base) + search + hash;
26
+ }
27
+ function useHistoryListeners(base, historyState, currentLocation, replace) {
28
+ let listeners = [];
29
+ let teardowns = [];
30
+ let pauseState = null;
31
+ const popStateHandler = ({ state }) => {
32
+ const to = createCurrentLocation(base, location);
33
+ const from = currentLocation.value;
34
+ const fromState = historyState.value;
35
+ let delta = 0;
36
+ if (state) {
37
+ currentLocation.value = to;
38
+ historyState.value = state;
39
+ if (pauseState && pauseState === from) {
40
+ pauseState = null;
41
+ return;
42
+ }
43
+ delta = fromState ? state.position - fromState.position : 0;
44
+ } else replace(to);
45
+ listeners.forEach((listener) => {
46
+ listener(currentLocation.value, from, {
47
+ delta,
48
+ type: "pop",
49
+ direction: delta ? delta > 0 ? "forward" : "back" : ""
50
+ });
51
+ });
52
+ };
53
+ function pauseListeners() {
54
+ pauseState = currentLocation.value;
55
+ }
56
+ function listen(callback) {
57
+ listeners.push(callback);
58
+ const teardown = () => {
59
+ const index = listeners.indexOf(callback);
60
+ if (index > -1) listeners.splice(index, 1);
61
+ };
62
+ teardowns.push(teardown);
63
+ return teardown;
64
+ }
65
+ function beforeUnloadListener() {
66
+ if (document.visibilityState === "hidden") {
67
+ const { history } = window;
68
+ if (!history.state) return;
69
+ history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), "");
70
+ }
71
+ }
72
+ function destroy() {
73
+ for (const teardown of teardowns) teardown();
74
+ teardowns = [];
75
+ window.removeEventListener("popstate", popStateHandler);
76
+ window.removeEventListener("pagehide", beforeUnloadListener);
77
+ document.removeEventListener("visibilitychange", beforeUnloadListener);
78
+ }
79
+ window.addEventListener("popstate", popStateHandler);
80
+ window.addEventListener("pagehide", beforeUnloadListener);
81
+ document.addEventListener("visibilitychange", beforeUnloadListener);
82
+ return {
83
+ pauseListeners,
84
+ listen,
85
+ destroy
86
+ };
87
+ }
88
+ /**
89
+ * Creates a state object
90
+ */
91
+ function buildState(back, current, forward, replaced = false, computeScroll = false) {
92
+ return {
93
+ back,
94
+ current,
95
+ forward,
96
+ replaced,
97
+ position: window.history.length,
98
+ scroll: computeScroll ? computeScrollPosition() : null
99
+ };
100
+ }
101
+ function useHistoryStateNavigation(base) {
102
+ const { history, location } = window;
103
+ const currentLocation = { value: createCurrentLocation(base, location) };
104
+ const historyState = { value: history.state };
105
+ if (!historyState.value) changeLocation(currentLocation.value, {
106
+ back: null,
107
+ current: currentLocation.value,
108
+ forward: null,
109
+ position: history.length - 1,
110
+ replaced: true,
111
+ scroll: null
112
+ }, true);
113
+ function changeLocation(to, state, replace) {
114
+ /**
115
+ * if a base tag is provided, and we are on a normal domain, we have to
116
+ * respect the provided `base` attribute because pushState() will use it and
117
+ * potentially erase anything before the `#` like at
118
+ * https://github.com/vuejs/router/issues/685 where a base of
119
+ * `/folder/#` but a base of `/` would erase the `/folder/` section. If
120
+ * there is no host, the `<base>` tag makes no sense and if there isn't a
121
+ * base tag we can just use everything after the `#`.
122
+ */
123
+ const hashIndex = base.indexOf("#");
124
+ const url = hashIndex > -1 ? (location.host && document.querySelector("base") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;
125
+ try {
126
+ history[replace ? "replaceState" : "pushState"](state, "", url);
127
+ historyState.value = state;
128
+ } catch (err) {
129
+ if (process.env.NODE_ENV !== "production") warn$1("Error with push/replace State", err);
130
+ else console.error(err);
131
+ location[replace ? "replace" : "assign"](url);
132
+ }
133
+ }
134
+ function replace(to, data) {
135
+ changeLocation(to, assign({}, history.state, buildState(historyState.value.back, to, historyState.value.forward, true), data, { position: historyState.value.position }), true);
136
+ currentLocation.value = to;
137
+ }
138
+ function push(to, data) {
139
+ const currentState = assign({}, historyState.value, history.state, {
140
+ forward: to,
141
+ scroll: computeScrollPosition()
142
+ });
143
+ if (process.env.NODE_ENV !== "production" && !history.state) warn$1("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\nhistory.replaceState(history.state, '', url)\n\nYou can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state");
144
+ changeLocation(currentState.current, currentState, true);
145
+ changeLocation(to, assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data), false);
146
+ currentLocation.value = to;
147
+ }
148
+ return {
149
+ location: currentLocation,
150
+ state: historyState,
151
+ push,
152
+ replace
153
+ };
154
+ }
155
+ /**
156
+ * Creates an HTML5 history. Most common history for single page applications.
157
+ *
158
+ * @param base -
159
+ */
160
+ function createWebHistory(base) {
161
+ base = normalizeBase(base);
162
+ const historyNavigation = useHistoryStateNavigation(base);
163
+ const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);
164
+ function go(delta, triggerListeners = true) {
165
+ if (!triggerListeners) historyListeners.pauseListeners();
166
+ history.go(delta);
167
+ }
168
+ const routerHistory = assign({
169
+ location: "",
170
+ base,
171
+ go,
172
+ createHref: createHref.bind(null, base)
173
+ }, historyNavigation, historyListeners);
174
+ Object.defineProperty(routerHistory, "location", {
175
+ enumerable: true,
176
+ get: () => historyNavigation.location.value
177
+ });
178
+ Object.defineProperty(routerHistory, "state", {
179
+ enumerable: true,
180
+ get: () => historyNavigation.state.value
181
+ });
182
+ return routerHistory;
183
+ }
184
+ //#endregion
185
+ //#region src/history/hash.ts
186
+ /**
187
+ * Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to
188
+ * handle any URL is not possible.
189
+ *
190
+ * @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag
191
+ * in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()
192
+ * calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything
193
+ * after the `#`).
194
+ *
195
+ * @example
196
+ * ```js
197
+ * // at https://example.com/folder
198
+ * createWebHashHistory() // gives a url of `https://example.com/folder#`
199
+ * createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`
200
+ * // if the `#` is provided in the base, it won't be added by `createWebHashHistory`
201
+ * createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`
202
+ * // you should avoid doing this because it changes the original url and breaks copying urls
203
+ * createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`
204
+ *
205
+ * // at file:///usr/etc/folder/index.html
206
+ * // for locations with no `host`, the base is ignored
207
+ * createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`
208
+ * ```
209
+ */
210
+ function createWebHashHistory(base) {
211
+ base = location.host ? base || location.pathname + location.search : "";
212
+ if (!base.includes("#")) base += "#";
213
+ if (process.env.NODE_ENV !== "production" && !base.endsWith("#/") && !base.endsWith("#")) warn$1(`A hash base must end with a "#":\n"${base}" should be "${base.replace(/#.*$/, "#")}".`);
214
+ return createWebHistory(base);
215
+ }
216
+ //#endregion
217
+ //#region src/history/memory.ts
218
+ /**
219
+ * 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.
220
+ * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.
221
+ *
222
+ * @param base - Base applied to all urls, defaults to '/'
223
+ * @returns a history object that can be passed to the router constructor
224
+ */
225
+ function createMemoryHistory(base = "") {
226
+ let listeners = [];
227
+ let queue = [["", {}]];
228
+ let position = 0;
229
+ base = normalizeBase(base);
230
+ function setLocation(location, state = {}) {
231
+ position++;
232
+ if (position !== queue.length) queue.splice(position);
233
+ queue.push([location, state]);
234
+ }
235
+ function triggerListeners(to, from, { direction, delta }) {
236
+ const info = {
237
+ direction,
238
+ delta,
239
+ type: "pop"
240
+ };
241
+ for (const callback of listeners) callback(to, from, info);
242
+ }
243
+ const routerHistory = {
244
+ location: "",
245
+ state: {},
246
+ base,
247
+ createHref: createHref.bind(null, base),
248
+ replace(to, state) {
249
+ queue.splice(position--, 1);
250
+ setLocation(to, state);
251
+ },
252
+ push(to, state) {
253
+ setLocation(to, state);
254
+ },
255
+ listen(callback) {
256
+ listeners.push(callback);
257
+ return () => {
258
+ const index = listeners.indexOf(callback);
259
+ if (index > -1) listeners.splice(index, 1);
260
+ };
261
+ },
262
+ destroy() {
263
+ listeners = [];
264
+ queue = [["", {}]];
265
+ position = 0;
266
+ },
267
+ go(delta, shouldTrigger = true) {
268
+ const from = this.location;
269
+ const direction = delta < 0 ? "back" : "forward";
270
+ position = Math.max(0, Math.min(position + delta, queue.length - 1));
271
+ if (shouldTrigger) triggerListeners(this.location, from, {
272
+ direction,
273
+ delta
274
+ });
275
+ }
276
+ };
277
+ Object.defineProperty(routerHistory, "location", {
278
+ enumerable: true,
279
+ get: () => queue[position][0]
280
+ });
281
+ Object.defineProperty(routerHistory, "state", {
282
+ enumerable: true,
283
+ get: () => queue[position][1]
284
+ });
285
+ return routerHistory;
286
+ }
287
+ //#endregion
288
+ //#region src/matcher/pathTokenizer.ts
289
+ const ROOT_TOKEN = {
290
+ type: 0,
291
+ value: ""
292
+ };
293
+ const VALID_PARAM_RE = /[a-zA-Z0-9_]/;
294
+ function tokenizePath(path) {
295
+ if (!path) return [[]];
296
+ if (path === "/") return [[ROOT_TOKEN]];
297
+ if (!path.startsWith("/")) throw new Error(process.env.NODE_ENV !== "production" ? `Route paths should start with a "/": "${path}" should be "/${path}".` : `Invalid path "${path}"`);
298
+ function crash(message) {
299
+ throw new Error(`ERR (${state})/"${buffer}": ${message}`);
300
+ }
301
+ let state = 0;
302
+ let previousState = state;
303
+ const tokens = [];
304
+ let segment;
305
+ function finalizeSegment() {
306
+ if (segment) tokens.push(segment);
307
+ segment = [];
308
+ }
309
+ let i = 0;
310
+ let char;
311
+ let buffer = "";
312
+ let customRe = "";
313
+ function consumeBuffer() {
314
+ if (!buffer) return;
315
+ if (state === 0) segment.push({
316
+ type: 0,
317
+ value: buffer
318
+ });
319
+ else if (state === 1 || state === 2 || state === 3) {
320
+ if (segment.length > 1 && (char === "*" || char === "+")) crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);
321
+ segment.push({
322
+ type: 1,
323
+ value: buffer,
324
+ regexp: customRe,
325
+ repeatable: char === "*" || char === "+",
326
+ optional: char === "*" || char === "?"
327
+ });
328
+ } else crash("Invalid state to consume buffer");
329
+ buffer = "";
330
+ }
331
+ function addCharToBuffer() {
332
+ buffer += char;
333
+ }
334
+ while (i < path.length) {
335
+ char = path[i++];
336
+ switch (state) {
337
+ case 0:
338
+ if (char === "\\") {
339
+ previousState = state;
340
+ state = 4;
341
+ } else if (char === "/") {
342
+ if (buffer) consumeBuffer();
343
+ finalizeSegment();
344
+ } else if (char === ":") {
345
+ consumeBuffer();
346
+ state = 1;
347
+ } else addCharToBuffer();
348
+ break;
349
+ case 4:
350
+ addCharToBuffer();
351
+ state = previousState;
352
+ break;
353
+ case 1:
354
+ if (char === "(") state = 2;
355
+ else if (VALID_PARAM_RE.test(char)) addCharToBuffer();
356
+ else {
357
+ consumeBuffer();
358
+ state = 0;
359
+ if (char !== "*" && char !== "?" && char !== "+") i--;
360
+ }
361
+ break;
362
+ case 2:
363
+ if (char === ")") if (customRe[customRe.length - 1] == "\\") customRe = customRe.slice(0, -1) + char;
364
+ else state = 3;
365
+ else customRe += char;
366
+ break;
367
+ case 3:
368
+ consumeBuffer();
369
+ state = 0;
370
+ if (char !== "*" && char !== "?" && char !== "+") i--;
371
+ customRe = "";
372
+ break;
373
+ default:
374
+ crash("Unknown state");
375
+ break;
376
+ }
377
+ }
378
+ if (state === 2) crash(`Unfinished custom RegExp for param "${buffer}"`);
379
+ consumeBuffer();
380
+ finalizeSegment();
381
+ return tokens;
382
+ }
383
+ //#endregion
384
+ //#region src/matcher/pathParserRanker.ts
385
+ const BASE_PARAM_PATTERN = "[^/]+?";
386
+ const BASE_PATH_PARSER_OPTIONS = {
387
+ sensitive: false,
388
+ strict: false,
389
+ start: true,
390
+ end: true
391
+ };
392
+ const REGEX_CHARS_RE = /[.+*?^${}()[\]/\\]/g;
393
+ /**
394
+ * Creates a path parser from an array of Segments (a segment is an array of Tokens)
395
+ *
396
+ * @param segments - array of segments returned by tokenizePath
397
+ * @param extraOptions - optional options for the regexp
398
+ * @returns a PathParser
399
+ */
400
+ function tokensToParser(segments, extraOptions) {
401
+ const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);
402
+ const score = [];
403
+ let pattern = options.start ? "^" : "";
404
+ const keys = [];
405
+ for (const segment of segments) {
406
+ const segmentScores = segment.length ? [] : [90];
407
+ if (options.strict && !segment.length) pattern += "/";
408
+ for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {
409
+ const token = segment[tokenIndex];
410
+ let subSegmentScore = 40 + (options.sensitive ? .25 : 0);
411
+ if (token.type === 0) {
412
+ if (!tokenIndex) pattern += "/";
413
+ pattern += token.value.replace(REGEX_CHARS_RE, "\\$&");
414
+ subSegmentScore += 40;
415
+ } else if (token.type === 1) {
416
+ const { value, repeatable, optional, regexp } = token;
417
+ keys.push({
418
+ name: value,
419
+ repeatable,
420
+ optional
421
+ });
422
+ const re = regexp ? regexp : BASE_PARAM_PATTERN;
423
+ if (re !== BASE_PARAM_PATTERN) {
424
+ subSegmentScore += 10;
425
+ try {
426
+ new RegExp(`(${re})`);
427
+ } catch (err) {
428
+ throw new Error(`Invalid custom RegExp for param "${value}" (${re}): ` + err.message);
429
+ }
430
+ }
431
+ let subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;
432
+ if (!tokenIndex) subPattern = optional && segment.length < 2 ? `(?:/${subPattern})` : "/" + subPattern;
433
+ if (optional) subPattern += "?";
434
+ pattern += subPattern;
435
+ subSegmentScore += 20;
436
+ if (optional) subSegmentScore += -8;
437
+ if (repeatable) subSegmentScore += -20;
438
+ if (re === ".*") subSegmentScore += -50;
439
+ }
440
+ segmentScores.push(subSegmentScore);
441
+ }
442
+ score.push(segmentScores);
443
+ }
444
+ if (options.strict && options.end) {
445
+ const i = score.length - 1;
446
+ score[i][score[i].length - 1] += .7000000000000001;
447
+ }
448
+ if (!options.strict) pattern += "/?";
449
+ if (options.end) pattern += "$";
450
+ else if (options.strict && !pattern.endsWith("/")) pattern += "(?:/|$)";
451
+ const re = new RegExp(pattern, options.sensitive ? "" : "i");
452
+ function parse(path) {
453
+ const match = path.match(re);
454
+ const params = {};
455
+ if (!match) return null;
456
+ for (let i = 1; i < match.length; i++) {
457
+ const value = match[i] || "";
458
+ const key = keys[i - 1];
459
+ params[key.name] = value && key.repeatable ? value.split("/") : value;
460
+ }
461
+ return params;
462
+ }
463
+ function stringify(params) {
464
+ let path = "";
465
+ let avoidDuplicatedSlash = false;
466
+ for (const segment of segments) {
467
+ if (!avoidDuplicatedSlash || !path.endsWith("/")) path += "/";
468
+ avoidDuplicatedSlash = false;
469
+ for (const token of segment) if (token.type === 0) path += token.value;
470
+ else if (token.type === 1) {
471
+ const { value, repeatable, optional } = token;
472
+ const param = value in params ? params[value] : "";
473
+ if (isArray(param) && !repeatable) throw new Error(`Provided param "${value}" is an array but it is not repeatable (* or + modifiers)`);
474
+ const text = isArray(param) ? param.join("/") : param;
475
+ if (!text) if (optional) {
476
+ if (segment.length < 2) if (path.endsWith("/")) path = path.slice(0, -1);
477
+ else avoidDuplicatedSlash = true;
478
+ } else throw new Error(`Missing required param "${value}"`);
479
+ path += text;
480
+ }
481
+ }
482
+ return path || "/";
483
+ }
484
+ return {
485
+ re,
486
+ score,
487
+ keys,
488
+ parse,
489
+ stringify
490
+ };
491
+ }
492
+ /**
493
+ * Compares an array of numbers as used in PathParser.score and returns a
494
+ * number. This function can be used to `sort` an array
495
+ *
496
+ * @param a - first array of numbers
497
+ * @param b - second array of numbers
498
+ * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b
499
+ * should be sorted first
500
+ */
501
+ function compareScoreArray(a, b) {
502
+ let i = 0;
503
+ while (i < a.length && i < b.length) {
504
+ const diff = b[i] - a[i];
505
+ if (diff) return diff;
506
+ i++;
507
+ }
508
+ if (a.length < b.length) return a.length === 1 && a[0] === 80 ? -1 : 1;
509
+ else if (a.length > b.length) return b.length === 1 && b[0] === 80 ? 1 : -1;
510
+ return 0;
511
+ }
512
+ /**
513
+ * Compare function that can be used with `sort` to sort an array of PathParser
514
+ *
515
+ * @param a - first PathParser
516
+ * @param b - second PathParser
517
+ * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b
518
+ */
519
+ function comparePathParserScore(a, b) {
520
+ let i = 0;
521
+ const aScore = a.score;
522
+ const bScore = b.score;
523
+ while (i < aScore.length && i < bScore.length) {
524
+ const comp = compareScoreArray(aScore[i], bScore[i]);
525
+ if (comp) return comp;
526
+ i++;
527
+ }
528
+ if (Math.abs(bScore.length - aScore.length) === 1) {
529
+ if (isLastScoreNegative(aScore)) return 1;
530
+ if (isLastScoreNegative(bScore)) return -1;
531
+ }
532
+ return bScore.length - aScore.length;
533
+ }
534
+ /**
535
+ * This allows detecting splats at the end of a path: /home/:id(.*)*
536
+ *
537
+ * @param score - score to check
538
+ * @returns true if the last entry is negative
539
+ */
540
+ function isLastScoreNegative(score) {
541
+ const last = score[score.length - 1];
542
+ return score.length > 0 && last[last.length - 1] < 0;
543
+ }
544
+ const PATH_PARSER_OPTIONS_DEFAULTS = {
545
+ strict: false,
546
+ end: true,
547
+ sensitive: false
548
+ };
549
+ //#endregion
550
+ //#region src/matcher/pathMatcher.ts
551
+ function createRouteRecordMatcher(record, parent, options) {
552
+ const parser = tokensToParser(tokenizePath(record.path), options);
553
+ if (process.env.NODE_ENV !== "production") {
554
+ const existingKeys = /* @__PURE__ */ new Set();
555
+ for (const key of parser.keys) {
556
+ if (existingKeys.has(key.name)) warn$1(`Found duplicated params with name "${key.name}" for path "${record.path}". Only the last one will be available on "$route.params".`);
557
+ existingKeys.add(key.name);
558
+ }
559
+ }
560
+ const matcher = assign(parser, {
561
+ record,
562
+ parent,
563
+ children: [],
564
+ alias: []
565
+ });
566
+ if (parent) {
567
+ if (!matcher.record.aliasOf === !parent.record.aliasOf) parent.children.push(matcher);
568
+ }
569
+ return matcher;
570
+ }
571
+ //#endregion
572
+ //#region src/matcher/index.ts
573
+ /**
574
+ * Creates a Router Matcher.
575
+ *
576
+ * @internal
577
+ * @param routes - array of initial routes
578
+ * @param globalOptions - global route options
579
+ */
580
+ function createRouterMatcher(routes, globalOptions) {
581
+ const matchers = [];
582
+ const matcherMap = /* @__PURE__ */ new Map();
583
+ globalOptions = mergeOptions(PATH_PARSER_OPTIONS_DEFAULTS, globalOptions);
584
+ function getRecordMatcher(name) {
585
+ return matcherMap.get(name);
586
+ }
587
+ function addRoute(record, parent, originalRecord) {
588
+ const isRootAdd = !originalRecord;
589
+ const mainNormalizedRecord = normalizeRouteRecord(record);
590
+ if (process.env.NODE_ENV !== "production") checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);
591
+ mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;
592
+ const options = mergeOptions(globalOptions, record);
593
+ const normalizedRecords = [mainNormalizedRecord];
594
+ if ("alias" in record) {
595
+ const aliases = typeof record.alias === "string" ? [record.alias] : record.alias;
596
+ for (const alias of aliases) normalizedRecords.push(normalizeRouteRecord(assign({}, mainNormalizedRecord, {
597
+ components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,
598
+ path: alias,
599
+ aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord
600
+ })));
601
+ }
602
+ let matcher;
603
+ let originalMatcher;
604
+ for (const normalizedRecord of normalizedRecords) {
605
+ const { path } = normalizedRecord;
606
+ if (parent && path[0] !== "/") {
607
+ const parentPath = parent.record.path;
608
+ const connectingSlash = parentPath[parentPath.length - 1] === "/" ? "" : "/";
609
+ normalizedRecord.path = parent.record.path + (path && connectingSlash + path);
610
+ }
611
+ if (process.env.NODE_ENV !== "production" && normalizedRecord.path === "*") throw new Error("Catch all routes (\"*\") must now be defined using a param with a custom regexp.\nSee more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.");
612
+ matcher = createRouteRecordMatcher(normalizedRecord, parent, options);
613
+ if (process.env.NODE_ENV !== "production" && parent && path[0] === "/") checkMissingParamsInAbsolutePath(matcher, parent);
614
+ if (originalRecord) {
615
+ originalRecord.alias.push(matcher);
616
+ if (process.env.NODE_ENV !== "production") checkSameParams(originalRecord, matcher);
617
+ } else {
618
+ originalMatcher = originalMatcher || matcher;
619
+ if (originalMatcher !== matcher) originalMatcher.alias.push(matcher);
620
+ if (isRootAdd && record.name && !isAliasRecord(matcher)) {
621
+ if (process.env.NODE_ENV !== "production") checkSameNameAsAncestor(record, parent);
622
+ removeRoute(record.name);
623
+ }
624
+ }
625
+ if (isMatchable(matcher)) insertMatcher(matcher);
626
+ if (mainNormalizedRecord.children) {
627
+ const children = mainNormalizedRecord.children;
628
+ for (let i = 0; i < children.length; i++) addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);
629
+ }
630
+ originalRecord = originalRecord || matcher;
631
+ }
632
+ return originalMatcher ? () => {
633
+ removeRoute(originalMatcher);
634
+ } : noop;
635
+ }
636
+ function removeRoute(matcherRef) {
637
+ if (isRouteName(matcherRef)) {
638
+ const matcher = matcherMap.get(matcherRef);
639
+ if (matcher) {
640
+ matcherMap.delete(matcherRef);
641
+ matchers.splice(matchers.indexOf(matcher), 1);
642
+ matcher.children.forEach(removeRoute);
643
+ matcher.alias.forEach(removeRoute);
644
+ }
645
+ } else {
646
+ const index = matchers.indexOf(matcherRef);
647
+ if (index > -1) {
648
+ matchers.splice(index, 1);
649
+ if (matcherRef.record.name) matcherMap.delete(matcherRef.record.name);
650
+ matcherRef.children.forEach(removeRoute);
651
+ matcherRef.alias.forEach(removeRoute);
652
+ }
653
+ }
654
+ }
655
+ function getRoutes() {
656
+ return matchers;
657
+ }
658
+ function insertMatcher(matcher) {
659
+ const index = findInsertionIndex(matcher, matchers);
660
+ matchers.splice(index, 0, matcher);
661
+ if (matcher.record.name && !isAliasRecord(matcher)) matcherMap.set(matcher.record.name, matcher);
662
+ }
663
+ function resolve(location, currentLocation) {
664
+ let matcher;
665
+ let params = {};
666
+ let path;
667
+ let name;
668
+ if ("name" in location && location.name) {
669
+ matcher = matcherMap.get(location.name);
670
+ if (!matcher) throw createRouterError(1, { location });
671
+ if (process.env.NODE_ENV !== "production") {
672
+ const invalidParams = Object.keys(location.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));
673
+ if (invalidParams.length) {
674
+ const isInherited = !matcher.keys.length && invalidParams.some((name) => name in currentLocation.params);
675
+ warn$1(`Discarded invalid param(s) "${invalidParams.join("\", \"")}" when navigating.` + (isInherited ? ` If you are using a catch-all route with a named redirect, pass an empty \`params\` object: \`redirect: { name: '...', params: {} }\`.` : "") + ` See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
676
+ }
677
+ }
678
+ name = matcher.record.name;
679
+ params = assign(pickParams(currentLocation.params, matcher.keys.filter((k) => !k.optional).concat(matcher.parent ? matcher.parent.keys.filter((k) => k.optional) : []).map((k) => k.name)), location.params && pickParams(location.params, matcher.keys.map((k) => k.name)));
680
+ path = matcher.stringify(params);
681
+ } else if (location.path != null) {
682
+ path = location.path;
683
+ if (process.env.NODE_ENV !== "production" && !path.startsWith("/")) warn$1(`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.`);
684
+ matcher = matchers.find((m) => m.re.test(path));
685
+ if (matcher) {
686
+ params = matcher.parse(path);
687
+ name = matcher.record.name;
688
+ matcher.keys.forEach((key) => {
689
+ if (key.optional && !params[key.name]) delete params[key.name];
690
+ });
691
+ }
692
+ } else {
693
+ matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m) => m.re.test(currentLocation.path));
694
+ if (!matcher) throw createRouterError(1, {
695
+ location,
696
+ currentLocation
697
+ });
698
+ name = matcher.record.name;
699
+ params = assign({}, currentLocation.params, location.params);
700
+ path = matcher.stringify(params);
701
+ }
702
+ const matched = [];
703
+ let parentMatcher = matcher;
704
+ while (parentMatcher) {
705
+ matched.unshift(parentMatcher.record);
706
+ parentMatcher = parentMatcher.parent;
707
+ }
708
+ return {
709
+ name,
710
+ path,
711
+ params,
712
+ matched,
713
+ meta: mergeMetaFields(matched)
714
+ };
715
+ }
716
+ routes.forEach((route) => addRoute(route));
717
+ function clearRoutes() {
718
+ matchers.length = 0;
719
+ matcherMap.clear();
720
+ }
721
+ return {
722
+ addRoute,
723
+ resolve,
724
+ removeRoute,
725
+ clearRoutes,
726
+ getRoutes,
727
+ getRecordMatcher
728
+ };
729
+ }
730
+ /**
731
+ * Picks an object param to contain only specified keys.
732
+ *
733
+ * @param params - params object to pick from
734
+ * @param keys - keys to pick
735
+ */
736
+ function pickParams(params, keys) {
737
+ const newParams = {};
738
+ for (const key of keys) if (key in params) newParams[key] = params[key];
739
+ return newParams;
740
+ }
741
+ /**
742
+ * Normalizes a RouteRecordRaw. Creates a copy
743
+ *
744
+ * @param record
745
+ * @returns the normalized version
746
+ */
747
+ function normalizeRouteRecord(record) {
748
+ const normalized = {
749
+ path: record.path,
750
+ redirect: record.redirect,
751
+ name: record.name,
752
+ meta: record.meta || {},
753
+ aliasOf: record.aliasOf,
754
+ beforeEnter: record.beforeEnter,
755
+ props: normalizeRecordProps(record),
756
+ children: record.children || [],
757
+ instances: {},
758
+ leaveGuards: /* @__PURE__ */ new Set(),
759
+ updateGuards: /* @__PURE__ */ new Set(),
760
+ enterCallbacks: {},
761
+ components: "components" in record ? record.components || null : record.component && { default: record.component }
762
+ };
763
+ Object.defineProperty(normalized, "mods", { value: {} });
764
+ return normalized;
765
+ }
766
+ /**
767
+ * Normalize the optional `props` in a record to always be an object similar to
768
+ * components. Also accept a boolean for components.
769
+ * @param record
770
+ */
771
+ function normalizeRecordProps(record) {
772
+ const propsObject = {};
773
+ const props = record.props || false;
774
+ if ("component" in record) propsObject.default = props;
775
+ else for (const name in record.components) propsObject[name] = typeof props === "object" ? props[name] : props;
776
+ return propsObject;
777
+ }
778
+ /**
779
+ * Checks if a record or any of its parent is an alias
780
+ * @param record
781
+ */
782
+ function isAliasRecord(record) {
783
+ while (record) {
784
+ if (record.record.aliasOf) return true;
785
+ record = record.parent;
786
+ }
787
+ return false;
788
+ }
789
+ /**
790
+ * Merge meta fields of an array of records
791
+ *
792
+ * @param matched - array of matched records
793
+ */
794
+ function mergeMetaFields(matched) {
795
+ return matched.reduce((meta, record) => assign(meta, record.meta), {});
796
+ }
797
+ function isSameParam(a, b) {
798
+ return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;
799
+ }
800
+ /**
801
+ * Check if a path and its alias have the same required params
802
+ *
803
+ * @param a - original record
804
+ * @param b - alias record
805
+ */
806
+ function checkSameParams(a, b) {
807
+ for (const key of a.keys) if (!key.optional && !b.keys.find(isSameParam.bind(null, key))) return warn$1(`Alias "${b.record.path}" and the original record: "${a.record.path}" must have the exact same param named "${key.name}"`);
808
+ for (const key of b.keys) if (!key.optional && !a.keys.find(isSameParam.bind(null, key))) return warn$1(`Alias "${b.record.path}" and the original record: "${a.record.path}" must have the exact same param named "${key.name}"`);
809
+ }
810
+ /**
811
+ * A route with a name and a child with an empty path without a name should warn when adding the route
812
+ *
813
+ * @param mainNormalizedRecord - RouteRecordNormalized
814
+ * @param parent - RouteRecordMatcher
815
+ */
816
+ function checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {
817
+ if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path && mainNormalizedRecord.children.length === 0) warn$1(`The route named "${String(parent.record.name)}" has a child without a name, an empty path, and no children. This is probably a mistake: 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 silence the warning.`);
818
+ }
819
+ function checkSameNameAsAncestor(record, parent) {
820
+ for (let ancestor = parent; ancestor; ancestor = ancestor.parent) if (ancestor.record.name === record.name) throw new Error(`A route named "${String(record.name)}" has been added as a ${parent === ancestor ? "child" : "descendant"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);
821
+ }
822
+ function checkMissingParamsInAbsolutePath(record, parent) {
823
+ for (const key of parent.keys) if (!record.keys.find(isSameParam.bind(null, key))) return warn$1(`Absolute path "${record.record.path}" must have the exact same param named "${key.name}" as its parent "${parent.record.path}".`);
824
+ }
825
+ /**
826
+ * Performs a binary search to find the correct insertion index for a new matcher.
827
+ *
828
+ * Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,
829
+ * with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.
830
+ *
831
+ * @param matcher - new matcher to be inserted
832
+ * @param matchers - existing matchers
833
+ */
834
+ function findInsertionIndex(matcher, matchers) {
835
+ let lower = 0;
836
+ let upper = matchers.length;
837
+ while (lower !== upper) {
838
+ const mid = lower + upper >> 1;
839
+ if (comparePathParserScore(matcher, matchers[mid]) < 0) upper = mid;
840
+ else lower = mid + 1;
841
+ }
842
+ const insertionAncestor = getInsertionAncestor(matcher);
843
+ if (insertionAncestor) {
844
+ upper = matchers.lastIndexOf(insertionAncestor, upper - 1);
845
+ if (process.env.NODE_ENV !== "production" && upper < 0) warn$1(`Finding ancestor route "${insertionAncestor.record.path}" failed for "${matcher.record.path}"`);
846
+ }
847
+ return upper;
848
+ }
849
+ function getInsertionAncestor(matcher) {
850
+ let ancestor = matcher;
851
+ while (ancestor = ancestor.parent) if (isMatchable(ancestor) && comparePathParserScore(matcher, ancestor) === 0) return ancestor;
852
+ }
853
+ /**
854
+ * Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without
855
+ * a component, or name, or redirect, are just used to group other routes.
856
+ * @param matcher
857
+ * @param matcher.record record of the matcher
858
+ * @returns
859
+ */
860
+ function isMatchable({ record }) {
861
+ return !!(record.name || record.components && Object.keys(record.components).length || record.redirect);
862
+ }
863
+ //#endregion
864
+ //#region src/RouterLink.ts
865
+ /**
866
+ * Returns the internal behavior of a {@link RouterLink} without the rendering part.
867
+ *
868
+ * @param props - a `to` location and an optional `replace` flag
869
+ */
870
+ function useLink(props) {
871
+ const router = inject(routerKey);
872
+ const currentRoute = inject(routeLocationKey);
873
+ let hasPrevious = false;
874
+ let previousTo = null;
875
+ const route = computed(() => {
876
+ const to = unref(props.to);
877
+ if (process.env.NODE_ENV !== "production" && (!hasPrevious || to !== previousTo)) {
878
+ if (!isRouteLocation(to)) if (hasPrevious) warn$1(`Invalid value for prop "to" in useLink()\n- to:`, to, `\n- previous to:`, previousTo, `\n- props:`, props);
879
+ else warn$1(`Invalid value for prop "to" in useLink()\n- to:`, to, `\n- props:`, props);
880
+ previousTo = to;
881
+ hasPrevious = true;
882
+ }
883
+ return router.resolve(to);
884
+ });
885
+ const activeRecordIndex = computed(() => {
886
+ const { matched } = route.value;
887
+ const { length } = matched;
888
+ const routeMatched = matched[length - 1];
889
+ const currentMatched = currentRoute.matched;
890
+ if (!routeMatched || !currentMatched.length) return -1;
891
+ const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));
892
+ if (index > -1) return index;
893
+ const parentRecordPath = getOriginalPath(matched[length - 2]);
894
+ return length > 1 && getOriginalPath(routeMatched) === parentRecordPath && currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index;
895
+ });
896
+ const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));
897
+ const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));
898
+ function navigate(e = {}) {
899
+ if (guardEvent(e)) {
900
+ const p = router[unref(props.replace) ? "replace" : "push"](unref(props.to)).catch(noop);
901
+ if (props.viewTransition && typeof document !== "undefined" && "startViewTransition" in document) document.startViewTransition(() => p);
902
+ return p;
903
+ }
904
+ return Promise.resolve();
905
+ }
906
+ if ((process.env.NODE_ENV !== "production" || __VUE_PROD_DEVTOOLS__) && isBrowser) {
907
+ const instance = getCurrentInstance();
908
+ if (instance) {
909
+ const linkContextDevtools = {
910
+ route: route.value,
911
+ isActive: isActive.value,
912
+ isExactActive: isExactActive.value,
913
+ error: null
914
+ };
915
+ instance.__vrl_devtools = instance.__vrl_devtools || [];
916
+ instance.__vrl_devtools.push(linkContextDevtools);
917
+ watchEffect(() => {
918
+ linkContextDevtools.route = route.value;
919
+ linkContextDevtools.isActive = isActive.value;
920
+ linkContextDevtools.isExactActive = isExactActive.value;
921
+ linkContextDevtools.error = isRouteLocation(unref(props.to)) ? null : "Invalid \"to\" value";
922
+ }, { flush: "post" });
923
+ }
924
+ }
925
+ /**
926
+ * NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this
927
+ */
928
+ return {
929
+ route,
930
+ href: computed(() => route.value.href),
931
+ isActive,
932
+ isExactActive,
933
+ navigate
934
+ };
935
+ }
936
+ function preferSingleVNode(vnodes) {
937
+ return vnodes.length === 1 ? vnodes[0] : vnodes;
938
+ }
939
+ /**
940
+ * Component to render a link that triggers a navigation on click.
941
+ */
942
+ const RouterLink = /* @__PURE__ */ defineComponent({
943
+ name: "RouterLink",
944
+ compatConfig: { MODE: 3 },
945
+ props: {
946
+ to: {
947
+ type: [String, Object],
948
+ required: true
949
+ },
950
+ replace: Boolean,
951
+ activeClass: String,
952
+ exactActiveClass: String,
953
+ custom: Boolean,
954
+ ariaCurrentValue: {
955
+ type: String,
956
+ default: "page"
957
+ },
958
+ viewTransition: Boolean
959
+ },
960
+ useLink,
961
+ setup(props, { slots }) {
962
+ const link = reactive(useLink(props));
963
+ const { options } = inject(routerKey);
964
+ const elClass = computed(() => ({
965
+ [getLinkClass(props.activeClass, options.linkActiveClass, "router-link-active")]: link.isActive,
966
+ [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, "router-link-exact-active")]: link.isExactActive
967
+ }));
968
+ return () => {
969
+ const children = slots.default && preferSingleVNode(slots.default(link));
970
+ return props.custom ? children : h("a", {
971
+ "aria-current": link.isExactActive ? props.ariaCurrentValue : null,
972
+ href: link.href,
973
+ onClick: link.navigate,
974
+ class: elClass.value
975
+ }, children);
976
+ };
977
+ }
978
+ });
979
+ function guardEvent(e) {
980
+ if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;
981
+ if (e.defaultPrevented) return;
982
+ if (e.button !== void 0 && e.button !== 0) return;
983
+ if (e.currentTarget && e.currentTarget.getAttribute) {
984
+ const target = e.currentTarget.getAttribute("target");
985
+ if (/\b_blank\b/i.test(target)) return;
986
+ }
987
+ if (e.preventDefault) e.preventDefault();
988
+ return true;
989
+ }
990
+ function includesParams(outer, inner) {
991
+ for (const key in inner) {
992
+ const innerValue = inner[key];
993
+ const outerValue = outer[key];
994
+ if (typeof innerValue === "string") {
995
+ if (innerValue !== outerValue) return false;
996
+ } else if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value.valueOf() !== outerValue[i].valueOf())) return false;
997
+ }
998
+ return true;
999
+ }
1000
+ /**
1001
+ * Get the original path value of a record by following its aliasOf
1002
+ * @param record
1003
+ */
1004
+ function getOriginalPath(record) {
1005
+ return record ? record.aliasOf ? record.aliasOf.path : record.path : "";
1006
+ }
1007
+ /**
1008
+ * Utility class to get the active class based on defaults.
1009
+ * @param propClass
1010
+ * @param globalClass
1011
+ * @param defaultClass
1012
+ */
1013
+ const getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;
1014
+ //#endregion
1015
+ //#region src/RouterView.ts
1016
+ const RouterViewImpl = /* @__PURE__ */ defineComponent({
1017
+ name: "RouterView",
1018
+ inheritAttrs: false,
1019
+ props: {
1020
+ name: {
1021
+ type: String,
1022
+ default: "default"
1023
+ },
1024
+ route: Object
1025
+ },
1026
+ compatConfig: { MODE: 3 },
1027
+ setup(props, { attrs, slots }) {
1028
+ process.env.NODE_ENV !== "production" && warnDeprecatedUsage();
1029
+ const injectedRoute = inject(routerViewLocationKey);
1030
+ const routeToDisplay = computed(() => props.route || injectedRoute.value);
1031
+ const injectedDepth = inject(viewDepthKey, 0);
1032
+ const depth = computed(() => {
1033
+ let initialDepth = unref(injectedDepth);
1034
+ const { matched } = routeToDisplay.value;
1035
+ let matchedRoute;
1036
+ while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) initialDepth++;
1037
+ return initialDepth;
1038
+ });
1039
+ const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);
1040
+ provide(viewDepthKey, computed(() => depth.value + 1));
1041
+ provide(matchedRouteKey, matchedRouteRef);
1042
+ provide(routerViewLocationKey, routeToDisplay);
1043
+ const viewRef = ref();
1044
+ watch(() => [
1045
+ viewRef.value,
1046
+ matchedRouteRef.value,
1047
+ props.name
1048
+ ], ([instance, to, name], [oldInstance, from, _oldName]) => {
1049
+ if (to) {
1050
+ to.instances[name] = instance;
1051
+ if (from && from !== to && instance && instance === oldInstance) {
1052
+ if (!to.leaveGuards.size) to.leaveGuards = from.leaveGuards;
1053
+ if (!to.updateGuards.size) to.updateGuards = from.updateGuards;
1054
+ }
1055
+ }
1056
+ if (instance && to && (!from || !isSameRouteRecord(to, from) || !oldInstance)) (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));
1057
+ }, { flush: "post" });
1058
+ return () => {
1059
+ const route = routeToDisplay.value;
1060
+ const currentName = props.name;
1061
+ const matchedRoute = matchedRouteRef.value;
1062
+ const ViewComponent = matchedRoute && matchedRoute.components[currentName];
1063
+ if (!ViewComponent) return normalizeSlot(slots.default, {
1064
+ Component: ViewComponent,
1065
+ route
1066
+ });
1067
+ const routePropsOption = matchedRoute.props[currentName];
1068
+ const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === "function" ? routePropsOption(route) : routePropsOption : null;
1069
+ const onVnodeUnmounted = (vnode) => {
1070
+ if (vnode.component.isUnmounted) matchedRoute.instances[currentName] = null;
1071
+ };
1072
+ const component = h(ViewComponent, assign({}, routeProps, attrs, {
1073
+ onVnodeUnmounted,
1074
+ ref: viewRef
1075
+ }));
1076
+ if ((process.env.NODE_ENV !== "production" || __VUE_PROD_DEVTOOLS__) && isBrowser && component.ref) {
1077
+ const info = {
1078
+ depth: depth.value,
1079
+ name: matchedRoute.name,
1080
+ path: matchedRoute.path,
1081
+ meta: matchedRoute.meta
1082
+ };
1083
+ (isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i]).forEach((instance) => {
1084
+ instance.__vrv_devtools = info;
1085
+ });
1086
+ }
1087
+ return normalizeSlot(slots.default, {
1088
+ Component: component,
1089
+ route
1090
+ }) || component;
1091
+ };
1092
+ }
1093
+ });
1094
+ function normalizeSlot(slot, data) {
1095
+ if (!slot) return null;
1096
+ const slotContent = slot(data);
1097
+ return slotContent.length === 1 ? slotContent[0] : slotContent;
1098
+ }
1099
+ /**
1100
+ * Component to display the current route the user is at.
1101
+ */
1102
+ const RouterView = RouterViewImpl;
1103
+ function warnDeprecatedUsage() {
1104
+ const instance = getCurrentInstance();
1105
+ const parentName = instance.parent && instance.parent.type.name;
1106
+ const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;
1107
+ if (parentName && (parentName === "KeepAlive" || parentName.includes("Transition")) && typeof parentSubTreeType === "object" && parentSubTreeType.name === "RouterView") {
1108
+ const comp = parentName === "KeepAlive" ? "keep-alive" : "transition";
1109
+ warn$1(`<router-view> can no longer be used directly inside <${comp}>.\nUse slot props instead:\n\n<router-view v-slot="{ Component }">\n <${comp}>\n <component :is="Component" />\n </${comp}>\n</router-view>`);
1110
+ }
1111
+ }
1112
+ //#endregion
1113
+ //#region src/router.ts
1114
+ /**
1115
+ * Creates a Router instance that can be used by a Vue app.
1116
+ *
1117
+ * @param options - {@link RouterOptions}
1118
+ */
1119
+ function createRouter(options) {
1120
+ const matcher = createRouterMatcher(options.routes, options);
1121
+ const parseQuery$1 = options.parseQuery || parseQuery;
1122
+ const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;
1123
+ const routerHistory = options.history;
1124
+ if (process.env.NODE_ENV !== "production" && !routerHistory) throw new Error("Provide the \"history\" option when calling \"createRouter()\": https://router.vuejs.org/api/interfaces/RouterOptions.html#history");
1125
+ const beforeGuards = useCallbacks();
1126
+ const beforeResolveGuards = useCallbacks();
1127
+ const afterGuards = useCallbacks();
1128
+ const currentRoute = shallowRef(START_LOCATION_NORMALIZED);
1129
+ let pendingLocation = START_LOCATION_NORMALIZED;
1130
+ if (isBrowser && options.scrollBehavior && "scrollRestoration" in history) history.scrollRestoration = "manual";
1131
+ const normalizeParams = applyToParams.bind(null, (paramValue) => "" + paramValue);
1132
+ const encodeParams = applyToParams.bind(null, encodeParam);
1133
+ const decodeParams = applyToParams.bind(null, decode);
1134
+ function addRoute(parentOrRoute, route) {
1135
+ let parent;
1136
+ let record;
1137
+ if (isRouteName(parentOrRoute)) {
1138
+ parent = matcher.getRecordMatcher(parentOrRoute);
1139
+ if (process.env.NODE_ENV !== "production" && !parent) warn$1(`Parent route "${String(parentOrRoute)}" not found when adding child route`, route);
1140
+ record = route;
1141
+ } else record = parentOrRoute;
1142
+ return matcher.addRoute(record, parent);
1143
+ }
1144
+ function removeRoute(name) {
1145
+ const recordMatcher = matcher.getRecordMatcher(name);
1146
+ if (recordMatcher) matcher.removeRoute(recordMatcher);
1147
+ else if (process.env.NODE_ENV !== "production") warn$1(`Cannot remove non-existent route "${String(name)}"`);
1148
+ }
1149
+ function getRoutes() {
1150
+ return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);
1151
+ }
1152
+ function hasRoute(name) {
1153
+ return !!matcher.getRecordMatcher(name);
1154
+ }
1155
+ function resolve(rawLocation, currentLocation) {
1156
+ currentLocation = assign({}, currentLocation || currentRoute.value);
1157
+ if (typeof rawLocation === "string") {
1158
+ const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);
1159
+ const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);
1160
+ const href = routerHistory.createHref(locationNormalized.fullPath);
1161
+ if (process.env.NODE_ENV !== "production") {
1162
+ if (href.startsWith("//")) warn$1(`Location "${rawLocation}" resolved to "${href}". A resolved location cannot start with multiple slashes.`);
1163
+ else if (!matchedRoute.matched.length) warn$1(`No match found for location with path "${rawLocation}"`);
1164
+ }
1165
+ return assign(locationNormalized, matchedRoute, {
1166
+ params: decodeParams(matchedRoute.params),
1167
+ redirectedFrom: void 0,
1168
+ href
1169
+ });
1170
+ }
1171
+ if (process.env.NODE_ENV !== "production" && !isRouteLocation(rawLocation)) {
1172
+ warn$1(`router.resolve() was passed an invalid location. This will fail in production.\n- Location:`, rawLocation);
1173
+ return resolve({});
1174
+ }
1175
+ let matcherLocation;
1176
+ if (rawLocation.path != null) {
1177
+ if (process.env.NODE_ENV !== "production" && "params" in rawLocation && !("name" in rawLocation) && Object.keys(rawLocation.params).length) warn$1(`Path "${rawLocation.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`);
1178
+ matcherLocation = assign({}, rawLocation, { path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path });
1179
+ } else {
1180
+ const targetParams = assign({}, rawLocation.params);
1181
+ for (const key in targetParams) if (targetParams[key] == null) delete targetParams[key];
1182
+ matcherLocation = assign({}, rawLocation, { params: encodeParams(targetParams) });
1183
+ currentLocation.params = encodeParams(currentLocation.params);
1184
+ }
1185
+ const matchedRoute = matcher.resolve(matcherLocation, currentLocation);
1186
+ const hash = rawLocation.hash || "";
1187
+ if (process.env.NODE_ENV !== "production" && hash && !hash.startsWith("#")) warn$1(`A \`hash\` should always start with the character "#". Replace "${hash}" with "#${hash}".`);
1188
+ matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));
1189
+ const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {
1190
+ hash: encodeHash(hash),
1191
+ path: matchedRoute.path
1192
+ }));
1193
+ const href = routerHistory.createHref(fullPath);
1194
+ if (process.env.NODE_ENV !== "production") {
1195
+ if (href.startsWith("//")) warn$1(`Location "${rawLocation}" resolved to "${href}". A resolved location cannot start with multiple slashes.`);
1196
+ else if (!matchedRoute.matched.length) warn$1(`No match found for location with path "${rawLocation.path != null ? rawLocation.path : rawLocation}"`);
1197
+ }
1198
+ return assign({
1199
+ fullPath,
1200
+ hash,
1201
+ query: stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}
1202
+ }, matchedRoute, {
1203
+ redirectedFrom: void 0,
1204
+ href
1205
+ });
1206
+ }
1207
+ function locationAsObject(to) {
1208
+ return typeof to === "string" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);
1209
+ }
1210
+ function checkCanceledNavigation(to, from) {
1211
+ if (pendingLocation !== to) return createRouterError(8, {
1212
+ from,
1213
+ to
1214
+ });
1215
+ }
1216
+ function push(to) {
1217
+ return pushWithRedirect(to);
1218
+ }
1219
+ function replace(to) {
1220
+ return push(assign(locationAsObject(to), { replace: true }));
1221
+ }
1222
+ function handleRedirectRecord(to, from) {
1223
+ const lastMatched = to.matched[to.matched.length - 1];
1224
+ if (lastMatched && lastMatched.redirect) {
1225
+ const { redirect } = lastMatched;
1226
+ let newTargetLocation = typeof redirect === "function" ? redirect(to, from) : redirect;
1227
+ if (typeof newTargetLocation === "string") {
1228
+ newTargetLocation = newTargetLocation.includes("?") || newTargetLocation.includes("#") ? newTargetLocation = locationAsObject(newTargetLocation) : { path: newTargetLocation };
1229
+ newTargetLocation.params = {};
1230
+ }
1231
+ if (process.env.NODE_ENV !== "production" && newTargetLocation.path == null && !("name" in newTargetLocation)) {
1232
+ warn$1(`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.`);
1233
+ throw new Error("Invalid redirect");
1234
+ }
1235
+ return assign({
1236
+ query: to.query,
1237
+ hash: to.hash,
1238
+ params: newTargetLocation.path != null ? {} : to.params
1239
+ }, newTargetLocation);
1240
+ }
1241
+ }
1242
+ function pushWithRedirect(to, redirectedFrom) {
1243
+ const targetLocation = pendingLocation = resolve(to);
1244
+ const from = currentRoute.value;
1245
+ const data = to.state;
1246
+ const force = to.force;
1247
+ const replace = to.replace === true;
1248
+ const shouldRedirect = handleRedirectRecord(targetLocation, from);
1249
+ if (shouldRedirect) return pushWithRedirect(assign(locationAsObject(shouldRedirect), {
1250
+ state: typeof shouldRedirect === "object" ? assign({}, data, shouldRedirect.state) : data,
1251
+ force,
1252
+ replace
1253
+ }), redirectedFrom || targetLocation);
1254
+ const toLocation = targetLocation;
1255
+ toLocation.redirectedFrom = redirectedFrom;
1256
+ let failure;
1257
+ if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {
1258
+ failure = createRouterError(16, {
1259
+ to: toLocation,
1260
+ from
1261
+ });
1262
+ handleScroll(from, from, true, false);
1263
+ }
1264
+ return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? isNavigationFailure(error, 2) ? error : markAsReady(error) : triggerError(error, toLocation, from)).then((failure) => {
1265
+ if (failure) {
1266
+ if (isNavigationFailure(failure, 2)) {
1267
+ if (process.env.NODE_ENV !== "production" && isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) && redirectedFrom && (redirectedFrom._count = redirectedFrom._count ? redirectedFrom._count + 1 : 1) > 30) {
1268
+ warn$1(`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.`);
1269
+ return Promise.reject(/* @__PURE__ */ new Error("Infinite redirect in navigation guard"));
1270
+ }
1271
+ return pushWithRedirect(assign({ replace }, locationAsObject(failure.to), {
1272
+ state: typeof failure.to === "object" ? assign({}, data, failure.to.state) : data,
1273
+ force
1274
+ }), redirectedFrom || toLocation);
1275
+ }
1276
+ } else failure = finalizeNavigation(toLocation, from, true, replace, data);
1277
+ triggerAfterEach(toLocation, from, failure);
1278
+ return failure;
1279
+ });
1280
+ }
1281
+ /**
1282
+ * Helper to reject and skip all navigation guards if a new navigation happened
1283
+ * @param to
1284
+ * @param from
1285
+ */
1286
+ function checkCanceledNavigationAndReject(to, from) {
1287
+ const error = checkCanceledNavigation(to, from);
1288
+ return error ? Promise.reject(error) : Promise.resolve();
1289
+ }
1290
+ function runWithContext(fn) {
1291
+ const app = installedApps.values().next().value;
1292
+ return app && typeof app.runWithContext === "function" ? app.runWithContext(fn) : fn();
1293
+ }
1294
+ function navigate(to, from) {
1295
+ let guards;
1296
+ const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);
1297
+ guards = extractComponentsGuards(leavingRecords.reverse(), "beforeRouteLeave", to, from);
1298
+ for (const record of leavingRecords) record.leaveGuards.forEach((guard) => {
1299
+ guards.push(guardToPromiseFn(guard, to, from));
1300
+ });
1301
+ const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);
1302
+ guards.push(canceledNavigationCheck);
1303
+ return runGuardQueue(guards).then(() => {
1304
+ guards = [];
1305
+ for (const guard of beforeGuards.list()) guards.push(guardToPromiseFn(guard, to, from));
1306
+ guards.push(canceledNavigationCheck);
1307
+ return runGuardQueue(guards);
1308
+ }).then(() => {
1309
+ guards = extractComponentsGuards(updatingRecords, "beforeRouteUpdate", to, from);
1310
+ for (const record of updatingRecords) record.updateGuards.forEach((guard) => {
1311
+ guards.push(guardToPromiseFn(guard, to, from));
1312
+ });
1313
+ guards.push(canceledNavigationCheck);
1314
+ return runGuardQueue(guards);
1315
+ }).then(() => {
1316
+ guards = [];
1317
+ for (const record of enteringRecords) if (record.beforeEnter) if (isArray(record.beforeEnter)) for (const beforeEnter of record.beforeEnter) guards.push(guardToPromiseFn(beforeEnter, to, from));
1318
+ else guards.push(guardToPromiseFn(record.beforeEnter, to, from));
1319
+ guards.push(canceledNavigationCheck);
1320
+ return runGuardQueue(guards);
1321
+ }).then(() => {
1322
+ to.matched.forEach((record) => record.enterCallbacks = {});
1323
+ guards = extractComponentsGuards(enteringRecords, "beforeRouteEnter", to, from, runWithContext);
1324
+ guards.push(canceledNavigationCheck);
1325
+ return runGuardQueue(guards);
1326
+ }).then(() => {
1327
+ guards = [];
1328
+ for (const guard of beforeResolveGuards.list()) guards.push(guardToPromiseFn(guard, to, from));
1329
+ guards.push(canceledNavigationCheck);
1330
+ return runGuardQueue(guards);
1331
+ }).catch((err) => isNavigationFailure(err, 8) ? err : Promise.reject(err));
1332
+ }
1333
+ function triggerAfterEach(to, from, failure) {
1334
+ afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));
1335
+ }
1336
+ /**
1337
+ * - Cleans up any navigation guards
1338
+ * - Changes the url if necessary
1339
+ * - Calls the scrollBehavior
1340
+ */
1341
+ function finalizeNavigation(toLocation, from, isPush, replace, data) {
1342
+ const error = checkCanceledNavigation(toLocation, from);
1343
+ if (error) return error;
1344
+ const isFirstNavigation = from === START_LOCATION_NORMALIZED;
1345
+ const state = !isBrowser ? {} : history.state;
1346
+ if (isPush) if (replace || isFirstNavigation) routerHistory.replace(toLocation.fullPath, assign({ scroll: isFirstNavigation && state && state.scroll }, data));
1347
+ else routerHistory.push(toLocation.fullPath, data);
1348
+ currentRoute.value = toLocation;
1349
+ handleScroll(toLocation, from, isPush, isFirstNavigation);
1350
+ markAsReady();
1351
+ }
1352
+ let removeHistoryListener;
1353
+ function setupListeners() {
1354
+ if (removeHistoryListener) return;
1355
+ removeHistoryListener = routerHistory.listen((to, _from, info) => {
1356
+ if (!router.listening) return;
1357
+ const toLocation = resolve(to);
1358
+ const shouldRedirect = handleRedirectRecord(toLocation, router.currentRoute.value);
1359
+ if (shouldRedirect) {
1360
+ pushWithRedirect(assign(shouldRedirect, {
1361
+ replace: true,
1362
+ force: true
1363
+ }), toLocation).catch(noop);
1364
+ return;
1365
+ }
1366
+ pendingLocation = toLocation;
1367
+ const from = currentRoute.value;
1368
+ if (isBrowser) saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());
1369
+ navigate(toLocation, from).catch((error) => {
1370
+ if (isNavigationFailure(error, 12)) return error;
1371
+ if (isNavigationFailure(error, 2)) {
1372
+ pushWithRedirect(assign(locationAsObject(error.to), { force: true }), toLocation).then((failure) => {
1373
+ if (isNavigationFailure(failure, 20) && !info.delta && info.type === "pop") routerHistory.go(-1, false);
1374
+ }).catch(noop);
1375
+ return Promise.reject();
1376
+ }
1377
+ if (info.delta) routerHistory.go(-info.delta, false);
1378
+ return triggerError(error, toLocation, from);
1379
+ }).then((failure) => {
1380
+ failure = failure || finalizeNavigation(toLocation, from, false);
1381
+ if (failure) {
1382
+ if (info.delta && !isNavigationFailure(failure, 8)) routerHistory.go(-info.delta, false);
1383
+ else if (info.type === "pop" && isNavigationFailure(failure, 20)) routerHistory.go(-1, false);
1384
+ }
1385
+ triggerAfterEach(toLocation, from, failure);
1386
+ }).catch(noop);
1387
+ });
1388
+ }
1389
+ let readyHandlers = useCallbacks();
1390
+ let errorListeners = useCallbacks();
1391
+ let ready;
1392
+ /**
1393
+ * Trigger errorListeners added via onError and throws the error as well
1394
+ *
1395
+ * @param error - error to throw
1396
+ * @param to - location we were navigating to when the error happened
1397
+ * @param from - location we were navigating from when the error happened
1398
+ * @returns the error as a rejected promise
1399
+ */
1400
+ function triggerError(error, to, from) {
1401
+ markAsReady(error);
1402
+ const list = errorListeners.list();
1403
+ if (list.length) list.forEach((handler) => handler(error, to, from));
1404
+ else {
1405
+ if (process.env.NODE_ENV !== "production") warn$1("uncaught error during route navigation:");
1406
+ console.error(error);
1407
+ }
1408
+ return Promise.reject(error);
1409
+ }
1410
+ function isReady() {
1411
+ if (ready && currentRoute.value !== START_LOCATION_NORMALIZED) return Promise.resolve();
1412
+ return new Promise((resolve, reject) => {
1413
+ readyHandlers.add([resolve, reject]);
1414
+ });
1415
+ }
1416
+ function markAsReady(err) {
1417
+ if (!ready) {
1418
+ ready = !err;
1419
+ setupListeners();
1420
+ readyHandlers.list().forEach(([resolve, reject]) => err ? reject(err) : resolve());
1421
+ readyHandlers.reset();
1422
+ }
1423
+ return err;
1424
+ }
1425
+ function handleScroll(to, from, isPush, isFirstNavigation) {
1426
+ const { scrollBehavior } = options;
1427
+ if (!isBrowser || !scrollBehavior) return Promise.resolve();
1428
+ const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;
1429
+ return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));
1430
+ }
1431
+ const go = (delta) => routerHistory.go(delta);
1432
+ let started;
1433
+ const installedApps = /* @__PURE__ */ new Set();
1434
+ const router = {
1435
+ currentRoute,
1436
+ listening: true,
1437
+ addRoute,
1438
+ removeRoute,
1439
+ clearRoutes: matcher.clearRoutes,
1440
+ hasRoute,
1441
+ getRoutes,
1442
+ resolve,
1443
+ options,
1444
+ push,
1445
+ replace,
1446
+ go,
1447
+ back: () => go(-1),
1448
+ forward: () => go(1),
1449
+ beforeEach: beforeGuards.add,
1450
+ beforeResolve: beforeResolveGuards.add,
1451
+ afterEach: afterGuards.add,
1452
+ onError: errorListeners.add,
1453
+ isReady,
1454
+ install(app) {
1455
+ app.component("RouterLink", RouterLink);
1456
+ app.component("RouterView", RouterView);
1457
+ app.config.globalProperties.$router = router;
1458
+ Object.defineProperty(app.config.globalProperties, "$route", {
1459
+ enumerable: true,
1460
+ get: () => unref(currentRoute)
1461
+ });
1462
+ if (isBrowser && !started && currentRoute.value === START_LOCATION_NORMALIZED) {
1463
+ started = true;
1464
+ push(routerHistory.location).catch((err) => {
1465
+ if (process.env.NODE_ENV !== "production") warn$1("Unexpected error when starting the router:", err);
1466
+ });
1467
+ }
1468
+ const reactiveRoute = {};
1469
+ for (const key in START_LOCATION_NORMALIZED) Object.defineProperty(reactiveRoute, key, {
1470
+ get: () => currentRoute.value[key],
1471
+ enumerable: true
1472
+ });
1473
+ app.provide(routerKey, router);
1474
+ app.provide(routeLocationKey, shallowReactive(reactiveRoute));
1475
+ app.provide(routerViewLocationKey, currentRoute);
1476
+ const unmountApp = app.unmount;
1477
+ installedApps.add(app);
1478
+ app.unmount = function() {
1479
+ installedApps.delete(app);
1480
+ if (installedApps.size < 1) {
1481
+ pendingLocation = START_LOCATION_NORMALIZED;
1482
+ removeHistoryListener && removeHistoryListener();
1483
+ removeHistoryListener = null;
1484
+ currentRoute.value = START_LOCATION_NORMALIZED;
1485
+ started = false;
1486
+ ready = false;
1487
+ }
1488
+ unmountApp();
1489
+ };
1490
+ if ((process.env.NODE_ENV !== "production" || __VUE_PROD_DEVTOOLS__) && isBrowser && true) addDevtools(app, router, matcher);
1491
+ }
1492
+ };
1493
+ function runGuardQueue(guards) {
1494
+ return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());
1495
+ }
1496
+ return router;
1497
+ }
1498
+ //#endregion
1499
+ export { 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 };