"use strict";(()=>{var e={};e.id=436,e.ids=[436],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")},82818:(e,t,a)=>{a.r(t),a.d(t,{originalPathname:()=>f,patchFetch:()=>h,requestAsyncStorage:()=>d,routeModule:()=>u,serverHooks:()=>g,staticGenerationAsyncStorage:()=>m});var n={};a.r(n),a.d(n,{GET:()=>p});var r=a(49303),o=a(88716),s=a(60670),i=a(87070),l=a(90455),c=a(17679);async function p(e){let t=e.nextUrl.searchParams.get("langCode")||"al",a=(0,l.I2)(),n=await (0,c.a)(t,a);return n?new i.NextResponse(n,{headers:{"Content-Type":"application/xml","Cache-Control":"public, max-age=86400"}}):i.NextResponse.json({error:"Sitemap not available"},{status:500})}let u=new r.AppRouteRouteModule({definition:{kind:o.x.APP_ROUTE,page:"/api/sitemap/route",pathname:"/api/sitemap",filename:"route",bundlePath:"app/api/sitemap/route"},resolvedPagePath:"/Users/ferlando/Desktop/baboon-nextjs/app/api/sitemap/route.ts",nextConfigOutput:"standalone",userland:n}),{requestAsyncStorage:d,staticGenerationAsyncStorage:m,serverHooks:g}=u,f="/api/sitemap/route";function h(){return(0,s.patchFetch)({serverHooks:g,staticGenerationAsyncStorage:m})}},19191:(e,t,a)=>{a.d(t,{F:()=>s,q:()=>o});var n=a(47090),r=a(70446);async function o(e,t={}){let{apiBase:a="mobile",method:o="GET",body:s,token:i,langCode:l,notificationToken:c,headers:p={},revalidate:u,cache:d}=t,m=n.Y8[a],g=`${m}${e.startsWith("/")?e:"/"+e}`,f={"Content-Type":"application/json","User-Agent":"BaboonWeb",...p};i&&(f.Authorization=i),l&&(f.langCode=l);let h=c;if(!h)try{h=(await (0,r.Gg)()).fcmToken}catch{}h&&(f.notificationToken=h);let y={method:o,headers:f};s&&"GET"!==o&&(y.body=JSON.stringify(s)),void 0!==u&&(y.next={revalidate:u}),d&&(y.cache=d);let x=await fetch(g,y);if(!x.ok)throw Error(`API request failed: ${x.status} ${x.statusText}`);return x.json()}async function s(e,t={}){let{apiBase:a="mobile",method:o="GET",body:s,token:i,langCode:l,notificationToken:c,headers:p={}}=t,u=n.Y8[a],d=`${u}${e.startsWith("/")?e:"/"+e}`,m={"Content-Type":"application/json","User-Agent":"BaboonWeb",...p};i&&(m.Authorization=i),l&&(m.langCode=l);let g=c;if(!g)try{g=(await (0,r.Gg)()).fcmToken}catch{}g&&(m.notificationToken=g);let f={method:o,headers:m};return s&&"GET"!==o&&(f.body=JSON.stringify(s)),fetch(d,f)}},90455:(e,t,a)=>{function n(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||""}a.d(t,{I2:()=>r,LP:()=>n})},47090:(e,t,a)=>{a.d(t,{RF:()=>n,Y8:()=>o,pH:()=>r});let n=["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}},o={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}},17679:(e,t,a)=>{a.d(t,{a:()=>i});var n=a(19191);let r=new Map;function o(e){let t='<?xml version="1.0" encoding="UTF-8"?>\n';for(let a of(t+='<urlset xmlns:xhtml="http://www.w3.org/1999/xhtml"\n        xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" >\n',e))t+=`    <url>
        <loc>${s(a.loc)}</loc>
`,a.lastmod&&(t+=`        <lastmod>${s(a.lastmod)}</lastmod>
`),a.changefreq&&(t+=`        <changefreq>${s(a.changefreq)}</changefreq>
`),a.priority&&(t+=`        <priority>${s(a.priority)}</priority>
`),t+="    </url>\n";return t+"</urlset>"}function s(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}async function i(e,t){let a="al"===e?"sq":e,s=`sitemap_data_${a}`,i=r.get(s);if(i&&Date.now()<i.expiresAt)return o(i.data);try{let i=await (0,n.F)(`/websystem/v1/sitemap?langCode=${a}`,{apiBase:"mobile",token:t});if(!i.ok)return null;let l=await i.text(),c=l;try{let e=JSON.parse(l);e.data&&"string"==typeof e.data&&(c=e.data)}catch{}let p=function(e){let t;let a=e.replace(/&(?!#?[a-z0-9]+;)/gi,"&amp;"),n=[],r=/<url>([\s\S]*?)<\/url>/g;for(;null!==(t=r.exec(a));){let e=t[1],a=e.match(/<loc>([\s\S]*?)<\/loc>/)?.[1]?.trim();if(!a)continue;let r={loc:a},o=e.match(/<lastmod>([\s\S]*?)<\/lastmod>/)?.[1]?.trim();o&&(r.lastmod=o);let s=e.match(/<changefreq>([\s\S]*?)<\/changefreq>/)?.[1]?.trim();s&&(r.changefreq=s);let i=e.match(/<priority>([\s\S]*?)<\/priority>/)?.[1]?.trim();i&&(r.priority=i),n.push(r)}return n}(c),u="sq"===a?"al":e;if("al"!==u)for(let e of p)e.loc&&(e.loc=e.loc+"?langCode="+u);return r.set(s,{data:p,expiresAt:Date.now()+864e5}),o(p)}catch{return null}}},70446:(e,t,a)=>{a.d(t,{Gg:()=>i,dx:()=>o,l7:()=>s,yK:()=>l});var n=a(78632),r=a(71615);let o={password:process.env.SESSION_SECRET,cookieName:"baboon-session",cookieOptions:{secure:!0,httpOnly:!0,sameSite:"lax",maxAge:604800}},s={...o,cookieName:"baboon-admin-session"};async function i(){let e=await (0,r.cookies)();return(0,n.iW)(e,o)}async function l(){let e=await (0,r.cookies)();return(0,n.iW)(e,s)}}};var t=require("../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),n=t.X(0,[8948,3314,8632,5972],()=>a(82818));module.exports=n})();