(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{7590:function(e,t,n){Promise.resolve().then(n.t.bind(n,2945,23)),Promise.resolve().then(n.t.bind(n,2778,23)),Promise.resolve().then(n.bind(n,71245)),Promise.resolve().then(n.bind(n,55534))},99376:function(e,t,n){"use strict";var r=n(35475);n.o(r,"usePathname")&&n.d(t,{usePathname:function(){return r.usePathname}}),n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}})},71245:function(e,t,n){"use strict";n.d(t,{AuthProvider:function(){return i}});var r=n(57437),u=n(2265);let s=(0,u.createContext)({user:null,setUser:()=>{}}),i=e=>{let{children:t}=e,[n,i]=(0,u.useState)(null);return(0,u.useEffect)(()=>{(async()=>{try{let e=await fetch("https://milimanibackend.sigraelfasolutions.com/api/auth/me",{credentials:"include"});if(e.ok){let t=await e.json();i(t.user)}}catch(e){console.error("Error fetching user:",e)}})()},[]),(0,r.jsx)(s.Provider,{value:{user:n,setUser:i},children:t})}},55534:function(e,t,n){"use strict";n.d(t,{UserProvider:function(){return a},x:function(){return o}});var r=n(57437),u=n(2265),s=n(99376);let i=(0,u.createContext)({user:null,loading:!0}),a=e=>{let{children:t}=e,[n,a]=(0,u.useState)(null),[o,l]=(0,u.useState)(!0);return(0,s.useRouter)(),(0,u.useEffect)(()=>{(async()=>{try{let e=await fetch("https://milimanibackend.sigraelfasolutions.com/api/auth/me",{credentials:"include"});if(!e.ok){a(null),l(!1);return}let t=await e.json();a(t)}catch(e){console.error("Failed to fetch user:",e),a(null)}finally{l(!1)}})()},[]),(0,r.jsx)(i.Provider,{value:{user:n,loading:o},children:t})},o=()=>{let{user:e,loading:t}=(0,u.useContext)(i);return e}},2778:function(){},2945:function(e){e.exports={style:{fontFamily:"'__Poppins_6bee3b', '__Poppins_Fallback_6bee3b'",fontStyle:"normal"},className:"__className_6bee3b",variable:"__variable_6bee3b"}}},function(e){e.O(0,[323,971,117,744],function(){return e(e.s=7590)}),_N_E=e.O()}]);