{"version":3,"file":"redirect.js","names":[],"sources":["esm/utils/redirect.js"],"sourcesContent":["import { getURL } from \"../getURL\";\nimport { router } from \"../router/imperative-api\";\nconst redirect = (path, status) => {\n  if (process.env.VITE_ENVIRONMENT !== \"ssr\") {\n    router.navigate(path);\n    return;\n  }\n  const finalPath = path[0] === \"/\" ? `${getURL()}${path}` : path;\n  return Response.redirect(finalPath, status);\n};\nexport {\n  redirect\n};\n//# sourceMappingURL=redirect.js.map\n"],"mappings":";;;;AAEA,MAAM,YAAY,MAAM,WAAW;CACjC,IAAI,QAAQ,IAAI,qBAAqB,OAAO;EAC1C,OAAO,SAAS,IAAI;EACpB;CACF;CACA,MAAM,YAAY,KAAK,OAAO,MAAM,GAAG,OAAO,IAAI,SAAS;CAC3D,OAAO,SAAS,SAAS,WAAW,MAAM;AAC5C"}