const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Login-CWH3x7xe.js","assets/vendor-DeEI1rpK.js","assets/element-plus-pbz_d-qS.js","assets/request-BEmSsgoM.js","assets/Login-9F0WSW0H.css","assets/TabLayout-DqSV0rLh.js","assets/TabLayout-h1nUEoAe.css","assets/Home-DBpKmnUx.js","assets/Home-CzqWt0ff.css","assets/Vehicles-JVkPd0AQ.js","assets/Vehicles-COnsGIPa.css","assets/VehicleDetail-o5dn_MeU.js","assets/VehicleDetail-Dy9bWpCb.css","assets/Orders-Bbqviy3-.js","assets/Orders-BnVqLHyb.css","assets/Profile-Dim3OacT.js","assets/Profile-B0c1N5EH.css"])))=>i.map(i=>d[i]);
import{H as g,I as y,ag as P,ax as O,ay as L,au as A}from"./vendor-DeEI1rpK.js";import{E as I,e as b}from"./element-plus-pbz_d-qS.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))a(e);new MutationObserver(e=>{for(const o of e)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function t(e){const o={};return e.integrity&&(o.integrity=e.integrity),e.referrerPolicy&&(o.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?o.credentials="include":e.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(e){if(e.ep)return;e.ep=!0;const o=t(e);fetch(e.href,o)}})();const R=(r,n)=>{const t=r.__vccOpts||r;for(const[a,e]of n)t[a]=e;return t},V={};function w(r,n){const t=P("router-view");return g(),y(t)}const D=R(V,[["render",w]]),S="modulepreload",T=function(r){return"/"+r},d={},u=function(n,t,a){let e=Promise.resolve();if(t&&t.length>0){let h=function(c){return Promise.all(c.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),i=s?.nonce||s?.getAttribute("nonce");e=h(t.map(c=>{if(c=T(c),c in d)return;d[c]=!0;const p=c.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${m}`))return;const l=document.createElement("link");if(l.rel=p?"stylesheet":S,p||(l.as="script"),l.crossOrigin="",l.href=c,i&&l.setAttribute("nonce",i),document.head.appendChild(l),p)return new Promise((E,v)=>{l.addEventListener("load",E),l.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(s){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s}return e.then(s=>{for(const i of s||[])i.status==="rejected"&&o(i.reason);return n().catch(o)})},N=[{path:"/login",name:"Login",component:()=>u(()=>import("./Login-CWH3x7xe.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/",component:()=>u(()=>import("./TabLayout-DqSV0rLh.js"),__vite__mapDeps([5,1,6])),children:[{path:"",name:"Home",component:()=>u(()=>import("./Home-DBpKmnUx.js"),__vite__mapDeps([7,1,2,3,8]))},{path:"vehicles",name:"Vehicles",component:()=>u(()=>import("./Vehicles-JVkPd0AQ.js"),__vite__mapDeps([9,1,2,3,10]))},{path:"vehicle/:id",name:"VehicleDetail",component:()=>u(()=>import("./VehicleDetail-o5dn_MeU.js"),__vite__mapDeps([11,1,2,3,12]))},{path:"orders",name:"Orders",component:()=>u(()=>import("./Orders-Bbqviy3-.js"),__vite__mapDeps([13,2,1,3,14]))},{path:"profile",name:"Profile",component:()=>u(()=>import("./Profile-Dim3OacT.js"),__vite__mapDeps([15,1,2,16]))}]}],_=O({history:L("/rider/"),routes:N});_.beforeEach((r,n,t)=>{const a=localStorage.getItem("token");r.path!=="/login"&&!a?t("/login"):r.path==="/login"&&a?t("/"):t()});const f=A(D);for(const[r,n]of Object.entries(I))f.component(r,n);f.use(b);f.use(_);f.mount("#app");export{R as _,_ as r};
