1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[38408],{38408:(e,t,i)=>{i.r(t),i.d(t,{default:()=>p});var r=i(95155),o=i(12115),n=i(68209),l=i(4373),a=i(5191),s=i(2912);let d={CRO:{bg:"#3b82f620",text:"#60a5fa",label:"CRO"},SMO:{bg:"#0ea5e920",text:"#38bdf8",label:"SMO"},SITE:{bg:"#22c55e20",text:"#4ade80",label:"Site"},INDIVIDUAL:{bg:"#a855f720",text:"#c084fc",label:"Individual"},VENDOR:{bg:"#f59e0b20",text:"#fbbf24",label:"Vendor"},SPONSOR:{bg:"#6366f120",text:"#818cf8",label:"Sponsor"}},c=[{id:"all",label:"All"},{id:"CRO",label:"CROs"},{id:"SMO",label:"SMOs"},{id:"SITE",label:"Sites"},{id:"VENDOR",label:"Vendors"},{id:"INDIVIDUAL",label:"Individuals"}];function p(e){let{mobile:t=!1}=e,[i,p]=(0,o.useState)([]),[g,u]=(0,o.useState)(!0),[b,f]=(0,o.useState)(""),[h,m]=(0,o.useState)("all"),[y,C]=(0,o.useState)(null),[j,S]=(0,o.useState)(null),[v,k]=(0,o.useState)(null),[z,w]=(0,o.useState)("marketplace"),R=(0,o.useCallback)(async()=>{u(!0);try{var e;let t=new URLSearchParams;"all"!==h&&t.set("type",h),b.trim()&&t.set("search",b.trim());let i=await (0,n.apiFetch)("/api/orgs?".concat(t.toString())),r=await i.json();p(null!=(e=r.orgs)?e:[])}catch(e){p([])}finally{u(!1)}},[h,b]);(0,o.useEffect)(()=>{let e=setTimeout(R,350*!!b);return()=>clearTimeout(e)},[R,b]);let W=(0,r.jsx)("div",{style:{display:"flex",gap:4,marginBottom:20,borderBottom:"1px solid ".concat(l.C.border),paddingBottom:10},children:[{id:"marketplace",label:"\uD83E\uDDEC Marketplace"},{id:"browse",label:"Browse all"}].map(e=>(0,r.jsx)("button",{onClick:()=>w(e.id),style:{padding:"8px 16px",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",background:z===e.id?(0,l.u)(l.C.accent,8):"transparent",color:z===e.id?l.C.accent:l.C.muted,border:z===e.id?"1px solid ".concat((0,l.u)(l.C.accent,27)):"1px solid transparent"},children:e.label},e.id))});return"marketplace"===z?(0,r.jsxs)("div",{style:{padding:t?16:24},children:[v&&(0,r.jsx)("div",{style:{position:"fixed",bottom:28,right:28,background:v.ok?"#0f2a1e":"#2a0f0f",border:"1px solid ".concat(v.ok?l.C.green:l.C.red),color:v.ok?l.C.green:l.C.red,borderRadius:10,padding:"12px 20px",fontSize:13,fontWeight:600,zIndex:9999,maxWidth:400},children:v.msg}),W,(0,r.jsx)(a.A,{mobile:t})]}):(0,r.jsxs)("div",{style:{padding:t?16:24},children:[v&&(0,r.jsx)("div",{style:{position:"fixed",bottom:28,right:28,background:v.ok?"#0f2a1e":"#2a0f0f",border:"1px solid ".concat(v.ok?l.C.green:l.C.red),color:v.ok?l.C.green:l.C.red,borderRadius:10,padding:"12px 20px",fontSize:13,fontWeight:600,zIndex:9999,maxWidth:400,boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:v.msg}),W,j&&(0,r.jsx)(s.Ay,{target:j,onClose:()=>S(null)}),(0,r.jsxs)("div",{style:{marginBottom:24},children:[(0,r.jsx)("h2",{style:{fontSize:20,fontWeight:700,color:l.C.text,margin:0,marginBottom:4},children:"Platform Directory"}),(0,r.jsx)("p",{style:{fontSize:13,color:l.C.muted,margin:0},children:"Browse organizations on the platform. Find CROs, sites, and individuals for your studies."})]}),(0,r.jsxs)("div",{style:{display:"flex",flexDirection:t?"column":"row",gap:12,marginBottom:20,alignItems:t?"stretch":"center"},children:[(0,r.jsxs)("div",{style:{position:"relative",flex:1},children:[(0,r.jsx)("span",{style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",color:l.C.muted,fontSize:14,pointerEvents:"none"},children:"\uD83D\uDD0D"}),(0,r.jsx)("input",{type:"text",placeholder:"Search by name or location...",value:b,onChange:e=>f(e.target.value),style:{width:"100%",padding:"10px 14px 10px 36px",background:l.C.bg,border:"1px solid ".concat(l.C.border),borderRadius:8,color:l.C.text,fontSize:13,outline:"none",boxSizing:"border-box",minHeight:42}})]}),(0,r.jsx)("div",{style:{display:"flex",gap:2,background:l.C.bg,border:"1px solid ".concat(l.C.border),borderRadius:8,padding:3,flexShrink:0},children:c.map(e=>{let t=h===e.id;return(0,r.jsx)("button",{onClick:()=>m(e.id),style:{padding:"7px 14px",borderRadius:6,fontSize:12,fontWeight:600,border:"none",cursor:"pointer",background:t?l.C.accent:"transparent",color:t?"#fff":l.C.muted,transition:"all 0.15s ease"},children:e.label},e.id)})})]}),!g&&(0,r.jsxs)("div",{style:{fontSize:12,color:l.C.muted,marginBottom:14},children:[i.length," organization",1!==i.length?"s":""," found"]}
1),g&&(0,r.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:200,color:l.C.muted,fontSize:14},children:"Loading directory..."}),!g&&0===i.length&&(0,r.jsxs)("div",{style:{textAlign:"center",padding:"60px 20px",color:l.C.muted},children:[(0,r.jsx)("div",{style:{fontSize:36,marginBottom:12},children:"\uD83D\uDCC2"}),(0,r.jsx)("div",{style:{fontSize:15,fontWeight:600,marginBottom:6},children:"No organizations found"}),(0,r.jsx)("div",{style:{fontSize:13},children:"Try adjusting your search or filter criteria."})]}),!g&&i.length>0&&(0,r.jsx)("div",{style:{display:"grid",gridTemplateColumns:t?"1fr":"repeat(auto-fill, minmax(320px, 1fr))",gap:14},children:i.map(e=>{var i;let o=null!=(i=d[e.type])?i:d.VENDOR,n=y===e.id;return(0,r.jsxs)("div",{style:{background:l.C.card,border:"1px solid ".concat(n?l.C.accent+"60":l.C.border),borderRadius:12,overflow:"hidden",transition:"border-color 0.2s ease, box-shadow 0.2s ease",boxShadow:n?"0 0 20px ".concat((0,l.u)(l.C.accent,8)):"none"},children:[(0,r.jsx)("div",{onClick:()=>{var t;return t=e.id,void C(e=>e===t?null:t)},style:{padding:"16px 18px",cursor:"pointer",transition:"background 0.15s ease"},onMouseEnter:e=>e.currentTarget.style.background=l.C.cardHover,onMouseLeave:e=>e.currentTarget.style.background="transparent",children:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:12},children:[(0,r.jsx)("div",{style:{width:40,height:40,borderRadius:10,background:o.bg,color:o.text,display:"flex",alignItems:"center",justifyContent:"center",fontSize:16,fontWeight:700,flexShrink:0},children:e.name.charAt(0).toUpperCase()}),(0,r.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4,flexWrap:"wrap"},children:[(0,r.jsx)("span",{style:{fontSize:14,fontWeight:600,color:l.C.text,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:t?160:180},children:e.name}),(0,r.jsx)("span",{style:{display:"inline-block",padding:"2px 8px",borderRadius:20,fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",background:o.bg,color:o.text},children:o.label})]}),e.location&&(0,r.jsxs)("div",{style:{fontSize:12,color:l.C.muted,marginBottom:6},children:[(0,r.jsx)("span",{style:{marginRight:4},children:"â²"}),e.location]}),e.specialties&&e.specialties.length>0&&(0,r.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:[e.specialties.slice(0,3).map((e,t)=>(0,r.jsx)("span",{style:{display:"inline-block",padding:"2px 7px",borderRadius:4,fontSize:10,border:"1px solid ".concat(l.C.border),color:l.C.muted},children:e},t)),e.specialties.length>3&&(0,r.jsxs)("span",{style:{fontSize:10,color:l.C.muted,padding:"2px 4px"},children:["+",e.specialties.length-3," more"]})]})]}),(0,r.jsx)("span",{style:{fontSize:10,color:l.C.muted,flexShrink:0,marginTop:4,transform:n?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",display:"inline-block"},children:"â¼"})]})}),n&&(0,r.jsx)("div",{style:{padding:"0 18px 16px",borderTop:"1px solid ".concat(l.C.border)},children:(0,r.jsxs)("div",{style:{paddingTop:14},children:[(0,r.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,marginBottom:14},children:[(0,r.jsx)(x,{label:"Type",value:o.label}),(0,r.jsx)(x,{label:"Public Profile",value:e.isPublic?"Yes":"No"}),e.website&&(0,r.jsx)(x,{label:"Website",value:(0,r.jsx)("a",{href:e.website.startsWith("http")?e.website:"https://".concat(e.website),target:"_blank",rel:"noopener noreferrer",style:{color:l.C.cyan,fontSize:12,textDecoration:"none"},children:e.website.replace(/^https?:\/\//,"")})}),e.contactEmail&&(0,r.jsx)(x,{label:"Contact",value:e.contactEmail})]}),e.specialties&&e.specialties.length>0&&(0,r.jsxs)("div",{style:{marginBottom:14},children:[(0,r.jsx)("div",{style:{fontSize:10,fontWeight:700,color:l.C.muted,textTransform:"uppercase",letterSpacing:"0.07em",marginBottom:6},children:"Specialties"}),(0,r.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:5},children:e.specialties.map((e,t)=>(0,r.jsx)("span",{style:{display:"inline-block",padding:"3px 9px",borderRadius:5,fontSize:11,border:"1px solid ".concat(l.C.border),color:l.C.muted,background:(0,l.u)(l.C.border,19)},children:e},t))})]}),(0,r.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,s.DB)(e.type)&&(0,r.jsx)("button",{onClick:()=>S({orgId:e.id,name:e.name,orgType:e.type}),style:{padding:"6px 14px",borderRadius:999,fontSize:12,fontWeight:600,border:"1px solid ".concat(l.C.accent),cursor:"pointer",background:l.C.accent,color:"#fff"},children:(0,s.DB)(e.type)}),e.contactEmail&&(0,r.jsx)("a",{href:"mailto:".concat(e.contactEmail),style:{padding:"6px 14px",borderRadius:6,fontSize:11,fontWeight:600,border:"1px solid ".concat(l.C.border),cursor:"pointer",background:"transparent",color:l.C.muted,textDecoration:"none",display:"inline-block",transition:"all 0.15s ease"},onMouseEnter:e=>e.currentTarget.style.borderColor=l.C.muted,onMouseLeave:e=>e.currentTarget.style.borderColor=l.C.border,children:"Contact"})]})]})})]},e.id)})})]})}function x(e){let{label:t,value:i}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{style:{fontSize:10,fontWeight:700,color:"#94a3b8",textTransform:"uppercase",letterSpacing:"0.07em",marginBottom:3},children:t}),(0,r.jsx)("div",{style:{fontSize:12,color:l.C.text},children:i})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.