"use strict";(()=>{var e={};e.id=2514,e.ids=[2514],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")},6498:(e,t,n)=>{n.r(t),n.d(t,{originalPathname:()=>h,patchFetch:()=>m,requestAsyncStorage:()=>l,routeModule:()=>p,serverHooks:()=>g,staticGenerationAsyncStorage:()=>y});var s={};n.r(s),n.d(s,{POST:()=>d});var o=n(49303),a=n(88716),r=n(60670),i=n(87070),c=n(19191),u=n(90455);async function d(e){let{userId:t}=await e.json();if(!t)return i.NextResponse.json({error:"Missing userId"},{status:400});try{let e=await (0,c.q)("/customers/v1/resend-activation",{apiBase:"mobile",method:"POST",token:(0,u.I2)(),body:{userId:t},cache:"no-store"});if(e.statusMessage?.status===200)return i.NextResponse.json({success:!0});return i.NextResponse.json({error:e.statusMessage?.message||"Failed to resend code"},{status:e.statusMessage?.status||500})}catch{return i.NextResponse.json({error:"Failed to resend activation code"},{status:500})}}let p=new o.AppRouteRouteModule({definition:{kind:a.x.APP_ROUTE,page:"/api/auth/resend-activation/route",pathname:"/api/auth/resend-activation",filename:"route",bundlePath:"app/api/auth/resend-activation/route"},resolvedPagePath:"/Users/ferlando/Desktop/baboon-nextjs/app/api/auth/resend-activation/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:l,staticGenerationAsyncStorage:y,serverHooks:g}=p,h="/api/auth/resend-activation/route";function m(){return(0,r.patchFetch)({serverHooks:g,staticGenerationAsyncStorage:y})}},19191:(e,t,n)=>{n.d(t,{F:()=>r,q:()=>a});var s=n(47090),o=n(70446);async function a(e,t={}){let{apiBase:n="mobile",method:a="GET",body:r,token:i,langCode:c,notificationToken:u,headers:d={},revalidate:p,cache:l}=t,y=s.Y8[n],g=`${y}${e.startsWith("/")?e:"/"+e}`,h={"Content-Type":"application/json","User-Agent":"BaboonWeb",...d};i&&(h.Authorization=i),c&&(h.langCode=c);let m=u;if(!m)try{m=(await (0,o.Gg)()).fcmToken}catch{}m&&(h.notificationToken=m);let x={method:a,headers:h};r&&"GET"!==a&&(x.body=JSON.stringify(r)),void 0!==p&&(x.next={revalidate:p}),l&&(x.cache=l);let v=await fetch(g,x);if(!v.ok)throw Error(`API request failed: ${v.status} ${v.statusText}`);return v.json()}async function r(e,t={}){let{apiBase:n="mobile",method:a="GET",body:r,token:i,langCode:c,notificationToken:u,headers:d={}}=t,p=s.Y8[n],l=`${p}${e.startsWith("/")?e:"/"+e}`,y={"Content-Type":"application/json","User-Agent":"BaboonWeb",...d};i&&(y.Authorization=i),c&&(y.langCode=c);let g=u;if(!g)try{g=(await (0,o.Gg)()).fcmToken}catch{}g&&(y.notificationToken=g);let h={method:a,headers:y};return r&&"GET"!==a&&(h.body=JSON.stringify(r)),fetch(l,h)}},90455:(e,t,n)=>{function s(e){return e.token?e.token:e.user?.token?e.user.token:process.env.BABOON_APP_BUSINESS_TOKEN||""}function o(){return process.env.BABOON_APP_BUSINESS_TOKEN||""}n.d(t,{I2:()=>o,LP:()=>s})},47090:(e,t,n)=>{n.d(t,{RF:()=>s,Y8:()=>a,pH:()=>o});let s=["al","en","it"],o={AL:{latitude:41.327546,longitude:19.818698,cityId:1,countryId:1},XK:{latitude:42.662914,longitude:21.165503,cityId:2,countryId:2}},a={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:()=>a,l7:()=>r,yK:()=>c});var s=n(78632),o=n(71615);let a={password:process.env.SESSION_SECRET,cookieName:"baboon-session",cookieOptions:{secure:!0,httpOnly:!0,sameSite:"lax",maxAge:604800}},r={...a,cookieName:"baboon-admin-session"};async function i(){let e=await (0,o.cookies)();return(0,s.iW)(e,a)}async function c(){let e=await (0,o.cookies)();return(0,s.iW)(e,r)}}};var t=require("../../../../webpack-runtime.js");t.C(e);var n=e=>t(t.s=e),s=t.X(0,[8948,3314,8632,5972],()=>n(6498));module.exports=s})();