module.exports=[92665,a=>{"use strict";let b="https://apismm.gainrhino.com".replace(/\/+$/,"");a.s(["BACKEND_URL",0,b])},42036,a=>{"use strict";a.i(55781);var b=a.i(5246),c=a.i(92665);async function d(a,{skipAuth:e=!1,...f}={}){let g=a.startsWith("http")?a:`${c.BACKEND_URL}${a}`,h=new Headers(f.headers),i="undefined"!=typeof FormData&&f.body instanceof FormData;if(h.has("Content-Type")||!f.body||i||h.set("Content-Type","application/json"),!e){let a=await (0,b.cookies)(),c=a.get("auth-token")?.value;if(!c)throw Error("Authentication token not found for this request.");h.set("Authorization",`Bearer ${c}`)}let j=await fetch(g,{...f,headers:h,cache:"no-store"});if(204===j.status)return;let k=await j.text();if(!j.ok){if(401===j.status)return{message:k.replace(/<[^>]+>/g,"").trim()||"Your session expired. Please sign in again."};throw Error(`[apiFetch ${j.status} ${g}] `+(k||"API request failed"))}if(!k)return;let l=async()=>{try{return JSON.parse(k)}catch{let b=k.lastIndexOf("{");if(-1!==b){let a=k.slice(b);try{return JSON.parse(a)}catch{}}if(g.startsWith(c.BACKEND_URL)&&!a.startsWith("/api/")){let b=await fetch(a,{...f,headers:h,cache:"no-store"});if(!b.ok){let c=await b.text();throw Error(`[apiFetch proxy ${b.status} ${a}] `+(c||"Proxy request failed"))}try{return await b.json()}catch{}}return null}},m=await l();if(null===m)throw Error(`[apiFetch invalid JSON ${g}] `+(k.replace(/<[^>]+>/g,"").slice(0,200).trim()||"Invalid JSON response from API"));return m}a.s(["apiFetch",()=>d])},10924,a=>{"use strict";var b=a.i(11857);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/components/layout/sidebar.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/layout/sidebar.tsx <module evaluation>","default"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call navItems() from the server but navItems is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/layout/sidebar.tsx <module evaluation>","navItems");a.s(["default",0,c,"navItems",0,d])},82671,a=>{"use strict";var b=a.i(11857);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/components/layout/sidebar.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/layout/sidebar.tsx","default"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call navItems() from the server but navItems is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/layout/sidebar.tsx","navItems");a.s(["default",0,c,"navItems",0,d])},45534,a=>{"use strict";a.i(10924);var b=a.i(82671);a.n(b)},91506,a=>{"use strict";let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/components/layout/top-bar.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/layout/top-bar.tsx <module evaluation>","default");a.s(["default",0,b])},17038,a=>{"use strict";let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/components/layout/top-bar.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/layout/top-bar.tsx","default");a.s(["default",0,b])},30236,a=>{"use strict";a.i(91506);var b=a.i(17038);a.n(b)},460,a=>{"use strict";var b=a.i(7997),c=a.i(42036);async function d(){return(0,c.apiFetch)("/api/user")}var e=a.i(45534),f=a.i(30236);async function g({children:a}){let c=await d();return(0,b.jsxs)("div",{className:"flex min-h-screen bg-white text-slate-900 dark:bg-slate-950 dark:text-white",children:[(0,b.jsx)(e.default,{user:c}),(0,b.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,b.jsx)(f.default,{user:c}),(0,b.jsx)("main",{className:"flex-1 overflow-y-auto bg-white p-6 dark:bg-slate-950",children:a})]})]})}a.s(["default",()=>g],460)}];

//# sourceMappingURL=src_d162e25f._.js.map