1import{r as n,j as e}from"./react-vendor-KcpGDhDO.js";import{S as u}from"./skeleton-BY9Sv9x3.js";import{e as W,o as Y,de as q,l as V,d as X,df as Z,dg as K,A as w,N as Q,M as ee,E as se,v as L,F as te,bE as ae,U as F,a1 as re,S as oe,W as ie,X as le,Y as ne,Z as ce}from"./index-WFq09cu9.js";import{u as me,P as de,T as pe,a as ue,b as xe,c as he}from"./PublicProfileLayout-DVTcn_Dp.js";import{m as fe}from"./jobsService-CIK7Kfc0.js";import{s as be,g as ge}from"./sourcePriority-BHL1HTox.js";import{J as je}from"./JobRailCard-DW9DwV78.js";import{a as we}from"./groupConstants-CQdi44S4.js";import{L as _e}from"./LocationChip-NVKzWKH_.js";import{p as C,a as Ne}from"./design-BFzSJeXH.js";import{M as ye}from"./message-circle-ClL693kO.js";import{S as ve}from"./send-fX-ZcCvT.js";import{B as Se}from"./building-DiOoQvel.js";import{M as ke}from"./map-pin-PkV8lRPR.js";import{m as Ee}from"./animation-vendor-9EcIC_Dc.js";import"./supabase-vendor-DqO-ystM.js";import"./ui-vendor-IRxhZ7TT.js";import"./profileHandlesService-ZIwtHjFY.js";import"./shortLinksService-DgTHrir4.js";import"./arrow-right-CYzGbR1C.js";import"./copy-D3q0MUkt.js";import"./mail-D3MiN49n.js";import"./SocialProfileHeader-yuh6mhEx.js";import"./palette-C_uQDUlw.js";import"./type-CQ6NtLnW.js";import"./eye-C94xy1es.js";import"./user-round-Dz5B-2EP.js";import"./campaignsService-BuPPphDc.js";import"./jobValidUntil--RUMSZUD.js";import"./ThreeBandCard-BwhgSwh3.js";import"./imageThumbs-B8jHQgqV.js";import"./jobCardHelpers-3WqbjAVL.js";import"./namedDay-C32HNmBp.js";import"./date-SUBYe4yQ.js";import"./date-vendor-C020zrle.js";import"./groupsService-E3wv35Xe.js";import"./profilesService-pkRQbu_6.js";import"./postStatus-C3JyJ8B4.js";import"./metricsService-0Vm9caQk.js";const Pe=10,Be=(o,s)=>{const m=new Map,x=new Map(s.map(t=>[t.id,t]));s.forEach(t=>{const i=t.parent_id?x.get(t.parent_id):null;m.set(t.name,i?.name||t.name)});const r=new Map;return o.forEach(t=>{new Set((t.tags||[]).map(c=>m.get(c)).filter(Boolean)).forEach(c=>r.set(c,(r.get(c)||0)+1))}),[...r.entries()].map(([t,i])=>({name:t,count:i})).sort((t,i)=>i.count-t.count||t.name.localeCompare(i.name,"he"))},Ie=(o,s,m)=>{if(!s)return!0;const x=new Map(m.map(r=>[r.id,r]));return(o.tags||[]).some(r=>{const t=m.find(c=>c.name===r);return t?((t.parent_id?x.get(t.parent_id):null)?.name||t.name)===s:!1})},Te=o=>o?Array.isArray(o)?o:typeof o=="string"?[o]:[]:[],J=10,Le=100;function ws(){const{profile:o}=W(),[s,m]=n.useState(null),[x,r]=n.useState(!0),[t,i]=n.useState([]),[c,M]=n.useState([]),[_,N]=n.useState(!1),[Fe,Ce]=n.useState(!1),[O,y]=n.useState(!1),[v,S]=n.useState([]),[R,A]=n.useState([]),[b,D]=n.useState(null),{profileId:g,isResolving:k,notFound:E}=me("recruiter");Y(s?.full_name?{title:s.full_name}:{}),n.useEffect(()=>{k||(g?U(g):E&&r(!1))},[g,k,E]);const U=async a=>{r(!0);try{const d=await q(a);m(d);try{const p=await V(X.JOB,{where:[{column:"recruiter_id",op:"eq",value:a}],isTestUser:!!o?.is_test_user,limit:Le}),I=be((p||[]).map(l=>({...l,type:"job"})),"created_at",{shuffleSeed:ge()}),T=await fe(I.map(l=>l.id)),j=I.map(l=>T[l.id]?{...l,source_post_url:T[l.id]}:l);if(i(j),j.length>=Pe)try{const l=await Z();S(Be(j,l)),A(l)}catch{S([])}}catch{i([])}M(await K(a))}catch{}r(!1)};if(x)return e.jsx("div",{className:`${C.default} p-4 md:p-8`,children:e.jsx("div",{className:"max-w-5xl mx-auto",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-xl overflow-hidden",children:[e.jsx("div",{className:"h-32 bg-gradient-to-b from-brand-navy to-brand-navy-light"}),e.jsxs("div",{className:"px-8 pb-8",children:[e.jsxs("div",{className:"flex flex-col md:flex-row items-center md:items-end gap-4 -mt-16",children:[e.jsx(u,{className:"w-32 h-32 rounded-full border-4 border-white"}),e.jsxs("div",{className:"flex-1 space-y-2 pt-4",children:[e.jsx(u,{className:"h-8 w-48"}),e.jsx(u,{className:"h-5 w-64"}),e.jsx(u,{className:"h-4 w-32"})]})]}),e.jsxs("div",{className:"mt-8 grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsx(u,{className:"h-32 rounded-xl"}),e.jsx(u,{className:"h-32 rounded-xl"})]})]})]})})});if(!s)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-slate-50",children:e.jsxs("div",{className:"text-center p-12",children:[e.jsx(w,{className:"w-16 h-16 mx-auto text-slate-300 mb-4"}),e.jsx("p",{className:"text-xl font-medium text-slate-500",children:"×× × ××¦× ×¤×¨×פ×× ××××ס"}),e.jsx("p",{className:"text-slate-400 mt-2",children:"××ת×× ×©×פר×פ×× ××סר ×× ×©××§×ש×ר ש×××"})]})});const h=s.full_name||"××× ×©×",P=Te(s.specialization),B=s.bio||s.description||"",$={whatsapp:s.show_whatsapp&&s.whatsapp_link?s.whatsapp_link:null,email:s.show_email&&s.email?s.email:null,phone:s.show_phone&&s.phone?s.phone:null},G=[{show:s.show_linkedin_profile,url:s.linkedin_profile,icon:Q,label:"××× ×§××××"},{show:s.show_facebook_profile,url:s.facebook_profile,icon:ee,label:"פ××ס×××§"},{show:s.show_whatsapp,url:s.whatsapp_link,icon:ye,label:"××××ס×פ"},{show:s.show_telegram,url:s.telegram_link,icon:ve,label:"×××ר×"},{show:!0,url:s.website,icon:se,label:"×תר"}].filter(a=>a.show&&a.url),z=[(s.company||s.is_freelancer)&&(s.is_freelancer?{icon:w,label:"×××ס עצ×××"}:{icon:Se,label:s.company}),s.location&&{icon:ke,label:s.location},s.experience_years&&{icon:L,label:`${s.experience_years} ×©× ×ת × ×ס×××`}
1].filter(Boolean),f=b?t.filter(a=>Ie(a,b,R)):t,H=[B&&{id:"about",label:"××××ת",icon:te,node:e.jsx(de,{children:B})},P.length>0&&{id:"expertise",label:"ת×××× ×ת×××ת",icon:ae,node:e.jsx(pe,{items:P})},t.length>0&&{id:"jobs",label:"×שר×ת פע×××ת",icon:L,aside:e.jsxs("span",{className:"ms-auto flex items-center gap-2",children:[f.length>J&&!_&&e.jsx("button",{type:"button",onClick:()=>N(!0),className:"text-xs font-bold text-brand-blue hover:underline",children:"××¦× ×××"}),e.jsx("span",{className:"rounded-full bg-slate-100 px-2 py-0.5 text-xs font-bold text-slate-600",children:f.length})]}),node:e.jsxs("div",{children:[v.length>1&&e.jsx("div",{className:"mb-4 flex flex-wrap gap-1.5",children:v.map(({name:a,count:d})=>{const p=b===a;return e.jsxs("button",{type:"button",onClick:()=>{D(p?null:a),N(!1)},"aria-pressed":p,className:`inline-flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs font-bold transition-colors ${p?"border-brand-navy bg-brand-navy text-white":"border-slate-200 bg-white text-slate-600 hover:border-brand-navy"}`,children:[a,e.jsx("span",{className:p?"text-white/70":"text-slate-400",children:d})]},a)})}),e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:(_?f:f.slice(0,J)).map((a,d)=>e.jsx(je,{job:a,index:d,layout:"grid"},a.id))})]})}].filter(Boolean);return e.jsx(ue,{profileName:h,contactInfo:$,children:e.jsxs("div",{className:`${C.brand} pb-2`,dir:"rtl",children:[e.jsx("div",{className:"mx-auto max-w-5xl px-4 pt-3 md:px-6 md:pt-6",children:e.jsx(_e,{label:"××××ס××",to:"/recruiters",current:h})}),e.jsx(Ee.div,{...Ne,className:"pt-3 md:pt-4",children:e.jsx(xe,{owner:{full_name:h,headline:s.headline||s.position,profile_image:s.profile_image,cover_gradient:s.cover_gradient,cover_text:s.cover_text},coverBadge:s.is_featured&&e.jsxs(re,{className:"bg-brand-amber text-slate-900 hover:bg-brand-amber shadow-lg",children:[e.jsx(oe,{className:"w-3.5 h-3.5 me-1"}),"××××ס ×××××¥"]}),chips:z,socialLinks:G,actions:c.length>0&&e.jsxs("button",{type:"button",onClick:()=>y(!0),className:"inline-flex w-full items-center justify-center gap-1.5 rounded-lg border border-slate-200 px-3 py-2 text-sm font-semibold text-slate-700 transition-colors hover:border-brand-navy hover:text-brand-navy",children:[e.jsx(F,{className:"h-4 w-4","aria-hidden":"true"}),"×פר×פ×× ××§××צ×ת ש×× ×"]}),sections:H,emptyState:e.jsx(he,{icon:w,title:"×פר×פ×× ×¢×××× ×× ××××",hint:"×××¨× ××××ר ××תר ××¢×××× ××"})})}),e.jsx(ie,{open:O,onOpenChange:y,children:e.jsxs(le,{className:"max-w-md",dir:"rtl",children:[e.jsx(ne,{children:e.jsxs(ce,{className:"text-base",children:[h," ××§××צ×ת ש×× ×"]})}),e.jsx("div",{className:"space-y-1",children:c.map(a=>e.jsxs("a",{href:a.author_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 rounded-lg px-3 py-2.5 transition-colors hover:bg-slate-50",children:[e.jsx(F,{className:"h-4 w-4 shrink-0 text-slate-400","aria-hidden":"true"}),e.jsx("span",{className:"flex-1 text-sm text-slate-700",children:we(a.group_name)}),e.jsxs("span",{className:"text-xs text-slate-400",children:[a.jobs_count," ",a.jobs_count===1?"×שר×":"×שר×ת"]})]},a.group_id))})]})}),e.jsx("div",{className:"pb-2"})]})})}export{ws 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.