PageSourceSearch

https://kollega.ai/assets/AllCandidatesPage-DXmurjU-.js

js kollega.ai collected 2026-10-05 12:08:03 UTC 25,258 bytes, 6 lines download raw bytes

1import{j as e}from"./vendor-editor-B5v07e1y.js";import{a as y,R as _}from"./vendor-charts-x3_JpA8L.js";import{c as Ue,j as de,D as Be,a as Ee,b as Ve,G as le,d as z,k as Re,e as _e,C as ie}from"./index-fiGoVOw_.js";import{a as Oe}from"./vendor-query-C94pIwNL.js";import{p as qe,q as Qe,b as Ke,r as We,a as He,d as Je,c as Ge}from"./hooks-D71KYXSY.js";import{a as Xe}from"./hooks-B0IxdJ9f.js";import{u as T}from"./i18n.generated-BtOkNL0B.js";import{F as Ye}from"./FilterToolbar-D5acZZ7L.js";import"./skeleton-CAA-Ow0n.js";import"./vendor-i18n-C7sBi11W.js";import{S as Ze}from"./hooks-D3SZL2KY.js";import"./TurnstileWidget-DdLsDA1k.js";import{c as O,f as q,S as oe,A as ce,d as ea,P as me,e as aa,a as ta,R as sa,h as ra}from"./CandidateProfile-DKwjdvRz.js";import{S as la,t as R,a as ia,b as na,c as da,d as oa,f as ca}from"./select-8bxIPmDJ.js";import{C as Q}from"./checkbox-DdGIAvEf.js";import"./textarea-DVJens9y.js";import"./radio-group-CxL14qyC.js";import"./time-picker-DDbI5lXD.js";import"./input-BhsbkQsg.js";import"./date-picker-DTLwY8lI.js";import"./ChatWindow-DynWvBKh.js";import"./core.esm-BxIz5KNU.js";import{U as ma}from"./user-DFIl0cCu.js";import{E as xa}from"./external-link-Bl6W-Fxr.js";import{S as K}from"./star-oamgmZd9.js";import{M as ga}from"./mail-CYVOMz9k.js";import{A as xe}from"./Avatar-x9UJHp5j.js";import{T as ge,a as N,b as ua,c as ha,d as S,e as ba}from"./table-B9oTqWli.js";import{C as pa}from"./chevron-down-BboIilIx.js";import{C as ya}from"./circle-alert-z2VpT9gy.js";import{E as ja}from"./eye-ChfQP03k.js";import{X as fa}from"./x-DieSpbTc.js";import{U as ka}from"./users-TB3v-1s4.js";import{C as ne}from"./chevron-left-POkY_fya.js";import"./vendor-sentry-BZrG4QX-.js";import"./vendor-socket-CL3SdtP1.js";import"./search-CFg9H6tx.js";import"./sliders-horizontal-BIv-JIng.js";import"./grip-vertical-G7NTVABg.js";import"./clock-DPda55Z6.js";import"./bot-TtSyNnf_.js";import"./message-circle-CYsuITlf.js";import"./wrench-CgiQ0lCe.js";import"./briefcase-DDjPBLqe.js";import"./trophy-BQ2fQHaZ.js";import"./ban-DoDHpa9D.js";import"./file-text-DSP0Uhfs.js";import"./DocumentPreview-Ce6bh7ap.js";import"./download-D1kcWT5U.js";import"./building-KIidTDbc.js";import"./phone-CPt30gCp.js";import"./hooks-D2DWkHZy.js";import"./CalendarAvailabilitySlots-ChqV3ctw.js";import"./hooks-DOqGzZG6.js";import"./validationErrorFormatter-DfDoMkZK.js";import"./refresh-cw-BZiApRsL.js";import"./calendar-sZv9_RI6.js";import"./settings-DKDKKXWK.js";import"./circle-check-big-B_q4S5Nj.js";import"./plus-UAuB_GRa.js";import"./trash-2-NxYl38ng.js";import"./circle-x-CMS1uC02.js";import"./hooks-CuFvfF3o.js";import"./globe-BD1H2DLW.js";import"./mic-CreG5dvT.js";import"./format-D6hvz-f7.js";import"./en-US-B32h3Idb.js";import"./isSameDay-DdGLoxX0.js";import"./triangle-alert-BtDJ7feK.js";import"./ellipsis-vertical-oIbYKgHf.js";import"./user-plus-C8sWMMDO.js";import"./info-CTE10BbS.js";import"./send-CdETN2x4.js";import"./loader-circle-BQv0O-yU.js";import"./arrow-right-6xrGmTA3.js";import"./hooks-CGnGzqoV.js";import"./pencil-uXqIr_b1.js";import"./trash-8i9B10TP.js";import"./hooks-sGAGGG7b.js";import"./index-BqG7uP9D.js";import"./index-D4mGc1Iv.js";import"./chevron-up-C12jjcFw.js";import"./minus-D32uYn9z.js";import"./popover-QJrW4baz.js";import"./endOfMonth-bs6ePwHs.js";import"./italic-B1Cddk2W.js";import"./code-Dn21Y4U0.js";import"./list-CRRAbtie.js";/**
2 * @license lucide-react v0.441.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Ca=Ue("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);function va(){const[a,o]=de(),j=y.useMemo(()=>({candidateId:a.get("candidateId"),status:a.get("status"),orderBy:a.get("orderBy")||"total_score",ascending:a.get("ascending")==="true",tab:a.get("tab")||"overview"}),[a]),i=y.useCallback(d=>{o(u=>{const x=new URLSearchParams(u);return Object.entries(d).forEach(([n,l])=>{l==null||l===""?x.delete(n):typeof l=="boolean"?n==="ascending"&&!l?x.delete(n):x.set(n,String(l)):n==="orderBy"&&l==="total_score"||n==="tab"&&l==="overview"?x.delete(n):x.set(n,String(l))}),x},{replace:!0})}
6,[o]),c=y.useMemo(()=>({setCandidateId:d=>i({candidateId:d}),setStatus:d=>i({status:d}),setOrderBy:d=>i({orderBy:d}),setAscending:d=>i({ascending:d}),setTab:d=>i({tab:d}),updateMultiple:i}),[i]);return[j,c]}const W=_.memo(({application:a,onViewProfile:o,onSeeInListing:j,onToggleFavorite:i,onShareViaEmail:c,showStatusBadge:d=!1})=>{const{t:u}=T("candidates"),x=O(a.status);return e.jsxs(Be,{children:[e.jsx(Ee,{asChild:!0,children:e.jsx("button",{className:"p-1.5 rounded-lg text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",onClick:n=>n.stopPropagation(),children:e.jsx(Ca,{size:16})})}),e.jsxs(Ve,{align:"end",className:"w-48",children:[d&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"px-3 py-2",children:[e.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:u("actionMenu.status")}),e.jsx("div",{className:"mt-1",children:e.jsx("span",{className:`inline-flex text-xs font-medium px-2 py-0.5 rounded border ${x.bg} ${x.text} ${x.border}`,children:q(a.status)})})]}),e.jsx(le,{})]}),e.jsxs(z,{onClick:o,children:[e.jsx(ma,{size:14}),u("actionMenu.viewProfile")]}),e.jsxs(z,{onClick:j,children:[e.jsx(xa,{size:14}),u("actionMenu.seeInListing")]}),e.jsxs(z,{onClick:i,children:[e.jsx(K,{size:14,className:a.isFavorite?"text-yellow-500 fill-yellow-500":""}),a.isFavorite?u("actionMenu.removeFavorite"):u("actionMenu.addToFavorites")]}),c&&e.jsxs(e.Fragment,{children:[e.jsx(le,{}),e.jsxs(z,{onClick:c,children:[e.jsx(ga,{size:14}),u("actionMenu.shareViaEmail")]})]})]})]})});W.displayName="CandidateActionMenu";const Na=a=>new Date(a).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),ue=_.memo(({application:a,isSelected:o,onSelect:j,onClick:i,onToggleFavorite:c,onJobClick:d,onSeeInListing:u,onShareViaEmail:x})=>{const{t:n}=T("candidates"),l=O(a.status),b=!a.isSeen;return e.jsxs(ge,{onClick:i,className:`cursor-pointer ${o?"bg-ink-50 dark:bg-ink-900/10":b?"bg-blue-100/60 dark:bg-blue-900/15 hover:bg-blue-100 dark:hover:bg-blue-900/25":""} ${b?"border-l-3 border-l-blue-500":""}`,children:[e.jsx(N,{className:"px-3 py-2.5",onClick:g=>g.stopPropagation(),children:e.jsx("div",{className:"flex items-center justify-center h-8",children:e.jsx(Q,{checked:o,onCheckedChange:()=>j()})})}),e.jsx(N,{className:"px-3 py-2.5",onClick:g=>g.stopPropagation(),children:e.jsx("button",{onClick:d,className:"text-sm font-medium text-purple-600 dark:text-purple-400 hover:underline text-left",children:a.jobTitle||n("table.unknownRole")})}),e.jsx(N,{className:"px-3 py-2.5",children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(xe,{name:a.name,imageUrl:a.image||void 0,size:"sm"}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`text-sm leading-tight ${b?"font-semibold text-gray-900 dark:text-white":"font-medium text-gray-900 dark:text-white"}`,children:a.name||n("table.unknownName")}),b&&e.jsx("span",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded-full bg-blue-100 text-blue-700 dark:bg-blue-900/40 dark:text-blue-300 shrink-0",children:n("allCandidatesPage.newBadge")}),a.isFavorite&&e.jsx(K,{size:14,className:"text-yellow-500 fill-yellow-500 shrink-0"}),e.jsx(oe,{source:a.source,size:"xs"}),e.jsx(ce,{accountClaimed:a.accountClaimed,size:"xs"})]}),e.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 truncate leading-tight",children:a.email||n("table.noValue")})]})]})}),e.jsx(N,{className:"px-3 py-2.5",children:e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:a.phone||n("table.noValue")})}),e.jsx(N,{className:"px-3 py-2.5",children:e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:Na(a.applicationDate)})}),e.jsx(N,{className:"px-3 py-2.5",children:e.jsx("div",{className:"flex justify-center",children:a.totalScore!==null?e.jsx(ea,{value:a.totalScore,size:"xs"}):e.jsx("span",{className:"text-sm text-gray-400",children:n("table.noValue")})})}),e.jsx(N,{className:"px-3 py-2.5",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:`inline-flex text-xs font-medium px-2 py-0.5 rounded border ${l.bg} ${l.text} ${l.border}`,children:q(a.status)}),e.jsx(me,{processingStatus:a.processing_status,size:"sm"})]})}),e.jsx(N,{className:"px-3 py-2.5 text-center",onClick:g=>g.stopPropagation(),children:e.jsx(W,{application:a,onViewProfile:i,onSeeInListing:u,onToggleFavorite:()=>c({}),onShareViaEmail:x})})]})});
6ue.displayName="CandidateTableRow";const Sa=a=>new Date(a).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),he=_.memo(({application:a,isExpanded:o,isSelected:j,onToggleExpand:i,onToggleSelect:c,onRowClick:d,onToggleFavorite:u,onSeeInListing:x,onShareViaEmail:n})=>{const{t:l}=T("candidates"),b=O(a.status),g=!a.isSeen;return e.jsxs("div",{className:`${j?"bg-ink-50 dark:bg-ink-900/10":g?"bg-blue-100/60 dark:bg-blue-900/15":""} ${g?"border-l-3 border-l-blue-500":""}`,children:[e.jsxs("div",{className:"flex items-center gap-3 p-3 cursor-pointer",onClick:i,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(pa,{size:16,className:`text-gray-400 transition-transform duration-200 ${o?"":"-rotate-90"}`}),e.jsx(Q,{checked:j,onCheckedChange:()=>c(),onClick:f=>f.stopPropagation()})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx(xe,{name:a.name,imageUrl:a.image||void 0,size:"md"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`text-sm truncate ${g?"font-semibold text-gray-900 dark:text-white":"font-medium text-gray-900 dark:text-white"}`,children:a.name||l("mobileCard.unknown")}),g&&e.jsx("span",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded-full bg-blue-100 text-blue-700 dark:bg-blue-900/40 dark:text-blue-300 flex-shrink-0",children:l("allCandidatesPage.newBadge")}),a.isFavorite&&e.jsx(K,{size:12,className:"text-yellow-500 fill-yellow-500 flex-shrink-0"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:`inline-block text-[10px] font-medium px-1.5 py-0.5 rounded ${b.bg} ${b.text}`,children:q(a.status)}),e.jsx(me,{processingStatus:a.processing_status}),e.jsx(oe,{source:a.source,size:"xs"}),e.jsx(ce,{accountClaimed:a.accountClaimed,size:"xs"})]})]})]}),e.jsx("div",{onClick:f=>f.stopPropagation(),children:e.jsx(W,{application:a,onViewProfile:d,onSeeInListing:x,onToggleFavorite:()=>u({}),onShareViaEmail:n,showStatusBadge:!1})})]}),o&&e.jsx("div",{className:"px-3 pb-3 ml-[52px] mr-3 pt-1 border-t border-gray-100 dark:border-gray-700",children:e.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 text-sm",children:[e.jsx("dt",{className:"text-gray-500 dark:text-gray-400",children:l("mobileCard.role")}),e.jsx("dd",{className:"text-ink-600 dark:text-ink-400 font-medium truncate",children:a.jobTitle||l("table.noValue")}),e.jsx("dt",{className:"text-gray-500 dark:text-gray-400",children:l("mobileCard.score")}),e.jsx("dd",{children:a.totalScore!==null?e.jsx("span",{className:`font-semibold ${aa(a.totalScore)}`,children:a.totalScore}):e.jsx("span",{className:"text-gray-400",children:l("table.noValue")})}),e.jsx("dt",{className:"text-gray-500 dark:text-gray-400",children:l("mobileCard.applied")}),e.jsx("dd",{className:"text-gray-700 dark:text-gray-300",children:Sa(a.applicationDate)}),e.jsx("dt",{className:"text-gray-500 dark:text-gray-400",children:l("mobileCard.email")}),e.jsx("dd",{className:"text-gray-700 dark:text-gray-300 truncate",children:a.email||l("table.noValue")}),e.jsx("dt",{className:"text-gray-500 dark:text-gray-400",children:l("mobileCard.phone")}),e.jsx("dd",{className:"text-gray-700 dark:text-gray-300",children:a.phone||l("table.noValue")})]})})]})});he.displayName="CandidateMobileCard";const is=()=>{var se,re;const{t:a}=T("candidates"),[o,j]=de(),{company:i}=Re(),c=parseInt(o.get("page")||"1",10),d=o.get("jobId")||"",u=o.get("status")||"",x=o.get("orderBy")||"created_at",n=o.get("ascending")==="true",l=o.get("timespan")||"",b=o.get("search")||"",[g,f]=y.useState(new Set),[be,pe]=y.useState(new Set),[ye,A]=y.useState(!1),[w,F]=y.useState(null),[je,M]=va(),v=je.candidateId,[fe,L]=y.useState(!1),H=Oe(),$=_e(),ke={page:c,limit:10,orderBy:x,ascending:n,...u&&{status:u},...d&&{jobId:d}},{data:k,isLoading:Ce,error:J}=qe(ke,{enabled:!!(i!=null&&i.id)}),{data:D}=Xe({companyId:(i==null?void 0:i.id)||""},{enabled:!!(i!=null&&i.id)}),ve=Qe(),Ne=Ke(),G=We(),Se=He({onSuccess:()=>{H.invalidateQueries({queryKey:["applications"]}),f(new Set)}}),{data:U,isLoading:we}=Je(v||"",{enabled:!!v}),P=U==null?void 0:U.data,X=Ge({onSuccess:()=>{H.invalidateQueries({queryKey:["applications"]}),L(!1)},onError:()=>{L(!1)}}),Y=(k==null?void 0:k.data)||[],m=(se=k==null?void 0:k.metadata)==null?void 0:se.pagination,B=((re=k==null?void 0:k.metadata)==null?void 0:re.unseenCount)??0,Pe=(D==null?void 0:D.data)||[],Me=y.useMemo(()=>[{value:"",label:a("allCandidatesPage.filters.allStages")}
6,{value:"screening",label:a("statusLabels.screening")},{value:"interview",label:a("statusLabels.interview")},{value:"assessment",label:a("statusLabels.assessment")},{value:"offer",label:a("statusLabels.offer")},{value:"hired",label:a("statusLabels.hired")},{value:"rejected",label:a("statusLabels.rejected")},{value:"withdrawn",label:a("statusLabels.withdrawn")}],[a]),Ie=y.useMemo(()=>[{value:"created_at-desc",label:a("allCandidatesPage.sort.newestFirst")},{value:"created_at-asc",label:a("allCandidatesPage.sort.oldestFirst")},{value:"total_score-desc",label:a("allCandidatesPage.sort.highestScore")},{value:"total_score-asc",label:a("allCandidatesPage.sort.lowestScore")}],[a]),ze=y.useMemo(()=>[{value:"",label:a("allCandidatesPage.filters.allTime")},{value:"7",label:a("allCandidatesPage.filters.last7Days")},{value:"30",label:a("allCandidatesPage.filters.last30Days")},{value:"90",label:a("allCandidatesPage.filters.last90Days")}],[a]),Te=[{key:"jobId",label:a("allCandidatesPage.filters.appliedRole"),options:[{value:"",label:a("allCandidatesPage.filters.allRoles")},...Pe.map(t=>({value:t.id,label:t.title}))]},{key:"status",label:a("allCandidatesPage.filters.stage"),options:Me}],p=y.useMemo(()=>{let t=Y;if(b.trim()){const s=b.toLowerCase();t=t.filter(r=>{var h,I,V;return(((h=r.name)==null?void 0:h.toLowerCase())||"").includes(s)||(((I=r.email)==null?void 0:I.toLowerCase())||"").includes(s)||(((V=r.jobTitle)==null?void 0:V.toLowerCase())||"").includes(s)})}if(l){const s=parseInt(l,10),r=new Date;r.setDate(r.getDate()-s),t=t.filter(h=>new Date(h.applicationDate)>=r)}return t},[Y,b,l]),C=t=>{const s=new URLSearchParams(o);Object.entries(t).forEach(([r,h])=>{h===void 0||h===""?s.delete(r):s.set(r,h)}),"page"in t||s.set("page","1"),j(s)};y.useEffect(()=>{v&&p.length>0&&(p.some(s=>s.id===v)||M.setCandidateId(null))},[p,v,M]);const Z=t=>{t.isSeen||Ne.mutate(t.id),M.setCandidateId(t.id)},ee=()=>{M.setCandidateId(null)},Ae=async t=>{if(!v||!P)return;L(!0);const s=P.status,I=s&&["filtered_out","rejected","withdrawn","hired"].includes(s)?"reconsider":"normal";try{await X.mutateAsync({applicationId:v,status:t,transition_type:I})}catch{}},ae=(t,s)=>{t.stopPropagation(),ve.mutate({applicationId:s.id,isFavorite:!s.isFavorite})},te=t=>{f(s=>{const r=new Set(s);return r.has(t)?r.delete(t):r.add(t),r})},Fe=()=>{f(E?new Set:new Set(p.map(t=>t.id)))},E=p.length>0&&p.every(t=>g.has(t.id)),Le=p.some(t=>g.has(t.id))&&!E,$e=t=>{pe(s=>{const r=new Set(s);return r.has(t)?r.delete(t):r.add(t),r})},De=()=>{if(!m)return[];const t=m.totalPages,s=m.page,r=[];if(t<=7)for(let h=1;h<=t;h++)r.push(h);else{r.push(1),s>3&&r.push("...");for(let h=Math.max(2,s-1);h<=Math.min(t-1,s+1);h++)r.push(h);s<t-2&&r.push("..."),r.push(t)}return r};return Ce?e.jsx("div",{className:"px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto w-full flex justify-center items-center h-64",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-ink-600"})}):J?e.jsx("div",{className:"px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto w-full",children:e.jsxs("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative",role:"alert",children:[e.jsxs("strong",{className:"font-bold mr-2",children:[e.jsx(ya,{size:18,className:"inline -mt-1"})," ",a("allCandidatesPage.errors.error")]}),e.jsx("span",{className:"block sm:inline",children:J.message||a("allCandidatesPage.errors.failedToLoad")})]})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"px-4 sm:px-6 lg:px-8 py-6 sm:py-8 max-w-7xl mx-auto w-full overflow-x-hidden",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("h1",{className:"text-xl md:text-2xl font-bold text-gray-900 dark:text-white",children:a("allCandidatesPage.title")}),(m==null?void 0:m.total)!==void 0&&e.jsx("span",{className:"px-2.5 py-1 text-sm font-medium bg-ink-700 dark:bg-ink-600 text-white rounded-full",children:m.total}),B>0&&e.jsx("span",{className:"px-2.5 py-1 text-sm font-medium bg-blue-500 text-white rounded-full",children:a("allCandidatesPage.unseenCount",{count:B})}),e.jsx("div",{className:"flex-1"}),B>0&&e.jsxs("button",{onClick:()=>G.mutate({jobId:d||void 0,status:u||void 0}),disabled:G.isPending,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-blue-600 dar
6k:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors disabled:opacity-50",children:[e.jsx(ja,{size:14}),a("allCandidatesPage.markAllSeen")]})]}),e.jsx("div",{className:"mb-4",children:e.jsx(Ye,{searchQuery:b,onSearchChange:t=>C({search:t}),searchPlaceholder:a("allCandidatesPage.search.placeholder"),filters:Te,activeFilters:{jobId:d,status:u},onFilterChange:(t,s)=>C({[t]:s}),inlineFilters:!0,sortOptions:Ie,sortValue:`${x}-${n?"asc":"desc"}`,onSortChange:t=>{const[s,r]=t.split("-");C({orderBy:s,ascending:r==="asc"?"true":void 0})},children:e.jsxs(la,{value:R(l),onValueChange:t=>C({timespan:ca(t)}),children:[e.jsx(ia,{selectSize:"sm",className:"w-auto bg-gray-100 dark:bg-gray-800 border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700",children:e.jsx(na,{})}),e.jsx(da,{children:ze.map(t=>e.jsx(oa,{value:R(t.value),children:t.label},R(t.value)))})]})})}),g.size>0&&e.jsxs("div",{className:"mb-4 p-3 bg-ink-50 dark:bg-ink-900/20 rounded-lg border border-ink-200 dark:border-ink-700 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-medium text-ink-700 dark:text-ink-300",children:a("allCandidatesPage.bulkActions.selected",{count:g.size})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>A(!0),disabled:Se.isPending,className:"px-3 py-1.5 text-sm font-medium text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-colors flex items-center gap-1.5 disabled:opacity-50",children:[e.jsx(fa,{size:14}),a("allCandidatesPage.bulkActions.reject")]}),e.jsx("button",{onClick:()=>f(new Set),className:"px-3 py-1.5 text-sm font-medium text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:a("allCandidatesPage.bulkActions.clear")})]})]}),p.length===0&&e.jsxs("div",{className:"text-center py-16 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700",children:[e.jsx(ka,{size:48,className:"mx-auto text-gray-300 dark:text-gray-600 mb-4"}),e.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:b?a("allCandidatesPage.emptyState.noMatchingCandidates",{query:b}):a("allCandidatesPage.emptyState.noCandidatesFound")})]}),p.length>0&&e.jsxs("div",{className:"md:hidden bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 divide-y divide-gray-100 dark:divide-gray-700",children:[p.map(t=>e.jsx(he,{application:t,isExpanded:be.has(t.id),isSelected:g.has(t.id),onToggleExpand:()=>$e(t.id),onToggleSelect:()=>te(t.id),onRowClick:()=>Z(t),onToggleFavorite:s=>ae(s,t),onSeeInListing:()=>{$(`/jobs/${t.jobId}/candidates?candidateId=${t.id}`)},onShareViaEmail:()=>F({id:t.id,name:t.name})},t.id)),m&&m.totalPages>1&&e.jsxs("div",{className:"flex items-center justify-between px-3 py-3",children:[e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:a("allCandidatesPage.pagination.page",{page:c,total:m.totalPages})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>C({page:String(c-1)}),disabled:c===1,className:"p-2 rounded border border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:e.jsx(ne,{size:16})}),e.jsx("button",{onClick:()=>C({page:String(c+1)}),disabled:!m.hasMore,className:"p-2 rounded border border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:e.jsx(ie,{size:16})})]})]})]}),p.length>0&&e.jsxs("div",{className:"hidden md:block bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden",children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(ua,{children:[e.jsx(ha,{children:e.jsxs(ge,{className:"border-b border-gray-200 dark:border-gray-700",children:[e.jsx(S,{className:"px-3 py-2.5 w-10",children:e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(Q,{checked:Le?"indeterminate":E,onCheckedChange:()=>Fe()})})}),e.jsx(S,{className:"px-3 py-2.5",children:a("allCandidatesPage.table.headers.appliedRole")}),e.jsx(S,{className:"px-3 py-2.5",children:a("allCandidatesPage.table.headers.candidate")}),e.jsx(S,{className:"px-3 py-2.5",children:a("allCandidatesPage.table.headers.contact")}),e.jsx(S,{className:"px-3 py-2.5",children:a("allCandidatesPage.table.headers.appliedDate")}),e.jsx(S,{className:"px-3 py-2.5 text-center",children:a("allCandidatesPage.table.headers.aiScore")}),e.jsx(S,{className:"px-3 py-2.5",children:a("allCandidatesPage.table.headers.stage")}),e.jsx(S,{className:"px-3 py-2.5 w-10",children:e.jsx("span",{className:"sr-only",children:a("allCandidatesPage.table.headers.actions")})})]})}),e.jsx(ba,{className:"divide-y divide-gray-100 dark:divide-gray-700",children:p.map(t=>e.jsx(ue,{application:t,isSelected:g.has(t.id),onSelect:()=>te(t.id),onClick:()=>Z(t),onToggleFavorite:s=>ae(s,t),onJobClick:()=>$(`/jobs/${t.jobId}/candidates`),onSeeInListing:()=>{$(`/jobs/${t.jobId}/candidates?candidateId=${t.id}`)},onShareViaEmail:()=>F({id:t.id,name:t.name})},t.id))})]})}),e.jsxs("div",{className:"px-4 py-3 border-t border-gray-200 dark:border-gray-700 flex items-center justify-between",children:[e.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:[a("allCandidatesPage.pagination.showing")," ",e.jsx("span",{className:"font-medium",children:m?(c-1)*10+1:1})," ",a("allCandidatesPage.pagination.to")," ",e.jsx("span",{className:"font-medium",children:m?Math.min(c*10,m.total):p.length})," ",a("allCandidatesPage.pagination.of")," ",e.jsx("span",{className:"font-medium",children:(m==null?void 0:m.total)||p.length})," ",a("allCandidatesPage.pagination.entries")]}),m&&m.totalPages>1&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>C({page:String(c-1)}),disabled:c===1,className:"p-2 rounded border border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:e.jsx(ne,{size:16})}),De().map((t,s)=>t==="..."?e.jsx("span",{className:"px-2 text-gray-400",children:"..."},`ellipsis-${s}`):e.jsx("button",{onClick:()=>C({page:String(t)}),className:`min-w-[36px] h-9 rounded border text-sm font-medium transition-colors ${t===c?"bg-ink-
6700 border-ink-700 text-white":"border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700"}`,children:t},t)),e.jsx("button",{onClick:()=>C({page:String(c+1)}),disabled:!m.hasMore,className:"p-2 rounded border border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:e.jsx(ie,{size:16})})]})]})]})]}),e.jsx(Ze,{isOpen:!!v,onClose:ee,resizable:!0,defaultWidth:600,minWidth:400,maxWidth:1e3,storageKey:"candidate-sidebar-width",children:t=>e.jsx(ta,{application:P,documents:(P==null?void 0:P.documents)||[],onClose:ee,onStatusUpdate:Ae,isUpdating:fe||X.isPending,variant:"sidebar",isLoading:we,error:null,panelWidth:t})}),e.jsx(sa,{isOpen:ye,onClose:()=>A(!1),applicationIds:Array.from(g),onSuccess:()=>{f(new Set),A(!1)}}),e.jsx(ra,{isOpen:!!w,onClose:()=>F(null),applicationId:(w==null?void 0:w.id)||"",candidateName:(w==null?void 0:w.name)||""})]})};export{is as AllCandidatesPage,is 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.