![]() 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/ |
"use strict";(()=>{var e={};e.id=5365,e.ids=[636,5365],e.modules={4722:e=>{e.exports=require("next-auth/react")},7085:e=>{e.exports=require("styled-jsx/style")},8732:e=>{e.exports=require("react/jsx-runtime")},9733:e=>{e.exports=import("@chakra-ui/react")},15964:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{default:()=>N,getServerSideProps:()=>w});var a=r(8732),i=r(82015),l=r(49788),n=r.n(l),o=r(3457),d=r(63220),c=r(35091),x=r(71410),m=r(66596),g=r(75974),u=r(5789),h=r(57341),p=r(87637),b=r(19918),y=r.n(b),f=r(92839);r(51898);var j=r(61932),v=e([o,d,f]);[o,d,f]=v.then?(await v)():v;let w=async e=>{let t=[];try{let e=await fetch(`${process.env.NEXTAUTH_URL||"http://localhost:3000"}/api/public/business-profiles`);t=await e.json()}catch(e){t=[]}return{props:{businesses:function e(t){return null==t?t:t instanceof Date?t.toISOString():Array.isArray(t)?t.map(e):"object"==typeof t?Object.fromEntries(Object.entries(t).map(([t,r])=>[t,e(r)])):t}(t)}}},N=({businesses:e})=>{let[t,r]=(0,i.useState)(e),[s,l]=(0,i.useState)(""),[b,v]=(0,i.useState)("name"),[w,N]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let t=e;s&&(t=t.filter(e=>e.businessName.toLowerCase().includes(s.toLowerCase())||e.industry?.toLowerCase().includes(s.toLowerCase())||e.description?.toLowerCase().includes(s.toLowerCase()))),w&&(t=t.filter(e=>e.isVerified)),t.sort((e,t)=>{switch(b){case"name":return e.businessName.localeCompare(t.businessName);case"winRate":return t.firmStats.averageWinRate-e.firmStats.averageWinRate;case"rating":return(t.firmStats.averageRating||0)-(e.firmStats.averageRating||0);case"cases":return t.firmStats.totalCases-e.firmStats.totalCases;case"lawyers":return t.firmStats.totalLawyers-e.firmStats.totalLawyers;default:return 0}}),r(t)},[e,s,b,w]);let k=e=>e>=80?"text-green-600":e>=60?"text-yellow-600":"text-red-600",S=e=>e>=4.5?"text-yellow-500":e>=4?"text-gray-600":"text-gray-400";return(0,a.jsxs)(o.default,{children:[(0,a.jsxs)(n(),{children:[(0,a.jsx)("title",{children:"Business Profiles - Legal Firms & Lawyers"}),(0,a.jsx)("meta",{name:"description",content:"Discover verified legal firms and their expert lawyers with detailed statistics, win rates, and client reviews."})]}),(0,a.jsxs)("div",{className:"max-w-7xl mx-auto px-4 py-8",children:[(0,a.jsxs)(d.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-900/20 dark:to-purple-900/20 rounded-xl p-6 border border-blue-200 dark:border-blue-800 mb-8",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4 flex items-center",children:"\uD83C\uDFDB️ Judicial Ecosystem Navigation"}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)(y(),{href:"/judicial-directory",className:"flex items-center space-x-3 p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm hover:shadow-md transition-all duration-200 group",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-blue-100 dark:bg-blue-900/30 rounded-lg flex items-center justify-center group-hover:scale-110 transition-transform",children:(0,a.jsx)("span",{className:"text-blue-600 text-lg",children:"⚖️"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-medium text-gray-900 dark:text-white group-hover:text-blue-600 transition-colors",children:"Judicial Directory"}),(0,a.jsx)("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Legal professionals & expertise"})]})]}),(0,a.jsxs)(y(),{href:"/business-profiles",className:"flex items-center space-x-3 p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm hover:shadow-md transition-all duration-200 group border-2 border-blue-500",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-purple-100 dark:bg-purple-900/30 rounded-lg flex items-center justify-center group-hover:scale-110 transition-transform",children:(0,a.jsx)("span",{className:"text-purple-600 text-lg",children:"\uD83C\uDFE2"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-medium text-gray-900 dark:text-white group-hover:text-purple-600 transition-colors",children:"Law Firms & Businesses"}),(0,a.jsx)("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Professional organizations"})]})]}),(0,a.jsxs)(y(),{href:"/profiles",className:"flex items-center space-x-3 p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm hover:shadow-md transition-all duration-200 group",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-green-100 dark:bg-green-900/30 rounded-lg flex items-center justify-center group-hover:scale-110 transition-transform",children:(0,a.jsx)("span",{className:"text-green-600 text-lg",children:"\uD83D\uDC65"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-medium text-gray-900 dark:text-white group-hover:text-green-600 transition-colors",children:"Society Members"}),(0,a.jsx)("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Community directory"})]})]})]})]}),(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsx)("h1",{className:"text-4xl font-bold text-gray-900 dark:text-white mb-4",children:"⚖️ Law Firms Directory"}),(0,a.jsx)("p",{className:"text-xl text-gray-600 dark:text-gray-400",children:"Discover verified law firms and legal organizations with detailed statistics, team information, and performance metrics in our judicial ecosystem"})]}),(0,a.jsx)("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 p-6 mb-8",children:(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(c.A,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-5 w-5 text-gray-400"}),(0,a.jsx)("input",{type:"text",placeholder:"Search firms, lawyers, or specializations...",value:s,onChange:e=>l(e.target.value),className:"w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white"})]})}),(0,a.jsxs)("div",{className:"flex gap-4",children:[(0,a.jsxs)("select",{value:b,onChange:e=>v(e.target.value),className:"px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white",children:[(0,a.jsx)("option",{value:"name",children:"Sort by Name"}),(0,a.jsx)("option",{value:"winRate",children:"Sort by Win Rate"}),(0,a.jsx)("option",{value:"rating",children:"Sort by Rating"}),(0,a.jsx)("option",{value:"cases",children:"Sort by Total Cases"}),(0,a.jsx)("option",{value:"lawyers",children:"Sort by Lawyers"})]}),(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",checked:w,onChange:e=>N(e.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),(0,a.jsx)("span",{className:"ml-2 text-sm text-gray-700 dark:text-gray-300",children:"Verified Only"})]})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:t.map((e,t)=>(0,a.jsx)(d.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1*t},whileHover:{y:-5,scale:1.02},className:"bg-white dark:bg-gray-800 rounded-xl shadow-lg hover:shadow-2xl transition-all duration-300 overflow-hidden border border-gray-100 dark:border-gray-700 cursor-pointer group",onClick:()=>window.open(`/business/${e.id}`,"_blank"),children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsxs)("div",{className:"relative",children:[e.logo?(0,a.jsx)("img",{src:e.logo,alt:e.businessName,className:"w-16 h-16 rounded-lg object-cover mr-4 group-hover:scale-110 transition-transform"}):(0,a.jsx)("div",{className:"w-16 h-16 bg-gradient-to-br from-blue-500 to-purple-600 rounded-lg flex items-center justify-center mr-4 group-hover:scale-110 transition-transform",children:(0,a.jsx)(x.A,{className:"h-8 w-8 text-white"})}),e.isVerified&&(0,a.jsx)("div",{className:"absolute -top-1 -right-1 w-6 h-6 bg-blue-600 rounded-full flex items-center justify-center",children:(0,a.jsx)(m.A,{className:"h-3 w-3 text-white"})})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"font-semibold text-lg text-gray-900 dark:text-white flex items-center group-hover:text-blue-600 transition-colors",children:[e.businessName,e.isVerified&&(0,a.jsx)(m.A,{className:"h-5 w-5 ml-2 text-blue-600"})]}),(0,a.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:e.businessType}),e.industry&&(0,a.jsx)("p",{className:"text-xs text-gray-500",children:e.industry})]})]}),(0,a.jsx)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",children:(0,a.jsx)("span",{className:"text-blue-600 text-sm font-medium",children:"\uD83C\uDFE2 View Firm"})})]}),(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 dark:bg-blue-900/20 rounded-lg group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 transition-colors",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-blue-600",children:e.firmStats.totalLawyers>0?e.firmStats.totalLawyers:(0,a.jsx)("span",{className:"text-gray-400 text-base",children:"No lawyers yet"})}),(0,a.jsx)("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Lawyers"})]}),(0,a.jsxs)("div",{className:"text-center p-3 bg-green-50 dark:bg-green-900/20 rounded-lg group-hover:bg-green-100 dark:group-hover:bg-green-900/30 transition-colors",children:[(0,a.jsx)("div",{className:`text-2xl font-bold ${k(e.firmStats.averageWinRate)}`,children:e.firmStats.totalCases>0&&"number"==typeof e.firmStats.averageWinRate?e.firmStats.averageWinRate.toFixed(1)+"%":(0,a.jsx)("span",{className:"text-gray-400 text-base",children:"N/A"})}),(0,a.jsx)("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Win Rate"})]}),(0,a.jsxs)("div",{className:"text-center p-3 bg-purple-50 dark:bg-purple-900/20 rounded-lg group-hover:bg-purple-100 dark:group-hover:bg-purple-900/30 transition-colors",children:[(0,a.jsx)("div",{className:"text-2xl font-bold text-purple-600",children:e.firmStats.totalCases>0?e.firmStats.totalCases:(0,a.jsx)("span",{className:"text-gray-400 text-base",children:"No cases yet"})}),(0,a.jsx)("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Total Cases"})]}),(0,a.jsxs)("div",{className:"text-center p-3 bg-yellow-50 dark:bg-yellow-900/20 rounded-lg group-hover:bg-yellow-100 dark:group-hover:bg-yellow-900/30 transition-colors",children:[(0,a.jsx)("div",{className:`text-2xl font-bold ${S(e.firmStats.averageRating||0)}`,children:e.firmStats.averageRating&&e.firmStats.averageRating>0?e.firmStats.averageRating.toFixed(1):(0,a.jsx)("span",{className:"text-gray-400 text-base",children:"N/A"})}),(0,a.jsx)("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Rating"})]})]}),e.description&&(0,a.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4 line-clamp-2",children:e.description}),(0,a.jsxs)("div",{className:"space-y-2 mb-4",children:[e.website&&(0,a.jsxs)("div",{className:"flex items-center text-sm text-gray-600 dark:text-gray-400",children:[(0,a.jsx)(g.A,{className:"h-4 w-4 mr-2"}),(0,a.jsx)("span",{className:"truncate",children:e.website})]}),e.phone&&(0,a.jsxs)("div",{className:"flex items-center text-sm text-gray-600 dark:text-gray-400",children:[(0,a.jsx)(u.A,{className:"h-4 w-4 mr-2"}),e.phone]}),e.address&&(0,a.jsxs)("div",{className:"flex items-center text-sm text-gray-600 dark:text-gray-400",children:[(0,a.jsx)(h.A,{className:"h-4 w-4 mr-2"}),(0,a.jsx)("span",{className:"truncate",children:e.address})]})]}),e.lawyers.length>0?(0,a.jsxs)("div",{className:"border-t border-gray-200 dark:border-gray-700 pt-4",children:[(0,a.jsx)("h4",{className:"text-sm font-medium text-gray-900 dark:text-white mb-2",children:"Top Lawyers"}),(0,a.jsx)("div",{className:"space-y-2",children:e.lawyers.slice(0,3).map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between group/lawyer",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[e.profilePicture?(0,a.jsx)("img",{src:e.profilePicture,alt:e.name,className:"w-8 h-8 rounded-full object-cover mr-2 group-hover/lawyer:scale-110 transition-transform"}):(0,a.jsx)("div",{className:"w-8 h-8 bg-gray-300 dark:bg-gray-600 rounded-full flex items-center justify-center mr-2 group-hover/lawyer:scale-110 transition-transform",children:(0,a.jsx)(p.A,{className:"h-4 w-4 text-gray-500"})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-900",children:e.name}),(0,a.jsx)(j.A,{verificationStatus:e.verificationStatus,isVerified:e.isVerified,size:"sm",showText:!1})]}),(0,a.jsx)("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:e.specialization})]})]}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("p",{className:`text-sm font-medium ${k(e.winRate)}`,children:"number"==typeof e.winRate?e.winRate.toFixed(1)+"%":"N/A"}),(0,a.jsxs)("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:[e.totalCases," cases"]})]})]},e.id))})]}):(0,a.jsx)("div",{className:"border-t border-gray-200 dark:border-gray-700 pt-4 text-center text-gray-400 text-sm",children:"No lawyers yet"}),e.lawyers.length>0&&(0,a.jsx)("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:(0,a.jsx)(f.A,{lawyer:e.lawyers[0],businessProfile:e,className:"w-full"})}),(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700 flex gap-2",children:[(0,a.jsx)("button",{onClick:t=>{t.stopPropagation(),window.open(`/business/${e.id}`,"_blank")},className:"flex-1 bg-gradient-to-r from-blue-500 to-purple-600 text-white px-3 py-2 rounded-md text-sm font-medium hover:from-blue-600 hover:to-purple-700 transition-all",children:"\uD83C\uDFE2 View Firm Profile"}),(0,a.jsx)("button",{onClick:t=>{t.stopPropagation(),window.open(`/hire?firm=${e.id}`,"_blank")},className:"bg-green-600 text-white px-3 py-2 rounded-md text-sm font-medium hover:bg-green-700 transition-colors",children:"\uD83D\uDCBC Hire Firm"})]})]})},e.id))}),0===t.length&&(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)(x.A,{className:"h-16 w-16 text-gray-400 mx-auto mb-4"}),(0,a.jsx)("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:"No businesses found"}),(0,a.jsx)("p",{className:"text-gray-600 dark:text-gray-400",children:"Try adjusting your search criteria or filters."})]})]})]})};s()}catch(e){s(e)}})},18787:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{config:()=>h,default:()=>x,getServerSideProps:()=>u,getStaticPaths:()=>g,getStaticProps:()=>m,reportWebVitals:()=>p,routeModule:()=>w,unstable_getServerProps:()=>j,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>f,unstable_getStaticPaths:()=>y,unstable_getStaticProps:()=>b});var a=r(63885),i=r(80237),l=r(81413),n=r(61779),o=r(32081),d=r(15964),c=e([o,d]);[o,d]=c.then?(await c)():c;let x=(0,l.M)(d,"default"),m=(0,l.M)(d,"getStaticProps"),g=(0,l.M)(d,"getStaticPaths"),u=(0,l.M)(d,"getServerSideProps"),h=(0,l.M)(d,"config"),p=(0,l.M)(d,"reportWebVitals"),b=(0,l.M)(d,"unstable_getStaticProps"),y=(0,l.M)(d,"unstable_getStaticPaths"),f=(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:"/business-profiles",pathname:"/business-profiles",bundlePath:"",filename:""},components:{App:o.default,Document:n.default},userland:d});s()}catch(e){s(e)}})},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")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},42893:e=>{e.exports=import("react-hot-toast")},61932:(e,t,r)=>{r.d(t,{A:()=>l});var s=r(8732);r(82015);var a=r(66596),i=r(13213);let l=({verificationStatus:e,isVerified:t,size:r="md",showText:l=!0,className:n=""})=>{if(!("VERIFIED_BARREAU"===e||t&&"VERIFIED_BARREAU"===e))return null;let o={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};return(0,s.jsxs)("div",{className:`inline-flex items-center gap-1.5 ${n}`,children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(a.A,{className:`${o[r]} text-blue-600`}),(0,s.jsx)(i.A,{className:`${o[r]} text-green-500 absolute -top-0.5 -right-0.5`})]}),l&&(0,s.jsx)("span",{className:`${{sm:"text-xs",md:"text-sm",lg:"text-base"}[r]} font-medium text-blue-700 dark:text-blue-300`,children:"Barreau Verified"})]})}},63220:e=>{e.exports=import("framer-motion")},74075:e=>{e.exports=require("zlib")},82015:e=>{e.exports=require("react")},96330:e=>{e.exports=require("@prisma/client")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[5126,8803,2341,5309,4327,3503,2081,3457,9904],()=>r(18787));module.exports=s})();