(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{13339:(e,t,n)=>{"use strict";n.d(t,{HeroProviders:()=>r});var s=n(73365),l=n(44814);function r(e){let{children:t}=e;return(0,s.jsx)(l.M,{children:t})}},54797:(e,t,n)=>{"use strict";n.d(t,{default:()=>d});var s=n(73365),l=n(50627),r=n(1521),i=n(83554),o=n(16033),a=n(23320);function c(){let[e,t]=(0,r.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.$,{onClick:()=>t(!0),className:"fixed bottom-20 right-6 rounded-full p-4 shadow-lg z-50",variant:"default",size:"lg",children:[(0,s.jsx)(o.A,{className:"h-6 w-6"}),(0,s.jsx)("span",{className:"sr-only",children:"Get Support"})]}),(0,s.jsx)(a.A,{isOpen:e,onClose:()=>t(!1)})]})}var u=n(42354);function d(){let e=(0,l.usePathname)();(0,u.n)(e=>e.user);let t=["/login","/register","/support"].includes(e);return(0,s.jsx)(s.Fragment,{children:!t&&(0,s.jsx)(c,{})})}},59112:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var s=n(73365),l=n(1521),r=n(50627),i=n(64956),o=n(42354),a=n(62850),c=n(83554);function u(){let{socket:e}=(0,i.F)(),t=(0,o.n)(e=>e.user),n=(0,r.useRouter)(),[u,d]=(0,l.useState)(null);return(0,l.useEffect)(()=>{if(!e||!(null==t?void 0:t.id))return;let n=e=>{let{roomId:t}=e;d({roomId:t})};return e.on("incoming-call",n),()=>{e.off("incoming-call",n)}},[e,null==t?void 0:t.id]),(0,s.jsx)(a.lG,{open:!!u,children:(0,s.jsxs)(a.Cf,{className:"bg-white text-center space-y-4 p-6 rounded-xl shadow-xl",children:[(0,s.jsx)(a.L3,{className:"text-lg font-semibold",children:"Incoming Video Call"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"You have a video call invitation."}),(0,s.jsxs)("div",{className:"flex justify-center gap-4 pt-2",children:[(0,s.jsx)(c.$,{onClick:()=>{u&&(n.push("/video-call?roomId=".concat(u.roomId,"&participantName=").concat(encodeURIComponent("".concat(null==t?void 0:t.firstName," ").concat(null==t?void 0:t.lastName)))),d(null))},className:"bg-blue-600 hover:bg-blue-700 text-white",children:"Join Call"}),(0,s.jsx)(c.$,{variant:"outline",onClick:()=>d(null),className:"border-gray-300",children:"Dismiss"})]})]})})}},60432:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,74270,23)),Promise.resolve().then(n.bind(n,82509)),Promise.resolve().then(n.bind(n,79298)),Promise.resolve().then(n.bind(n,54797)),Promise.resolve().then(n.bind(n,13339)),Promise.resolve().then(n.bind(n,83635)),Promise.resolve().then(n.bind(n,59112)),Promise.resolve().then(n.bind(n,64956)),Promise.resolve().then(n.bind(n,93689)),Promise.resolve().then(n.t.bind(n,57648,23))},74270:()=>{},79298:(e,t,n)=>{"use strict";n.d(t,{default:()=>l});var s=n(1521);function l(e){let{children:t}=e,[n,l]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{l(!0)},[]),n?t:null}},82509:(e,t,n)=>{"use strict";n.d(t,{default:()=>r});var s=n(1521),l=n(42354);function r(){let{login:e}=(0,l.n)();return(0,s.useEffect)(()=>{!async function(){try{let t=await fetch("/api/profiles/me",{credentials:"include"});if(t.ok){let n=await t.json();e(n.user,n.token)}}catch(e){console.error("Auth check failed:",e)}}()},[e]),null}},83635:(e,t,n)=>{"use strict";n.d(t,{QueryProvider:()=>o});var s=n(73365),l=n(14111),r=n(60676);let i=new(n(43565)).E({defaultOptions:{queries:{staleTime:3e5,retry:2,refetchOnWindowFocus:!1}}});function o(e){let{children:t}=e;return(0,s.jsxs)(l.Ht,{client:i,children:[t,(0,s.jsx)(r.E,{initialIsOpen:!1})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[1540,1303,9995,3736,5293,1165,9617,8303,6222,9217,8139,3320,2347,4870,7358],()=>t(60432)),_N_E=e.O()}]);