PageSourceSearch

https://www.elevolt.co.ke/_next/static/chunks/3763-5d291d7e2c71db9b.js

js elevolt.co.ke collected 2026-10-04 21:45:13 UTC 47,669 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="da384c5b-b680-4101-9d4a-deeba3811ce7",e._sentryDebugIdIdentifier="sentry-dbid-da384c5b-b680-4101-9d4a-deeba3811ce7")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3763],{251:function(e,t,s){"use strict";s.d(t,{N:function(){return I},T:function(){return N}});var a=s(52322),l=s(47023),n=s(65232),i=s(1973),r=s(17047),o=s(59578),c=s(23640),d=s(18966),u=s(76467),m=s(45558),x=s(59417),h=s(99603),p=s(13980),f=s.n(p),g=s(2784),b=s(62202),v=s(11025),j=s(85052),y=s(59434),w=s(40652);let N={409:"Analysis is still being generated, please check back shortly.",404:"This analysis isn't available. It may still be generating, or you may not have access to it."},k=e=>{let{score:t,size:s=80}=e,l=(s-8)/2,n=2*l*Math.PI,i="".concat(n," ").concat(n),r=n-t/100*n;return(0,a.jsxs)("div",{className:"relative inline-flex items-center justify-center",children:[(0,a.jsxs)("svg",{className:"transform -rotate-90",height:s,width:s,children:[(0,a.jsx)("circle",{className:"text-gray-200",cx:s/2,cy:s/2,fill:"transparent",r:l,stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("circle",{className:(0,c.cl)(t),cx:s/2,cy:s/2,fill:"transparent",r:l,stroke:"currentColor",strokeDasharray:i,strokeDashoffset:r,strokeWidth:"4",style:{transition:"stroke-dashoffset 0.5s ease-in-out"}})]}),(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-2xl font-bold text-gray-900",children:t})})]})};k.propTypes={score:f().number.isRequired,size:f().number};let C=e=>{let{message:t}=e;return(0,a.jsxs)("div",{className:"w-full flex flex-col items-center gap-3 sm:flex-row sm:justify-between",children:[(0,a.jsx)(u.Z,{color:"text-gray-600",variant:"body",children:t}),(0,a.jsx)(l.Z,{className:"w-full sm:w-auto flex-shrink-0",design:"primary",href:"/pricing",size:"sm",children:"View plans"})]})};C.propTypes={message:f().string.isRequired};let A=e=>{let{status:t,stalled:s,onRefresh:n,onReanalyze:i,canReanalyze:r,busy:o,refreshing:c}=e,d="processing"===t;return(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full flex items-center justify-center ".concat(d?"bg-blue-50":"bg-yellow-50"),children:(0,a.jsx)(h.G,{className:"animate-spin ".concat(d?"text-blue":"text-orange"),icon:x.LM3,size:"lg"})}),(0,a.jsx)(u.Z,{as:"h4",className:"mb-2",variant:"sectionHeader",children:d?"Analysis in Progress":"Analysis Queued"}),(0,a.jsx)(u.Z,{className:"mb-2",variant:"body",children:d?"Our AI is carefully reviewing this candidate's profile...":"Your analysis request is in the queue..."}),(0,a.jsx)(u.Z,{variant:"bodySmall",children:d?"This usually takes 1-2 minutes to complete.":"Processing will begin shortly."}),!!s&&(0,a.jsxs)("div",{className:"mt-6 max-w-md mx-auto bg-orange-50 border border-orange-200 rounded-xl p-4 text-left",children:[(0,a.jsx)(u.Z,{color:"text-gray-900",variant:"bodySmall",weight:"font-semibold",children:"This is taking longer than expected"}),(0,a.jsx)(u.Z,{className:"mt-1",color:"text-gray-600",variant:"bodySmall",children:"Refresh to check for an update, or start a new analysis if this one appears stuck."}),(0,a.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,a.jsx)(l.Z,{beforeIcon:(0,a.jsx)(h.G,{icon:x.QDM}),design:"secondary",disabled:c,loading:c,onClick:n,size:"sm",children:"Refresh"}),!!r&&(0,a.jsx)(l.Z,{design:"primary",disabled:o,loading:o,onClick:i,size:"sm",children:"Re-analyze"})]})]})]})};A.propTypes={status:f().oneOf(["processing","pending"]).isRequired,stalled:f().bool.isRequired,onRefresh:f().func.isRequired,onReanalyze:f().func.isRequired,canReanalyze:f().bool.isRequired,busy:f().bool.isRequired,refreshing:f().bool.isRequired};let I=e=>{var t,s,p,f;let{application:I,canAnalyze:z=!1}=e,[R,Z]=(0,g.useState)(!1),[S,F]=(0,g.useState)(!1),[T,G]=(0,g.useState)(!1),{user:q}=(0,d.Eu)(),L=(0,y.G)({enabled:!0}),E=!!(L.hasSubscription||L.isLoading||L.error),{data:P,isLoading:_,refetch:M}=(0,c.sU)({applicationId:null==I?void 0:I.aid,enabled:!!(null==I?void 0:I.aid)}),D=(0,c.ar)(),O=(0,c.Kp)(),W=(0,g.useCallback)(async()=>{G(!0);try{(await M()).isError&&b.default.error("Couldn't refresh the analysis status. Please try again.")}finally{G(!1)}},[M]),B=async()=>{let{canProceed:e,message:t}=L.checkCanProceed();if(!e){Z(!0),b.default.error(t);return}try{await D.mutateAsync({applicationId:I.aid}
1),b.default.success("Analysis started successfully")}catch(e){o.RY(e,{tags:{applicationId:null==I?void 0:I.aid}}),b.default.error("Failed to analyze application")}},V=(0,g.useCallback)(()=>{(0,r.Z)({title:"Re-analyze Application",message:"This will generate a new AI analysis. The current analysis results will be replaced. Are you sure you want to proceed?",confirmButtonText:"Yes, Re-analyze",cancelButtonText:"Cancel",handler:async()=>{let{canProceed:e,message:t}=L.checkCanProceed();if(!e){Z(!0),b.default.error(t);return}try{await D.mutateAsync({applicationId:I.aid}),b.default.success("Analysis started successfully")}catch(e){o.RY(e,{tags:{applicationId:null==I?void 0:I.aid}}),b.default.error("Failed to analyze application")}}})},[L,Z,D,null==I?void 0:I.aid]),Q=async()=>{let{canProceed:e,message:t}=L.checkCanProceed();if(!e){Z(!0),b.default.error(t);return}try{await O.mutateAsync({applicationId:I.aid}),b.default.success("Analysis complete")}catch(t){var s;let e=null==t?void 0:null===(s=t.response)||void 0===s?void 0:s.status;if(402===e||429===e){Z(!0);return}if(403===e)return;(!e||e>=500)&&o.RY(t,{tags:{applicationId:null==I?void 0:I.aid,statusCode:e}}),b.default.error((0,m.g8)(e,t,{messages:N,fallback:"Failed to run analysis. Please try again."}))}},U=()=>{Z(!1),F(!0)},H=()=>(0,a.jsxs)(a.Fragment,{children:[!!R&&(0,a.jsx)(w.Z,{actionType:"AI analysis",onBuyCredits:U,onClose:()=>Z(!1),reason:L.hasSubscription?"limit_reached":"no_subscription",show:R,usageInfo:L}),(0,a.jsx)(v.Z,{isOpen:S,onClose:()=>F(!1),tenantId:null==q?void 0:q.tenant_id})]}),Y=(0,c.dJ)(P),J=D.isPending||(0,c.fq)(P);if(_)return(0,a.jsx)(n.ZP,{children:(0,a.jsx)(n.eW,{children:(0,a.jsx)(i.Z,{design:"wrapped",isLoading:!0,message:"Loading AI analysis..."})})});if(!Y)return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.ZP,{children:(0,a.jsx)(n.eW,{children:(0,a.jsx)(i.Z,{action:(0,a.jsx)(l.Z,{afterIcon:(0,a.jsx)(h.G,{className:"ml-2",icon:x.QDM}),design:"primary",disabled:J,loading:J,onClick:B,size:"sm",children:J?"Generating...":"Analyze with AI"}),design:"wrapped",icon:x.VE0,message:"Get ElevoltAI powered insights about this candidate's fit for the role.",subtitle:"Analysis typically takes 1-2 minutes to complete.",title:"No ElevoltAI Analysis Available"})})}),H()]});let{status:K,score:X,skillsMatch:$,redFlags:ee,recommendations:et,llmAnalysis:es,isRevealed:ea,shapeWarnings:el}=Y,en=!!(et.hire||(null===(t=et.concerns)||void 0===t?void 0:t.length)||(null===(s=et.interview_focu
1s)||void 0===s?void 0:s.length));if("completed"===K&&!ea)return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.ZP,{children:(0,a.jsx)(n.eW,{children:(0,a.jsxs)("div",{className:"flex flex-col justify-center items-center text-center gap-4 py-8 px-4",children:[(0,a.jsxs)("div",{className:"relative w-16 h-16 flex items-center justify-center bg-blue-50 rounded-full",children:[(0,a.jsx)(h.G,{className:"text-blue",icon:x.VE0,size:"lg"}),(0,a.jsx)("span",{className:"absolute -bottom-1 -right-1 w-7 h-7 flex items-center justify-center bg-blue text-white rounded-full",children:(0,a.jsx)(h.G,{icon:x.byT,size:"xs"})})]}),(0,a.jsxs)("div",{className:"max-w-md",children:[(0,a.jsx)(u.Z,{variant:"heading3",children:"Analyze this application with Elevolt AI"}),(0,a.jsx)(u.Z,{className:"mt-2",color:"text-gray-600",variant:"body",children:"Run Elevolt AI to get a recommendation score, skills match, and areas of concern for this candidate."})]}),!!(z&&E)&&(0,a.jsx)("div",{className:"w-full max-w-xs",children:(0,a.jsx)(j.c,{showModal:!0,variant:"compact"})}),!!(z&&E)&&(0,a.jsx)(l.Z,{beforeIcon:(0,a.jsx)(h.G,{className:"mr-2",icon:x.VE0}),design:"primary",disabled:O.isPending,loading:O.isPending,onClick:Q,children:O.isPending?"Analyzing...":"Analyze with Elevolt AI"}),!!(z&&!E)&&(0,a.jsx)("div",{className:"w-full max-w-md",children:(0,a.jsx)(C,{message:"Analyzing this candidate needs an active plan with AI analysis credits."})}),!z&&(0,a.jsx)(u.Z,{color:"text-gray-500",variant:"bodySmall",children:"You don't have permission to run AI analysis for this job post."})]})})}),H()]});let ei=e=>{switch(e){case"high":return(0,a.jsx)(h.G,{className:"text-green-600",icon:x.f8k});case"medium":return(0,a.jsx)(h.G,{className:"text-yellow-600",icon:x.RLE});case"low":return(0,a.jsx)(h.G,{className:"text-red-600",icon:x.nYk});default:return(0,a.jsx)(h.G,{className:"text-gray-600",icon:x.Fuz})}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.ZP,{children:(0,a.jsxs)(n.eW,{padding:0,children:[!!E&&(0,a.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,a.jsx)(j.c,{showModal:!0,variant:"compact"}),(0,a.jsx)(l.Z,{beforeIcon:(0,a.jsx)(h.G,{className:"mr-2",icon:x.QDM}),design:"secondary",disabled:J,loading:J,onClick:V,size:"sm",children:J?"Analyzing...":"Re-analyze with AI"})]}),!E&&(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(C,{message:"Re-analyzing this candidate needs an active plan with AI analysis credits."})}),!!("completed"===K&&ea)&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[el.length>0&&(0,a.jsx)(i.Z,{action:z&&E?(0,a.jsx)(l.Z,{beforeIcon:(0,a.jsx)(h.G,{className:"mr-2",icon:x.QDM}),design:"primary",disabled:J,loading:J,onClick:V,size:"sm",children:"Re-analyze with AI"}):void 0,description:"The analysis came back in an unexpected format. Re-analyzing usually fixes it.",design:"wrapped",icon:x.eHv,message:"Part of this report couldn't be displayed"}),(0,a.jsx)("div",{className:"bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6",children:(0,a.jsxs)("div",{className:"flex flex-col lg:flex-row items-start lg:items-center gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)(k,{score:X,size:100}),(0,a.jsxs)("div",{className:"mt-2 text-center",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Recommendation Score"}),(0,a.jsx)("p",{className:"text-xs text-gray-600",children:"Out of 100"})]})]}),!!(null==es?void 0:es.summary)&&(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("h4",{className:"text-lg font-semibold text-gray-900 mb-3 flex items-center",children:[(0,a.jsx)(h.G,{className:"mr-2 text-blue",icon:x.Stf}),"Report Summary"]}),(0,a.jsx)("p",{className:"text-gray-700 leading-relaxed",children:es.summary})]})]})}),!!(null==$?void 0:$.length)&&(0,a.jsxs)("div",{className:"bg-white border border-gray-200 rounded-xl p-6",children:[(0,a.jsxs)("h4",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center",children:["Skills Assessment (",$.length," skills evaluated)"]}),(0,a.jsx)("div",{className:"grid gap-3",children:$.map(e=>{var t;return(0,a.jsx)("div",{className:"border rounded-lg p-4 ".concat((0,c.Rk)(e.match_level)),children:(0,a.jsx)("div",{className:"flex items-start justify-between",children:(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center mb-2",children:[ei(e.match_level),(0,a.jsx)("h5",{className:"font-semibold ml-2 text-gray-900 capitalize",children:null===(t=e.skill)||void 0===t?void 0:t.replaceAll("_"," ")}),!!e.match_level&&(0,a.jsx)("span",{className:"ml-auto text-xs font-medium px-2 py-1 rounded-full bg-white",children:e.match_level.toUpperCase()})]}),(0,a.jsx)("p",{className:"text-base text-gray-700",children:e.evidence})]})})},e.skill)})})]}),!!(null==ee?void 0:ee.length)&&(0,a.jsxs)("div",{className:"bg-red-50 border border-red-200 rounded-xl p-6",children:[(0,a.jsxs)("h4",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center",children:[(0,a.jsx)(h.G,{className:"mr-2 text-red-900",icon:x.RrC}),"Areas of Concern (",ee.length,")"]}),(0,a.jsx)("div",{className:"space-y-3",children:ee.map(e=>(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(h.G,{className:"mr-3 mt-0.5 text-red-500",icon:x.eHv,size:"sm"}),(0,a.jsx)("p",{className:"text-gray-700",children:e})]},e))})]}),!!en&&(0,a.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-6",children:[(0,a.jsxs)("h4",{className:"text-lg font-semibold text-blue-dark mb-4 flex items-center",children:[(0,a.jsx)(h.G,{className:"mr-2 text-blue",icon:x.X8G}),"ElevoltAI Recommendations"]}),!!et.hire&&(0,a.jsxs)("div",{className:"mb-4 p-4 bg-white rounded-lg rounded-l-none border-l-4 border-blue-100",children:[(0,a.jsx)("h5",{className:"font-semibold text-blue-dark mb-2",children:"Hiring Recommendation"}),(0,a.jsx)("p",{className:"text-gray-600",children:et.hire})]}),!!(null===(p=et.concerns)||void 0===p?void 0:p.length)&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h5",{className:"font-semibold text-blue-dark mb-2",children:"Key Concerns"}),(0,a.jsx)("ul",{className:"space-y-2 text-blue list-disc list-inside",children:et.concerns.map(e=>(0,a.jsx)("li",{children:e},e))})]}
1),!!(null===(f=et.interview_focus)||void 0===f?void 0:f.length)&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h5",{className:"font-semibold text-blue-dark mb-2",children:"Interview Focus Areas"}),(0,a.jsx)("ul",{className:"space-y-2 text-blue list-disc list-inside",children:et.interview_focus.map(e=>(0,a.jsx)("li",{children:e},e))})]})]})]}),!!(0,c.fq)(P)&&(0,a.jsx)(A,{busy:D.isPending,canReanalyze:!!(z&&E),onReanalyze:V,onRefresh:W,refreshing:T,stalled:(0,c.FJ)(P),status:K}),"failed"===K&&(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-red-50 rounded-full flex items-center justify-center",children:(0,a.jsx)(h.G,{className:"text-red",icon:x.eHv,size:"lg"})}),(0,a.jsx)("h4",{className:"text-lg font-medium text-gray-900 mb-2",children:"Analysis Failed"}),(0,a.jsx)("p",{className:"text-gray-600 mb-4",children:"We encountered an issue while analyzing this candidate."}),(0,a.jsx)(l.Z,{beforeIcon:(0,a.jsx)(h.G,{icon:x.QDM}),design:"primary",disabled:J,loading:J,onClick:B,size:"sm",children:J?"Analyzing...":"Retry Analysis"})]})]})}),H()]})};I.propTypes={application:f().object.isRequired,canAnalyze:f().bool}},5473:function(e,t,s){"use strict";var a=s(52322),l=s(47477),n=s(59417),i=s(99603),r=s(96577),o=s.n(r),c=s(13980),d=s.n(c),u=s(2784),m=s(24886);let x=e=>e>=70?"Strong Match":e>=50?"Good Match":e>=20?"Moderate Match":"Low Match",h=e=>{var t,s;let{application:r}=e,c=(null==r?void 0:r.owner)||e.applicant,[d,h]=(0,u.useState)("#10B981");return((0,u.useEffect)(()=>{(null==r?void 0:r.owner)&&(null==r?void 0:r.jobpost)&&h((0,l.B9)(r.rating))},[r]),r||c)?(0,a.jsx)("div",{className:"w-full bg-white md:p-4 roun
1ded",children:(0,a.jsxs)("div",{className:"w-full flex flex-col md:flex-row justify-start items-center",children:[(0,a.jsxs)("div",{className:"flex w-full md:w-auto items-center",children:[(0,a.jsxs)("div",{className:"flex justify-center items-center text-center relative avatar bg-no-repeat bg-center bg-blue-50",children:[c.avatar?(0,a.jsx)(o(),{alt:c.name,layout:"fill",objectFit:"cover",src:c.avatar}):null,!c.avatar&&c.name?(0,a.jsx)("p",{className:"font-semibold",children:c.name.substr(0,1)}):null]}),(0,a.jsxs)("div",{className:"flex flex-col justify-start md:border-r border-gray-300 md:pr-4 ml-4",children:[(0,a.jsx)("h3",{className:"text-sm text-gray-500 font-semibold",children:"Name"}),(0,a.jsx)("p",{className:"text-sm text-gray-600 font-medium leading-none mt-1 whitespace-nowrap",children:c.name})]})]}),(0,a.jsxs)("div",{className:"w-full flex flex-col md:flex-row my-4 md:my-0 p-3 border md:border-0 rounded md:rounded-none",children:[(0,a.jsxs)("div",{className:"md:border-r border-gray-300 md:pr-4 md:pl-4 mb-3 md:mb-0",children:[(0,a.jsxs)("h3",{className:"text-sm text-gray-500 font-semibold",children:[(0,a.jsx)(i.G,{className:"hover:text-blue-dark mr-1",icon:n.mSY,size:"sm"}),"Email"]}),(0,a.jsx)("p",{className:"text-sm text-gray-600 font-medium leading-none mt-1",children:c.email?c.email:"unknown"})]}),(0,a.jsxs)("div",{className:"md:pr-4 md:pl-4 mb-3 md:mb-0",children:[(0,a.jsxs)("h3",{className:"text-sm text-gray-500 font-semibold",children:[(0,a.jsx)(i.G,{className:"hover:text-blue-dark mr-1",icon:n.j1w,size:"sm"}),"Phone"]}),(0,a.jsx)("p",{className:"text-sm text-gray-600 font-medium leading-none mt-1",children:c.phone?c.phone:"unknown"})]}),!!r&&(0,a.jsx)("div",{className:"flex w-auto md:ml-auto md:mr-8 my-auto",children:(0,a.jsx)("p",{className:"text-xs text-gray-700 font-medium capitalize leading-none px-3 py-[2px] rounded-full ".concat((0,l.g2)(r)),children:null==r?void 0:r.status})})]}),!!(null==r?void 0:r.rating)&&(0,a.jsxs)("div",{"aria-label":"E-score: ".concat(null==r?void 0:r.rating,"% - ").concat(x(null==r?void 0:r.rating)),className:"ml-auto text-center hidden md:flex flex-col items-center flex-shrink-0",role:"img",children:[(0,a.jsx)("div",{style:{width:60,height:60},children:(0,a.jsx)(m.Ip,{strokeWidth:14,styles:{path:{stroke:d},trail:{stroke:"#F1F6FB"},text:{fontSize:"24px",fill:"#374151",fontWeight:500},background:"#F1F6FB"},text:"".concat(null!==(t=null==r?void 0:r.rating)&&void 0!==t?t:0,"%"),value:null!==(s=r.rating)&&void 0!==s?s:0})}),(0,a.jsx)("span",{className:"text-xs text-gray-500 mt-1 font-medium",children:x(null==r?void 0:r.rating)})]})]})}):null};h.propTypes={application:d().shape({jobpost:d().any,owner:d().shape({avatar:d().any,email:d().any,name:d().shape({substr:d().func}),phone:d().any}),rating:d().any,status:d().any})},t.Z=h},48147:function(e,t,s){"use strict";s.d(t,{y:function(){return ep}});var a=s(52322),l=s(42369),n=s(2369),i=s(92942),r=s(12524),o=s.n(r),c=s(13980),d=s.n(c),u=s(2784);let m=e=>{let{currentIndex:t,totalCount:s,onPrevious:l,onNext:r,disabled:c=!1,showKeyboardHint:d=!0,enableKeyboardNav:m=!0,className:x}=e,h=t<=0,p=t>=s-1,f=(0,u.useCallback)(e=>{c||!m||("ArrowLeft"!==e.key||h?"ArrowRight"!==e.key||p||(e.preventDefault(),null==r||r()):(e.preventDefault(),null==l||l()))},[c,m,h,p,l,r]);return((0,u.useEffect)(()=>{if(m&&!c)return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[m,c,f]),s<=1)?null:(0,a.jsxs)("div",{"aria-label":"Application navigation",className:o()("flex items-center gap-2 select-none",x),role:"navigation",children:[(0,a.jsx)("button",{"aria-label":"Previous application",className:o()("w-8 h-8 flex items-center justify-center rounded-lg transition-colors",{"bg-gray-100 hover:bg-gray-200 text-gray-700":!h&&!c,"bg-gray-50 text-gray-300 cursor-not-allowed":h||c}),disabled:h||c,onClick:l,type:"button",children:(0,a.jsx)(i.FontAwesomeIcon,{icon:n.A35,size:"sm"})}),(0,a.jsxs)("div",{"aria-atomic":"true","aria-live":"polite",className:"text-sm font-medium text-gray-600 min-w-[60px] text-center",children:[(0,a.jsx)("span",{className:"text-gray-900",children:t+1}),(0,a.jsx)("span",{className:"text-gray-400 mx-1",children:"of"}),(0,a.jsx)("span",{className:"text-gray-900",children:s})]}),(0,a.jsx)("button",{"aria-label":"Next application",className:o()("w-8 h-8 flex items-center justify-center rounded-lg transition-colors",{"bg-gray-100 hover:bg-gray-200 text-gray-700":!p&&!c,"bg-gray-50 text-gray-300 cursor-not-allowed":p||c}),disabled:p||c,onClick:r,type:"button",children:(0,a.jsx)(i.FontAwesomeIcon,{icon:n._tD,size:"sm"})}),!!(d&&m)&&(0,a.jsxs)("div",{className:"hidden md:flex items-center gap-1 text-xs text-gray-400 ml-2",title:"Use arrow keys to navigate",children:[(0,a.jsx)(i.FontAwesomeIcon,{icon:n.UFh,size:"xs"}),(0,a.jsx)("span",{children:"← →"})]})]})};m.propTypes={currentIndex:d().number.isRequired,totalCount:d().number.isRequired,onPrevious:d().func,onNext:d().func,disabled:d().bool,showKeyboardHint:d().bool,enableKeyboardNav:d().bool,className:d().string};let x=[{id:"new",label:"Applied",icon:n.diR},{id:"shortlisted",label:"Shortlisted",icon:n.u8Q},{id:"interviewing",label:"Interviewing",icon:n.IV4},{id:"offered",label:"Offer",icon:n.uqx},{id:"accepted",label:"Accepted",icon:n.FFp}],h={rejected:{label:"Archived",color:"bg-red-100 text-red-700"},withdrawn:{label:"Withdrawn",color:"bg-gray-100 text-gray-700"}},p=e=>x.findIndex(t=>t.id===e),f=(e,t)=>e<t?"completed":e===t?"active":"inactive",g=e=>{let{currentStatus:t,compact:s=!1,showLabels:l=!0,showIcons:n=!0,ariaLabel:r="Ap
1plication progress",className:c}=e,d=h[t];if(d)return(0,a.jsx)("div",{className:o()("flex items-center",c),children:(0,a.jsx)("span",{className:o()("px-3 py-1.5 text-sm font-medium rounded-full inline-flex items-center gap-1.5",d.color),role:"status",children:d.label})});let u=p(t);if(s){var m;let e=u>=0?(u+1)/x.length*100:0;return(0,a.jsxs)("div",{className:o()("flex items-center gap-2",c),children:[(0,a.jsx)("div",{className:"flex-1 bg-gray-200 rounded-full h-2 overflow-hidden",children:(0,a.jsx)("div",{"aria-label":"".concat(u+1," of ").concat(x.length," stages completed"),"aria-valuemax":x.length,"aria-valuemin":1,"aria-valuenow":u+1,className:"h-full bg-blue rounded-full transition-all duration-300",role:"progressbar",style:{width:"".concat(e,"%")}})}),(0,a.jsx)("span",{className:"text-sm text-gray-600 font-medium whitespace-nowrap",children:(null===(m=x[u])||void 0===m?void 0:m.label)||"Unknown"})]})}return(0,a.jsx)("nav",{"aria-label":r,className:o()("w-full",c),role:"navigation",children:(0,a.jsx)("div",{className:"flex items-start justify-between",children:x.map((e,t)=>{let s=f(t,u),r="active"===s,c="completed"===s,d=t===x.length-1;return(0,a.jsxs)("div",{"aria-current":r?"step":void 0,className:"flex flex-col items-center flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center w-full",children:[t>0&&(0,a.jsx)("div",{className:o()("h-0.5 flex-1 transition-colors",{"bg-blue":c||r,"bg-gray-200":!c&&!r})}),(0,a.jsxs)("div",{className:o()("w-8 h-8 rounded-full flex items-center justify-center transition-all flex-shrink-0",{"bg-blue text-white":c||r,"bg-gray-200 text-gray-400":!c&&!r,"ring-4 ring-blue-100":r}),children:[!!n&&(0,a.jsx)(i.FontAwesomeIcon,{className:"text-xs",icon:e.icon,size:"sm"}),!n&&(0,a.jsx)("span",{className:"text-xs font-medium",children:t+1})]}),!d&&(0,a.jsx)("div",{className:o()("h-0.5 flex-1 transition-colors",{"bg-blue":c,"bg-gray-200":!c})})]}),!!l&&(0,a.jsx)("span",{className:o()("text-xs font-medium mt-2 text-center whitespace-nowrap",{"text-blue":r,"text-gray-700":c,"text-gray-400":!r&&!c}),children:e.label})]},e.id)})})})};g.propTypes={currentStatus:d().oneOf(["new","shortlisted","interviewing","offered","accepted","rejected","withdrawn"]).isRequired,compact:d().bool,showLabels:d().bool,showIcons:d().bool,ariaLabel:d().string,className:d().string};var b=s(17047),v=s(71186),j=s(2230),y=s(26790),w=s(44707),N=s(3316),k=s(22406),C=s(74618),A=s(59417),I=s(99603),z=s(36160),R=s.n(z),Z=s(5632),S=s(62202),F=s(5473),T=s(31184),G=s(93024),q=s(4542);let L={website:{icon:A.nNP,label:"Website"},linkedin:{icon:G.D9H,label:"LinkedIn"},facebook:{icon:G.neY,label:"Facebook"},twitter:{icon:G.mdU,label:"Twitter"}},E=e=>{let{value:t,label:s}=e,[l,n]=(0,u.useState)(!1),i=(0,u.useCallback)(async()=>{try{await navigator.clipboard.writeText(t),n(!0),S.default.success("".concat(s," copied to clipboard")),setTimeout(()=>n(!1),2e3)}catch(e){S.default.error("Failed to copy")}},[t,s]);return(0,a.jsx)("button",{"aria-label":"Copy ".concat(s," URL"),className:"p-1.5 text-gray-400 hover:text-blue rounded transition-colors",onClick:i,type:"button",children:(0,a.jsx)(I.G,{className:"text-xs",icon:l?A.LEp:A.kZ_,size:"sm"})})};E.propTypes={value:d().string.isRequired,label:d().string.isRequired};let P=e=>{let{type:t,url:s,isLast:l=!1}=e,n=L[t];return!n||R()(s)?null:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2 pb-2 ".concat(l?"":"mb-2 border-b border-gray-200"),children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold flex items-center gap-1.5 text-gray-700",children:[(0,a.jsx)(I.G,{className:"text-gray-500",icon:n.icon,size:"sm"}),n.label]}),(0,a.jsx)(q.Z,{className:"text-sm text-blue hover:text-blue-dark break-words max-w-full block mt-0.5",label:"Open ".concat(n.label," profile"),url:s,warningKind:"link",children:s})]}),(0,a.jsx)(E,{label:n.label,value:s})]})};P.propTypes={type:d().oneOf(["website","linkedin","facebook","twitter"]).isRequired,url:d().string,isLast:d().bool};let _=e=>{let{owner:t}=e,s=[{type:"website",url:null==t?void 0:t.website},{type:"linkedin",url:null==t?void 0:t.linkedin},{type:"facebook",url:null==t?void 0:t.facebook},{type:"twitter",url:null==t?void 0:t.twitter}].filter(e=>!R()(e.url));return 0===s.length?null:(0,a.jsxs)("div",{className:"w-full flex flex-col bg-white rounded px-4 py-4 mt-4",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Links"}),(0,a.jsx)("hr",{className:"-mx-4 mt-2 mb-3"}),(0,a.jsx)("div",{className:"w-full flex flex-col",children:s.map((e,t)=>(0,a.jsx)(P,{isLast:t===s.length-1,type:e.type,url:e.url},e.type))})]})};_.propTypes={owner:d().shape({website:d().string,linkedin:d().string,facebook:d().string,twitter:d().string})};var M=s(47023),D=s(98473),O=s(1973),W=s(20576),B=s(47477),V=s(73067),Q=s(52199),U=s(64825),H=s(31948),Y=s(23825),J=s(7325);let{createNote:K,deleteNote:X,getNotes:$}=Q,{validateData:ee}=U,et=e=>!e||0===e.replace(/<[^>]*>/g,"").replace(/&nbsp;/g,"").trim().length,es=e=>{let{subject:t,showHeader:s=!0,padding:l=0}=e,r=(0,W.v9)(e=>e.http.isFetching),o=(0,W.v9)(e=>e.validator.errors),c=(0,W.v9)(e=>e.validator.isValid),d=(0,W.I0)(),[m,x]=(0,u.useState)([]),[h,p]=(0,u.useState)({content:""}),[f,g]=(0,u.useState)(!1),[b,v]=(0,u.useState)(!0),[j,y]=(0,u.useState)(!1),[w,N]=(0,u.useState)(!1),k=b&&!j,C={content:{required:!0}};(0,u.useEffect)(()=>{A()},[]);let A=()=>{v(!0),d($(t.aid)).then(e=>{e&&e.data?(x(e.data),N(!1)):j?S.default.error("Failed to refresh notes. Please try again."):N(!0),y(!0),v(!1)})};(0,u.useEffect)(()=>{g(!et(h.content))}
1,[h]);let I=e=>{d(X(e)).then(e=>{if(!e){S.default.error("Failed to delete note. Please try again.");return}S.default.success("Note deleted successfully!"),A()})};return(0,a.jsx)("div",{className:"w-full flex flex-col",children:(0,a.jsxs)("div",{className:"w-full p-".concat(l," bg-white rounded flex flex-col"),children:[!!s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold my-2",children:"Notes"}),(0,a.jsx)(J.Z,{body:(0,a.jsx)("p",{className:"text-white text-sm",children:"You can add notes to be referenced later by yourself or your colleagues."}),id:"notes-ttp"})]}),(0,a.jsx)("hr",{className:"-mx-3 mb-2"})]}),(0,a.jsxs)("div",{className:"w-full",children:[!!(k||w||0===m.length)&&(0,a.jsx)(O.Z,{description:w?"Please refresh the page to try again.":"Add a note below to keep your colleagues in the loop.",isError:w,isLoading:k,message:w?"Failed to load notes":"No notes yet"}),!!(!k&&!w&&m.length>0)&&(0,a.jsx)(Y.Z,{isFetching:b,message:"Refreshing notes",children:m.map(e=>{var t;return(0,a.jsxs)("div",{className:"w-full p-2 border hover:border-blue rounded relative group mb-2 animated fadeIn",children:[(0,a.jsx)(V.Z,{className:"mb-1 font-normal leading-tight",content:e.content,size:"sm"}),(0,a.jsxs)("p",{className:"leading-none flex justify-between",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-gray-400",children:(0,B.QS)(e.created_at)}),(0,a.jsxs)("span",{className:"text-xs font-medium text-gray-500",children:[" ","- ",null===(t=e.owner)||void 0===t?void 0:t.name]})]}),(0,a.jsx)("div",{className:"absolute -top-2 right-0 hidden group-hover:block",children:(0,a.jsx)(M.Z,{className:"px-2",design:"plain",onClick:()=>I(e.id),children:(0,a.jsx)(i.FontAwesomeIcon,{className:"hover:text-blue-dark text-sm",icon:n.NBC,size:"sm"})})})]},e.aid)})})]}),(0,a.jsx)("div",{className:"w-full flex flex-col bg-gray-100 rounded",children:(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),d(K(t.aid,h)).then(e=>{e&&e.data&&(S.default.success("Note added successfully!"),x([...m,e.data]),p({content:""}),g(!1),N(!1))})},children:[(0,a.jsx)(H.ZP,{ariaLabel:"Add a note",error:o.content,maxHeight:150,minHeight:f?80:40,name:"notes",onChange:e=>{let t={...h};t.content=e.target.value,d(ee({content:et(t.content)?"":t.content},C)),p(t)},placeholder:"Add a note...",toolbar:"minimal",value:h.content}),!!f&&(0,a.jsxs)("div",{className:"w-full px-2 pb-1 pt-1 flex justify-between items-center border-t animated fadeIn",children:[(0,a.jsx)(M.Z,{className:"px-1",design:"plain",onClick:()=>{g(!1)},children:(0,a.jsx)(i.FontAwesomeIcon,{className:"hover:text-blue-dark text-sm",icon:n.NBC,size:"sm"})}),(0,a.jsx)(M.Z,{className:"py-2 text-sm",design:"secondary",disabled:!c,isLoading:r,type:"submit",children:"Save"})]})]})})]})})};es.propTypes={subject:d().shape({aid:d().oneOfType([d().string,d().number]).isRequired}).isRequired,showHeader:d().bool,padding:d().number};var ea=s(79663),el=s(65405),en=s(51634),ei=s(251),er=s(71320);let eo=e=>{var t,s,l;let{application:n,dimensions:i}=e,{width:r="100%",height:o}=i,c=null===(t=n.cv)||void 0===t?void 0:t.match(/https?:\/\/.*\.(jpg|jpeg|png|gif|bmp)$/i);return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("a",{className:"absolute top-1 right-2 z-10 flex items-center bg-blue/80 hover:bg-blue-dark text-sm font-medium rounded-sm text-white hover:text-white px-2 py-1",href:(0,C.Ld)(n.cv),rel:"noopener noreferrer",target:"_blank",children:[(0,a.jsx)(I.G,{className:"mr-2 text-sm",icon:A.gJF}),"Open in new window"]}),!!c&&(0,a.jsx)("img",{alt:"".concat((null===(s=n.owner)||void 0===s?void 0:s.name)||"Applicant"," CV"),height:o,src:(0,C.Ld)(n.cv),width:r}),!c&&(0,a.jsx)("iframe",{frameBorder:"0",height:o,src:(0,C.Ld)(n.cv),title:"".concat((null===(l=n.owner)||void 0===l?void 0:l.name)||"Applicant"," CV"),width:r})]})};eo.propTypes={application:d().object.isRequired,dimensions:d().shape({width:d().oneOfType([d().number,d().string]),height:d().number}).isRequired};let ec=()=>(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsx)(I.G,{icon:A.qxT}),(0,a.jsx)(I.G,{className:"ml-1 text-yellow-500 text-xs",icon:A.O7Q})]}),ed=e=>{let{application:t,chatId:s,isInitiatingChat:l,onCloseChat:n,onInitChat:i}=e;return s?(0,a.jsx)(D.Z,{application:t,chatId:s,handleCloseChatTabs:n}):(0,a.jsx)(O.Z,{action:(0,a.jsx)(M.Z,{loading:l,onClick:i,children:"Start Conversation"}
1),description:"Start a conversation with the applicant to discuss their application.",design:"wrapped",message:"No conversation yet"})};ed.propTypes={application:d().object.isRequired,chatId:d().oneOfType([d().string,d().number]),isInitiatingChat:d().bool,onCloseChat:d().func,onInitChat:d().func};let eu=e=>{var t;let{application:s,canAnalyze:l=!1,chatId:n,cvFileIframeDimensions:i,isInitiatingChat:r,onCloseChat:o,onInitChat:c}=e,d=(0,Z.useRouter)(),m=(0,u.useMemo)(()=>{if(!s)return[];let e=[];return e.push({key:"cover-letter",label:"Cover Letter",icon:(0,a.jsx)(I.G,{icon:A.gMD}),content:(0,a.jsxs)(a.Fragment,{children:[!!s.cover_letter&&(0,a.jsx)("p",{className:"whitespace-pre-line text-base text-gray-700",children:s.cover_letter}),!s.cover_letter&&(0,a.jsx)(O.Z,{description:"The applicant did not include a cover letter with their application.",design:"wrapped",message:"No cover letter provided"})]})}),R()(s.questions)||e.push({key:"questions",label:"Q&A",icon:(0,a.jsx)(I.G,{icon:A.Fuz}),content:(0,a.jsx)("div",{className:"space-y-3",children:s.questions.map((e,t)=>{var s;return(0,a.jsxs)("div",{className:"bg-gray-50 border border-gray-200 px-4 py-3 rounded",children:[(0,a.jsxs)("p",{className:"text-base font-medium text-blue-dark",children:[t+1,". ",e.title]}),(0,a.jsx)("div",{className:"border-l-4 border-blue pl-3 ml-1 mt-2",children:(0,a.jsx)(er.Z,{answer:e})})]},null!==(s=e.name)&&void 0!==s?s:t)})})}),R()(s.cv)||e.push({key:"cv",label:"CV File",icon:(0,a.jsx)(I.G,{icon:A.gSj}),content:(0,a.jsx)(eo,{application:s,dimensions:i})}),e.push({key:"ai-analysis",label:"AI Analysis",icon:(0,a.jsx)(ec,{}),content:(0,a.jsx)(ei.N,{application:s,canAnalyze:l})}),e.push({key:"chat",label:"Chat",icon:(0,a.jsx)(I.G,{icon:A.lXL}),content:(0,a.jsx)(ed,{application:s,chatId:n,isInitiatingChat:r,onCloseChat:o,onInitChat:c})}),e.push({key:"notes",label:"Notes",icon:(0,a.jsx)(I.G,{icon:A.L4e}),content:(0,a.jsx)(es,{showHeader:!1,subject:s})}),e},[s,l,n,i,r,o,c]),x=(0,u.useMemo)(()=>{var e;if(n||(null===(e=d.query)||void 0===e?void 0:e.chat_open)==="true"){let e=m.findIndex(e=>"chat"===e.key);return e>=0?e:0}return 0},[n,null===(t=d.query)||void 0===t?void 0:t.chat_open,m]);return s?(0,a.jsxs)(ea.ZP,{defaultIndex:x,lazyMount:!0,syncWithUrl:!1,children:[m.map(e=>(0,a.jsx)(el.Z,{icon:e.icon,label:e.label},e.key)),m.map(e=>(0,a.jsx)(en.Z,{className:"bg-white",padding:4,children:e.content},e.key))]}):null};eu.propTypes={application:d().object,canAnalyze:d().bool,chatId:d().oneOfType([d().string,d().number]),cvFileIframeDimensions:d().shape({width:d().oneOfType([d().number,d().string]),height:d().number}),isInitiatingChat:d().bool,onCloseChat:d().func,onInitChat:d().func};let em="appearance-none flex justify-start items-center text-sm font-medium hover:text-blue-dark rounded-sm py-3 px-4 bg-blue-50 hover:bg-blue-100",ex=()=>(0,a.jsx)(I.G,{className:"ml-auto text-sm text-inherit",icon:A._tD,size:"1x"}),eh=e=>{let{count:t}=e;return(0,a.jsx)("span",{className:"bg-blue-100 text-blue-700 py-0.5 px-2 text-xs rounded-full font-medium ml-2",children:t})};eh.propTypes={count:d().number.isRequired};let ep=e=>{var t,s,n,i,r;let{application:o={},tenantName:c,onModal:d=!1,jobpost:x={},applicationList:h=[],currentIndex:p=0,onNavigatePrevious:f,onNavigateNext:z}=e,G=(0,Z.useRouter)(),[q,L]=(0,u.useState)(),[E,P]=(0,u.useState)(!1),M=(0,u.useRef)(null),[D,O]=(0,u.useState)({width:0,height:500}),{data:W,refetch:B,isLoading:V}=(0,y.bL)({applicationId:o.aid,includeAI:!0}),{data:{data:Q}={},isLoading:U}=(0,w.vl)({id:x.jid||(null==W?void 0:null===(t=W.jobpost)||void 0===t?void 0:t.jid),realm:"portal"}),{updateApplication:H}=(0,y.Kr)(),Y=(0,j.l$)(),{data:J}=(0,N.qN)({jobpostId:x.jid||(null==W?void 0:null===(s=W.jobpost)||void 0===s?void 0:s.jid),applicationId:o.aid,enabled:!!o.aid&&!!(x.jid||(null==W?void 0:null===(n=W.jobpost)||void 0===n?void 0:n.jid))}),K=(0,u.useMemo)(()=>(null==J?void 0:J.data)||[],[null==J?void 0:J.data]),X=(null==W?void 0:null===(i=W.chat)||void 0===i?void 0:i.cid)||q,$=(0,u.useMemo)(()=>{var e;return(null==W?void 0:null===(e=W.interviews)||void 0===e?void 0:e.filter(e=>{var t;return(null==e?void 0:e.user_id)===(null==W?void 0:null===(t=W.owner)||void 0===t?void 0:t.uid)}))||[]},[null==W?void 0:W.interviews,null==W?void 0:null===(r=W.owner)||void 0===r?void 0:r.uid]),ee=h.length>1;(0,u.useEffect)(()=>{M.current&&O(e=>{var t;return{...e,width:(null===(t=M.current)||void 0===t?void 0:t.offsetWidth)-64}})},[]);let et=(0,u.useCallback)(e=>{var t;if(!(null==e?void 0:e.jobpost)&&!Q){S.default.error("An error occurred code: 001NAJ");return}G.push({pathname:"/hr/".concat(c,"/hiring/").concat((null==e?void 0:null===(t=e.jobpost)||void 0===t?void 0:t.jid)||(null==Q?void 0:Q.jid),"/offers/new"),query:{application:null==e?void 0:e.aid}})},[Q,G,c]),es=(0,u.useCallback)(e=>{var t;G.push("/hr/".concat(c,"/hiring/").concat(null==e?void 0:null===(t=e.jobpost)||void 0===t?void 0:t.jid,"/offers"))},[G,c]),ea=(0,u.useCallback)(()=>{P(!0)},[]),el=(0,u.useCallback)(async(e,t)=>{try{await H.mutateAsync({id:null==e?void 0:e.aid,status:t}),await B(),S.default.success("Application updated successfully!")}catch(e){S.default.error("An error occurred while updating the application")}},[B,H]),en=async()=>
1{if(!X)try{await Y.mutateAsync({crmId:null==W?void 0:W.aid}),await B(),S.default.success("Initiated chat successfully!")}catch(e){S.default.error("An error occurred initiating chat.")}},ei=async()=>{L(null),await B(),S.default.success("Chat closed successfully!")},er=(null==H?void 0:H.isPending)||Y.isPending,eo=(0,v.UQ)(Q,"manage_applications"),ec=(0,v.UQ)(Q,"schedule_interviews"),ed=(0,v.UQ)(Q,"manage_offers"),ep=W&&!["shortlisted","interviewing","rejected"].includes(null==W?void 0:W.status),ef=(0,u.useMemo)(()=>{var e;return!!W&&(null==W?void 0:W.status)!=="rejected"&&!!R()(null==W?void 0:null===(e=W.offers)||void 0===e?void 0:e.filter(e=>!["withdrawn","rejected"].includes(null==e?void 0:e.status)))},[W]),eg=(null==W?void 0:W.status)==="offered",eb=W&&(null==W?void 0:W.status)!=="rejected",ev=(0,u.useCallback)(()=>{var e;(0,b.Z)({title:"Archive Application",message:"Are you sure you want to archive ".concat(null==W?void 0:null===(e=W.owner)||void 0===e?void 0:e.name,"'s application? This will move them to the rejected pool. This action can be undone later."),confirmButtonText:"Yes, Archive",cancelButtonText:"Cancel",suppressRecording:!0,handler:()=>el(W,"rejected")})},[W,el]),ej=(0,u.useMemo)(()=>{let e=[];return ep&&eo&&e.push((0,a.jsxs)("button",{className:em,disabled:er,onClick:()=>el(W,"shortlisted"),type:"button",children:[(0,a.jsx)(I.G,{className:"mr-2 text-sm",icon:A.u8Q,size:"1x"}),"Shortlist",(0,a.jsx)(ex,{})]},"shortlist")),ec&&e.push((0,a.jsxs)("button",{className:em,disabled:er,onClick:ea,type:"button",children:[(0,a.jsx)(I.G,{className:"mr-2 text-sm",icon:A.SZw,size:"1x"}),"Schedule Interview",(0,a.jsx)(ex,{})]},"schedule-interview")),ef&&ed&&e.push((0,a.jsxs)("button",{className:em,disabled:er,onClick:()=>et(W),type:"button",children:[(0,a.jsx)(I.G,{className:"mr-2 text-sm",icon:A.uqx,size:"1x"}),"Send Offer",(0,a.jsx)(ex,{})]},"send-offer")),eg&&e.push((0,a.jsxs)("button",{className:em,disabled:er,onClick:()=>es(W),type:"button",children:[(0,a.jsx)(I.G,{className:"mr-2 text-sm",icon:A.uqx,size:"1x"}),"View Offer",(0,a.jsx)(ex,{})]},"view-offer")),d&&W&&Q&&c&&e.push((0,a.jsxs)("a",{className:em,href:"/hr/".concat(c,"/hiring/").concat(null==Q?void 0:Q.jid,"/applications/").concat(null==W?void 0:W.aid),rel:"noopener",target:"_blank",children:[(0,a.jsx)(I.G,{className:"mr-2 text-sm",icon:A.gJF,size:"1x"}),"Open in New Window",(0,a.jsx)(ex,{})]},"open-new-window")),(null==W?void 0:W.cv)&&e.push((0,a.jsxs)("a",{className:em,href:(0,C.Ld)(null==W?void 0:W.cv),rel:"noopener",target:"_blank",children:[(0,a.jsx)(I.G,{className:"mr-2 text-sm",icon:A.gSj,size:"1x"}),"View CV",(0,a.jsx)(ex,{})]},"view-cv")),(null==K?void 0:K.length)>0&&W&&Q&&c&&e.push((0,a.jsxs)("a",{className:em,href:"/hr/".concat(c,"/hiring/").concat(null==Q?void 0:Q.jid,"/applications/").concat(null==W?void 0:W.aid,"/scorecards"),children:[(0,a.jsx)(I.G,{className:"mr-2 text-sm",icon:A.OGB,size:"1x"}),"View Scorecards",(0,a.jsx)(eh,{count:K.length}),(0,a.jsx)(ex,{})]},"view-scorecards")),!R()($)&&Q&&c&&e.push((0,a.jsxs)("a",{className:em,href:"/hr/".concat(c,"/hiring/").concat(null==Q?void 0:Q.jid,"/interviews/"),children:[(0,a.jsx)(I.G,{className:"mr-2 text-sm",icon:A.IV4,size:"1x"}),"View Interviews",(0,a.jsx)(eh,{count:$.length}),(0,a.jsx)(ex,{})]},"view-interviews")),(null==Q?void 0:Q.offers_count)>0&&c&&e.push((0,a.jsxs)("a",{className:em,href:"/hr/".concat(c,"/hiring/").concat(null==Q?void 0:Q.jid,"/offers/"),children:[(0,a.jsx)(I.G,{className:"mr-2 text-sm",icon:A.uqx,size:"1x"}),"View Offers",(0,a.jsx)(eh,{count:(null==Q?void 0:Q.offers_count)||0}),(0,a.jsx)(ex,{})]},"view-offers")),eb&&eo&&e.push((0,a.jsxs)("button",{className:"appearance-none flex justify-start items-center text-sm font-medium text-red-600 hover:text-red-700 rounded-sm py-3 px-4 bg-red-50 hover:bg-red-100",disabled:er,onClick:ev,type:"button",children:[(0,a.jsx)(I.G,{className:"mr-2 text-sm",icon:A.gPx,size:"1x"}),"Archive Application",(0,a.jsx)(ex,{})]},"archive")),e},[W,Q,c,d,K,$,er,eo,ec,ed,ep,ef,eg,eb,et,es,ev,ea,el]);return(0,a.jsxs)("div",{className:"w-full flex flex-col relative",children:[(0,a.jsx)(T.Z,{application:W,getInterviews:async()=>{await B()},onClose:async()=>{await B(),P(!1)},show:E}),!!(V||U||er)&&(0,a.jsx)(l.J,{fixed:!1}),(0,a.jsxs)("div",{className:"w-full md:mb-4",children:[!!(ee&&d)&&(0,a.jsx)("div",{className:"flex justify-end mb-3",children:(0,a.jsx)(m,{currentIndex:p,onNext:z,onPrevious:f,totalCount:h.length})}),(0,a.jsx)(F.Z,{application:W}),!!(null==W?void 0:W.status)&&(0,a.jsx)("div",{className:"mt-4 bg-white rounded-lg p-4",children:(0,a.jsx)(g,{currentStatus:null==W?void 0:W.status,showLabels:!0})})]}),(0,a.jsxs)("div",{className:"w-full flex flex-col md:flex-row items-stretch gap-x-4 ".concat(d?"bg-white":"bg-blue-50"),children:[(0,a.jsx)("div",{className:"w-full md:w-9/12",ref:M,children:(0,a.jsx)("div",{className:"w-full border rounded",children:(0,a.jsx)(eu,{application:W,canAnalyze:eo,chatId:X,cvFileIframeDimensions:D,isInitiatingChat:Y.isPending,onCloseChat:ei,onInitChat:en})})}),(0,a.jsxs)("div",{className:"w-full md:w-3/12",children:[(0,a.jsx)(k.Z,{customActions:ej,showDefaultActions:!1,title:"Quick Actions"}),(0,a.jsx)(_,{owner:null==W?void 0:W.owner})]})]})]})};ep.propTypes={application:d().object,jobpost:d().object,onModal:d().bool,tenantName:d().string,applicationList:d().array,currentIndex:d().number,onNavigatePrevious:d().func,onNavigateNext:d().func}},26790:function(e,t,s){"use strict";s.d(t,{Kr:function(){return u},N:function(){return m},bL:function(){return d}});var a=s(59820),l=s(87686),n=s(60418),i=s(62202),r=s(82036),o=s(84475),c=s(53651);let d=e=>{let{applicationId:t,includeAI:s=!1}=e;return(0,a.a)({enabled:!!t,queryKey:["applications",t,{includeAI:s}],queryFn:async()=>{var e;let a=new URLSearchParams;s&&a.append("include_ai","true");let l="".concat(r.JW,"applications/").concat(t).concat(a.toString()?"?".concat(a.toString()):"");return null===(e=(await n.Z.get(l,{headers:{...(0,o.g0)({realm:"hr"})}})).data)||void 0===e?void 0:e.data}})},u=()=>({updateApplication:(0,l.D)({mutationFn:async e=>{let{id:t,status:s}=e;return(await n.Z.post("".concat(r.JW,"applications/").concat(t),{status:s},{headers:{...(0,o.g0)({realm:"hr"})}})).data}}),createApplication:(0,l.D)({mutationFn:async e=>{let{jobPostId:t,data:s}=e;return(await n.Z.post("".concat(r.JW,"jobposts/").concat(t,"/applications"),s,{headers:{...(0,o.g0)({realm:"hr"})}})).data},onSuccess:()=>{i.default.success("Application created successfully!")},onError:()=>{i.default.error("Failed to create application!")}})}),m=e=>{let{jobPostId:t,enabled:s,query:l,includeAI:i=!1,page:d=1,perPage:u=15,status:m,search:x,messaged:h}=e,p=new URLSearchParams;d>1&&p.append("page",d.toString()),15!==u&&p.append("per_page",u.toString()),m&&p.append("status",m),x&&p.append("search",x),h&&p.append("messaged","true"),i&&p.append("include_ai","true"),(null==l?void 0:l.orderBy)&&p.append("orderBy",l.orderBy),(null==l?void 0:l.direction)&&p.append("direction",l.direction);let f=p.toString();return(0,a.a)({enabled:s,queryKey:["applications",t,{page:d,perPage:u,status:m,search:x,messaged:h,includeAI:i,...l}],placeholderData:(0,c.g)(t),queryFn:async()=>{let e="".concat(r.JW,"jobposts/").concat(t,"/applications").concat(f?"?".concat(f):"");return(await n.Z.get(e,{headers:{...(0,o.g0)({realm:"hr"})}})).data}})}},7325:function(e,t,s){"use strict";s.d(t,{Z:function(){return f}});var a=s(52322),l=s(2369),n=s(92942),i=s(12524),r=s.n(i),o=s(13980),c=s.n(o),d=s(2784),u=s(28316);let m=function(e,t,s){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:8,n={width:window.innerWidth,height:window.innerHeight},i=s=>{switch(s){case"top":return{top:e.top-t.height-a,left:e.left+e.width/2-t.width/2};case"bottom":return{top:e.bottom+a,left:e.left+e.width/2-t.width/2};case"left":return{top:e.top+e.height/2-t.height/2,left:e.left-t.width-a};case"right":return{top:e.top+e.height/2-t.height/2,left:e.right+a};default:return{top:0,left:0}}},r=(e,s)=>{let a=e.left+t.width,i=e.top+t.height;switch(s){case"top":return e.top>=l;case"bottom":return i<=n.height-l;case"left":return e.left>=l;case"right":return a<=n.width-l;default:return!0}},o={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]}[s]||["top"],c=s,d=i(s);for(let e of o){let t=i(e);if(r(t,e)){c=e,d=t;break}}return d.left=Math.max(l,Math.min(d.left,n.width-t.width-l)),d.top=Math.max(l,Math.min(d.top,n.height-t.height-l)),{...d,actualPlacement:c}},x=function(){let{placement:e="top",clickable:t=!0,showDelay:s=150,hideDelay:a=100}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[l,n]=(0,d.useState)(!1),[i,r]=(0,d.useState)({top:0,left:0,actualPlacement:e}),o=(0,d.useRef)(null),c=(0,d.useRef)(null),u=(0,d.useRef)(null),x=(0,d.useRef)(null),h=(0,d.useCallback)(()=>{u.current&&(clearTimeout(u.current),u.current=null),x.current&&(clearTimeout(x.current),x.current=null)},[]),p=(0,d.useCallback)(()=>{o.current&&c.current&&r(m(o.current.getBoundingClientRect(),c.current.getBoundingClientRect(),e))},[e]),f=(0,d.useCallback)(()=>{h(),u.current=setTimeout(()=>{n(!0)},s)},[h,s]),g=(0,d.useCallback)(()=>{h(),x.current=setTimeout(()=>{n(!1)},a)},[h,a]),b=(0,d.useCallback)(()=>{h(),n(!1)}
1,[h]),v=(0,d.useCallback)(()=>{h(),n(e=>!e)},[h]),j=(0,d.useCallback)(()=>{f()},[f]),y=(0,d.useCallback)(()=>{g()},[g]),w=(0,d.useCallback)(()=>{t&&h()},[t,h]),N=(0,d.useCallback)(()=>{t&&g()},[t,g]),k=(0,d.useCallback)(()=>{f()},[f]),C=(0,d.useCallback)(()=>{g()},[g]),A=(0,d.useCallback)(e=>{e.preventDefault(),v()},[v]);return(0,d.useEffect)(()=>{let e=e=>{"Escape"===e.key&&l&&b()};return l&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[l,b]),(0,d.useEffect)(()=>{if(!l)return;let e=requestAnimationFrame(()=>{p()}),t=()=>{p()};return window.addEventListener("scroll",t,!0),window.addEventListener("resize",t),()=>{cancelAnimationFrame(e),window.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t)}},[l,p]),(0,d.useEffect)(()=>()=>{h()},[h]),{isVisible:l,position:i,anchorRef:o,tooltipRef:c,show:f,hide:g,hideImmediate:b,toggle:v,anchorProps:{ref:o,onMouseEnter:j,onMouseLeave:y,onFocus:k,onBlur:C,onClick:A},tooltipProps:{ref:c,onMouseEnter:w,onMouseLeave:N}}};s(18159);let h=()=>{let[e,t]=(0,d.useState)(!1);return(0,d.useEffect)(()=>t(!0),[]),e},p=e=>{let{body:t,maxWidth:s="300px",type:i="info",clickable:o=!0,id:c,className:d="",placement:m="top",icon:p=l.FDd}=e,f=h(),{isVisible:g,position:b,anchorProps:v,tooltipProps:j}=x({placement:m,clickable:o}),y=r()("eux-tooltip",{"eux-tooltip--visible":g,"eux-tooltip--clickable":o,["eux-tooltip--".concat(b.actualPlacement)]:!0}),w=r()("eux-tooltip-content",{"bg-blue-dark text-white":"info"===i}),N=(0,a.jsx)("div",{"aria-hidden":!g,className:y,id:"".concat(c,"-tooltip"),role:"tooltip",style:{top:b.top,left:b.left},...j,children:(0,a.jsxs)("div",{className:w,style:{maxWidth:s},children:[(0,a.jsx)("div",{className:"eux-tooltip-arrow"}),t]})});return(0,a.jsxs)("span",{className:d,children:[(0,a.jsx)("button",{"aria-describedby":g?"".concat(c,"-tooltip"):void 0,className:"appearance-none",id:"".concat(c,"-anchor"),type:"button",...v,children:(0,a.jsx)(n.FontAwesomeIcon,{icon:p,size:"sm"})}),!!f&&(0,u.createPortal)(N,document.body)]})};p.propTypes={body:c().any.isRequired,maxWidth:c().string,type:c().string,clickable:c().bool,id:c().string.isRequired,className:c().string,placement:c().oneOf(["top","bottom","left","right"]),icon:c().any};var f=p},18159:function(){}}]);

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.