"use strict";(()=>{var e={};e.id=7939,e.ids=[7939],e.modules={72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},6005:e=>{e.exports=require("node:crypto")},98269:(e,t,n)=>{n.r(t),n.d(t,{originalPathname:()=>f,patchFetch:()=>h,requestAsyncStorage:()=>m,routeModule:()=>y,serverHooks:()=>x,staticGenerationAsyncStorage:()=>g});var o={};n.r(o),n.d(o,{GET:()=>p,POST:()=>l});var r=n(49303),s=n(88716),a=n(60670),i=n(87070),c=n(19191),d=n(70446),u=n(90455);async function p(e){let t=await (0,d.yK)(),n=(0,u.LP)(t),o=e.nextUrl.searchParams.get("orderId"),r=o?`/orders/${o}`:"/orders",s=await (0,c.q)(r,{apiBase:"sysadmin",token:n,cache:"no-store"});return i.NextResponse.json(s.data)}async function l(e){let t=await (0,d.yK)(),n=(0,u.LP)(t),o=await e.json(),r=await (0,c.q)("/orders/filter",{apiBase:"sysadmin",method:"POST",token:n,body:o,cache:"no-store"});return i.NextResponse.json(r.data)}let y=new r.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/sysadmin/ordering/route",pathname:"/api/sysadmin/ordering",filename:"route",bundlePath:"app/api/sysadmin/ordering/route"},resolvedPagePath:"/Users/ferlando/Desktop/baboon-nextjs/app/api/sysadmin/ordering/route.ts",nextConfigOutput:"standalone",userland:o}),{requestAsyncStorage:m,staticGenerationAsyncStorage:g,serverHooks:x}=y,f="/api/sysadmin/ordering/route";function h(){return(0,a.patchFetch)({serverHooks:x,staticGenerationAsyncStorage:g})}},19191:(e,t,n)=>{n.d(t,{F:()=>a,q:()=>s});var o=n(47090),r=n(70446);async function s(e,t={}){let{apiBase:n="mobile",method:s="GET",body:a,token:i,langCode:c,notificationToken:d,headers:u={},revalidate:p,cache:l}=t,y=o.Y8[n],m=`${y}${e.startsWith("/")?e:"/"+e}`,g={"Content-Type":"application/json","User-Agent":"BaboonWeb",...u};i&&(g.Authorization=i),c&&(g.langCode=c);let x=d;if(!x)try{x=(await (0,r.Gg)()).fcmToken}catch{}x&&(g.notificationToken=x);let f={method:s,headers:g};a&&"GET"!==s&&(f.body=JSON.stringify(a)),void 0!==p&&(f.next={revalidate:p}),l&&(f.cache=l);let h=await fetch(m,f);if(!h.ok)throw Error(`API request failed: ${h.status} ${h.statusText}`);return h.json()}async function a(e,t={}){let{apiBase:n="mobile",method:s="GET",body:a,token:i,langCode:c,notificationToken:d,headers:u={}}=t,p=o.Y8[n],l=`${p}${e.startsWith("/")?e:"/"+e}`,y={"Content-Type":"application/json","User-Agent":"BaboonWeb",...u};i&&(y.Authorization=i),c&&(y.langCode=c);let m=d;if(!m)try{m=(await (0,r.Gg)()).fcmToken}catch{}m&&(y.notificationToken=m);let g={method:s,headers:y};return a&&"GET"!==s&&(g.body=JSON.stringify(a)),fetch(l,g)}},90455:(e,t,n)=>{function o(e){return e.token?e.token:e.user?.token?e.user.token:process.env.BABOON_APP_BUSINESS_TOKEN||""}function r(){return process.env.BABOON_APP_BUSINESS_TOKEN||""}n.d(t,{I2:()=>r,LP:()=>o})},47090:(e,t,n)=>{n.d(t,{RF:()=>o,Y8:()=>s,pH:()=>r});let o=["al","en","it"],r={AL:{latitude:41.327546,longitude:19.818698,cityId:1,countryId:1},XK:{latitude:42.662914,longitude:21.165503,cityId:2,countryId:2}},s={mobile:process.env.BABOON_API_MOBILE_URL,legacy:process.env.BABOON_API_URL,sysadmin:process.env.BABOON_API_SYSADMIN_URL,payment:process.env.BABOON_API_PAYMENT_URL}},70446:(e,t,n)=>{n.d(t,{Gg:()=>i,dx:()=>s,l7:()=>a,yK:()=>c});var o=n(78632),r=n(71615);let s={password:process.env.SESSION_SECRET,cookieName:"baboon-session",cookieOptions:{secure:!0,httpOnly:!0,sameSite:"lax",maxAge:604800}},a={...s,cookieName:"baboon-admin-session"};async function i(){let e=await (0,r.cookies)();return(0,o.iW)(e,s)}async function c(){let e=await (0,r.cookies)();return(0,o.iW)(e,a)}}};var t=require("../../../../webpack-runtime.js");t.C(e);var n=e=>t(t.s=e),o=t.X(0,[8948,3314,8632,5972],()=>n(98269));module.exports=o})();