![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/lavocat.ca/private_html/.next/server/pages/profile/ |
"use strict";(()=>{var e={};e.id=9802,e.ids=[636,9802],e.modules={694:(e,s,t)=>{t.d(s,{A:()=>l});var r=t(8732),a=t(49788),i=t.n(a);let l=({title:e,description:s,url:t,image:a,type:l="website",siteName:n="Libert\xe9 M\xeame en Prison",author:o,publishedTime:d,modifiedTime:c,section:m,tags:x=[],twitterCard:u="summary_large_image",twitterCreator:g,twitterSite:h="@LiberteMemeEnPrison"})=>{let p=t.startsWith("http")?t:`https://lavocat.ca${t}`,f=a?.startsWith("http")?a:`https://lavocat.ca${a}`;return(0,r.jsxs)(i(),{children:[(0,r.jsx)("title",{children:e}),(0,r.jsx)("meta",{name:"description",content:s}),(0,r.jsx)("meta",{name:"keywords",content:x.join(", ")}),(0,r.jsx)("meta",{property:"og:title",content:e}),(0,r.jsx)("meta",{property:"og:description",content:s}),(0,r.jsx)("meta",{property:"og:url",content:p}),(0,r.jsx)("meta",{property:"og:type",content:l}),(0,r.jsx)("meta",{property:"og:site_name",content:n}),(0,r.jsx)("meta",{property:"og:locale",content:"en_US"}),f&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:image",content:f}),(0,r.jsx)("meta",{property:"og:image:width",content:"1200"}),(0,r.jsx)("meta",{property:"og:image:height",content:"630"}),(0,r.jsx)("meta",{property:"og:image:alt",content:e})]}),"article"===l&&(0,r.jsxs)(r.Fragment,{children:[o&&(0,r.jsx)("meta",{property:"article:author",content:o}),d&&(0,r.jsx)("meta",{property:"article:published_time",content:d}),c&&(0,r.jsx)("meta",{property:"article:modified_time",content:c}),m&&(0,r.jsx)("meta",{property:"article:section",content:m}),x.map((e,s)=>(0,r.jsx)("meta",{property:"article:tag",content:e},s))]}),(0,r.jsx)("meta",{name:"twitter:card",content:u}),(0,r.jsx)("meta",{name:"twitter:title",content:e}),(0,r.jsx)("meta",{name:"twitter:description",content:s}),f&&(0,r.jsx)("meta",{name:"twitter:image",content:f}),g&&(0,r.jsx)("meta",{name:"twitter:creator",content:g}),h&&(0,r.jsx)("meta",{name:"twitter:site",content:h}),(0,r.jsx)("meta",{name:"robots",content:"index, follow"}),(0,r.jsx)("meta",{name:"author",content:o||n}),(0,r.jsx)("link",{rel:"canonical",href:p})]})}},4722:e=>{e.exports=require("next-auth/react")},7085:e=>{e.exports=require("styled-jsx/style")},8092:(e,s,t)=>{t.d(s,{A:()=>n});var r=t(8732);t(82015);var a=t(5057);let i=e=>{switch(e){case"achievement":return"\uD83C\uDFC6";case"case":return"⚖️";case"review":return"⭐";case"endorsement":return"\uD83D\uDC4D";case"milestone":return"\uD83C\uDFAF";case"badge":return"\uD83C\uDFC5";case"activity":return"\uD83D\uDCDD";default:return"\uD83D\uDCCB"}},l=e=>{switch(e){case"achievement":return"bg-yellow-100 text-yellow-800 border-yellow-200";case"case":return"bg-blue-100 text-blue-800 border-blue-200";case"review":return"bg-green-100 text-green-800 border-green-200";case"endorsement":return"bg-purple-100 text-purple-800 border-purple-200";case"milestone":return"bg-orange-100 text-orange-800 border-orange-200";case"badge":return"bg-indigo-100 text-indigo-800 border-indigo-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}};function n({activities:e,isLoading:s,error:t}){return s?(0,r.jsx)("div",{className:"space-y-4",children:[void 0,void 0,void 0,void 0,void 0].map((e,s)=>(0,r.jsx)("div",{className:"animate-pulse",children:(0,r.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,r.jsx)("div",{className:"w-8 h-8 bg-gray-200 rounded-full"}),(0,r.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,r.jsx)("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),(0,r.jsx)("div",{className:"h-3 bg-gray-200 rounded w-1/2"})]})]})},s))}):t?(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)("div",{className:"text-red-500 text-2xl mb-2",children:"⚠️"}),(0,r.jsx)("p",{className:"text-red-600 font-medium",children:"Error loading activity"}),(0,r.jsx)("p",{className:"text-red-500 text-sm mt-1",children:t})]}):0===e.length?(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)("div",{className:"text-gray-400 text-4xl mb-3",children:"\uD83D\uDCED"}),(0,r.jsx)("p",{className:"text-gray-500 font-medium",children:"No recent activity"}),(0,r.jsx)("p",{className:"text-gray-400 text-sm mt-1",children:"Activity will appear here as it happens"})]}):(0,r.jsx)("div",{className:"space-y-4",children:e.map(e=>(0,r.jsxs)("div",{className:"flex items-start space-x-3 p-3 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("div",{className:"w-8 h-8 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white text-sm",children:i(e.type)})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h4",{className:"text-sm font-medium text-gray-900 truncate",children:e.title}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[e.badge&&(0,r.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium border ${l(e.type)}`,children:e.badge}),(0,r.jsx)("span",{className:"text-xs text-gray-400",children:(0,a.m)(new Date(e.timestamp),{addSuffix:!0})})]})]}),(0,r.jsx)("p",{className:"text-sm text-gray-600 mt-1 line-clamp-2",children:e.description}),e.metadata&&(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1",children:[e.metadata.caseTitle&&(0,r.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded text-xs font-medium bg-blue-100 text-blue-800",children:["⚖️ ",e.metadata.caseTitle]}),e.metadata.senderName&&(0,r.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded text-xs font-medium bg-green-100 text-green-800",children:["\uD83D\uDC64 ",e.metadata.senderName]})]})]})]},e.id))})}},8732:e=>{e.exports=require("react/jsx-runtime")},9733:e=>{e.exports=import("@chakra-ui/react")},11460:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.d(s,{A:()=>y});var a=t(8732),i=t(82015),l=t(4722),n=t(63220),o=t(43604),d=t(63106),c=t(87637),m=t(39461),x=t(53609),u=t(23779),g=t(5453),h=t(82439),p=t(45057),f=t(42893),b=e([n,f]);[n,f]=b.then?(await b)():b;let y=({profileId:e,profileName:s,isOwnProfile:t,isOnline:r=!1,onStartMessage:b,onScheduleMeeting:y})=>{let{data:j}=(0,l.useSession)(),[v,w]=(0,i.useState)({followers:0,following:0,endorsements:0,views:0,isFollowing:!1,isEndorsed:!1,mutualConnections:0}),[N,k]=(0,i.useState)(!1),[C,D]=(0,i.useState)(!1);(0,i.useEffect)(()=>{!t&&j?.user?.id&&S()},[e,j?.user?.id,t]);let S=async()=>{try{let s=await fetch(`/api/profile/${e}/stats`);if(s.ok){let e=await s.json();w(e)}}catch(e){console.error("Error fetching profile stats:",e)}},E=async()=>{if(!j?.user?.id)return void f.default.error("Please log in to follow users");k(!0);try{(await fetch(`/api/profile/${e}/follow`,{method:v.isFollowing?"DELETE":"POST",headers:{"Content-Type":"application/json"}})).ok?(w(e=>({...e,isFollowing:!e.isFollowing,followers:e.isFollowing?e.followers-1:e.followers+1})),f.default.success(v.isFollowing?`Unfollowed ${s}`:`Following ${s}`)):f.default.error("Failed to update follow status")}catch(e){f.default.error("Error updating follow status")}finally{k(!1)}},A=async()=>{if(!j?.user?.id)return void f.default.error("Please log in to endorse users");k(!0);try{(await fetch(`/api/profile/${e}/endorse`,{method:v.isEndorsed?"DELETE":"POST",headers:{"Content-Type":"application/json"}})).ok?(w(e=>({...e,isEndorsed:!e.isEndorsed,endorsements:e.isEndorsed?e.endorsements-1:e.endorsements+1})),f.default.success(v.isEndorsed?`Removed endorsement for ${s}`:`Endorsed ${s}`)):f.default.error("Failed to update endorsement")}catch(e){f.default.error("Error updating endorsement")}finally{k(!1)}};return t?(0,a.jsxs)(n.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"bg-white rounded-xl shadow-lg p-6 border border-gray-100",children:[(0,a.jsxs)("h3",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center",children:[(0,a.jsx)(o.A,{className:"h-5 w-5 mr-2 text-blue-600"}),"Profile Analytics"]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"text-center p-3 bg-blue-50 rounded-lg",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-blue-600",children:v.views}),(0,a.jsx)("div",{className:"text-sm text-gray-600",children:"Profile Views"})]}),(0,a.jsxs)("div",{className:"text-center p-3 bg-green-50 rounded-lg",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-green-600",children:v.followers}),(0,a.jsx)("div",{className:"text-sm text-gray-600",children:"Followers"})]})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("button",{onClick:()=>D(!C),className:"w-full flex items-center justify-center gap-2 px-4 py-2 bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors",children:[(0,a.jsx)(d.A,{className:"h-4 w-4"}),"View Detailed Analytics"]})})]}):(0,a.jsxs)(n.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"bg-white rounded-xl shadow-lg p-6 border border-gray-100",children:[(0,a.jsxs)("h3",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center",children:[(0,a.jsx)(c.A,{className:"h-5 w-5 mr-2 text-purple-600"}),"Connect with ",s]}),(0,a.jsxs)("div",{className:"space-y-3 mb-6",children:[(0,a.jsxs)(n.motion.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:b,disabled:N,className:`w-full flex items-center justify-center gap-2 px-4 py-3 rounded-lg font-medium transition-all ${r?"bg-gradient-to-r from-blue-600 to-purple-600 text-white shadow-lg hover:shadow-xl":"bg-blue-100 text-blue-700 hover:bg-blue-200"}`,children:[(0,a.jsx)(m.A,{className:"h-4 w-4"}),r?"Message Now":"Send Message"]}),(0,a.jsx)(n.motion.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:E,disabled:N,className:`w-full flex items-center justify-center gap-2 px-4 py-3 rounded-lg font-medium transition-all ${v.isFollowing?"bg-gray-100 text-gray-700 hover:bg-gray-200":"bg-purple-100 text-purple-700 hover:bg-purple-200"}`,children:v.isFollowing?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.A,{className:"h-4 w-4"}),"Unfollow"]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.A,{className:"h-4 w-4"}),"Follow"]})}),(0,a.jsxs)(n.motion.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:y,disabled:N,className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-green-100 text-green-700 hover:bg-green-200 rounded-lg font-medium transition-all",children:[(0,a.jsx)(g.A,{className:"h-4 w-4"}),"Schedule Meeting"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3 mb-6",children:[(0,a.jsxs)(n.motion.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:A,disabled:N,className:`flex items-center justify-center gap-2 px-3 py-2 rounded-lg text-sm font-medium transition-all ${v.isEndorsed?"bg-yellow-100 text-yellow-700 hover:bg-yellow-200":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[(0,a.jsx)(h.A,{className:"h-4 w-4"}),v.isEndorsed?"Endorsed":"Endorse"]}),(0,a.jsxs)(n.motion.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>{navigator.share?navigator.share({title:`${s}'s Profile`,text:`Check out ${s}'s professional profile`,url:window.location.href}):(navigator.clipboard.writeText(window.location.href),f.default.success("Profile link copied to clipboard!"))},className:"flex items-center justify-center gap-2 px-3 py-2 bg-gray-100 text-gray-700 hover:bg-gray-200 rounded-lg text-sm font-medium transition-all",children:[(0,a.jsx)(p.A,{className:"h-4 w-4"}),"Share"]})]}),(0,a.jsx)("div",{className:"border-t border-gray-200 pt-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-4 text-center",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-lg font-bold text-gray-900",children:v.followers}),(0,a.jsx)("div",{className:"text-xs text-gray-600",children:"Followers"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-lg font-bold text-gray-900",children:v.endorsements}),(0,a.jsx)("div",{className:"text-xs text-gray-600",children:"Endorsements"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-lg font-bold text-gray-900",children:v.mutualConnections}),(0,a.jsx)("div",{className:"text-xs text-gray-600",children:"Mutual"})]})]})}),r&&(0,a.jsxs)("div",{className:"mt-4 flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),"Online now"]})]})};r()}catch(e){r(e)}})},13648:(e,s,t)=>{t.d(s,{H3:()=>c,Sw:()=>d,Tu:()=>l,gw:()=>i,hv:()=>n,qi:()=>o});var r=t(82015),a=t(4722);function i(){let{data:e}=(0,a.useSession)(),[s,t]=(0,r.useState)(!1);return{followUser:async s=>{if(!e?.user?.id)return{success:!1,message:"You must be logged in to follow users"};t(!0);try{let e=await fetch("/api/friends/request",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({friendId:s})}),t=await e.json();if(!e.ok)throw Error(t.message||"Failed to send friend request");return{success:!0,message:"Friend request sent successfully",data:t}}catch(e){return console.error("Error following user:",e),{success:!1,message:e instanceof Error?e.message:"Failed to follow user"}}finally{t(!1)}},isLoading:s}}function l(){let{data:e}=(0,a.useSession)(),[s,t]=(0,r.useState)(!1);return{sendFriendRequest:async s=>{if(!e?.user?.id)return{success:!1,message:"You must be logged in to send friend requests"};t(!0);try{let e=await fetch("/api/friends/request",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({friendId:s})}),t=await e.json();if(!e.ok)throw Error(t.message||"Failed to send friend request");return{success:!0,message:"Friend request sent successfully",data:t}}catch(e){return console.error("Error sending friend request:",e),{success:!1,message:e instanceof Error?e.message:"Failed to send friend request"}}finally{t(!1)}},acceptFriendRequest:async s=>{if(!e?.user?.id)return{success:!1,message:"You must be logged in to accept friend requests"};t(!0);try{let e=await fetch("/api/friends/accept",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({friendId:s})}),t=await e.json();if(!e.ok)throw Error(t.message||"Failed to accept friend request");return{success:!0,message:"Friend request accepted successfully",data:t}}catch(e){return console.error("Error accepting friend request:",e),{success:!1,message:e instanceof Error?e.message:"Failed to accept friend request"}}finally{t(!1)}},declineFriendRequest:async s=>{if(!e?.user?.id)return{success:!1,message:"You must be logged in to decline friend requests"};t(!0);try{let e=await fetch("/api/friends/decline",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({friendId:s})}),t=await e.json();if(!e.ok)throw Error(t.message||"Failed to decline friend request");return{success:!0,message:"Friend request declined successfully",data:t}}catch(e){return console.error("Error declining friend request:",e),{success:!1,message:e instanceof Error?e.message:"Failed to decline friend request"}}finally{t(!1)}},removeFriend:async s=>{if(!e?.user?.id)return{success:!1,message:"You must be logged in to remove friends"};t(!0);try{let e=await fetch("/api/friends/remove",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({friendId:s})}),t=await e.json();if(!e.ok)throw Error(t.message||"Failed to remove friend");return{success:!0,message:"Friend removed successfully",data:t}}catch(e){return console.error("Error removing friend:",e),{success:!1,message:e instanceof Error?e.message:"Failed to remove friend"}}finally{t(!1)}},isLoading:s}}function n(){let{data:e}=(0,a.useSession)(),[s,t]=(0,r.useState)(!1);return{endorseUser:async(s,r)=>{if(!e?.user?.id)return{success:!1,message:"You must be logged in to endorse users"};t(!0);try{let e=await fetch("/api/users/endorse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:s,endorsement:r})}),t=await e.json();if(!e.ok)throw Error(t.message||"Failed to endorse user");return{success:!0,message:"User endorsed successfully",data:t}}catch(e){return console.error("Error endorsing user:",e),{success:!1,message:e instanceof Error?e.message:"Failed to endorse user"}}finally{t(!1)}},isLoading:s}}function o(){let{data:e}=(0,a.useSession)(),[s,t]=(0,r.useState)(!1);return{sendMessage:async(s,r)=>{if(!e?.user?.id)return{success:!1,message:"You must be logged in to send messages"};t(!0);try{let e=await fetch("/api/messages/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({recipientId:s,message:r})}),t=await e.json();if(!e.ok)throw Error(t.message||"Failed to send message");return{success:!0,message:"Message sent successfully",data:t}}catch(e){return console.error("Error sending message:",e),{success:!1,message:e instanceof Error?e.message:"Failed to send message"}}finally{t(!1)}},isLoading:s}}function d(){let[e,s]=(0,r.useState)(!1);return{shareProfile:async(e,t)=>{s(!0);try{let s=`${window.location.origin}/profile/${e}`;switch(t){case"copy":return await navigator.clipboard.writeText(s),{success:!0,message:"Profile URL copied to clipboard"};case"twitter":return window.open(`https://twitter.com/intent/tweet?text=Check out this profile&url=${encodeURIComponent(s)}`),{success:!0,message:"Opened Twitter share dialog"};case"linkedin":return window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(s)}`),{success:!0,message:"Opened LinkedIn share dialog"};case"facebook":return window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(s)}`),{success:!0,message:"Opened Facebook share dialog"};default:return{success:!1,message:"Unsupported sharing platform"}}}catch(e){return console.error("Error sharing profile:",e),{success:!1,message:e instanceof Error?e.message:"Failed to share profile"}}finally{s(!1)}},isLoading:e}}function c(){let{data:e}=(0,a.useSession)(),[s,t]=(0,r.useState)(!1);return{reportUser:async(s,r,a)=>{if(!e?.user?.id)return{success:!1,message:"You must be logged in to report users"};t(!0);try{let e=await fetch("/api/users/report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:s,reason:r,details:a})}),t=await e.json();if(!e.ok)throw Error(t.message||"Failed to report user");return{success:!0,message:"User reported successfully",data:t}}catch(e){return console.error("Error reporting user:",e),{success:!1,message:e instanceof Error?e.message:"Failed to report user"}}finally{t(!1)}},isLoading:s}}},15806:e=>{e.exports=require("next-auth/next")},16382:e=>{e.exports=require("next-auth/providers/credentials")},22326:e=>{e.exports=require("react-dom")},27910:e=>{e.exports=require("stream")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},36653:e=>{e.exports=require("nprogress")},37036:(e,s,t)=>{t.d(s,{N:()=>n});var r=t(16382),a=t.n(r),i=t(74729),l=t(51898);let n={providers:[a()({name:"Credentials",credentials:{email:{label:"Email",type:"email"},password:{label:"Password",type:"password"}},async authorize(e){if(!e?.email||!e?.password)return null;try{let s=await l.z.user.findUnique({where:{email:e.email},select:{id:!0,email:!0,password:!0,role:!0,name:!0,isVerified:!0,verificationStatus:!0}});if(!s||!await (0,i.compare)(e.password,s.password))return null;let{password:t,...r}=s;return{...r,name:r.name||r.email}}catch(e){return console.error("Auth error:",e),null}}})],session:{strategy:"jwt",maxAge:2592e3},cookies:{sessionToken:{name:"__Secure-next-auth.session-token",options:{httpOnly:!0,sameSite:"lax",path:"/",secure:!0,domain:process.env.COOKIE_DOMAIN}}},pages:{signIn:"/auth/login",signOut:"/auth/login",error:"/auth/error"},callbacks:{async jwt({token:e,user:s,trigger:t}){try{if(console.log("JWT Callback - trigger:",t),console.log("JWT Callback - user:",s?{id:s.id,email:s.email,role:s.role}:null),s)e.id=s.id,e.role=s.role,e.email=s.email,e.name=s.name||s.email,e.profilePicture=s.profilePicture||void 0,e.username=s.username||void 0,e.isVerified=s.isVerified||!1,e.verificationStatus=s.verificationStatus||"PENDING",e.isImpersonating=s.isImpersonating||!1,e.originalUser=s.originalUser||void 0,console.log("JWT Callback - Updated token from user:",{id:e.id,role:e.role,isImpersonating:e.isImpersonating});else if(e.id)try{console.log("JWT Callback - Checking for impersonation sessions...");let s=await l.z.impersonationSession.findFirst({where:{originalUserId:e.id,isActive:!0,expiresAt:{gt:new Date}},include:{impersonatedUser:{select:{id:!0,email:!0,name:!0,role:!0,profilePicture:!0,username:!0}},originalUser:{select:{id:!0,email:!0,name:!0,role:!0,profilePicture:!0,username:!0}}}});if(s){let t=s.impersonatedUser;e.id=t.id,e.email=t.email,e.name=t.name||t.email,e.role=t.role,e.profilePicture=t.profilePicture||void 0,e.username=t.username||void 0,e.isImpersonating=!0,e.originalUser={id:s.originalUser.id,email:s.originalUser.email,name:s.originalUser.name||s.originalUser.email,role:s.originalUser.role,profilePicture:s.originalUser.profilePicture||void 0,username:s.originalUser.username||void 0},console.log("JWT Callback - Applied impersonation:",{originalId:e.originalUser.id,impersonatedId:e.id,originalRole:e.originalUser.role,impersonatedRole:e.role})}else e.isImpersonating&&(e.originalUser&&(console.log("JWT Callback - Restoring original user from token"),e.id=e.originalUser.id,e.email=e.originalUser.email,e.name=e.originalUser.name||e.originalUser.email,e.role=e.originalUser.role,e.profilePicture=e.originalUser.profilePicture||void 0,e.username=e.originalUser.username||void 0),e.isImpersonating=!1,e.originalUser=void 0,console.log("JWT Callback - Cleared impersonation state"))}catch(s){console.error("JWT Callback - Database error:",s),e.isImpersonating&&e.originalUser&&(console.log("JWT Callback - Error occurred, restoring original user"),e.id=e.originalUser.id,e.email=e.originalUser.email,e.name=e.originalUser.name||e.originalUser.email,e.role=e.originalUser.role,e.profilePicture=e.originalUser.profilePicture||void 0,e.username=e.originalUser.username||void 0,e.isImpersonating=!1,e.originalUser=void 0)}return console.log("JWT Callback - Final token:",{id:e.id,email:e.email,role:e.role,isImpersonating:e.isImpersonating}),e}catch(s){return console.error("JWT Callback - Error:",s),e}},async session({session:e,token:s}){try{return console.log("Session Callback - token:",{id:s.id,email:s.email,role:s.role,isImpersonating:s.isImpersonating}),console.log("Session Callback - session before:",e),s&&e.user&&(e.user.id=s.id,e.user.role=s.role,e.user.email=s.email,e.user.name=s.name,e.user.profilePicture=s.profilePicture,e.user.username=s.username,e.user.isVerified=s.isVerified,e.user.verificationStatus=s.verificationStatus,e.user.isImpersonating=s.isImpersonating,e.user.originalUser=s.originalUser),console.log("Session Callback - session after:",e),console.log("Session Callback - Final user ID:",e.user?.id),e}catch(s){return console.error("Session Callback - Error:",s),e}},redirect:async({url:e,baseUrl:s})=>e===s||e===`${s}/`||e.endsWith("/auth/login")?s:e.startsWith("/")?`${s}${e}`:e.startsWith(s)?e:s},secret:process.env.NEXTAUTH_SECRET||"3560f921b7bbf968e64fbc2835960840d184fcb95977e960a2124de6bbbed2d3",debug:!1}},37547:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.r(s),t.d(s,{default:()=>D,getServerSideProps:()=>S});var a=t(8732),i=t(82015),l=t.n(i),n=t(19918),o=t.n(n),d=t(15806),c=t(37036),m=t(51898),x=t(63220),u=t(3457),g=t(694),h=t(90226),p=t(11460),f=t(46844),b=t(44889),y=t(85038),j=t(43793),v=t(13648),w=t(8092),N=t(81673),k=t(40558),C=e([x,u,p,k]);[x,u,p,k]=C.then?(await C)():C;let D=({profile:e,currentUser:s,error:t})=>{if(t||!e)return(0,a.jsx)(u.default,{children:(0,a.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-gray-100 flex items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("h1",{className:"text-4xl font-bold text-gray-900 mb-4",children:"Profile Not Found"}),(0,a.jsx)("p",{className:"text-gray-600 mb-8",children:t||"The requested profile could not be found."}),(0,a.jsx)(o(),{href:"/",className:"text-blue-600 hover:text-blue-800 underline",children:"Return to Homepage"})]})})});let[r,n]=l().useState(null),{notifications:d}=(0,f.w)(e.id),{user:c,stats:m,activeCases:C,pastCases:D,caseApplications:S,friends:E,mutualFriends:A,isLoading:P,error:T}=(0,b.t)(e.id),{activities:U,achievements:F,badges:L,isLoading:M,error:I}=(0,y.c)(e.id),{testimonials:O,reviews:R,isLoading:q,error:$}=(0,j.k)(e.id),{followUser:H,isLoading:_}=(0,v.gw)(),{sendFriendRequest:W,isLoading:V}=(0,v.Tu)(),{endorseUser:z,isLoading:J}=(0,v.hv)(),{sendMessage:Y,isLoading:B}=(0,v.qi)(),{shareProfile:G,isLoading:Q}=(0,v.Sw)(),{reportUser:X,isLoading:Z}=(0,v.H3)(),[K,ee]=(0,i.useState)(!1),[es,et]=(0,i.useState)(!1),[er,ea]=(0,i.useState)(!1),[ei,el]=(0,i.useState)(!1),[en,eo]=(0,i.useState)(!1),ed=s&&s.id&&s.username&&(s.id===e.id||s.username===e.username),ec=async s=>{switch(s){case"follow":let t=await H(e.id);t.success&&console.log(t.message);break;case"friend":let r=await W(e.id);r.success&&console.log(r.message);break;case"endorse":let a=await z(e.id,"Great professional");a.success&&console.log(a.message);break;case"message":window.location.href=`/messages?recipient=${e.id}`;break;case"share":ee(!0);break;case"report":et(!0)}},em=e=>{switch(e){case"ADMIN":return"Legal Administrator";case"LAWYER":return"Lawyer";default:return"Client"}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{title:`${e.name} - ${e.title||em(e.role)} - Libert\xe9 M\xeame en Prison`,description:e.bio||`Professional profile of ${e.name}, ${e.title||em(e.role)}. ${e.specialization?`Specializing in ${e.specialization}.`:""} ${e.yearsOfExperience?`${e.yearsOfExperience} years of experience.`:""}`,url:`/profile/${e.username}`,type:"profile",author:e.name,image:e.profilePicture||void 0,tags:[e.role.toLowerCase(),"legal professional",e.specialization||"law",e.officeLocation||"legal services"],twitterCreator:e.linkedinUrl?`@${e.linkedinUrl.split("/").pop()}`:void 0}),"LAWYER"===e.role&&(0,a.jsx)(h.Ay,{type:"lawyer",data:(0,h.Ei)(e)}),(0,a.jsx)(h.Ay,{type:"breadcrumb",data:(0,h.L8)([{name:"Home",url:"/"},{name:"Profiles",url:"/profiles"},{name:e.name,url:`/profile/${e.username}`}])}),(0,a.jsxs)(u.default,{children:[(0,a.jsx)(k.A,{}),(0,a.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-purple-50 via-pink-50 to-blue-50 dark:from-gray-900 dark:via-purple-900 dark:to-blue-900 transition-colors duration-300",children:[(0,a.jsxs)(x.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8},className:"relative w-full max-w-4xl mx-auto mt-8 mb-12",children:[(0,a.jsx)("div",{className:"absolute inset-0 h-64 rounded-3xl bg-gradient-to-br from-purple-600 via-pink-500 to-blue-500 shadow-2xl z-0 dark:from-purple-700 dark:via-pink-600 dark:to-blue-600"}),(0,a.jsx)("div",{className:"absolute inset-0 rounded-3xl bg-gradient-to-t from-black/20 to-transparent z-0"}),(0,a.jsx)("div",{className:"absolute top-4 right-4 z-10",children:(0,a.jsx)(x.motion.div,{animate:{rotate:360},transition:{duration:20,repeat:1/0,ease:"linear"},className:"w-16 h-16 rounded-full bg-white/10 backdrop-blur-sm border border-white/20"})}),(0,a.jsx)("div",{className:"absolute bottom-4 left-4 z-10",children:(0,a.jsx)(x.motion.div,{animate:{scale:[1,1.2,1]},transition:{duration:3,repeat:1/0},className:"w-12 h-12 rounded-full bg-white/10 backdrop-blur-sm border border-white/20"})}),(0,a.jsxs)("div",{className:"relative z-10 pt-12 pb-8 px-8",children:[(0,a.jsxs)("div",{className:"flex flex-col lg:flex-row items-center lg:items-start gap-8",children:[(0,a.jsxs)(x.motion.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.3,duration:.6},className:"relative group",children:[(0,a.jsxs)("div",{className:"w-40 h-40 rounded-full border-4 border-white shadow-2xl overflow-hidden hover:scale-105 transition-transform duration-300 cursor-pointer relative",children:[(0,a.jsx)("img",{src:e.profilePicture||"/default-avatar.png",alt:e.name,className:"w-full h-full object-cover"}),(0,a.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity"})]}),(0,a.jsx)(x.motion.div,{animate:{scale:e.showOnlineStatus||ed?[1,1.2,1]:1},transition:{duration:2,repeat:e.showOnlineStatus||ed?1/0:0},className:`absolute bottom-4 right-4 w-6 h-6 rounded-full border-4 border-white ${e.showOnlineStatus||ed?"bg-green-400":"bg-gray-400"}`})]}),(0,a.jsxs)("div",{className:"flex-1 text-center lg:text-left",children:[(0,a.jsxs)(x.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4,duration:.6},className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center lg:justify-start gap-3 mb-2",children:[(0,a.jsx)("h1",{className:"text-4xl lg:text-5xl font-black text-white drop-shadow-lg",children:e.name}),e.isVerified&&(0,a.jsx)(x.motion.div,{initial:{scale:0,rotate:-180},animate:{scale:1,rotate:0},transition:{delay:.6,type:"spring",stiffness:200},className:"bg-blue-500 rounded-full p-2 shadow-lg",title:"Verified",children:(0,a.jsx)("span",{className:"text-white text-lg",children:"✓"})})]}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h2",{className:"text-xl lg:text-2xl font-bold text-white/90 mb-2",children:e.title||em(e.role)}),(0,a.jsx)("p",{className:"text-lg text-white/80 font-medium",children:"Representative and initiator of the Bordeaux Prison Case"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap justify-center lg:justify-start gap-4 mb-6",children:[(0,a.jsxs)(x.motion.div,{whileHover:{scale:1.05},className:"flex items-center gap-2 bg-white/20 backdrop-blur-sm px-4 py-2 rounded-full",children:[(0,a.jsx)("span",{className:"text-white text-lg",children:"\uD83D\uDCCD"}),(0,a.jsx)("span",{className:"text-white font-medium",children:"Montr\xe9al"})]}),e.workPhone&&(0,a.jsxs)(x.motion.div,{whileHover:{scale:1.05},className:"flex items-center gap-2 bg-white/20 backdrop-blur-sm px-4 py-2 rounded-full",children:[(0,a.jsx)("span",{className:"text-white text-lg",children:"\uD83D\uDCDE"}),(0,a.jsx)("span",{className:"text-white font-medium",children:e.workPhone})]}),(0,a.jsxs)(x.motion.div,{whileHover:{scale:1.05},className:"flex items-center gap-2 bg-white/20 backdrop-blur-sm px-4 py-2 rounded-full",children:[(0,a.jsx)("span",{className:"text-white text-lg",children:"\uD83D\uDCE7"}),(0,a.jsx)("span",{className:"text-white font-medium",children:e.email})]})]})]}),(0,a.jsxs)(x.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5,duration:.6},className:"grid grid-cols-3 gap-6 mb-6",children:[(0,a.jsxs)(x.motion.div,{whileHover:{scale:1.05,y:-5},className:"bg-white/20 backdrop-blur-sm rounded-xl p-4 text-center",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-white",children:m?.followers||0}),(0,a.jsx)("div",{className:"text-sm text-white/80 font-medium",children:"Followers"})]}),(0,a.jsxs)(x.motion.div,{whileHover:{scale:1.05,y:-5},className:"bg-white/20 backdrop-blur-sm rounded-xl p-4 text-center",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-white",children:m?.endorsements||0}),(0,a.jsx)("div",{className:"text-sm text-white/80 font-medium",children:"Endorsements"})]}),(0,a.jsxs)(x.motion.div,{whileHover:{scale:1.05,y:-5},className:"bg-white/20 backdrop-blur-sm rounded-xl p-4 text-center",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-white",children:m?.mutualFriends||0}),(0,a.jsx)("div",{className:"text-sm text-white/80 font-medium",children:"Mutual"})]})]})]})]}),!ed&&(0,a.jsxs)(x.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6,duration:.6},className:"flex flex-wrap justify-center gap-4 mt-8",children:[(0,a.jsxs)(x.motion.button,{whileHover:{scale:1.05,y:-3},whileTap:{scale:.95},onClick:()=>ec("follow"),disabled:_,className:"bg-gradient-to-r from-blue-500 to-blue-600 hover:from-blue-600 hover:to-blue-700 text-white px-6 py-3 rounded-xl shadow-lg transition-all text-base font-bold disabled:opacity-50 flex items-center gap-2",children:[(0,a.jsx)("span",{children:_?"✓":"+"}),_?"Following":"Follow"]}),(0,a.jsxs)(x.motion.button,{whileHover:{scale:1.05,y:-3},whileTap:{scale:.95},onClick:()=>ec("message"),disabled:B,className:"bg-gradient-to-r from-pink-500 to-pink-600 hover:from-pink-600 hover:to-pink-700 text-white px-6 py-3 rounded-xl shadow-lg transition-all text-base font-bold flex items-center gap-2",children:[(0,a.jsx)("span",{children:"\uD83D\uDCAC"}),"Message"]}),(0,a.jsxs)(x.motion.button,{whileHover:{scale:1.05,y:-3},whileTap:{scale:.95},onClick:()=>ec("endorse"),disabled:J,className:"bg-gradient-to-r from-yellow-400 to-yellow-500 hover:from-yellow-500 hover:to-yellow-600 text-white px-6 py-3 rounded-xl shadow-lg transition-all text-base font-bold flex items-center gap-2",children:[(0,a.jsx)("span",{children:"⭐"}),"Endorse"]}),(0,a.jsxs)(x.motion.button,{whileHover:{scale:1.05,y:-3},whileTap:{scale:.95},onClick:()=>ec("share"),disabled:Q,className:"bg-gradient-to-r from-gray-500 to-gray-600 hover:from-gray-600 hover:to-gray-700 text-white px-6 py-3 rounded-xl shadow-lg transition-all text-base font-bold flex items-center gap-2",children:[(0,a.jsx)("span",{children:"\uD83D\uDCE4"}),"Share"]})]})]})]}),(0,a.jsx)(x.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.9,duration:.6},className:"max-w-3xl mx-auto mb-8",children:(0,a.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-lg p-6 border border-gray-100 dark:border-gray-700",children:[(0,a.jsxs)("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-yellow-600",children:"\uD83C\uDFC5"})," Professional Credentials"]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[(0,a.jsx)(x.motion.div,{whileHover:{scale:1.05,y:-5},className:"bg-gradient-to-br from-blue-50 to-blue-100 dark:from-blue-900 dark:to-blue-800 rounded-xl p-4 border border-blue-200 dark:border-blue-700",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-12 h-12 bg-blue-500 rounded-full flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-white text-xl",children:"⚖️"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-bold text-blue-900 dark:text-blue-100",children:"Barreau du Qu\xe9bec"}),(0,a.jsx)("div",{className:"text-sm text-blue-700 dark:text-blue-300",children:"Licensed Attorney"})]})]})}),(0,a.jsx)(x.motion.div,{whileHover:{scale:1.05,y:-5},className:"bg-gradient-to-br from-purple-50 to-purple-100 dark:from-purple-900 dark:to-purple-800 rounded-xl p-4 border border-purple-200 dark:border-purple-700",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-12 h-12 bg-purple-500 rounded-full flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-white text-xl",children:"\uD83C\uDFDB️"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-bold text-purple-900 dark:text-purple-100",children:"Prison Law Expert"}),(0,a.jsx)("div",{className:"text-sm text-purple-700 dark:text-purple-300",children:"Specialized Cases"})]})]})}),(0,a.jsx)(x.motion.div,{whileHover:{scale:1.05,y:-5},className:"bg-gradient-to-br from-green-50 to-green-100 dark:from-green-900 dark:to-green-800 rounded-xl p-4 border border-green-200 dark:border-green-700",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-12 h-12 bg-green-500 rounded-full flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-white text-xl",children:"⭐"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-bold text-green-900 dark:text-green-100",children:"10+ Years"}),(0,a.jsx)("div",{className:"text-sm text-green-700 dark:text-green-300",children:"Legal Experience"})]})]})})]})]})}),(0,a.jsx)(x.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.8,duration:.6},className:"max-w-3xl mx-auto mb-8",children:(0,a.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-lg p-6 flex flex-col md:flex-row md:items-center md:justify-between gap-6 border border-gray-100 dark:border-gray-700",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-2 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-blue-600 dark:text-blue-400",children:"ℹ️"})," About"]}),(0,a.jsx)("p",{className:"text-gray-700 dark:text-gray-300 mb-2 leading-relaxed",children:e.bio||"No bio provided."}),(0,a.jsxs)(x.motion.div,{whileHover:{x:5},className:"flex items-center gap-2 text-gray-600 dark:text-gray-400 mb-1",children:[(0,a.jsx)("span",{children:"\uD83D\uDCCD"}),(0,a.jsx)("span",{children:e.officeLocation||"Location not set"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-2 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-green-600 dark:text-green-400",children:"\uD83D\uDCDE"})," Contact"]}),(0,a.jsxs)(x.motion.div,{whileHover:{x:5},className:"flex items-center gap-2 text-gray-600 dark:text-gray-400 mb-1",children:[(0,a.jsx)("span",{children:"\uD83D\uDCE7"}),(0,a.jsx)("a",{href:`mailto:${e.email}`,className:"hover:underline hover:text-blue-600 dark:hover:text-blue-400 transition-colors",children:e.email})]}),e.workPhone&&(0,a.jsxs)(x.motion.div,{whileHover:{x:5},className:"flex items-center gap-2 text-gray-600 dark:text-gray-400 mb-1",children:[(0,a.jsx)("span",{children:"\uD83D\uDCDE"}),(0,a.jsx)("span",{children:e.workPhone})]})]})]})}),(0,a.jsx)(x.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:1,duration:.6},className:"max-w-3xl mx-auto mb-8",children:(0,a.jsxs)("div",{className:"bg-gradient-to-r from-purple-100 via-pink-50 to-blue-100 dark:from-purple-900 dark:via-pink-900 dark:to-blue-900 rounded-2xl shadow-lg p-6",children:[(0,a.jsxs)("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-6 flex items-center gap-2",children:[(0,a.jsx)("span",{children:"\uD83D\uDCCA"})," Professional Statistics"]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[(0,a.jsxs)(x.motion.div,{whileHover:{scale:1.05},className:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-xl p-4 text-center",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-purple-700 dark:text-purple-300",children:e.totalCases||0}),(0,a.jsx)("div",{className:"text-sm text-gray-600 dark:text-gray-400 font-medium",children:"Total Cases"})]}),(0,a.jsxs)(x.motion.div,{whileHover:{scale:1.05},className:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-xl p-4 text-center",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-green-700 dark:text-green-300",children:e.wonCases||0}),(0,a.jsx)("div",{className:"text-sm text-gray-600 dark:text-gray-400 font-medium",children:"Won Cases"})]}),(0,a.jsxs)(x.motion.div,{whileHover:{scale:1.05},className:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-xl p-4 text-center",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-blue-700 dark:text-blue-300",children:e.averageRating||0}),(0,a.jsx)("div",{className:"text-sm text-gray-600 dark:text-gray-400 font-medium",children:"Rating"})]}),(0,a.jsxs)(x.motion.div,{whileHover:{scale:1.05},className:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-xl p-4 text-center",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-yellow-700 dark:text-yellow-300",children:e.level||1}),(0,a.jsx)("div",{className:"text-sm text-gray-600 dark:text-gray-400 font-medium",children:"Level"})]})]}),(0,a.jsxs)("div",{className:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-xl p-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("span",{className:"font-semibold text-gray-900 dark:text-white",children:"Experience Progress"}),(0,a.jsxs)("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[e.xpPoints||0," / ",1e3*(e.level||1)," XP"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-3",children:(0,a.jsx)(x.motion.div,{initial:{width:0},animate:{width:`${Math.min((e.xpPoints||0)%1e3/10,100)}%`},transition:{duration:1,delay:.5},className:"h-3 bg-gradient-to-r from-purple-400 to-blue-400 rounded-full"})})]}),(0,a.jsxs)("div",{className:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-xl p-4",children:[(0,a.jsxs)("h4",{className:"font-semibold text-gray-900 dark:text-white mb-3 flex items-center gap-2",children:[(0,a.jsx)("span",{children:"\uD83C\uDFC6"})," Recent Achievements"]}),(0,a.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:F&&F.length>0?F.slice(0,3).map((e,s)=>(0,a.jsxs)(x.motion.div,{whileHover:{scale:1.05},className:"bg-gradient-to-br from-yellow-50 to-orange-50 dark:from-yellow-900 dark:to-orange-900 rounded-lg p-3 text-center border border-yellow-200 dark:border-yellow-700",children:[(0,a.jsx)("div",{className:"text-2xl mb-1",children:e.icon||"⭐"}),(0,a.jsx)("div",{className:"font-semibold text-gray-800 dark:text-gray-200 text-sm",children:e.name})]},e.id||s)):(0,a.jsx)("div",{className:"col-span-full text-center text-gray-500 dark:text-gray-400 py-4",children:"No achievements yet. Start your journey!"})})]})]})}),(0,a.jsx)("div",{className:"max-w-3xl mx-auto mb-8",children:(0,a.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-lg p-6",children:[(0,a.jsxs)("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{children:"\uD83D\uDCE2"})," Live Activity"]}),(0,a.jsx)("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:U&&U.length>0?U.slice(0,7).map((e,s)=>(0,a.jsxs)("div",{className:"flex items-center gap-3 py-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-purple-300 to-blue-200 flex items-center justify-center text-xl",children:e.icon||"\uD83D\uDCDD"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("div",{className:"font-semibold text-gray-800 dark:text-gray-200",children:e.title}),(0,a.jsx)("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:e.timestamp?new Date(e.timestamp).toLocaleString():""})]})]},e.id||s)):(0,a.jsx)("div",{className:"text-center text-gray-400 dark:text-gray-500 py-6",children:"No recent activity"})})]})}),(0,a.jsx)(x.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:1.1,duration:.6},className:"max-w-3xl mx-auto mb-8",children:(0,a.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-lg p-6 border border-gray-100 dark:border-gray-700",children:[(0,a.jsxs)("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-6 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-purple-600",children:"⚡"})," Quick Actions"]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[(0,a.jsx)(x.motion.button,{whileHover:{scale:1.05,y:-5},whileTap:{scale:.95},onClick:()=>window.location.href=`/calendar?user=${e.username}`,className:"bg-gradient-to-br from-blue-500 to-blue-600 hover:from-blue-600 hover:to-blue-700 text-white p-4 rounded-xl shadow-lg transition-all",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-xl",children:"\uD83D\uDCC5"})}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-bold",children:"Schedule Consultation"}),(0,a.jsx)("div",{className:"text-sm opacity-90",children:"Book a meeting"})]})]})}),(0,a.jsx)(x.motion.button,{whileHover:{scale:1.05,y:-5},whileTap:{scale:.95},onClick:()=>window.location.href=`/hire?lawyer=${e.username}`,className:"bg-gradient-to-br from-green-500 to-green-600 hover:from-green-600 hover:to-green-700 text-white p-4 rounded-xl shadow-lg transition-all",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-xl",children:"\uD83D\uDCCB"})}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-bold",children:"Request Review"}),(0,a.jsx)("div",{className:"text-sm opacity-90",children:"Get case evaluation"})]})]})}),(0,a.jsx)(x.motion.button,{whileHover:{scale:1.05,y:-5},whileTap:{scale:.95},onClick:()=>ec("message"),className:"bg-gradient-to-br from-pink-500 to-pink-600 hover:from-pink-600 hover:to-pink-700 text-white p-4 rounded-xl shadow-lg transition-all",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-xl",children:"\uD83D\uDCAC"})}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-bold",children:"Send Message"}),(0,a.jsx)("div",{className:"text-sm opacity-90",children:"Direct contact"})]})]})}),(0,a.jsx)(x.motion.button,{whileHover:{scale:1.05,y:-5},whileTap:{scale:.95},onClick:()=>window.location.href=`/cases?lawyer=${e.username}`,className:"bg-gradient-to-br from-purple-500 to-purple-600 hover:from-purple-600 hover:to-purple-700 text-white p-4 rounded-xl shadow-lg transition-all",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-xl",children:"⚖️"})}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-bold",children:"View Cases"}),(0,a.jsx)("div",{className:"text-sm opacity-90",children:"See past work"})]})]})}),(0,a.jsx)(x.motion.button,{whileHover:{scale:1.05,y:-5},whileTap:{scale:.95},onClick:()=>window.open("/api/users/cv","_blank"),className:"bg-gradient-to-br from-yellow-500 to-yellow-600 hover:from-yellow-600 hover:to-yellow-700 text-white p-4 rounded-xl shadow-lg transition-all",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-xl",children:"\uD83D\uDCC4"})}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-bold",children:"Download CV"}),(0,a.jsx)("div",{className:"text-sm opacity-90",children:"Professional resume"})]})]})}),(0,a.jsx)(x.motion.button,{whileHover:{scale:1.05,y:-5},whileTap:{scale:.95},onClick:()=>ec("share"),className:"bg-gradient-to-br from-gray-500 to-gray-600 hover:from-gray-600 hover:to-gray-700 text-white p-4 rounded-xl shadow-lg transition-all",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-xl",children:"\uD83D\uDCE4"})}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-bold",children:"Share Profile"}),(0,a.jsx)("div",{className:"text-sm opacity-90",children:"Spread the word"})]})]})})]})]})}),(0,a.jsx)("div",{className:"max-w-3xl mx-auto mb-8",children:(0,a.jsx)(p.A,{profileId:e.id,profileName:e.name,isOwnProfile:!!ed,isOnline:!!e.showOnlineStatus||!!ed,onStartMessage:()=>ec("message"),onScheduleMeeting:()=>{window.location.href=`/calendar?user=${e.username}`}})}),!ed&&(0,a.jsx)("div",{className:"max-w-3xl mx-auto mb-8",children:(0,a.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-lg p-6",children:[(0,a.jsxs)("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{children:"⚡"})," Quick Actions for ",e.name]}),"LAWYER"===e.role&&(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)("button",{onClick:()=>window.location.href=`/hire?lawyer=${e.username}`,className:"flex items-center p-4 border border-gray-200 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDCBC"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:"Hire Lawyer"}),(0,a.jsx)("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Start legal consultation"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href=`/cases?lawyer=${e.username}`,className:"flex items-center p-4 border border-gray-200 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"⚖️"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:"View Cases"}),(0,a.jsx)("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"See their work"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href=`/calendar?user=${e.username}`,className:"flex items-center p-4 border border-gray-200 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDCC5"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:"Schedule Meeting"}),(0,a.jsx)("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Book consultation"})]})]})]}),"SUPERADMIN"===e.role&&(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)("button",{onClick:()=>window.location.href="/class-action",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83C\uDFDB️"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Class Action"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Join legal action"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href="/contact",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDCDE"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Contact Representative"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Get legal help"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href="/resources",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDCDA"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Legal Resources"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Access materials"})]})]})]}),"CLIENT"===e.role&&(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)("button",{onClick:()=>window.location.href="/client/dashboard",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDC64"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Client Portal"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Access dashboard"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href="/hire/new-case",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDCDD"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Create Case"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Start legal process"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href="/messages",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDCAC"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Messages"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"View communications"})]})]})]}),!["LAWYER","SUPERADMIN","CLIENT"].includes(e.role)&&(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)("button",{onClick:()=>ec("message"),className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDCAC"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Send Message"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Start conversation"})]})]}),(0,a.jsxs)("button",{onClick:()=>ec("follow"),className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDC65"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Follow"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Stay connected"})]})]}),(0,a.jsxs)("button",{onClick:()=>ec("endorse"),className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"⭐"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Endorse"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Show support"})]})]})]})]})}),ed&&(0,a.jsx)("div",{className:"max-w-3xl mx-auto mb-8",children:(0,a.jsxs)("div",{className:"bg-white rounded-2xl shadow-lg p-6",children:[(0,a.jsxs)("h3",{className:"text-lg font-bold text-gray-900 mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{children:"⚡"})," Your Quick Actions"]}),"SUPERADMIN"===e.role&&(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)("button",{onClick:()=>window.location.href="/admin/dashboard",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDC51"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Admin Dashboard"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"System management"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href="/admin/cases",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"⚖️"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Case Management"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Oversee all cases"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href="/admin/users",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDC65"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"User Management"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Manage users"})]})]})]}),"LAWYER"===e.role&&(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)("button",{onClick:()=>window.location.href="/lawyer/dashboard",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDCBC"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Lawyer Dashboard"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Manage cases"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href="/lawyer/cases",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDCCB"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"My Cases"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"View assignments"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href="/lawyer/consultations",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDCAC"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Consultations"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Client meetings"})]})]})]}),"CLIENT"===e.role&&(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)("button",{onClick:()=>window.location.href="/client/dashboard",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDC64"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Client Dashboard"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"View your cases"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href="/hire/new-case",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDCDD"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Create New Case"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Start legal process"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href="/messages",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDCAC"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Messages"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"View communications"})]})]})]}),!["SUPERADMIN","LAWYER","CLIENT"].includes(e.role)&&(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)("button",{onClick:()=>window.location.href="/user/dashboard",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83C\uDFE0"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"User Dashboard"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Main dashboard"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href="/messages",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83D\uDCAC"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Messages"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"View communications"})]})]}),(0,a.jsxs)("button",{onClick:()=>window.location.href="/profile/edit",className:"flex items-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"✏️"}),(0,a.jsxs)("div",{className:"text-left",children:[(0,a.jsx)("div",{className:"font-medium text-gray-900",children:"Edit Profile"}),(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Update information"})]})]})]})]})}),ed&&(0,a.jsx)("div",{className:"max-w-3xl mx-auto mb-8",children:(0,a.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-lg p-6 flex flex-col gap-4",children:[(0,a.jsx)("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-2",children:"Privacy & Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"checkbox",checked:!!e.showOnlineStatus,onChange:()=>{}}),(0,a.jsx)("span",{className:"text-gray-700 dark:text-gray-300",children:"Show my online status"})]}),(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"checkbox",checked:!!e.showFriends,onChange:()=>{}}),(0,a.jsx)("span",{className:"text-gray-700 dark:text-gray-300",children:"Show my friends list"})]}),(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"checkbox",checked:!!e.showEmail,onChange:()=>{}}),(0,a.jsx)("span",{className:"text-gray-700 dark:text-gray-300",children:"Show my email address"})]}),(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"checkbox",checked:!!e.allowMessages,onChange:()=>{}}),(0,a.jsx)("span",{className:"text-gray-700 dark:text-gray-300",children:"Allow messages from others"})]})]})]})}),(0,a.jsxs)("div",{className:"max-w-3xl mx-auto mb-8",children:[(0,a.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-lg p-6 mb-6",children:[(0,a.jsxs)("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{children:"\uD83D\uDCE2"})," Recent Activity"]}),(0,a.jsx)(w.A,{activities:U||[],isLoading:M,error:I})]}),(0,a.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-lg p-6 mb-6",children:[(0,a.jsxs)("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{children:"\uD83D\uDCAC"})," Testimonials & Reviews"]}),(0,a.jsx)(N.A,{testimonials:O||[],reviews:R||[],isLoading:q,error:$})]})]}),ed&&(0,a.jsx)("button",{onClick:()=>window.location.href="/profile/edit",className:"fixed bottom-8 right-8 z-50 bg-gradient-to-r from-purple-500 to-pink-500 text-white px-6 py-3 rounded-full shadow-lg text-lg font-bold hover:scale-105 transition-all",children:"Edit Profile"})]})]})]})},S=async e=>{let{username:s}=e.params,t=await (0,d.getServerSession)(e.req,e.res,c.N);try{let e=await m.z.user.findUnique({where:{username:s},include:{degrees:{include:{degree:!0}},lodgeMemberships:{include:{lodge:!0}}}});if(!e)return{notFound:!0};return{props:{profile:{id:e.id,username:e.username||"",name:e.name||"",email:e.email||"",role:e.role||"",profilePicture:e.profilePicture||null,bio:e.bio||null,title:e.title||null,specialization:e.specialization||null,yearsOfExperience:e.yearsOfExperience||null,education:e.education||null,officeLocation:e.officeLocation||null,linkedinUrl:e.linkedinUrl||null,websiteUrl:e.websiteUrl||null,availability:e.availability||null,pronouns:e.pronouns||null,language:e.language||"en",createdAt:e.createdAt.toISOString(),hourlyRate:e.hourlyRate||null,proBono:e.proBono||null,averageRating:e.averageRating||null,totalCases:e.totalCases||null,wonCases:e.wonCases||null,lostCases:e.lostCases||null,winRate:e.winRate||null,totalBadges:e.totalBadges||null,isVerified:e.isVerified||null,verificationStatus:e.verificationStatus||null,xpPoints:e.xpPoints||null,level:e.level||null,boldnessRating:e.boldnessRating||null,transparencyRating:e.transparencyRating||null,workPhone:e.workPhone||null,degrees:e.degrees?.map(e=>({id:e.id,achievedAt:e.achievedAt.toISOString(),ceremonyDate:e.ceremonyDate?.toISOString()||null,ceremonyCompleted:e.ceremonyCompleted,progressPercentage:e.progressPercentage,degree:{id:e.degree.id,degreeNumber:e.degree.degreeNumber,name:e.degree.name,title:e.degree.title||"",track:e.degree.track,symbol:e.degree.symbol||"",color:e.degree.color||"",lodgeLevel:e.degree.lodgeLevel,isSecret:e.degree.isSecret}}))||[],lodgeMemberships:e.lodgeMemberships?.map(e=>({id:e.id,role:e.role,isActive:e.isActive,joinedDate:e.joinedDate.toISOString(),lodge:{id:e.lodge.id,name:e.lodge.name,track:e.lodge.track,lodgeLevel:e.lodge.lodgeLevel,isSecret:e.lodge.isSecret}}))||[],reviewsWritten:e.reviewsWritten||null,forumPosts:e.forumPosts||null,helpedOthers:e.helpedOthers||null,observationHours:e.observationHours||null,reformProposals:e.reformProposals||null,wisdomScore:e.wisdomScore||null,civicEngagement:e.civicEngagement||null,showOnlineStatus:e.showOnlineStatus||!1,showFriends:e.showFriends||!1,showEmail:e.showEmail||!1,allowMessages:e.allowMessages||!1},currentUser:t?.user?{id:t.user.id,username:t.user.username||null,name:t.user.name||null,email:t.user.email||null,role:t.user.role||null}:null}}}catch(e){return console.error("Error fetching profile:",e),{props:{error:"Failed to load profile"}}}};r()}catch(e){r(e)}})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},40558:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.d(s,{A:()=>c});var a=t(8732),i=t(82015),l=t(63220),n=t(66491),o=t(54372),d=e([l]);l=(d.then?(await d)():d)[0];let c=({className:e=""})=>{let[s,t]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let e=localStorage.getItem("theme"),s=window.matchMedia("(prefers-color-scheme: dark)").matches;("dark"===e||!e&&s)&&(t(!0),document.documentElement.classList.add("dark"))},[]),(0,a.jsx)(l.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{let e=!s;t(e),e?(document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"))},className:`fixed top-4 right-4 z-50 p-3 rounded-full bg-white dark:bg-gray-800 shadow-lg border border-gray-200 dark:border-gray-700 transition-colors duration-300 ${e}`,title:s?"Switch to light mode":"Switch to dark mode",children:(0,a.jsx)(l.motion.div,{initial:!1,animate:{rotate:180*!!s},transition:{duration:.3},children:s?(0,a.jsx)(n.A,{className:"w-5 h-5 text-yellow-500"}):(0,a.jsx)(o.A,{className:"w-5 h-5 text-gray-700"})})})};r()}catch(e){r(e)}})},42893:e=>{e.exports=import("react-hot-toast")},43604:(e,s,t)=>{t.d(s,{A:()=>r});let r=(0,t(72386).A)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},43793:(e,s,t)=>{t.d(s,{k:()=>i});var r=t(82015),a=t(4722);function i(e){let{data:s}=(0,a.useSession)(),[t,i]=(0,r.useState)({testimonials:[],reviews:[],isLoading:!0,error:null});return t}},44889:(e,s,t)=>{t.d(s,{t:()=>i});var r=t(82015),a=t(4722);function i(e){let{data:s}=(0,a.useSession)(),[t,i]=(0,r.useState)({user:{},stats:{followers:0,following:0,endorsements:0,mutualConnections:0,friends:0,mutualFriends:0,views:0,totalCases:0,activeCases:0,completedCases:0},activeCases:[],pastCases:[],caseApplications:[],friends:[],mutualFriends:[],isLoading:!0,error:null});return t}},45057:(e,s,t)=>{t.d(s,{A:()=>r});let r=(0,t(72386).A)("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]])},46844:(e,s,t)=>{t.d(s,{w:()=>l});var r=t(82015),a=t(4722),i=t(14940);function l(e){let{data:s}=(0,a.useSession)(),{ws:t,connected:l,sendMessage:n}=(0,i.h)(),[o,d]=(0,r.useState)([]),[c,m]=(0,r.useState)(null),[x,u]=(0,r.useState)([]),[g,h]=(0,r.useState)(!1),[p,f]=(0,r.useState)(null),[b,y]=(0,r.useState)([]),j=(0,r.useCallback)(async(e,t,r)=>{if(l&&s?.user?.id)try{await n("PROFILE_INTERACTION",{type:e,toUserId:t,data:r});let a={type:e,fromUserId:s.user.id,fromUserName:s.user.name||"Unknown",fromUserAvatar:s.user.image||void 0,toUserId:t,timestamp:Date.now(),data:r};d(e=>[a,...e.slice(0,49)])}catch(e){console.error("Error sending profile interaction:",e)}},[l,s,n]);return{interactions:o,userStatus:c,profileViews:x,isOnline:g,lastActivity:p,notifications:b,sendProfileInteraction:j,trackProfileView:(0,r.useCallback)(async e=>{if(l&&s?.user?.id&&s.user.id!==e)try{await n("PROFILE_VIEW",{targetUserId:e})}catch(e){console.error("Error tracking profile view:",e)}},[l,s,n]),updateOnlineStatus:(0,r.useCallback)(async e=>{if(l)try{await n("ONLINE_STATUS",{status:e}),h("online"===e)}catch(e){console.error("Error updating online status:",e)}},[l,n]),connected:l,hasRecentActivity:!!p&&Date.now()-p<3e5}}},51898:(e,s,t)=>{t.d(s,{z:()=>a});var r=t(96330);let a=globalThis.prisma??new r.PrismaClient({log:["error"]})},53609:(e,s,t)=>{t.d(s,{A:()=>r});let r=(0,t(72386).A)("user-minus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]])},54372:(e,s,t)=>{t.d(s,{A:()=>r});let r=(0,t(72386).A)("moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]])},58509:(e,s,t)=>{t.d(s,{A:()=>r});let r=(0,t(72386).A)("heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]])},63106:(e,s,t)=>{t.d(s,{A:()=>r});let r=(0,t(72386).A)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])},63220:e=>{e.exports=import("framer-motion")},66491:(e,s,t)=>{t.d(s,{A:()=>r});let r=(0,t(72386).A)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},72991:(e,s,t)=>{t.a(e,async(e,r)=>{try{t.r(s),t.d(s,{config:()=>h,default:()=>m,getServerSideProps:()=>g,getStaticPaths:()=>u,getStaticProps:()=>x,reportWebVitals:()=>p,routeModule:()=>w,unstable_getServerProps:()=>j,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>y,unstable_getStaticPaths:()=>b,unstable_getStaticProps:()=>f});var a=t(63885),i=t(80237),l=t(81413),n=t(61779),o=t(32081),d=t(37547),c=e([o,d]);[o,d]=c.then?(await c)():c;let m=(0,l.M)(d,"default"),x=(0,l.M)(d,"getStaticProps"),u=(0,l.M)(d,"getStaticPaths"),g=(0,l.M)(d,"getServerSideProps"),h=(0,l.M)(d,"config"),p=(0,l.M)(d,"reportWebVitals"),f=(0,l.M)(d,"unstable_getStaticProps"),b=(0,l.M)(d,"unstable_getStaticPaths"),y=(0,l.M)(d,"unstable_getStaticParams"),j=(0,l.M)(d,"unstable_getServerProps"),v=(0,l.M)(d,"unstable_getServerSideProps"),w=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/profile/[username]",pathname:"/profile/[username]",bundlePath:"",filename:""},components:{App:o.default,Document:n.default},userland:d});r()}catch(e){r(e)}})},74075:e=>{e.exports=require("zlib")},74729:e=>{e.exports=require("bcryptjs")},80237:(e,s)=>{Object.defineProperty(s,"A",{enumerable:!0,get:function(){return t}});var t=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},81413:(e,s)=>{Object.defineProperty(s,"M",{enumerable:!0,get:function(){return function e(s,t){return t in s?s[t]:"then"in s&&"function"==typeof s.then?s.then(s=>e(s,t)):"function"==typeof s&&"default"===t?s:void 0}}})},81673:(e,s,t)=>{t.d(s,{A:()=>d});var r=t(8732),a=t(82015),i=t(5057),l=t(27290),n=t(58509);let o=e=>{switch(e){case"LIFE_CHANGING":return"bg-purple-100 text-purple-800 border-purple-200";case"MAJOR":return"bg-green-100 text-green-800 border-green-200";case"MODERATE":return"bg-blue-100 text-blue-800 border-blue-200";case"MINOR":return"bg-yellow-100 text-yellow-800 border-yellow-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}};function d({testimonials:e,reviews:s,isLoading:t,error:d}){let[c,m]=(0,a.useState)("testimonials");return t?(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex space-x-4 border-b",children:[(0,r.jsx)("div",{className:"h-8 bg-gray-200 rounded w-32 animate-pulse"}),(0,r.jsx)("div",{className:"h-8 bg-gray-200 rounded w-24 animate-pulse"})]}),(0,r.jsx)("div",{className:"space-y-3",children:[void 0,void 0].map((e,s)=>(0,r.jsx)("div",{className:"animate-pulse",children:(0,r.jsx)("div",{className:"border border-gray-200 rounded-lg p-4",children:(0,r.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,r.jsx)("div",{className:"w-12 h-12 bg-gray-200 rounded-full"}),(0,r.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,r.jsx)("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),(0,r.jsx)("div",{className:"h-3 bg-gray-200 rounded w-1/2"}),(0,r.jsx)("div",{className:"h-3 bg-gray-200 rounded w-2/3"})]})]})})},s))})]}):d?(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)("div",{className:"text-red-500 text-2xl mb-2",children:"⚠️"}),(0,r.jsx)("p",{className:"text-red-600 font-medium",children:"Error loading testimonials"}),(0,r.jsx)("p",{className:"text-red-500 text-sm mt-1",children:d})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex space-x-4 border-b mb-4",children:[(0,r.jsxs)("button",{onClick:()=>m("testimonials"),className:`pb-2 px-1 ${"testimonials"===c?"border-b-2 border-blue-500 text-blue-600 font-medium":"text-gray-500 hover:text-gray-700"}`,children:["Testimonials (",e.length,")"]}),(0,r.jsxs)("button",{onClick:()=>m("reviews"),className:`pb-2 px-1 ${"reviews"===c?"border-b-2 border-blue-500 text-blue-600 font-medium":"text-gray-500 hover:text-gray-700"}`,children:["Reviews (",s.length,")"]})]}),"testimonials"===c&&(0,r.jsx)("div",{className:"space-y-4",children:0===e.length?(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)("div",{className:"text-gray-400 text-4xl mb-3",children:"\uD83D\uDCAC"}),(0,r.jsx)("p",{className:"text-gray-500 font-medium",children:"No testimonials yet"}),(0,r.jsx)("p",{className:"text-gray-400 text-sm mt-1",children:"Client testimonials will appear here"})]}):e.map(e=>(0,r.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 bg-purple-100 rounded-full flex items-center justify-center",children:e.client?.profilePicture?(0,r.jsx)("img",{src:e.client.profilePicture,alt:e.client.name,className:"w-10 h-10 rounded-full object-cover"}):(0,r.jsx)("span",{className:"text-purple-600 font-semibold",children:e.client?.name?.charAt(0)||"C"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold text-gray-900",children:e.title}),(0,r.jsxs)("p",{className:"text-sm text-gray-600",children:["by ",e.client?.name||"Anonymous"]})]})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[e.isFeatured&&(0,r.jsx)("span",{className:"px-2 py-1 rounded-full text-xs font-medium text-yellow-600 bg-yellow-100",children:"Featured"}),(0,r.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium border ${o(e.impactLevel)}`,children:e.impactLevel.replace("_"," ")})]})]}),(0,r.jsxs)("blockquote",{className:"text-gray-700 italic mb-3",children:['"',e.content,'"']}),e.beforeSituation&&e.afterSituation&&(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 mb-3",children:[(0,r.jsxs)("div",{className:"bg-red-50 p-3 rounded-lg",children:[(0,r.jsx)("h5",{className:"font-medium text-red-800 mb-1 text-sm",children:"Before"}),(0,r.jsx)("p",{className:"text-sm text-red-700",children:e.beforeSituation})]}),(0,r.jsxs)("div",{className:"bg-green-50 p-3 rounded-lg",children:[(0,r.jsx)("h5",{className:"font-medium text-green-800 mb-1 text-sm",children:"After"}),(0,r.jsx)("p",{className:"text-sm text-green-700",children:e.afterSituation})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between text-sm text-gray-500",children:[(0,r.jsx)("span",{children:(0,i.m)(new Date(e.createdAt),{addSuffix:!0})}),(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("span",{className:"flex items-center space-x-1",children:[(0,r.jsx)(l.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{children:e.views})]}),(0,r.jsxs)("span",{className:"flex items-center space-x-1",children:[(0,r.jsx)(n.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{children:e.helpfulVotes})]})]})]})]},e.id))}),"reviews"===c&&(0,r.jsx)("div",{className:"space-y-4",children:0===s.length?(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)("div",{className:"text-gray-400 text-4xl mb-3",children:"⭐"}),(0,r.jsx)("p",{className:"text-gray-500 font-medium",children:"No reviews written yet"}),(0,r.jsx)("p",{className:"text-gray-400 text-sm mt-1",children:"Reviews you write about lawyers will appear here"})]}):s.map(e=>(0,r.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center",children:e.lawyer?.profilePicture?(0,r.jsx)("img",{src:e.lawyer.profilePicture,alt:e.lawyer.name,className:"w-10 h-10 rounded-full object-cover"}):(0,r.jsx)("span",{className:"text-blue-600 font-semibold",children:e.lawyer?.name?.charAt(0)||"L"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold text-gray-900",children:e.title}),(0,r.jsxs)("p",{className:"text-sm text-gray-600",children:["about ",e.lawyer?.name||"Lawyer"]})]})]}),(0,r.jsx)("div",{className:"flex items-center space-x-2",children:(0,r.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium border ${o(e.impactLevel)}`,children:e.impactLevel.replace("_"," ")})})]}),(0,r.jsxs)("blockquote",{className:"text-gray-700 italic mb-3",children:['"',e.content,'"']}),e.case&&(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded text-xs font-medium bg-blue-100 text-blue-800",children:["⚖️ ",e.case.title]})}),(0,r.jsxs)("div",{className:"flex items-center justify-between text-sm text-gray-500",children:[(0,r.jsx)("span",{children:(0,i.m)(new Date(e.createdAt),{addSuffix:!0})}),(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("span",{className:"flex items-center space-x-1",children:[(0,r.jsx)(l.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{children:e.views})]}),(0,r.jsxs)("span",{className:"flex items-center space-x-1",children:[(0,r.jsx)(n.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{children:e.helpfulVotes})]})]})]})]},e.id))})]})}},82015:e=>{e.exports=require("react")},85038:(e,s,t)=>{t.d(s,{c:()=>i});var r=t(82015),a=t(4722);function i(e){let{data:s}=(0,a.useSession)(),[t,i]=(0,r.useState)({activities:[],achievements:[],badges:[],isLoading:!0,error:null});return t}},96330:e=>{e.exports=require("@prisma/client")}};var s=require("../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[5126,8803,2341,5309,4327,3503,2081,3457,3510],()=>t(72991));module.exports=r})();