PageSourceSearch

https://infoliga.lovable.app/assets/NetworkingDatabasePage-Dzh126Nt.js

js infoliga.lovable.app collected 2026-10-03 03:30:37 UTC 17,908 bytes, 15 lines download raw bytes

1import{j as e,e as b,a as B,s as q,r as p,G as w,L as F}from"./index-B8Dc63x_.js";import{P as G}from"./PageLayout-BlVBFAKP.js";import{I as H}from"./input-BO6lSX2O.js";import{B as M}from"./badge-CmFsG1_o.js";import{u as K}from"./useQuery-BCYDBY_r.js";import{A as _,a as S,b as C}from"./avatar-CqXLR6_8.js";import{n as R,a as E}from"./socialLinks-DsBKXkg1.js";import{I as P}from"./instagram-B__kRhqc.js";import{S as U}from"./send-B3ivAUUh.js";import{M as A}from"./map-pin-aZFUBHjs.js";import{B as I}from"./briefcase-DKm1ujzm.js";import{D as O,b as Q,c as W,d as J}from"./dialog-BSj2CJo0.js";import{S as X}from"./sparkles-DRaIU0gq.js";import{m as V}from"./proxy-Btef8N91.js";import{S as z,a as T,b as $,c as D,d as k}from"./select-BJ3czOmj.js";import{S as Y}from"./search-C2lTWZWS.js";import{U as Z}from"./users-DDuesyhN.js";import{U as ee}from"./user-search-BoBJIH9x.js";import"./button-9BsRAvlC.js";import"./endOfMonth-XeyFCMRz.js";import"./index-BCW2Bzs0.js";import"./ru-DscSjZb_.js";import"./target-BeZ6XNQL.js";import"./flame-CndcjEjE.js";import"./trending-up-DkxLiwEV.js";import"./chevron-down-CQLaAbvX.js";import"./trash-2-B6H-oAQB.js";import"./useKnowledgeCategories-DCleEjK_.js";import"./useMutation-qJsIGkoK.js";import"./formatDistanceToNow-DdA6tJnI.js";import"./constructNow-lY-wweAe.js";import"./package-BNoX7M3O.js";import"./house-CB2G9cqr.js";import"./calendar-BC0IKwOI.js";import"./square-check-big-CXq3Z_oR.js";import"./compass-DkuvDqF4.js";import"./paperclip-KS2tPwm6.js";import"./brain-DIDQtWhB.js";import"./lightbulb-BDS9iJ5O.js";import"./rocket-lp5ni_nE.js";import"./differenceInDays-CdYVTmpk.js";import"./format-F8HcQvh7.js";import"./zap-B_hn-1iJ.js";import"./mic-DoMOQe6Q.js";import"./index-BIpHzjgx.js";import"./index-CVU_N1qf.js";import"./scroll-area-D425RR7L.js";import"./index-CDLPjKBt.js";import"./index-BdQq_4o_.js";import"./isBefore-BjQuR_yR.js";import"./info-CiLYZR-M.js";import"./circle-x-CmT8iqvM.js";import"./triangle-alert-7pOGy1ew.js";import"./parseISO-C7hah6W6.js";import"./circle-alert-BM9_XNuG.js";import"./clock-BGr--5Df.js";import"./isToday-BsOH9kr7.js";import"./isSameDay-D589YSO3.js";import"./index-BVB6zetQ.js";import"./index-BPO9yh2v.js";import"./chevron-up-kwGju07V.js";import"./check-DG_VMtGm.js";function re({icon:r,title:l,description:o,action:i,className:m}){return e.jsxs("div",{className:b("relative flex flex-col items-center text-center px-6 py-12 rounded-2xl","border border-border/40 bg-foreground
1/[0.02] backdrop-blur-sm","noise",m),children:[r&&e.jsxs("div",{className:"relative mb-5",children:[e.jsx("div",{className:"absolute inset-0 rounded-full blur-2xl opacity-50",style:{background:"radial-gradient(circle, hsl(var(--gold) / 0.55), transparent 70%)"}}),e.jsx("div",{className:"relative h-16 w-16 rounded-full flex items-center justify-center border border-gold/30 bg-[linear-gradient(180deg,hsl(var(--gold)/0.15),hsl(var(--gold)/0.04))] shadow-[inset_0_1px_0_hsl(var(--gold)/0.2)]",children:e.jsx(r,{className:"h-7 w-7 text-gold-light",strokeWidth:1.5})})]}),e.jsx("h3",{className:"text-display text-xl mb-2 text-foreground",children:l}),o&&e.jsx("p",{className:"text-sm text-muted-foreground max-w-sm leading-relaxed",children:o}),i&&e.jsx("div",{className:"mt-5 relative z-10",children:i})]})}function se(){const{user:r}=B();return K({queryKey:["all-participants",r==null?void 0:r.telegram_id],enabled:!!(r!=null&&r.telegram_id),queryFn:async()=>{const{data:l,error:o}=await q.from("networking_participants").select(`
2          id,
3          full_name,
4          niche,
5          role,
6          city,
7          photo_url,
8          instagram,
9          telegram_username,
10          cohort_id,
11          cohorts (
12            cohort_number,
13            name
14          )
15        `).order("full_name");if(o)throw console.error("Error fetching participants:",o),o;if(!l||!Array.isArray(l))return[];const i=l.map(t=>{var d,u;return{id:t.id,name:t.full_name||"",niche:t.niche||"",role:t.role||"",city:t.city||"",photo:t.photo_url||"",instagram:t.instagram||"",telegram:t.telegram_username||"",stream:((u=(d=t.cohorts)==null?void 0:d.cohort_number)==null?void 0:u.toString())||"",cohortId:t.cohort_id}}).filter(t=>t.name.trim()!==""),m=t=>(t.photo?1e3:0)+(Number(t.stream)||0)*10+(t.niche?2:0)+(t.city?1:0)+(t.telegram?1:0),n=new Map;for(const t of i){const d=t.name.trim().toLowerCase().replace(/\s+/g," "),u=n.get(d);(!u||m(t)>m(u))&&n.set(d,t)}return Array.from(n.values()).sort((t,d)=>t.name.localeCompare(d.name))},staleTime:5*60*1e3})}const ae=p.memo(function({name:l,niche:o,role:i,city:m,photo:n,instagram:t,telegram:d,compact:u=!1,variant:h="horizontal",onClick:x}){const g=p.useMemo(()=>l.split(" ").map(c=>c[0]).join("").slice(0,2).toUpperCase(),[l]),{instagramUrl:f,telegramUrl:j,hasInstagram:v,hasTelegram:y}=p.useMemo(()=>{const c=R(t),L=E(d);return{instagramUrl:c,telegramUrl:L,hasInstagram:!!c,hasTelegram:!!L}},[t,d]);if(u)return e.jsxs("div",{className:b("flex items-center gap-3 p-2 rounded-lg hover:bg-muted/50 transition-colors",x&&"cursor-pointer"),onClick:x,children:[e.jsxs(_,{className:"h-9 w-9",children:[e.jsx(S,{src:n,alt:l,loading:"lazy"}),e.jsx(C,{className:"text-xs bg-primary/10 text-primary",children:g})]}),e.jsx("span",{className:"font-medium text-sm truncate flex-1",children:l})]});const N=()=>e.jsxs("div",{className:"flex gap-2",children:[v&&f&&e.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",referrerPolicy:"no-referrer","aria-label":`Открыть Instagram: ${l}`,onClick:c=>c.stopPropagation(),className:"p-1.5 rounded-lg bg-primary/10 hover:bg-primary/20 transition-colors",children:e.jsx(P,{className:"w-4 h-4 text-primary"})}),y&&j&&e.jsx("a",{href:j,target:"_blank",rel:"noopener noreferrer",referrerPolicy:"no-referrer","aria-label":`Открыть Telegram: ${l}`,onClick:c=>c.stopPropagation(),className:"p-1.5 rounded-lg bg-primary/10 hover:bg-primary/20 transition-colors",children:e.jsx(U,{className:"w-4 h-4 text-primary"})})]}),s=()=>e.jsx("div",{className:b("signature-card",x&&"cursor-pointer"),onClick:x,role:x?"button":void 0,children:e.jsxs("div",{className:"signature-card__media",children:[n?e.jsx("img",{src:n,alt:l,loading:"lazy"}):e.jsx("div",{className:"signature-card__fallback",children:g}),i&&e.jsx("span",{className:"signature-card__eyebrow",children:i}),(v||y)&&e.jsxs("div",{className:"signature-card__socials",children:[v&&f&&e.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",referrerPolicy:"no-referrer","aria-label":`Открыть Instagram: ${l}`,onClick:c=>c.stopPropagation(),className:"signature-card__social",children:e.jsx(P,{className:"w-3.5 h-3.5"})}),y&&j&&e.jsx("a",{href:j,target:"_blank",rel:"noopener noreferrer",referrerPolicy:"no-referrer","aria-label":`Открыть Telegram: ${l}`,onClick:c=>c.stopPropagation(),className:"signature-card__social",children:e.jsx(U,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"signature-card__body",children:[e.jsx("h3",{className:"signature-card__name",children:l}),o&&e.jsx("p",{className:"signature-card__niche",children:o}),m&&e.jsx("div",{className:"signature-card__meta",children:e.jsxs("span",{children:[e.jsx(A,{className:"w-3 h-3"}),m]})})]})]})}),a=()=>e.jsx(w,{className:b("p-4 transition-all",x&&"cursor-pointer hover:bg-muted/30"),onClick:x,children:e.jsxs("div",{className:"flex gap-4",children:[e.jsxs(_,{className:"h-20 w-20 shrink-0 aspect-square ring-1 ring-gold/20",children:[e.jsx(S,{src:n,alt:l,loading:"lazy",className:"object-cover object-top"}),e.jsx(C,{className:"text-lg bg-primary/10 text-primary",children:g})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-name-display text-sm",children:l}),o&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:o}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-xs text-muted-foreground flex-wrap",children:[i&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(I,{className:"w-3 h-3"}),i]}),m&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(A,{className:"w-3 h-3"}),m]})]}),e.jsx("div",{className:"mt-2",children:e.jsx(N,{})})]})]})});return h==="vertical"?e.jsx(s,{}):h==="horizontal"?e.jsx(a,{}):h==="responsive"?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden lg:block",children:e.jsx(s,{})}),e.jsx("div",{className:"lg:hidden",children:e.jsx(a,{})})]}):h==="compact"?e.jsx(w,{className:b("p-3 transition-all",x&&"cursor-pointer hover:bg-muted/30"),onClick:x,children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs(_,{className:"h-10 w-10 flex-shrink-0",children:[e.jsx(S,{src:n,alt:l,loading:"lazy"}),e.jsx(C,{className:"text-sm bg-primary/10 text-primary",children:g})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-semibold text-sm",children:l}),e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:[o,m].filter(
15Boolean).join(" · ")})]}),e.jsx(N,{})]})}):h==="tag"?e.jsxs(w,{className:b("p-2 transition-all",x&&"cursor-pointer hover:bg-muted/30"),onClick:x,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(_,{className:"h-8 w-8 flex-shrink-0",children:[e.jsx(S,{src:n,alt:l,loading:"lazy"}),e.jsx(C,{className:"text-xs bg-primary/10 text-primary",children:g})]}),e.jsx("span",{className:"font-medium text-sm flex-1 truncate",children:l}),e.jsx(N,{})]}),o&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1 pl-10 truncate",children:o})]}):null});function te({participant:r,open:l,onOpenChange:o}){if(!r)return null;const i=r.name.split(" ").map(t=>t[0]).join("").slice(0,2).toUpperCase(),m=R(r.instagram),n=E(r.telegram);return e.jsx(O,{open:l,onOpenChange:o,children:e.jsxs(Q,{className:"sm:max-w-4xl p-0 border-border/40 bg-background/95 backdrop-blur-xl overflow-hidden",children:[e.jsx(W,{children:e.jsx(J,{className:"sr-only",children:r.name})}),e.jsx("div",{className:"absolute inset-0 pointer-events-none overflow-hidden",children:e.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[500px] h-[500px] rounded-full blur-3xl op
15acity-30",style:{background:"radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"}})}),e.jsxs("div",{className:"relative grid grid-cols-1 md:grid-cols-[1fr_minmax(280px,360px)_1fr] gap-6 md:gap-8 p-6 md:p-10",children:[e.jsxs("div",{className:"hidden md:flex flex-col justify-center order-1 space-y-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(X,{className:"w-4 h-4 text-primary"}),e.jsx("h3",{className:"text-xs font-semibold tracking-[0.2em] uppercase text-primary",children:"Экспертиза"})]}),r.niche?e.jsx("p",{className:"text-sm leading-relaxed text-foreground/80",children:r.niche}):e.jsx("p",{className:"text-sm text-muted-foreground italic",children:"Не указана"})]}),r.role&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-full border border-border/50 bg-card/40 w-fit",children:[e.jsx(I,{className:"w-3.5 h-3.5 text-primary"}),e.jsx("span",{className:"text-xs font-medium text-foreground/90",children:r.role})]})]}),e.jsxs("div",{className:"order-0 md:order-2 flex flex-col items-center",children:[e.jsxs("div",{className:"relative w-full aspect-[3/4] max-w-[320px] rounded-3xl overflow-hidden border border-border/60 shadow-2xl",style:{background:"linear-gradient(135deg, hsl(var(--primary) / 0.25) 0%, hsl(var(--primary) / 0.05) 100%)"},children:[r.photo?e.jsx("img",{src:r.photo,alt:r.name,className:"w-full h-full object-cover object-top"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsx("span",{className:"text-7xl font-bold text-primary/40",children:i})}),e.jsxs("div",{className:"absolute inset-x-0 bottom-0 p-5 pt-20 bg-gradient-to-t from-black/95 via-black/70 to-transparent",children:[e.jsx("h2",{className:"text-name-display text-2xl md:text-3xl text-white",children:r.name}),r.city&&e.jsxs("div",{className:"flex items-center gap-1.5 mt-2 text-white/80",children:[e.jsx(A,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"text-sm",children:r.city})]})]})]}),e.jsxs("div",{className:"md:hidden w-full max-w-[320px] mt-4 space-y-3",children:[r.niche&&e.jsx("p",{className:"text-sm text-center text-foreground/80 leading-relaxed",children:r.niche}),r.role&&e.jsxs("div",{className:"flex items-center justify-center gap-2 text-xs text-muted-foreground",children:[e.jsx(I,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:r.role})]})]})]}),e.jsxs("div",{className:"order-2 md:order-3 flex md:flex-col md:justify-center items-center md:items-end gap-3 md:gap-4",children:[m&&e.jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"group flex items-center gap-2 text-foreground/80 hover:text-primary transition-colors",children:[e.jsx("span",{className:"text-base md:text-lg font-bold tracking-[0.15em] uppercase",children:"Instagram"}),e.jsx("span",{className:"w-9 h-9 rounded-full border border-border/60 flex items-center justify-center group-hover:border-primary group-hover:bg-primary/10 transition-all",children:e.jsx(P,{className:"w-4 h-4"})})]}),n&&e.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"group flex items-center gap-2 text-foreground/80 hover:text-primary transition-colors",children:[e.jsx("span",{className:"text-base md:text-lg font-bold tracking-[0.15em] uppercase",children:"Telegram"}),e.jsx("span",{className:"w-9 h-9 rounded-full border border-border/60 flex items-center justify-center group-hover:border-primary group-hover:bg-primary/10 transition-all",children:e.jsx(U,{className:"w-4 h-4"})})]}),!m&&!n&&e.jsx("span",{className:"text-xs text-muted-foreground italic",children:"Контакты не указаны"})]})]})]})})}const le={hidden:{opacity:1},show:{opacity:1,transition:{staggerChildren:.05,delayChildren:.04}}},ie={hidden:{opacity:0,y:12,scale:.98},show:{opacity:1,y:0,scale:1,transition:{duration:.45,ease:[.22,1,.36,1]}}};function ne({children:r,as:l="div",className:o}){const i=V(l);return e.jsx(i,{className:o,variants:le,initial:"hidden",animate:"show",children:r})}function oe({children:r,as:l="div",className:o}){const i=V(l);return e.jsx(i,{className:o,variants:ie,children:r})}const ce="5";function me(){const{data:r,isLoading:l,error:o}
15=se(),[i,m]=p.useState(""),[n,t]=p.useState("all"),[d,u]=p.useState("all"),[h,x]=p.useState("all"),[g,f]=p.useState(null),j=p.useMemo(()=>{if(!r)return[];const s=new Set(r.map(a=>a.stream).filter(a=>a.trim()!==""));return Array.from(s).sort((a,c)=>Number(c)-Number(a))},[r]),v=p.useMemo(()=>{if(!r)return[];const s=new Set(r.map(a=>a.city).filter(a=>a.trim()!==""));return Array.from(s).sort()},[r]),y=p.useMemo(()=>{if(!r)return[];const s=new Set(r.map(a=>a.role).filter(a=>a.trim()!==""));return Array.from(s).sort()},[r]),N=p.useMemo(()=>{if(!r)return[];let s=r;if(n!=="all"&&(s=s.filter(a=>a.stream===n)),d!=="all"&&(s=s.filter(a=>a.city===d)),h!=="all"&&(s=s.filter(a=>a.role===h)),i.trim()){const a=i.toLowerCase();s=s.filter(c=>c.name.toLowerCase().includes(a)||c.niche.toLowerCase().includes(a)||c.role.toLowerCase().includes(a)||c.city.toLowerCase().includes(a))}return s},[r,i,n,d,h]);return l?e.jsxs(w,{className:"p-8 flex flex-col items-center justify-center",children:[e.jsx(F,{className:"w-8 h-8 text-primary animate-spin mb-2"}),e.jsx("p",{className:"text-muted-foreground",children:"Загружаем участников..."})]}):o?e.jsx(w,{className:"p-5 border-destructive/50",children:e.jsx("p",{className:"text-destructive text-center",children:"Ошибка загрузки данных"})}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(Y,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(H,{placeholder:"Поиск по имени, нише, роли или городу...",value:i,onChange:s=>m(s.target.value),className:"pl-10"})]}),j.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(M,{variant:n==="all"?"default":"matte",className:"cursor-pointer",onClick:()=>t("all"),children:"Все потоки"}),j.map(s=>{const a=s===ce,c=n===s;return e.jsxs(M,{variant:c?a?"foil":"default":a?"gold":"matte",className:"cursor-pointer",onClick:()=>t(s),children:["Поток ",s,a&&" ✦"]},s)})]}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsxs(z,{value:d,onValueChange:u,children:[e.jsx(T,{className:"w-[180px]",children:e.jsx($,{placeholder:"Город"})}),e.jsxs(D,{children:[e.jsx(k,{value:"all",children:"Все города"}),v.map(s=>e.jsx(k,{value:s,children:s},s))]})]}),e.jsxs(z,{value:h,onValueChange:x,children:[e.jsx(T,{className:"w-[180px]",children:e.jsx($,{placeholder:"Роль"})}),e.jsxs(D,{children:[e.jsx(k,{value:"all",children:"Все роли"}),y.map(s=>e.jsx(k,{value:s,children:s},s))]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Z,{className:"w-4 h-4"}),e.jsxs("span",{children:[N.length," из ",(r==null?void 0:r.length)||0," участников",n!=="all"&&` (поток ${n})`]})]}),N.length>0?e.jsx(ne,{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:N.map((s,a)=>e.jsx(oe,{children:e.jsx(ae,{...s,variant:"responsive",onClick:()=>f(s)})},`${s.telegram||s.name}-${a}`))},`${i}-${n}`):e.jsx(re,{icon:ee,title:i?"Ничего не найдено":"Нет участников",description:i?"Попробуй изменить поисковый запрос или сбросить фильтры.":"Здесь появятся участники, как только они присоединятся."}),e.jsx(te,{participant:g,open:!!g,onOpenChange:s=>!s&&f(null)})]})}function Nr(){return e.jsx(G,{title:"База участников",children:e.jsx("div",{className:"p-4 lg:p-8 max-w-6xl",children:e.jsx(me,{})})})}export{Nr as default};

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.