{"version":3,"file":"vueRouter.mjs","names":["createRouter","originalCreateRouter"],"sources":["../../../src/domain/router/vueRouter.ts"],"sourcesContent":["import { createRouter as originalCreateRouter } from 'vue-router'\nimport type { RouterOptions, Router } from 'vue-router'\nimport { startVueRouterView } from './startVueRouterView'\n\nexport function createRouter(options: RouterOptions): Router {\n  const router = originalCreateRouter(options)\n\n  // afterEach fires for the initial navigation when the app is mounted via app.use(router).\n  // In tests without mounting, an explicit router.push() is needed to trigger the hook.\n  // Skip any failed navigation (blocked by a guard, cancelled, duplicated, etc.).\n  // Skip query-only changes (to.path stays the same): those don't constitute a new view,\n  // consistent with how the SDK's automatic view tracking ignores query string changes.\n  // from.matched.length === 0 identifies the initial START_LOCATION so the first\n  // navigation is always tracked, even when the app starts at '/'.\n  router.afterEach((to, from, failure) => {\n    if (failure) {\n      return\n    }\n    if (from.matched.length > 0 && to.path === from.path) {\n      return\n    }\n    startVueRouterView(to.matched, to.path)\n  })\n\n  return router\n}\n"],"mappings":";;;AAIA,SAAgBA,eAAa,SAAgC;CAC3D,MAAM,SAASC,aAAqB,OAAO;CAS3C,OAAO,WAAW,IAAI,MAAM,YAAY;EACtC,IAAI,SACF;EAEF,IAAI,KAAK,QAAQ,SAAS,KAAK,GAAG,SAAS,KAAK,MAC9C;EAEF,mBAAmB,GAAG,SAAS,GAAG,IAAI;CACxC,CAAC;CAED,OAAO;AACT"}