1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2558],{62577:function(e,n,t){"use strict";t.d(n,{z:function(){return s}});var i=t(61261),l=t(8685),o=t.n(l),r=t(91987),a=t(20479),d=t(29450);let s=(0,r.forwardRef)((e,n)=>{let{href:t,color:l,iconName:r,iconSize:s,renderAs:c,label:u,disabledText:v,className:p,variant:g,fullWidth:h,onClick:f,onKeyDown:x,size:m,title:j,target:b,type:y="button",...w}=e,k=d.NN.some(e=>{let n=RegExp(e);return n.test(t.split("?")[0])}),_=d.hB.includes(t.split("?")[0]);return _||k?(0,i.jsx)(o(),{ref:n,href:t,children:(0,i.jsx)(a.z,{renderAs:c,type:y,color:l,ref:n,label:u,disabledText:v,className:p,variant:g,fullWidth:h,onClick:f,onKeyDown:x,size:m,title:j,target:b,iconSize:s,...w})}):(0,i.jsx)(a.z,{href:t,renderAs:"a",type:y,color:l,ref:n,label:u,disabledText:v,className:p,variant:g,fullWidth:h,onClick:f,onKeyDown:x,size:m,title:j,target:b,iconSize:s,...w})})},57778:function(e,n,t){"use strict";t.d(n,{A:function(){return f}});var i=t(61261),l=t(22126),o=t(39078);let r=()=>(0,l.useMutation)(e=>(0,o.Ts)(e));var a=t(91987),d=t(34968),s=t(30099),c=t(5749),u=t(59684),v=t(32266),p=t(28709),g=t(20479),h=t(17577);let f=e=>{var n;let{applicationId:t,questionId:l,subQuestionId:o,adminFeedback:f}=e,[x,m]=(0,a.useState)(!1),[j,b]=(0,a.useState)(null!==(n=null==f?void 0:f.comment)&&void 0!==n?n:""),y=r(),w=()=>{y.mutate({applicationId:t,questionId:l,subQuestionId:o,comment:j},{onSuccess:()=>{u.$.success({content:"Feedback submitted"}),m(!1)},onError:e=>{u.$.error({errorResponse:e,id:"submitGptScreeningFeedbackError"})}})},k=y.isLoading?"Submitting...":void 0;return j||(k="Submit feedback"),(0,i.jsx)(d.x,{display:"flex",justifyContent:"flex-end",children:(0,i.jsx)(c.z,{flyoutElement:(0,i.jsxs)(d.x,{borderRadius:"base",boxShadow:"shadow-base",backgroundColor:"white",border:"grey-4",maxWidth:300,padding:10,children:[(0,i.jsx)(s.x,{children:"Feedback"}),(0,i.jsx)(v.L,{size:5}),(0,i.jsx)(p.g,{onChange:e=>{b(e.target.value)},value:j}),(0,i.jsx)(v.L,{size:10}),(0,i.jsx)(g.z,{disabledText:k,label:"Submit feedback",onClick:w})]}),align:"center",isOpen:x,onVisibilityChange:m,variant:"custom",children:(0,i.jsxs)(d.x,{display:"flex",gap:5,alignItems:"center",children:[!!(null==f?void 0:f.comment)&&(0,i.jsx)(d.x,{width:7,height:7,borderRadius:"full",backgroundColor:"success-base"}),(0,i.jsx)(h.x,{children:"Feedback"})]})})})}},85922:function(e,n,t){"use strict";t.d(n,{k:function(){return d}});var i=t(61261),l=t(25597),o=t(45846);function r(){var e,n;let t=(e=["\n ","\n border-radius: 50%;\n ",";\n\n & svg {\n stroke-width: 4px;\n vertical-align: top;\n }\n"],n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}})));return r=function(){return t},t}let a=o.ZP.div.withConfig({componentId:"sc-9179b776-0"})(r(),e=>{let{size:n}=e;return n&&"width: ".concat(n,"px; height: ").concat(n,"px;")},e=>{let{evalStatus:n}=e;return"high"===n?"\n color: var(--white);\n background-color: var(--success-base);\n padding: 4px;\n ":"medium"===n?"\n color: var(--warning-dark);\n background-color: var(--warning-light);\n padding: 3px;\n ":"\n color: var(--danger-base);\n background-color: var(--danger-light);\n padding: 4px;\n "}),d=e=>{let{size:n,evalStatus:t}=e;return(0,i.jsx)(a,{size:n,evalStatus:t,children:"high"===t||"medium"===t?l.$.check:l.$.close})}},26988:function(e,n,t){"use strict";t.d(n,{Oe:function(){return m},Pv:function(){return f},UX:function(){return h},i9:function(){return x},n$:function(){return p},yY:function(){return g}});var i=t(54115),l=t(65062),o=t(45846);function r(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function a(){let e=r(["\n width: 450px;\n max-width: 100%;\n text-align: center;\n font-size: 13px;\n padding: 20px 0;\n ","\n flex-direction: column;\n align-items: center;\n gap: 20px;\n position: relative;\n"]);return a=function(){return e},e}function d(){let e=r(["\n background-color: var(--special-section-dark-background);\n align-self: stretch;\n"]);return d=function(){return e},e}function s(){let e=r(["\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(50%, 1fr));\n"]);return s=function(){return e},e}function c(){let e=r(["\n vertical-align: top;\n"]);return c=function(){return e},e}function u(){let e=r(["\n padding: 10px;\n"]);return u=function(){return e},e}function v(){let e=r(["\n animation: "," 1s infinite linear;\n"]);return v=function(){return e},e}let p=o.ZP.div.withConfig({componentId:"sc-748d5d6f-0"})(a(),l.kC),g=o.ZP.div.withConfig({componentId:"sc-748d5d6f-1"})(d()),h=o.ZP.div.withConfig({componentId:"sc-748d5d6f-2"})(s()),f=o.ZP.span.withConfig({componentId:"sc-748d5d6f-3"})(c()),x=o.ZP.div.withConfig({componentId:"sc-748d5d6f-4"})(u()),m=o.ZP.span.withConfig({componentId:"sc-748d5d6f-5"})(v(),i.Gx)},72046:function(e,n,t){"use strict";t.d(n,{D5:function(){return d},Iv:function(){return a},R:function(){return s}});var i=t(66555),l=t(10566),o=t(5442);let r=(e,n)=>{if(n&&e&&Array.isArray(e)&&e.length>0)for(let t=0;t<e.length;t+=1){let i=e[t];if("string"==typeof n&&(null==i?void 0:i._id)===n||"function"==typeof n&&n(i))return{index:t,message:i}}return{index:-1,message:null}},a=(0,o.ZP)((e,n)=>{let{messageId:t,recipe:i}=n;if(t&&i){let{index:n,message:l}=r(e,t);if(n<0||!l)console.error("Failed to update message with id",t);else{let t=(0,o.ZP)(i)(l);e[n]=t}}}),d=(0,o.ZP)((e,n)=>{let{message:t,afterMessageId:i}=n||{};if(t){if(e){if(i){let{index:n}=r(e,i);if(n>-1){e.splice(n+1,0,t);return}e.push(t)}else e.push(t)}else e=[]}}),s=e=>{let{message:n,resourceId:t,threadId:a}=e,s=null==n?void 0:n._id;n&&s&&i.E.setQueryData((0,l.f)(a),e=>{if(t){let{index:n,message:i}=r(e,e=>(null==e?void 0:e.clientResourceId)===t||(null==e?void 0:e._id)===s);if(n>-1&&i)return(0,o.ZP)(e,e=>{delete e[n].clientResourceId})}return d(e,{message:n})})}},60513:function(e,n,t){"use strict";t.d(n,{z:function(){return f}});var i=t(61261);t(91987);
1var l=t(72139),o=t.n(l),r=t(34968),a=t(80366),d=t(32898),s=t(30099),c=t(20479),u=t(85881),v=t(45846),p=t(40795);function g(){var e,n;let t=(e=["\n width: 100%;\n\n .rupee-green {\n &:first-child > svg {\n flex-shrink: 0;\n color: ",";\n }\n }\n .rupee-red {\n &:first-child > svg {\n flex-shrink: 0;\n color: ",";\n }\n }\n"],n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}})));return g=function(){return t},t}let h=v.ZP.div.withConfig({componentId:"sc-26aa496d-0"})(g(),(0,p.gJ)("--success-base"),(0,p.gJ)("--danger-base")),f=e=>{var n,t;let{iconRequired:l=!1,applicationCardData:v}=e,p=null==v?void 0:null===(n=v.offerData)||void 0===n?void 0:n.offeredSalary,g=null==v?void 0:null===(t=v.offerData)||void 0===t?void 0:t.joiningDate,f=Object.keys((null==v?void 0:v.offerData)||{}).length>0;return(0,i.jsx)(h,{children:(0,i.jsxs)(r.x,{width:"100%",display:"flex",flexWrap:"wrap",alignItems:"center",gap:5,backgroundColor:p?"success-light":"danger-light",padding:"5px 10px",borderRadius:"sm",children:[l&&(0,i.jsx)(d.J,{type:"rupee",className:p?"rupee-green":"rupee-red"}),p?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.x,{children:["Offer: ",p]}),g?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.i,{variant:"dot"}),(0,i.jsxs)(s.x,{children:["Joining: ",o()(g).format("DD/MM/YYYY")]})]}):null]}):(0,i.jsx)(s.x,{children:"Offer details missing"}),(0,i.jsx)(c.z,{label:"".concat(f?"edit":"add"," it now"),variant:"link",onClick:()=>(0,u.h7)("CapturingOfferDataModal",{data:{applicationId:null==v?void 0:v.id,offerData:null==v?void 0:v.offerData}})})]})})}},69151:function(e,n,t){"use strict";t.d(n,{O:function(){return K}});var i=t(61261),l=t(91987),o=t(20479),r=t(32266),a=t(34968),d=t(30099),s=t(5749),c=t(59684),u=t(17577),v=t(15851),p=t(98949),g=t(61458),h=t(34794),f=t(27688),x=t(61906),m=t(3672),j=t(64130),b=t(74303),y=t(97156),w=t(97575),k=t(12776),_=t(85881),C=t(65062),S=t(45846),I=t(40795);function z(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function A(){let e=z(["\n width: 100%;\n display: flex;\n align-items: center;\n input {\n height: 38px;\n border-radius: 5px 0px 0px 5px;\n border-right: none;\n }\n button {\n background: ",";\n color: ",";\n padding: 10px 10px;\n height: 38px;\n width: 60px;\n border-radius: 0px 5px 5px 0px;\n }\n button:hover {\n background: ",";\n }\n\n .input-error-flag {\n max-width: 200px;\n top: -85px;\n }\n .input-error-flag > div {\n white-space: unset;\n }\n"]);return A=function(){return e},e}function D(){let e=z(["\n ","\n align-items: center;\n gap: 10px;\n"]);return D=function(){return e},e}function O(){let e=z(["\n background-color: ",";\n border: 1px solid #eee;\n border-left: none;\n border-radius: 0 5px 5px 0;\n display: flex;\n align-self: stretch;\n align-items: center;\n justify-content: center;\n padding: 0 10px;\n"]);return O=function(){return e},e}let P=S.ZP.div.withConfig({componentId:"sc-5c15898e-0"})(A(),(0,I.gJ)("--brand-base"),(0,I.gJ)("--white"),(0,I.gJ)("--brand-light")),E=S.ZP.div.withConfig({componentId:"sc-5c15898e-1"})(D(),C.kC),T=S.ZP.div.withConfig({componentId:"sc-5c15898e-2"})(O(),(0,I.gJ)("--grey-1")),M=e=>{let{closeAskMoreDetails:n,applicationCardData:t,jobId:r,stageId:a,showMessageSentText:d,setShowAskMoreDetails:s}=e,[c,u]=(0,l.useState)(""),v=(0,l.useRef)(c),p=(0,h.Q)(a),{sendMessage:g,isSendingMessage:f}=(0,j.$)({applicationData:t,stageData:p,stageId:a,applicationId:null==t?void 0:t.id,jobId:r}),[C,S]=(0,l.useState)(null),I=async()=>{let e=(0,_.gP)("ApplicationCardModal");if((0,k.j)("Clicked to ask details on ats page",{...e&&{right_pane:!0}}),(0,b.xp)(v.current)||(0,b.oO)(v.current)||(0,b.u3)(v.current))S("Please use this feature only to ask more information and not to share contact details or links. Your messages will be reviewed by our team.");else{var n;await g({isVoilaActive:!1,message:null===(n=v.current)||void 0===n?void 0:n.trim(),options:{brief_message:!0}}),d(),s(!1),u("")}};return(0,l.useEffect)(()=>{(0,b.xp)(v.current)||(0,b.oO)(v.current)||(0,b.u3)(v.current)||S(null),v.current=c},[c]),(0,i.jsxs)(E,{className:"application-card-inner-cta",children:[(0,i.jsxs)(P,{children:[(0,i.jsx)(y.p,{error:C,fullWidth:!0,children:(0,i.jsx)(m.o,{inputProps:{value:c,placeholder:"Briefly ask your question",onChange:e=>{u(e.target.value)},onPaste:()=>{(0,k.j)("Pasted text in brief message section on ats page")}},enterKeyHandler:()=>{I()},autoFocus:!0})}),f?(0,i.jsx)(T,{children:(0,i.jsx)(w.T,{height:20,width:"20px"})}):(0,i.jsx)(x.h,{iconName:"send_white",size:"sm",onClick:()=>{I()}})]}),(0,i.jsx)(o.z,{variant:"link",onClick:()=>{(0,k.j)("Clicked to cancel ask details input on ats page",{...(0,_.gP)("ApplicationCardModal")&&{right_pane:!0}}),n()},label:"Cancel"})]})};var R=t(98332),F=t(39760),Z=t(80308),N=t(31041),q=t(18440),J=t(60839),L=t(81684),W=t(32582);function U(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function V(){let e=U(["\n position: relative;\n ","\n"]);return V=function(){return e},e}function B(){let e=U(["\n position: absolute;\n top: -6px;\n right: 12px;\n border-radius: 50px;\n padding: 0px 8px;\n background: ",";\n"]);return B=function(){return e},e}function $(){let e=U(["\n max-width: 200px;\n"]);return $=function(){return e},e}function Q(){let e=U(["\n ","\n align-self: stretch;\n ","\n gap: 10px;\n"]);return Q=function(){return e},e}let H=S.ZP.div.withConfig({componentId:"sc-c151fa38-0"})(V(),e=>{let{fullWidth:n}=e;return n&&"width: 100%;"}),G=S.ZP.div.withConfig({componentId:"sc-c151fa38-1"})(B(),(0,I.gJ)("--success-base")),Y=S.ZP.div.withConfig({componentId:"sc-c151fa38-2"})($()),X=S.ZP.div.withConfig({componentId:"sc-c151fa38-3"})(Q(),C.kC,e=>{let{fullWidth:n}=e;return!n&&"\n display: flex;\n justify-content: center;\n "}),K=e=>{var n,t,x,m,j;let{variant:b,applicationCardData:y,stageId:w}=e,C=(0,f.useRouter)(),S=null===(n=C.query)||void 0===n?void 0:null===(t=n.job)||void 0===t?void 0:t.toString(),I=(0,h.Q)(w),{data:z}=(0,v.T)(),{data:A}=(0,p._)(),{data:D}=(0,W.yq)(),O=null==D?void 0:null===(x=D.allJobsIdsObject)||void 0===x?void 0:x[S],[P,E]=(0,l.useState)(!1),[T,U]=(0,l.useState)(!1),V=(0,q.Po)(e=>{var n;return null===(n=e.state)||void 0===n?void 0:n[null==y?void 0:y.id]}),{applicationCardTrackEventHelper:B}=(0,N.O)(),$=(0,L.l)(),[Q,K]=(0,l.useState)(!1),[ee,en]=(0,l.useState)(!1),{bulkUpdateApplicationCards:et}=(0,g.y)({selectedJobId:S}),ei=(null==I?void 0:I.type)==="candidates"?"application_review":"application_engage",{trackActivityComplete:el}=(0,Z.m)(ei,{jobid:S,applicationid:null==y?void 0:y.id,current_stage_id:w,current_stage_title:null==I?void 0:I.title,current_stage_type:null==I?void 0:I.type}),eo=null==z?void 0:null===(m=z.permissions)||void 0===m?void 0:m.unlockCandidates,er=null==z?void 0:null===(j=z.permissions)||void 0===j?void 0:j.salaryLimit,ea=null==y?void 0:y.eligible_for_free_unlock,ed=null==y?void 0:y.unlocked,es=async()=>{B(y,"Clicked to take application forward on ats page",{additionalAnalyticsProvider:["intercom"]});let e=F.m.get("auto_proceed_to_next_application_on_action");e=!e||"true"===e,q.Po.setState(e=>({state:{...e.state,[y.id]:!0}}));
1try{await et({jobId:S,action:"shortlist",selectApplications:[y.id],throwOnError:!0,showErrorToast:!1}),("conversation"===b||"lg"===b)&&el({complete_reason:"shortlisted"})}catch(e){var n,t,i,l;e.extraData&&(null===(n=JSON.parse(e.extraData))||void 0===n?void 0:null===(t=n.error)||void 0===t?void 0:null===(i=t.options)||void 0===i?void 0:null===(l=i.error)||void 0===l?void 0:l.customCode)==="limit_exhausted"?(0,_.h7)("ResumeDownloadLimitCrossed",{data:{limit:""}}):c.$.error({errorResponse:e})}q.Po.setState(e=>({state:{...e.state,[y.id]:!1}}))},ec=()=>{K(!0),setTimeout(()=>{K(!1)},5e3)},eu=(0,J.a)(),ev=(null==I?void 0:I.type)==="candidates",ep=(null==I?void 0:I.type)==="rejected",eg=(null==I?void 0:I.type)==="sent",eh=async()=>{let e=((null==z?void 0:z.firstName)||"").toLowerCase(),n=((null==z?void 0:z.lastName)||"").charAt(0).toLowerCase(),t=new Date;t.setMonth(t.getMonth()-12);let i=(null==y?void 0:y.belongsToCollections)||{},l=Object.values(i).some(e=>{let n=null==e?void 0:e.addedOn;if(!n)return!1;let i=null;return n instanceof Date?i=n:"string"==typeof n||"number"==typeof n?i=new Date(n):"function"==typeof(null==n?void 0:n.toDate)?i=n.toDate():(null==n?void 0:n.seconds)!=null?i=new Date(1e3*n.seconds):(null==n?void 0:n._seconds)!=null&&(i=new Date(1e3*n._seconds)),i&&!Number.isNaN(i.getTime())&&i>t}),o=(null==O?void 0:O.hiringMode)==="lightning",r="".concat(o&&l?"OutboundFromCutshort-Nk":"OutboundFromCutshort","-").concat(e).concat(n);try{await eu.mutateAsync({tcid:null==y?void 0:y.tcid,jobid:S,context:"markITACandidateInterested",applicationSource:r}),c.$.success({content:"Candidate moved to application stage successfully"}),E(!0)}catch(e){c.$.error({errorResponse:e})}},ef=async()=>{try{await $.mutateAsync({tcId:null==y?void 0:y.tcid,context:"ITAStageUnlock",jobId:S,skipNotification:!0}),c.$.success({content:"Successfully unlocked profile"}),U(!0)}catch(e){c.$.error({errorResponse:e})}};return ee&&"conversation"===b?(0,i.jsx)(M,{showMessageSentText:ec,jobId:S,applicationCardData:y,stageId:w,closeAskMoreDetails:()=>en(!1),setShowAskMoreDetails:en}):!ee&&eo&&(0,i.jsxs)(a.x,{display:"flex",flexDirection:"column",alignItems:"flex-end",children:[V?(0,i.jsx)(a.x,{children:(0,i.jsx)(o.z,{variant:"primary-inverted",size:"sm",disabledText:"Taking forward...",label:"Taking forward..."})}):(0,i.jsxs)(X,{fullWidth:"conversation"!==b,children:[!((()=>{var e,n,t,i;if(!y||!y.userCurrentSalary||!er)return!1;let l=(null==y?void 0:y.userCurrentSalary)||1/((null==A?void 0:null===(e=A.exchangeRates)||void 0===e?void 0:e[null==y?void 0:y.userCurrentSalaryCurrency])||1);return(null==A?void 0:null===(n=A.ICPTagCategories)||void 0===n?void 0:n.includes(null==A?void 0:null===(t=A.tag_to_tagcat)||void 0===t?void 0:t[null==y?void 0:null===(i=y.tags)||void 0===i?void 0:i[0]]))&&l>er})()&&!ea)&&ev&&(0,i.jsxs)(H,{fullWidth:"conversation"!==b,children:[(0,i.jsx)(o.z,{className:"application-card-inner-cta",onClick:es,label:ed?"Shortlist":"Unlock profile",fullWidth:!0,size:"sm"}),!!ea&&(0,i.jsx)(G,{children:(0,i.jsx)(s.z,{positions:["top"],className:"application-card-inner-cta",maxWidth:200,variant:"tooltip",hoverEnabled:!0,flyoutElement:(0,i.jsx)(Y,{className:"application-card-inner-cta",children:(0,i.jsx)(d.x,{color:"grey-3",children:null==y?void 0:y.eligible_for_free_unlock_reason_text})}),children:(0,i.jsx)(a.x,{children:(0,i.jsx)(d.x,{color:"white",size:"xs",children:"Free"})})})})]}),eg&&(0,i.jsxs)(i.Fragment,{children:[!(null==y?void 0:y.unlocked)&&(0,i.jsx)(o.z,{size:"sm",variant:"primary",label:"Unlock profile",disabledText:($.isLoading||T)&&"Unlocking...",onClick:ef}),(0,i.jsx)(o.z,{size:"sm",variant:"secondary",label:"Candidate interested",disabledText:(eu.isLoading||P)&&"Updating...",onClick:eh})]}),!ep&&(0,i.jsx)(R.s,{variant:b,applicationCardData:y})]}),"conversation"===b&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.L,{size:10}),Q?(0,i.jsx)(d.x,{size:"sm",color:"success-base",children:"Message sent successfully"}):(0,i.jsxs)(d.x,{size:"sm",color:"grey-7",..."conversation"===b&&{textAlign:"center"},children:["Or"," ",(0,i.jsxs)(u.x,{className:"application-card-inner-cta",onClick:()=>{(0,k.j)("Clicked to view ask details input on ats page"),en(!0)},children:["ask candidate for more details"," "]})," ","before taking an action"]})]})]})}},58113:function(e,n,t){"use strict";t.d(n,{w:function(){return iV}});var i=t(61261),l=t(96756),o=t(17577),r=t(30099),a=t(94313),d=t(34005),s=t(12776),c=t(27688),u=t(91987),v=t(35345),p=t(74285),g=t(45846);function h(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function f(){let e=h(["\n ","\n border-radius: 5px 5px 0 0;\n padding: 8px 10px;\n background: #f8f8f8;\n"]);return f=function(){return e},e}function x(){let e=h(["\n color: #79b22b;\n"]);return x=function(){return e},e}let m=g.ZP.div.withConfig({componentId:"sc-992e8720-0"})(f(),e=>e.margin&&"margin: ".concat(e.margin,";")),j=(0,g.ZP)(p.x).withConfig({componentId:"sc-992e8720-1"})(x()),b=e=>{var n,t,l;let{cardData:u,margin:p,variant:g}=e,h=(0,c.useRouter)(),[f]=(0,a.J)(),x="pipeline"===g,b=(0,d.N)(),{track:y}=(0,s.z)(),w=x?null==f?void 0:null===(n=f.gender)||void 0===n?void 0:n.gender:null==h?void 0:null===(t=h.query)||void 0===t?void 0:t.gender;return w&&(null==u?void 0:null===(l=u.genderStatus)||void 0===l?void 0:l.confidence)<1?(0,i.jsx)(m,{margin:p,children:b.isSuccess?(0,i.jsxs)(j,{children:["Thanks for reporting."," ",!x&&"This will help us in fixing such errors."]}):(0,i.jsxs)(r.x,{color:"grey-7",size:x?"sm":"base",children:[x?"Gender deduced by algorithms.":"Gender of this candidate was deduced by our algorithms which are generally 95% accurate."," ",(0,i.jsx)(o.x,{renderAs:"span",onClick:()=>{var e,n,t;
1let i={sendOnlyToEngineeringTeam:!0,sendToBD:!1,compact_message:"has reported incorrect gender of TC - ".concat(null==u?void 0:u._id,"(").concat(null==u?void 0:null===(e=u.createdBy)||void 0===e?void 0:e.__un,") | Set it to Male - https://cutshort.io/shadmin/correct-gender-for-user?userid=").concat(null==u?void 0:null===(n=u.createdBy)||void 0===n?void 0:n._id,"&gender=male | Set it to Female - https://cutshort.io/shadmin/correct-gender-for-user?userid=").concat(null==u?void 0:null===(t=u.createdBy)||void 0===t?void 0:t._id,"&gender=female"),subject:"Emp reported incorrect gender"};b.mutate(i,{onError:e=>{v.$.error({errorResponse:e})}}),x?y("Clicked to report incorrect gender on ats page"):y("Clicked to report incorrect gender on candidates page")},children:x?"Incorrect?":"Report as incorrect"})]})}):null};var y=t(34968),w=t(51575),k=t(90763),_=t(32898),C=t(28394),S=t(14301),I=t(90916),z=t(26488),A=t(28447),D=t(79993),O=t(98640),P=t(94802),E=t(92244);let T=()=>{var e,n,t,l;let a=(0,c.useRouter)(),d=null===(e=a.query)||void 0===e?void 0:null===(n=e.job)||void 0===n?void 0:null===(t=n.toString)||void 0===t?void 0:t.call(n),v=(0,D.a)(O.VB.tabletM),{variant:p,applicationCardData:g,applicationId:h}=(0,I.a0)(),{data:f,isLoading:x}=(0,z.n)(d),{allTeamMembersForCurrentJob:m,allTeamMembersForCurrentJobIdsObject:j}=null!=f?f:{},{mutateAsync:b,isLoading:T}=(0,A.d)(),M=(0,u.useMemo)(()=>null==m?void 0:m.map(e=>({...e,label:null==e?void 0:e.name})),[m]),[R,F]=(0,u.useState)(),Z=null==g?void 0:null===(l=g.assignee)||void 0===l?void 0:l[0];(0,u.useEffect)(()=>{F(null==j?void 0:j[Z])},[j,Z]);let N=(0,u.useCallback)(e=>(0,i.jsxs)(E.sQ,{draggable:!1,onDragStart:()=>!1,children:[(0,i.jsxs)(y.x,{display:"flex",gap:10,children:[(0,i.jsx)(k.q,{src:e.profilePicture,size:20}),(0,i.jsx)(E.n2,{children:e.name})]}),(null==R?void 0:R._id)===(null==e?void 0:e._id)&&(0,i.jsx)(_.J,{type:"tick"})]}),[null==R?void 0:R._id]);return(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",gap:10,flexShrink:0,children:[!!(null==g?void 0:g.new_candidate_activity)&&(0,i.jsxs)(E.qt,{onClick:()=>{(0,s.j)("Clicked to view conversation from stage card icon on ats page")},title:"New candidate activity on this application",children:[(0,i.jsx)(_.J,{src:"/message_bubble_p.png",size:15}),(0,i.jsx)(E.kb,{})]}),!!(null==g?void 0:g.addedFirstNote)&&(0,i.jsx)(E.qt,{className:"application-card-inner-cta",onClick:()=>{(0,P.cF)({data:{modalTab:"notes",isOnMediumTablet:v,applicationId:h,applicationData:g}}),(0,s.j)("Clicked to view notes from stage card icon on ats page")},title:"View notes added by your team",children:(0,i.jsx)(_.J,{src:"/note_indicator_o.png",size:15})}),x?(0,i.jsx)(y.x,{flexShrink:0,children:(0,i.jsx)(S.O,{variant:"circle",diameter:20})}):(0,i.jsx)(w.P,{size:"sm",variant:"search",menuPositions:["left"],flyoutProps:{className:"application-card-inner-cta"},options:M||[],optionTemplate:e=>{let{option:n}=e;return N(n)},searchInputPlaceholder:"Assign to team member",customTriggerElement:T?(0,i.jsx)(E.sb,{children:(0,i.jsx)(C.a,{})}):(0,i.jsxs)(E.GO,{className:"application-card-inner-cta",title:"This application is assigned to ".concat(null==R?void 0:R.name),onClick:()=>{(0,s.j)("Clicked to view assignee flyout on ats page")},children:["base"===p&&(0,i.jsx)(r.x,{size:"xs",color:"grey-7",children:"Assigned to"}),(0,i.jsx)(k.q,{src:null==R?void 0:R.profilePicture,size:20})]}),customFooter:(0,i.jsx)(o.x,{className:"application-card-inner-cta",href:"/profile/hiring-settings/teammates",target:"_blank",onClick:()=>{(0,s.j)("Clicked to invite team member on ats stage")},children:"Invite team members"}),value:null==R?void 0:R._id,onSelectItem:async e=>{(0,s.j)("Clicked to assign application to team member on ats page"),await b({threadid:g.threadid,new_assignee:e._id},{onSuccess(){F(e)}})}})]})};var M=t(5749),R=t(20479),F=(t(32925),t(65062)),Z=t(40795);function N(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function q(){let e=N(["\n ","\n justify-content: space-between;\n svg {\n color: ",";\n }\n"]);return q=function(){return e},e}function J(){let e=N(["\n ","\n ","\n"]);return J=function(){return e},e}function L(){let e=N(["\n max-width: 200px;\n"]);return L=function(){return e},e}g.ZP.div.withConfig({componentId:"sc-a8bdfdb1-0"})(q(),F.kC,(0,Z.gJ)("--success-base")),(0,g.ZP)(r.x).withConfig({componentId:"sc-a8bdfdb1-1"})(J(),F.Mk,F.od),g.ZP.div.withConfig({componentId:"sc-a8bdfdb1-2"})(L());var W=t(69151),U=t(85061),V=t(32582),B=t(72139),$=t.n(B),Q=t(93571);let H=e=>{let{data:n,options:t}=e;return(0,Q.o)({options:{queryKey:["stageData",n],...t},realtime:!0,fetchType:"single",collectionName:"stages_collection",docId:n.stageId})},G=e=>{var n,t,l;let{otherApplication:o}=e||{},{jobid:a,thread_obj:d}=o||{},{data:s}=(0,V.yq)(),c=(null==s?void 0:s.allJobsIdsObject)||{},{data:u,isInitialLoading:v}=H({data:{stageId:null==d?void 0:null===(n=d.atsStage)||void 0===n?void 0:n.id},options:{enabled:!!(null==d?void 0:null===(t=d.atsStage)||void 0===t?void 0:t.id),cacheTime:0}});return(0,i.jsxs)(y.x,{display:"flex",children:[(0,i.jsxs)(y.x,{flexGrow:1,children:[(0,i.jsx)(r.x,{children:null==c?void 0:null===(l=c[a])||void 0===l?void 0:l.headline}),(0,i.jsx)(r.x,{size:"sm",color:"grey-7",children:v?"Loading...":"Stage: ".concat(null==u?void 0:u.title)})]}),(0,i.jsx)(y.x,{flexShrink:0,children:(0,i.jsx)(R.z,{label:"View",variant:"link",target:"_blank",renderAs:"a",href:"/profile/workflow?application=".concat(null==o?void 0:o.atsApplicationId)})})]})};var Y=t(22126),X=t(39078),K=t(29465);let ee=e=>{let{id:n}=(0,K.Z)(),t={talentCardIds:e,workspaceId:n};return(0,Y.useQuery)(["getApplicationOnOtherJobs",e],()=>(0,X.vq)(t))},en=()=>{var e;let{applicationCardData:n}=(0,I.a0)(),{data:t}
1=ee(null==n?void 0:n.tcid),l=null==t?void 0:null===(e=t[null==n?void 0:n.tcid])||void 0===e?void 0:e.filter(e=>e.atsApplicationId!==n.id);return(0,i.jsx)(y.x,{width:275,display:"flex",flexDirection:"column",gap:5,children:(null==l?void 0:l.length)>0&&(null==l?void 0:l.map(e=>(0,i.jsx)(G,{otherApplication:e},null==e?void 0:e.atsApplicationId)))})};var et=t(74303);function ei(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function el(){let e=ei(["\n display: inline-block;\n vertical-align: top;\n cursor: pointer;\n\n & > div {\n display: inline-block;\n }\n"]);return el=function(){return e},e}function eo(){let e=ei(["\n position: absolute;\n top: 0;\n left: 0;\n width: calc(100% + 8px);\n height: calc(100% + 4px);\n background-color: ",";\n border-radius: 5px;\n margin-left: -2px;\n margin-top: -2px;\n"]);return eo=function(){return e},e}let er=g.ZP.div.withConfig({componentId:"sc-fe14500b-0"})(el());g.ZP.div.withConfig({componentId:"sc-fe14500b-1"})(eo(),(0,Z.gJ)("--warning-light"));let ea=()=>{var e;let{applicationCardData:n}=(0,I.a0)(),{data:t,isLoading:l}=ee(null==n?void 0:n.tcid),a=null==t?void 0:null===(e=t[null==n?void 0:n.tcid])||void 0===e?void 0:e.filter(e=>e.atsApplicationId!==n.id);return(0,i.jsx)(y.x,{position:"relative",children:(0,i.jsx)(y.x,{position:"relative",children:(0,i.jsxs)(r.x,{size:"sm",color:"grey-7",fontWeight:"regular",children:[(0,i.jsx)(r.x,{renderAs:"span",color:"grey-7",fontWeight:"regular",children:"â¢"})," ","Candidate applied to"," ",l?(0,i.jsx)(y.x,{display:"inline-block",children:"loading..."}):(0,i.jsx)(i.Fragment,{children:(null==a?void 0:a.length)>0?(0,i.jsx)(er,{children:(0,i.jsx)(M.z,{variant:"popover",flyoutElement:(0,i.jsx)(en,{}),children:(0,i.jsx)(o.x,{renderAs:"span",children:"".concat(null==a?void 0:a.length," other ").concat((0,et.Rr)("job",null==a?void 0:a.length))})})}):"no other job"})]})})})};
1var ed=t(17543),es=t(32266);function ec(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function eu(){let e=ec(["\n ","\n flex-direction: column;\n align-items: center;\n max-width: 220px;\n"]);return eu=function(){return e},e}function ev(){let e=ec(["\n background-color: ",";\n padding: 2px 6px;\n border-radius: 3px;\n"]);return ev=function(){return e},e}let ep=g.ZP.div.withConfig({componentId:"sc-56d624bb-0"})(eu(),F.kC),eg=g.ZP.div.withConfig({componentId:"sc-56d624bb-1"})(ev(),(0,Z.gJ)("--info-light")),eh=()=>{var e,n,t,l;let o=(0,c.useRouter)(),a=null===(e=o.query)||void 0===e?void 0:null===(n=e.job)||void 0===n?void 0:null===(t=n.toString)||void 0===t?void 0:t.call(n),{data:d,isLoading:u}=(0,z.n)(a),{applicationCardData:v}=(0,I.a0)(),{allTeamMembersForCurrentJobIdsObject:p}=null!=d?d:{},g=null==v?void 0:null===(l=v.assignee)||void 0===l?void 0:l[0],h=null==p?void 0:p[g];return(0,i.jsx)(M.z,{maxWidth:250,className:"application-card-inner-cta",triggeredOn:"hover",onVisibilityChange:()=>{(0,s.j)("Hovered to see invited badge on ats page")},align:"center",flyoutElement:(0,i.jsxs)(ep,{children:[(0,i.jsxs)(r.x,{textAlign:"center",children:["This candidate was invited by"," ",u?(0,i.jsx)(y.x,{display:"flex",centerContent:!0,children:(0,i.jsx)(S.O,{width:120,variant:"rounded-rectangle"})}):(0,i.jsxs)(r.x,{renderAs:"span",fontWeight:"bold",children:[null==h?void 0:h.name," "]}),"to apply on this job. Invite more to get relevant candidates."]}),(0,i.jsx)(es.L,{size:10}),(0,i.jsx)(R.z,{target:"_blank",renderAs:"a",className:"application-card-inner-cta",label:"Invite candidates",size:"sm",href:"/profile/candidate-search/db?matchesfor=".concat(a)})]}),variant:"popover",children:(0,i.jsx)(eg,{className:"application-card-inner-cta",children:(0,i.jsx)(r.x,{size:"xs",color:"info-base",fontWeight:"bold",children:"Invited"})})})};function ef(){var e,n;let t=(e=["\n vertical-align: middle;\n"],n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}})));return ef=function(){return t},t}let ex=(0,g.ZP)(y.x).withConfig({componentId:"sc-a78dd21c-0"})(ef()),em=()=>{var e,n,t,l,o,a,d,s,u,v,p;let g=(0,c.useRouter)(),h=null===(e=g.query)||void 0===e?void 0:null===(n=e.job)||void 0===n?void 0:null===(t=n.toString)||void 0===t?void 0:t.call(n),{variant:f,applicationCardData:x,stageId:m}=(0,I.a0)(),{data:j}=(0,U.c)({data:{jobId:h}}),b=(null==j?void 0:null===(l=j.modifiedStagesDataIdObj)||void 0===l?void 0:l[m])||{},{data:y,isLoading:w}=(0,z.n)(h),{allTeamMembersForCurrentJobIdsObject:k}=null!=y?y:{};return(null==x?void 0:null===(o=x.stageStatus)||void 0===o?void 0:null===(a=o[null==b?void 0:b.id])||void 0===a?void 0:a.addedByUser)?(0,i.jsxs)(r.x,{size:"lg"===f?"sm":"xs",color:"grey-7",fontWeight:"regular",children:[(0,i.jsx)(r.x,{renderAs:"span",color:"grey-7",fontWeight:"regular",children:"â¢"})," ","Moved to this stage by"," ",w?(0,i.jsx)(ex,{display:"inline-block",children:(0,i.jsx)(S.O,{width:120,variant:"rounded-rectangle"})}):(0,i.jsx)(i.Fragment,{children:(null==k?void 0:null===(u=k[null==x?void 0:null===(d=x.stageStatus)||void 0===d?void 0:null===(s=d[null==b?void 0:b.id])||void 0===s?void 0:s.addedByUser])||void 0===u?void 0:u.name)||(null==x?void 0:null===(v=x.stageStatus)||void 0===v?void 0:null===(p=v[null==b?void 0:b.id])||void 0===p?void 0:p.addedByUser)})]}):null},ej=()=>{var e,n,t,l,o,a,d,s,u,v,p,g;let h=(0,c.useRouter)(),f=null===(e=h.query)||void 0===e?void 0:null===(n=e.job)||void 0===n?void 0:null===(t=n.toString)||void 0===t?void 0:t.call(n),{variant:x,applicationCardData:m}=(0,I.a0)(),{data:j}=(0,U.c)({data:{jobId:f}}),b=null==j?void 0:null===(l=j.modifiedStagesDataIdObj)||void 0===l?void 0:l[null==j?void 0:j.applicationsStageId],y="lg"===x;return(0,i.jsxs)(i.Fragment,{children:[(null==m?void 0:null===(o=m.stageStatus)||void 0===o?void 0:null===(a=o[null==b?void 0:b.id])||void 0===a?void 0:a.addedOnDate)&&(0,i.jsxs)(r.x,{title:"Added to this stage on ".concat($()(null==m?void 0:m.addedToCurrentStageOnDate).format("Do MMMM [at] h:mm a")),size:y?"sm":"xs",color:"grey-7",fontWeight:"regular",children:[(0,i.jsx)(r.x,{renderAs:"span",color:"grey-7",fontWeight:"regular",children:"â¢"})," ","lg"===x?"Applied on ".concat($()(null==m?void 0:null===(d=m.stageStatus)||void 0===d?void 0:null===(s=d[null==b?void 0:b.id])||void 0===s?void 0:s.addedOnDate).format("DD/MM/YYYY [at] h:mm a")):"Applied ".concat($()(null==m?void 0:null===(u=m.stageStatus)||void 0===u?void 0:null===(v=u[null==b?void 0:b.id])||void 0===v?void 0:v.addedOnDate).fromNow(!0)," ago")]}),!(null==m?void 0:null===(p=m.stageStatus)||void 0===p?void 0:null===(g=p[null==b?void 0:b.id])||void 0===g?void 0:g.addedOnDate)&&(0,i.jsxs)(r.x,{size:y?"sm":"xs",color:"grey-7",fontWeight:"regular",children:[(0,i.jsx)(r.x,{renderAs:"span",color:"grey-7",fontWeight:"regular",children:"â¢"})," ","Not applied yet"]})]})};var eb=t(36839),ey=t(41670),ew=t(15851),ek=t(98949),e_=t(23823),eC=t(1737),eS=t(24492),eI=t(13750);function ez(){var e,n;let t=(e=["\n ","\n flex-wrap: wrap;\n align-items: center;\n gap: 5px;\n margin-right: 10px;\n"],n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}})));return ez=function(){return t},t}let eA=g.ZP.div.withConfig({componentId:"sc-817108d1-0"})(ez(),F.kC),eD=()=>{var e,n,t,l,a,d,c,v;let{variant:p,applicationCardData:g,applicationId:h}=(0,I.a0)(),{data:f}=(0,ew.T)(),{data:x}=(0,ek._)(),m=null==f?void 0:null===(e=f.hiringStatus)||void 0===e?void 0:null===(n=e.hiringAtCompanies)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.companyId,{data:{allJobsIdsObject:j}}=(0,V.yq)(),b=(0,eb.a)(ey.VB.tabletM),{isAdminUser:w}=(0,ed.O)(),k="lg"===p,_="search"===p,[C,S]=(0,u.useState)(!1),z=(0,u.useRef)(!1),{data:A}=(0,eI.H)({tcid:(null==j?void 0:null===(l=j[null==g?void 0:g.jobid])||void 0===l?void 0:l.hiringMode)==="lightning"&&k&&C?null==g?void 0:g.tcid:null}),{observe:D,unobserve:O}=(0,eS.s)({onEnter:()=>{z.current=!0,setTimeout(()=>{z.current&&(S(!0),O())},500)},onLeave:()=>{z.current=!1},threshold:1}),P=(0,u.useMemo)(()=>{var e;let n=(null==x?void 0:x.skills_map)||{},t=(null==g?void 0:null===(e=g.rejectedStatus)||void 0===e?void 0:e.rejectedReason)||{},i=[],l=(e,t)=>
1{let l=e.replace(/_/g," ");if("boolean"==typeof t)i.push(l);else{let o;o=Array.isArray(t)?t.map(t=>"skills"===e&&n[t]?n[t].toLowerCase():t.toLowerCase()).join(", "):t,i.push("".concat(l," - ").concat(o))}};return t&&Object.entries(t).forEach(e=>{let[n,t]=e;l(n,t)}),i.join(", ")},[null==x?void 0:x.skills_map,null==g?void 0:null===(a=g.rejectedStatus)||void 0===a?void 0:a.rejectedReason]);return(0,i.jsxs)(y.x,{display:"flex",justifyContent:"space-between",flexDirection:"column",alignItems:"flex-start",children:[(0,i.jsxs)(y.x,{display:"flex",flexDirection:b?"column":"row",alignItems:"center",gap:b?10:5,children:[(0,i.jsxs)(eA,{children:[(0,i.jsxs)(r.x,{size:k?"sm":"xs",color:"grey-7",fontWeight:"regular",title:"Added to this stage on ".concat($()(null==g?void 0:g.addedToCurrentStageOnDate).format("Do MMMM [at] h:mm a")),children:["Source: ",null==g?void 0:g.visibleApplicationSourceParsed]}),"sm"!==p&&!_&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ej,{}),(0,i.jsx)(em,{})]}),_&&(null==j?void 0:null===(d=j[null==g?void 0:g.jobid])||void 0===d?void 0:d.headline)&&(0,i.jsxs)(r.x,{size:"xs",color:"grey-7",fontWeight:"regular",children:[(0,i.jsx)(r.x,{renderAs:"span",color:"grey-7",fontWeight:"regular",children:"â¢"})," ","Job ",null==j?void 0:null===(c=j[null==g?void 0:g.jobid])||void 0===c?void 0:c.headline]}),k&&(0,i.jsx)(ea,{})]}),(null==g?void 0:g.invited_to_apply)&&!_&&!k&&(null==g?void 0:g.stagetype)!=="sent"&&(0,i.jsx)(eh,{}),(null==j?void 0:null===(v=j[null==g?void 0:g.jobid])||void 0===v?void 0:v.hiringMode)==="lightning"&&k&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.x,{size:"sm",renderAs:"span",children:(0,i.jsx)(o.x,{target:"_blank",onClick:()=>{(0,s.j)("Clicked to view on client lightning UI on application card")},href:"/lightning-dashboard/".concat(m,"/").concat(null==g?void 0:g.jobid,"/").concat((()=>{let e="inprocess";for(let[n,t]of Object.entries(e_.$V))"string"==typeof t&&t===(null==g?void 0:g.stagetype)&&(e=n);return e})(),"/").concat(h),children:"View on Lightning"})}),(0,i.jsxs)(r.x,{size:"sm",renderAs:"span",children:[(0,i.jsx)(r.x,{renderAs:"span",color:"grey-7",fontWeight:"regular",children:"â¢"})," ",(0,i.jsx)(o.x,{target:"_blank",onClick:()=>{(0,s.j)("Clicked to view on client lightning UI on application card")},href:"/back-office/data-validation?applicationId=".concat(h,"&includeAllStageTypes=true&ignoreDataValidationStatus=true"),children:"Edit on DV"})]}),(null==A?void 0:A.length)>0&&(0,i.jsxs)(r.x,{size:"sm",renderAs:"span",children:[(0,i.jsx)(r.x,{renderAs:"span",color:"grey-7",fontWeight:"regular",children:"â¢"})," ",(0,i.jsx)(o.x,{onClick:()=>{(0,eC.h7)("CandidateAICallsModal",{data:{tcid:null==g?void 0:g.tcid}})},children:"AI calls"})]})]})]}),w&&k&&P&&(0,i.jsx)(y.x,{display:"block",margin:"5px 0",children:(0,i.jsxs)(r.x,{size:"sm",color:"grey-7",children:[(0,i.jsx)(r.x,{size:"sm",renderAs:"span",color:"grey-7",children:"Reject reason:"})," ",P]})}),(0,i.jsx)("div",{ref:D})]})};var eO=t(99831),eP=t(65029),eE=t(24843),eT=t(29924),eM=t(98527);let eR=()=>(0,Y.useMutation)(e=>(0,eM.nn)({applicationId:e,AiPrompts:[],AIModel:"gpt_4_mini"}));var eF=t(59684),eZ=t(27396),eN=t(15656),eq=t(28400),eJ=t(61458),eL=t(25620),eW=t(85922),eU=t(57778),eV=t(28709);let eB=e=>{var n,t;let{applicationId:l,questionId:a,jobId:d,evaluation:s}=e,[c,v]=(0,u.useState)(!1),[p,g]=(0,u.useState)(null!==(n=null==s?void 0:s.reason)&&void 0!==n?n:""),[h,f]=(0,u.useState)(null!==(t=null==s?void 0:s.confidenceScore)&&void 0!==t?t:0),[x,m]=(0,u.useState)(!1),{updateApplicationCard:j}=(0,eJ.y)({selectedJobId:d}),b=async()=>{m(!0);try{await j({applicationCardId:l,updateObject:{["embeddingsForScreening.questionConfigs.".concat(a,".reason")]:p,["embeddingsForScreening.questionConfigs.".concat(a,".confidenceScore")]:h},throwOnError:!0}),v(!1)}catch(e){eF.$.error({errorResponse:e})}m(!1)},k=x?"Updating...":void 0;return p||(k="Update evaluation"),(0,i.jsx)(y.x,{display:"flex",justifyContent:"flex-end",children:(0,i.jsx)(M.z,{flyoutElement:(0,i.jsxs)(y.x,{borderRadius:"base",boxShadow:"shadow-base",backgroundColor:"white",border:"grey-4",width:300,padding:10,
1children:[(0,i.jsx)(r.x,{children:"Edit evaluation"}),(0,i.jsx)(es.L,{size:5}),(0,i.jsx)(w.P,{value:h,options:[{_id:3,label:"3"},{_id:2,label:"2"},{_id:1,label:"1"},{_id:0,label:"0"}],onSelectItem:e=>{f(Number(e._id))},size:"base",variant:"default"}),(0,i.jsx)(es.L,{size:5}),(0,i.jsx)(eV.g,{onChange:e=>{g(e.target.value)},value:p}),(0,i.jsx)(es.L,{size:10}),(0,i.jsx)(R.z,{disabledText:k,label:"Update evaluation",onClick:b})]}),align:"center",isOpen:c,onVisibilityChange:v,variant:"custom",children:(0,i.jsx)(y.x,{display:"flex",gap:5,alignItems:"center",children:(0,i.jsx)(o.x,{children:"Edit"})})})})};var e$=t(64198);let eQ={strong_fit:"Strong",maybe_a_fit:"Fair",not_a_fit:"Not a fit"},eH={strong_fit:"brand-lightest",maybe_a_fit:"brand-lightest",not_a_fit:"brand-lightest"},eG=e=>{let{compact:n,generatingProfileXRay:t,evaluationRefreshPending:l,onRegenerate:o}=e,[r,a]=(0,u.useState)(!1),d=t||l,s=n?24:28,c=n?16:18;return(0,i.jsx)(M.z,{variant:"tooltip",flyoutElement:"Calculate shortlisting match from the candidate profile (takes a few seconds)",className:"application-card-inner-cta",children:(0,i.jsx)("button",{type:"button",disabled:d,"aria-label":"Recalculate shortlisting match","aria-busy":!!d||void 0,onMouseEnter:()=>{d||a(!0)},onMouseLeave:()=>a(!1),onClick:e=>{e.stopPropagation(),d||o()},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:s,height:s,padding:0,border:"none",borderRadius:"50%",margin:0,color:"var(--brand-base)",cursor:d?"not-allowed":"pointer",transition:"background-color 0.12s ease",opacity:d?.45:1,backgroundColor:!d&&r?"var(--grey-3)":"transparent"},children:(0,i.jsx)(y.x,{display:"flex",width:c,height:c,alignItems:"center",justifyContent:"center",children:eT.$.refresh})})})},eY=()=>{var e,n,t,l,a,d,s,v,p,g,h,f;let x=(0,c.useRouter)(),{isAdminUser:m}=(0,ed.O)(),{mutate:j,isLoading:b}=eR(),[w,k]=(0,u.useState)([]),[_,C]=(0,u.useState)("idle"),[S,z]=(0,u.useState)(null),[A,D]=(0,u.useState)(!0),[O,P]=(0,u.useState)(0),E=(0,u.useRef)(null),T=(0,u.useRef)([]),{fns:F}=(0,e$.$I)()||{},{applicationCardData:Z,variant:N}=(0,I.a0)(),q=null==Z?void 0:Z.jobid,{data:J}=(0,V.yq)(),L=q?null==J?void 0:null===(e=J.allJobsIdsObject)||void 0===e?void 0:e[q]:void 0,W=null==L||(0,eL.w)(L),U="lg"===N,B="base"===N,{data:$,isInitialLoading:Q}=(0,eO.e)((null==Z?void 0:null===(n=Z.AIScreener)||void 0===n?void 0:n.botConversationThread)?null==Z?void 0:Z._id:null),{updateApplicationCard:H}=(0,eJ.y)({selectedJobId:null==Z?void 0:Z.jobid}),{data:G,isInitialLoading:Y}=(0,eP.G)(q,"jobcreation",{pageSize:50}),X=null==$?void 0:null===(t=$.thread)||void 0===t?void 0:t.configId,K=X?"https://aiscreener.cutshort.io/ai-screener/".concat(X,"/").concat(null==Z?void 0:Z._id,"?mode=preview"):"",ee=null==Z?void 0:null===(l=Z.embeddingsForScreening)||void 0===l?void 0:l.questionConfigs,[en]=(0,eE.$)(),et=(0,u.useMemo)(()=>{var e;return null==G?void 0:null===(e=G.pages)||void 0===e?void 0:e.map(e=>{var n;return null==e?void 0:null===(n=e.questions)||void 0===n?void 0:n.filter(e=>!(null==e?void 0:e.isMarkedDeleted))}).flat()},[G]);(0,u.useEffect)(()=>{C("idle"),z(null),E.current=null,T.current=[]},[null==Z?void 0:Z._id]),(0,u.useEffect)(()=>{if("pending"!==_){D(!0);return}let e=window.setInterval(()=>{D(e=>!e)},550);return()=>window.clearInterval(e)},[_]),(0,u.useEffect)(()=>{if("pending"!==_)return;let e=E.current,n=T.current;null!=e&&n.length&&!(Date.now()-e<2e3)&&function(e,n,t){var i,l;if(!n.length)return!1;let o=null!==(l=null==e?void 0:null===(i=e.embeddingsForScreening)||void 0===i?void 0:i.questionConfigs)&&void 0!==l?l:{};return n.every(e=>{let n=o[e];if(!n)return!1;let i=function(e){if(null==e)return null;if("number"==typeof e)return e;if(e instanceof Date)return e.getTime();if("string"==typeof e){let n=Date.parse(e);return Number.isNaN(n)?null:n}if("object"==typeof e){if("function"==typeof e.toDate){let n=e.toDate();return n instanceof Date?n.getTime():null}if("number"==typeof e.seconds)return 1e3*e.seconds;if("number"==typeof e._seconds)return 1e3*e._seconds}return null}(n.generatedOn);return null!=i&&i>t})}(Z,n,e)&&(C("done"),z(Date.now()))},[_,Z]),(0,u.useEffect)(()=>
1{if("pending"!==_)return;let e=window.setTimeout(()=>{C(e=>"pending"===e?"timeout":e)},9e4);return()=>window.clearTimeout(e)},[_]),(0,u.useEffect)(()=>{if("done"!==_||null==S)return;let e=window.setInterval(()=>{P(e=>e+1)},3e4);return()=>window.clearInterval(e)},[_,S]);let ei=(0,u.useMemo)(()=>{var e;return((null==G?void 0:null===(e=G.pages)||void 0===e?void 0:e.map(e=>{var n;return null==e?void 0:null===(n=e.questions)||void 0===n?void 0:n.map(e=>{var n;return(null==ee?void 0:ee[null==e?void 0:e._id])&&(null==e?void 0:e.type)==="jobcreation"?{...e,...null!==(n=null==ee?void 0:ee[null==e?void 0:e._id])&&void 0!==n?n:{},configId:null==e?void 0:e._id}:null}).filter(Boolean)}))||[]).flat()},[ee,G]),el=(0,u.useMemo)(()=>{let e=[],n=(null==ei?void 0:ei.map(e=>{var n;let t="low";return(null==e?void 0:e.confidenceScore)===3&&(t="high"),(null==e?void 0:e.confidenceScore)===2&&(t="medium"),{shortlisting_criteria:null!==(n=null==en?void 0:en[null==e?void 0:e.configId])&&void 0!==n?n:null==e?void 0:e.configId,evalStatus:t,reason:null==e?void 0:e.reason,type:e.generatedBy||"profile_xray",question_id:null==e?void 0:e._id,adminFeedback:null==e?void 0:e.adminFeedback,originalEval:e}}))||[];return(null==et?void 0:et.map(t=>{let i=e.find(e=>e.question_id===(null==t?void 0:t._id)),l=n.find(e=>e.question_id===(null==t?void 0:t._id)),o=(new Date().getTime()-new Date(null==t?void 0:t.creationDate).getTime())/36e5,r={shortlisting_criteria:null==t?void 0:t.question,...i||l||{processing:!0,createdHrsAgo:o}};return r}).filter(Boolean))||[]},[$,en,ei,et]),eo=Boolean(null==Z?void 0:null===(a=Z.shortlistingCriteriaFitment)||void 0===a?void 0:a.fitment),er=()=>{j(null==Z?void 0:Z._id,{onSuccess:()=>{var e;let n=null!==(e=null==et?void 0:et.map(e=>e._id).filter(e=>Boolean(e)))&&void 0!==e?e:[];E.current=Date.now(),T.current=n,C("pending"),z(null),eF.$.success({content:eo?"Key criteria will be re-evaluated in a few seconds.":"Key criteria will be evaluated in a few seconds."})},onError:()=>{eF.$.error({content:eo?"Failed to re-evaluate key criteria":"Failed to evaluate key criteria"})}})},ea=async e=>{let n=w.includes(e);try{let t=[];n?(t=w.filter(n=>n!==e),k(t)):(t=[...w,e],k(t)),await H({applicationCardId:null==Z?void 0:Z._id,updateObject:{hide_questions:t},throwOnError:!0,showErrorToast:!1}),eF.$.success({content:"Visibility updated successfully"})}catch(t){k(t=>n?[...t,e]:t.filter(n=>n!==e)),eF.$.error({errorResponse:t})}};(0,u.useEffect)(()=>{k((null==Z?void 0:Z.hide_questions)||[])},[null==Z?void 0:Z.hide_questions]);let ec=(0,u.useMemo)(()=>(new Date().getTime()-new Date(null==Z?void 0:Z.timestampDate).getTime())/36e5,[Z]),eu=Boolean(null==et?void 0:et.length)&&Boolean(null==Z?void 0:Z._id);return(0,i.jsx)(y.x,{display:"flex",flexDirection:"column",gap:10,children:(0,i.jsx)(y.x,{children:Q||Y?(0,i.jsx)(y.x,{padding:"30px 0",centerContent:!0,children:(0,i.jsx)(eZ.a,{})}):(0,i.jsxs)(y.x,{display:"flex",gap:15,flexWrap:"wrap",children:[(0,i.jsxs)(y.x,{flexGrow:1,flexBasis:500,display:"flex",flexDirection:"column",gap:10,backgroundColor:(null==Z?void 0:null===(d=Z.shortlistingCriteriaFitment)||void 0===d?void 0:d.fitment)&&eH[Z.shortlistingCriteriaFitment.fitment]||"grey-1",padding:U?15:10,borderRadius:"base",children:[(eo||eu)&&(0,i.jsxs)(y.x,{margin:"0 0 5px",children:[U?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:10,children:[(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",gap:4,minWidth:0,flexGrow:1,children:[(0,i.jsxs)(r.x,{fontWeight:"bold",children:["Overall fitment:"," ",eo?null!==(h=eQ[Z.shortlistingCriteriaFitment.fitment])&&void 0!==h?h:Z.shortlistingCriteriaFitment.fitment:"Not evaluated"]}),eu&&(0,i.jsx)(eG,{compact:!1,generatingProfileXRay:b,evaluationRefreshPending:"pending"===_,onRegenerate:er})]}),(0,i.jsx)(o.x,{onClick:()=>{let e=encodeURIComponent("/profile/workflow?job=".concat(q));x.push("/profile/job-setup/".concat(q,"/shortlisting-criteria?redirect_url=").concat(e))},children:"Edit shortlisting criteria"})]}),eo&&Z.shortlistingCriteriaFitment.reason&&(0,i.jsx)(r.x,{size:"sm",children:Z.shortlistingCriteriaFitment.reason})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",gap:4,children:[(0,i.jsx)(M.z,{variant:"tooltip",flyoutElement:"Edit job to update match criteria",children:(0,i.jsxs)(r.x,{size:"sm",fontWeight:"bold",children:["Overall fitment:"," ",eo?null!==(f=eQ[Z.shortlistingCriteriaFitment.fitment])&&void 0!==f?f:Z.shortlistingCriteriaFitment.fitment:"Not evaluated"]})}),eu&&(0,i.jsx)(eG,{compact:!0,generatingProfileXRay:b,evaluationRefreshPending:"pending"===_,onRegenerate:er})]}),eo&&Z.shortlistingCriteriaFitment.reason&&(0,i.jsx)(r.x,{size:"sm",children:Z.shortlistingCriteriaFitment.reason})]}),"pending"===_&&(0,i.jsx)(r.x,{size:"sm",color:"grey-7",style:{opacity:A?1:.28,transition:"opacity 0.18s ease"},children:"Evaluatingâ¦"}),"timeout"===_&&(0,i.jsx)(r.x,{size:"sm",color:"grey-7",children:"Evaluation is taking longer than expected. Try refresh again in a moment."}),"done"===_&&null!=S&&(0,i.jsx)(r.x,{size:"sm",color:"grey-7",children:function(e){let n=Math.floor((Date.now()-e)/6e4);return n<=0?"Evaluated just now":1===n?"Evaluated 1 min ago":"Evaluated ".concat(n," mins ago")}(S)},O)]}),el.map(e=>{if(e.processing){if(!B||!W)return null;let n="Evaluating...";return e.createdHrsAgo>1&&ec>1&&(n="Error"),(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",gap:U?10:5,children:[(0,i.jsx)(y.x,{flexShrink:0,alignSelf:"flex-start",children:(0,i.jsx)(y.x,{width:U?20:18,height:U?20:18,border:"grey-6",borderRadius:"full"})}),(0,i.jsxs)(y.x,{display:"inline-flex",gap:5,children:[(0,i.jsx)(y.x,{flexGrow:1,children:(0,i.jsx)(r.x,{size:"sm",clamp:1,color:"grey-7",children:e.shortlisting_criteria})}),(0,i.jsx)(r.x,{color:"grey-7",size:"sm",children:"|"}),(0,i.jsx)(y.x,{flexShrink:0,children:(0,i.jsx)(r.x,{size:"sm",color:"grey-7",children:n})})]})]},e.question_id)}return(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",gap:U?10:5,children:[(0,i.jsx)(y.x,{flexShrink:0,alignSelf:"flex-start",margin:"0px 0 0",children:(0,i.jsx)(eW.k,{size:U?20:18,evalStatus:e.evalStatus})}),(0,i.jsx)(y.x,{flexGrow:1,children:U?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.x,{fontWeight:"bold",children:e.shortlisting_criteria}),(0,i.jsx)(r.x,{children:e.reason})]}):(0,i.jsx)(M.z,{variant:"tooltip",flyoutElement:(0,i.jsx)("div",{style:{width:"250px"},children:e.reason}),children:(0,i.jsx)(r.x,{size:"sm",clamp:1,children:e.shortlisting_criteria})})}),m&&U&&(0,i.jsxs)(y.x,{display:"flex",gap:10,flexShrink:0,children:[(0,i.jsx)(eB,{applicationId:null==Z?void 0:Z._id,questionId:null==e?void 0:e.question_id,jobId:q,evaluation:null==e?void 0:e.originalEval}),(0,i.jsx)(eU.A,{applicationId:null==Z?void 0:Z._id,questionId:null==e?void 0:e.question_id,adminFeedback:null==e?void 0:e.adminFeedback}),(0,i.jsx)(y.x,{display:"flex",justifyContent:"flex-end",children:(0,i.jsx)(o.x,{onClick:()=>{var n,t;null==F||null===(n=F.updateHighlightInput)||void 0===n||n.call(F,null==e?void 0:null===(t=e.originalEval)||void 0===t?void 0:t.reason)},children:"Highlight"})}),(0,i.jsx)(M.z,{flyoutElement:"Visible to the employer on the Lightning UI",variant:"tooltip",children:(0,i.jsx)(eq.Z,{size:"sm",isChecked:!(null==w?void 0:w.includes(null==e?void 0:e.question_id)),onChange:()=>{ea(null==e?void 0:e.question_id)}})})]})]},e.question_id)}),!W&&el.some(e=>e.processing)&&B&&(0,i.jsx)(y.x,{margin:"10px 0 0",children:(0,i.jsxs)(r.x,{size:"sm",color:"grey-7",children:["Get applications reviewed as per your own criteria."," ",(0,i.jsx)(o.x,{href:"/pricing",target:"_blank",children:"Upgrade to use Application Reviewer"})]})})]}),el.find(e=>"ai_screener"===e.type)&&(null==$?void 0:null===(s=$.thread)||void 0===s?void 0:s.evaluated)&&(null==$?void 0:null===(v=$.thread)||void 0===v?void 0:v.completionType)!=="thread_expired"&&U&&(0,i.jsx)(y.x,{flexShrink:0,textAlign:"center",children:(0,i.jsxs)(o.x,{href:K,target:"_blank",children:[(null==$?void 0:null===(p=$.thread)||void 0===p?void 0:p.snapshotUrl)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(y.x,{width:150,height:85,position:"relative",borderRadius:"base",backgroundColor:"grey-9",children:(0,i.jsx)(eN.d,{src:null==$?void 0:null===(g=$.thread)||void 0===g?void 0:g.snapshotUrl,layout:"fill",objectFit:"contain",priority:!0})}),(0,i.jsx)(es.L,{size:10})]}),(0,i.jsx)(R.z,{label:"View AI screener",variant:"link",iconName:"
1chat-bubble-oval-left"})]})})]})})})},eX=()=>(0,Y.useMutation)(e=>(0,X.at)(e));var eK=t(25049),e0=t.n(eK),e1=t(47727);let e5=e0()(()=>Promise.all([t.e(4541),t.e(6677),t.e(369)]).then(t.bind(t,41132)).then(e=>e.RichTextEditor),{loadableGenerated:{webpack:()=>[41132]},ssr:!1}),e2=()=>{let{data:e}=(0,ew.T)(),{applicationData:n,jobId:t,updateFns:l,fns:o}=(0,e$.$I)(),a=null==n?void 0:n.applicationHighlight,d=!1,[s,c]=u.useState(()=>{try{return a?(0,et.ID)(a)?a:decodeURIComponent(a||""):""}catch(e){return a||""}});(0,u.useEffect)(()=>{null==l||l({...o,updateHighlightInput:e=>{c(e)}});try{if(e1.m.get("lastApplicationHighlightCache")){let e=JSON.parse(e1.m.get("lastApplicationHighlightCache"));e.applicationId===(null==n?void 0:n._id)&&c(e.content)}}catch(e){console.error("Error reading lastApplicationHighlightCache",e)}},[]),(0,u.useEffect)(()=>{if(a)try{c((0,et.ID)(a)?a:decodeURIComponent(a||""))}catch(e){c(a)}},[a]);let[v,p]=u.useState(!1),g=(null==e?void 0:e.admin_logged_in)||(null==e?void 0:e.admin_faking_user),h=eX(),f=()=>{var e,n;return(null===(e=null===(n=null==s?void 0:s.replace(/<[^>]+>/g,""))||void 0===n?void 0:n.trim())||void 0===e?void 0:e.length)>0},{updateApplicationCard:x}=(0,eJ.y)({selectedJobId:t});f()&&a&&(d=(0,et.ID)(a)?a===s:decodeURIComponent(a)===s);let m=()=>{let e={applicationId:null==n?void 0:n._id,text:f()?s:""};h.mutate(e,{onSuccess(e){eF.$.success({content:"Highlights generated successfully"}),e.response&&c(null==e?void 0:e.response.split("\n").map(e=>"<p>".concat(e||"<br />","</p>")).join(""))},onError(e){eF.$.error({errorResponse:e})}})},j=async()=>{try{p(!0),await x({applicationCardId:null==n?void 0:n._id,updateObject:{applicationHighlight:f()?encodeURIComponent(s):""},throwOnError:!0,showErrorToast:!1}),eF.$.success({content:"Highlights updated successfully"})}catch(e){eF.$.error({errorResponse:e})}finally{p(!1)}};return((0,u.useEffect)(()=>{s&&e1.m.set("lastApplicationHighlightCache",JSON.stringify({applicationId:null==n?void 0:n._id,content:s}))},[s]),g)?(0,i.jsxs)(y.x,{children:[(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",gap:15,children:[(0,i.jsx)(r.x,{fontWeight:"bold",children:"Top candidate highlights"}),(0,i.jsx)(R.z,{variant:"link",label:"Generate",disabledText:h.isLoading?"Generating...":"",onClick:()=>{m()}})]}),(0,i.jsxs)(y.x,{margin:"10px 0 0 0",children:[(0,i.jsx)(e5,{id:"".concat(null==n?void 0:n._id,"_").concat(t,"_highlight_editor"),value:s,onChange:e=>{c(e)}}),(0,i.jsxs)(y.x,{margin:"10px 0 0 0",display:"flex",justifyContent:"space-between",children:[(0,i.jsx)(y.x,{children:(!!a||!!s)&&(0,i.jsx)(r.x,{color:d?"success-base":"danger-base",children:d?"Highlight is live on the application card":"Highlight unsaved. Don't forget to update the highlight."})}),(0,i.jsx)(R.z,{variant:"secondary",size:"sm",label:"Update highlight",disabledText:h.isLoading?"Update highlight":v?"Updating...":"",onClick:()=>{j()}})]})]})]}):null};var e8=t(79580),e3=t(64626);let e7=()=>{var e,n,t,l,o;let a=(0,c.useRouter)(),d=null===(e=a.query)||void 0===e?void 0:null===(n=e.job)||void 0===n?void 0:null===(t=n.toString)||void 0===t?void 0:t.call(n),{data:{allJobsIdsObject:s}}=(0,V.yq)(),{applicationData:u}=(0,e$.$I)(),{customQuestions:v,interestedInRole:p,internalComment:g}=(null==u?void 0:u.dataValidationStatus)||{},h=Object.keys(v||{}),{data:f}=(0,e3.o)({searchQuery:{questions:null==h?void 0:h.join("-")}},{enabled:(null==h?void 0:h.length)>0}),x="N/A";!0===p?x="Yes":!1===p&&(x="No");let m=null!==(o=null==f?void 0:f.allScreeningQuestions)&&void 0!==o?o:[],j=e=>{var n,t,i;if(!e||(null==v?void 0:v[e])===void 0)return"N/A";let l=null==f?void 0:null===(n=f.allScreeningQuestionsObj)||void 0===n?void 0:n[e];return(null==l?void 0:l.responseType)==="text"?null==v?void 0:v[e]:(null==l?void 0:l.responseType)==="mcq"&&(null===(t=null==l?void 0:null===(i=l.options)||void 0===i?void 0:i.find(n=>(null==n?void 0:n._id)===(null==v?void 0:v[e])))||void 0===t?void 0:t.label)||"N/A"};return(null==s?void 0:null===(l=s[d])||void 0===l?void 0:l.hiringMode)!=="lightning"?null:(0,i.jsxs)(y.x,{backgroundColor:"grey-1",borderRadius:"base",margin:"20px 0",padding:10,maxHeight:"400px",overflow:"auto",children:[(0,i.jsxs)(e8.NI,{
1children:[(0,i.jsx)(e8.lX,{children:"Interested in role"}),(0,i.jsx)(r.x,{children:x})]}),h.length>0&&(null==m?void 0:m.length)>0&&(null==m?void 0:m.map(e=>(0,i.jsxs)(e8.NI,{children:[(0,i.jsx)(e8.lX,{children:null==e?void 0:e.title}),(0,i.jsx)(r.x,{children:j(null==e?void 0:e._id)||"N/A"})]},null==e?void 0:e._id))),(0,i.jsxs)(e8.NI,{children:[(0,i.jsx)(e8.lX,{children:"Additional comments or remarks"}),(0,i.jsx)(r.x,{children:g||"N/A"})]})]})};function e6(){var e,n;let t=(e=["\n display: flex;\n flex-direction: column;\n overflow-wrap: anywhere;\n gap: 10px;\n"],n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}})));return e6=function(){return t},t}let e4=g.ZP.div.withConfig({componentId:"sc-4f0424f4-0"})(e6());var e9=t(41372),ne=t(5014),nn=t(5105);function nt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function ni(){let e=nt(["\n font-size: 11px;\n padding: ",";\n display: inline-flex;\n /* position: relative; */\n align-self: stretch;\n max-height: 23px;\n\n "," {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n }\n"]);return ni=function(){return e},e}function nl(){let e=nt(["\n /* position: absolute;\n right: 4px;\n top: 4px; */\n display: inline-flex;\n ","\n ","\n width: ","px;\n height: ","px;\n border-radius: 50%;\n overflow: hidden;\n border: 1px solid ",";\n background: ",";\n"]);return nl=function(){return e},e}function no(){let e=nt(["\n height: 11px;\n display: flex;\n"]);return no=function(){return e},e}function nr(){let e=nt(["\n ","\n ","\n flex-wrap: wrap;\n gap: 5px;\n"]);return nr=function(){return e},e}function na(){let e=nt(["\n font-size: 11px;
1\n margin-top: 1px;\n ","\n display: inline-flex;\n ","\n"]);return na=function(){return e},e}let nd=(0,g.ZP)(ne.D).withConfig({componentId:"sc-8db70c76-0"})(ni(),e=>e.showTick?"6px 25px 6px 12px":"6px 12px",nn.yN),ns=g.ZP.div.withConfig({componentId:"sc-8db70c76-1"})(nl(),F.Un,F.fg,e=>e.size?e.size:15,e=>e.size?e.size:15,e=>"gold"===e.type?"#ebc300":"#79b22b",e=>"gold"===e.type?"#ebc300":"#fff");g.ZP.span.withConfig({componentId:"sc-8db70c76-2"})(no());let nc=g.ZP.div.withConfig({componentId:"sc-8db70c76-3"})(nr(),F.kC,F.Un),nu=g.ZP.span.withConfig({componentId:"sc-8db70c76-4"})(na(),F.Ur,F.Un),nv=e0()(()=>t.e(1826).then(t.bind(t,11826)).then(e=>e.ApplicationCardSkillTestFlyout),{loadableGenerated:{webpack:()=>[11826]},ssr:!1,loading:()=>(0,i.jsx)(y.x,{width:332,padding:5,display:"flex",centerContent:!0,children:(0,i.jsx)(C.a,{})})}),np=()=>{let{applicationCardData:e,variant:n}=(0,I.a0)(),{data:t}=(0,ek._)(),l=null==t?void 0:t.skills_icon_map,{skills:r=[],skillsFoundInResume:a=[]}=e||{},d="base"===n,s=(0,u.useMemo)(()=>{let e=a.concat(r.filter(e=>!a.find(n=>n._id===e._id)));return e},[r,a]),c=d?s.slice(0,3):s;return(0,i.jsxs)(nc,{children:[null==c?void 0:c.map(e=>{let n=(null==e?void 0:e.test_result)&&(null==e?void 0:e.test_result)!=="failed",t=n&&(null==e?void 0:e.test_result)==="topped";return n?(0,i.jsx)(e9.z,{variant:"popover",triggeredOn:"hover",align:"center",flyoutElement:(0,i.jsx)(nv,{skill:e,testResult:null==e?void 0:e.test_result,qualityEvidences:null==e?void 0:e.quality_evidences}),children:(0,i.jsx)("span",{style:{display:"flex"},children:(0,i.jsx)(nd,{skillIcon:null==l?void 0:l[null==e?void 0:e._id],showTick:!0,label:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(nu,{children:e._rendered_skill}),(0,i.jsx)(ns,{type:t?"gold":"default",children:(0,i.jsx)(_.J,{src:t?"/success_icon_w.png":"/success_icon.png",size:11})})]})},e._rendered_skill)})},e._rendered_skill):(0,i.jsx)("span",{style:{display:"flex"},children:(0,i.jsx)(nd,{skillIcon:null==l?void 0:l[null==e?void 0:e._id],label:(0,i.jsx)(nu,{children:e._rendered_skill})},e._rendered_skill)},e._rendered_skill)}),d&&(null==r?void 0:r.length)>3&&(0,i.jsxs)(o.x,{renderAs:"span",children:[r.length-3," More"]})]})},ng=()=>{var e,n,t,l,o,r;let a=(0,c.useRouter)(),{variant:d,applicationCardData:s,stageId:u}=(0,I.a0)(),v=null===(e=a.query)||void 0===e?void 0:null===(n=e.job)||void 0===n?void 0:null===(t=n.toString)||void 0===t?void 0:t.call(n),{data:p}=(0,U.c)({data:{jobId:v}}),g=(null==p?void 0:null===(l=p.modifiedStagesDataIdObj)||void 0===l?void 0:l[u])||{},h="search"===d,f="lg"===d,x="base"===d,m=(null==s?void 0:null===(o=s.skillsFoundInResume)||void 0===o?void 0:o.length)>0||(null==s?void 0:null===(r=s.skills)||void 0===r?void 0:r.length)>0;return(0,i.jsxs)(e4,{children:[f&&(0,i.jsx)(e2,{}),f&&(0,i.jsx)(e7,{}),(f||x)&&(0,i.jsx)(eY,{}),f&&m&&(0,i.jsx)(y.x,{display:"flex",flexDirection:"column",padding:x?"10px 10px 0":"5px 0px",children:(0,i.jsx)(np,{})}),(0,i.jsxs)(y.x,{display:"flex",justifyContent:"space-between",flexDirection:"row",alignItems:"center",padding:"5px 0 0",children:[(0,i.jsx)(eD,{}),!h&&!f&&(0,i.jsx)(T,{})]}),(null==g?void 0:g.type)==="accepted"&&!1,(null==g?void 0:g.type)==="candidates"&&!f&&!h&&(0,i.jsx)(W.O,{stageId:u,applicationCardData:s,variant:d})]})};function nh(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function nf(){let e=nh(["\n background-color: ",";\n color: ",";\n "]);return nf=function(){return e},e}function nx(){let e=nh(["\n align-self: flex-start;\n padding: 2px 6px;\n border-radius: 3px;\n cursor: default;\n flex-shrink: 0;\n\n ","\n"]);return nx=function(){return e},e}let nm={strong:{background:(0,Z.gJ)("--success-light"),color:(0,Z.gJ)("--success-base")},maybe:{background:(0,Z.gJ)("--warning-light"),color:(0,Z.gJ)("--warning-dark")},not:{background:(0,Z.gJ)("--grey-2"),color:(0,Z.gJ)("--grey-7")}},nj=g.ZP.div.withConfig({componentId:"sc-dd10fb86-0"})(nx(),e=>{let{$variant:n}=e,t=nm[n];return(0,g.iv)(nf(),t.background,t.color)}),nb={strong_fit:"Strong",maybe_a_fit:"Fair",not_a_fit:"Not"},ny={strong_fit:"strong",maybe_a_fit:"maybe",not_a_fit:"not"},nw=e=>{var n,t,l,o,a;let{application:d}=e,c=null==d?void 0:null===(n=d.shortlistingCriteriaFitment)||void 0===n?void 0:n.fitment;if(!c)return null;let u=null!==(o=nb[c])&&void 0!==o?o:c,v=null!==(a=ny[c])&&void 0!==a?a:"maybe",p=null==d?void 0:null===(t=d.shortlistingCriteriaFitment)||void 0===t?void 0:null===(l=t.reason)||void 0===l?void 0:l.trim();return(0,i.jsx)(M.z,{maxWidth:p?300:220,variant:"tooltip",flyoutElement:p?(0,i.jsx)(r.x,{color:"grey-3",size:"sm",children:p}):(0,i.jsx)(r.x,{color:"grey-3",size:"sm",children:"Application reviewer verdict. Use Application reviewer filters on the left to filter by fitment."}),onVisibilityChange:e=>{e&&(0,s.j)("Hovered to see application reviewer fitment on sent stage card",{jobid:null==d?void 0:d.jobid,applicationid:null==d?void 0:d.id,fitment:c})},children:(0,i.jsx)(nj,{$variant:v,children:(0,i.jsx)(r.x,{fontWeight:"bold",size:"xs",renderAs:"span",children:u})})})};var nk=t(55259),n_=t.n(nk),nC=t(36233),nS=t.n(nC),nI=t(51745),nz=t.n(nI),nA=t(34794);$().extend(nz()),$().extend(nS()),$().extend(n_());let nD=()=>{var e,n;let{applicationCardData:t,stageId:l}=(0,I.a0)(),o=(0,nA.Q)(l);return(0,i.jsx)(i.Fragment,{children:(null==t?void 0:t.confirmedMeetingTime)&&!(null==t?void 0:t.confirmedMeetingTimeHasPassed)&&(null==o?void 0:null===(e=o.automations)||void 0===e?void 0:null===(n=e[0])||void 0===n?void 0:n.type)!=="send_meeting_request"&&(0,i.jsxs)(r.x,{color:"teal-base",size:"sm",fontWeight:"bold",children:["Meeting on"," ",$()(null==t?void 0:t.confirmedMeetingTime).format("D MMM, h
1h:mm A")]})})};function nO(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function nP(){let e=nO(["\n filter: blur(4px);\n "]);return nP=function(){return e},e}function nE(){let e=nO(["\n ","\n"]);return nE=function(){return e},e}let nT=(0,g.ZP)(p.x).withConfig({componentId:"sc-8e1da638-0"})(nE(),e=>e.unlocked?"":(0,g.iv)(nP())),nM=()=>{var e;let{applicationCardData:n}=(0,I.a0)(),t=null==n?void 0:n.unlocked,l=null==n?void 0:null===(e=n.teamApplicantData)||void 0===e?void 0:e.name,o=(null==n?void 0:n.stagetype)==="sent";return(0,i.jsx)(y.x,{display:"flex",flexDirection:"column",gap:5,children:(0,i.jsxs)(y.x,{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:2,children:[(0,i.jsxs)(y.x,{display:"flex",flexDirection:"row",alignItems:"center",gap:5,children:[(0,i.jsx)(nT,{bold:!0,unlocked:t,children:t?l:"Cutshort user"}),o&&(0,i.jsx)(nw,{application:n})]}),(null==n?void 0:n.confirmedMeetingTime)&&(0,i.jsx)(nD,{})]})})};var nR=t(93499);let nF=e=>(0,Y.useQuery)(["investigate-match-criteria",null==e?void 0:e.matchesfor,null==e?void 0:e.investigateSearchCriteriaForTcid,null==e?void 0:e.onlyMatchFromIds],()=>(0,nR.eQ)(e),{enabled:!!(null==e?void 0:e.matchesfor)&&!!(null==e?void 0:e.investigateSearchCriteriaForTcid)&&!!(null==e?void 0:e.onlyMatchFromIds)});var nZ=t(85881),nN=t(48530);function nq(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function nJ(){let e=nq([""]);return nJ=function(){return e},e}function nL(){let e=nq(["\n width: 260px;\n display: flex;\n flex-direction: column;\n"]);return nL=function(){return e},e}function nW(){let e=nq(["\n ","\n width: 100%;\n"]);return nW=function(){return e},e}function nU(){let e=nq(["\n align-self: flex-start;\n max-height: 150px;\n over-flow: auto;\n padding-left: 20px;\n"]);return nU=function(){return e},e}function nV(){let e=nq(["\n ","\n gap: 4px;\n"]);return nV=function(){return e},e}g.ZP.div.withConfig({componentId:"sc-e54a5f8f-0"})(nJ());let nB=g.ZP.div.withConfig({componentId:"sc-e54a5f8f-1"})(nL()),n$=g.ZP.div.withConfig({componentId:"sc-e54a5f8f-2"})(nW(),F.si),nQ=g.ZP.ul.withConfig({componentId:"sc-e54a5f8f-3"})(nU()),nH=g.ZP.div.withConfig({componentId:"sc-e54a5f8f-4"})(nV(),F.kC),nG=e=>{var n,t,l,a,d,s,u,v;let{application:p}=e,g=(0,c.useRouter)(),h=null===(n=g.query.job)||void 0===n?void 0:null===(t=n.toString)||void 0===t?void 0:t.call(n),{data:f}=(0,ew.T)(),{data:x}=(0,nN.N)(),{data:m}=(0,eP.G)(null,null,{sendDeletedJobsToo:!0}),j=(null===(l=null===(a=((null==m?void 0:null===(d=m.pages)||void 0===d?void 0:d.map(e=>e.questions).flat())||[]).filter(e=>"matchcriteria"===e.type))||void 0===a?void 0:a.map(e=>e.subQuestions))||void 0===l?void 0:l.flat())||[],{data:{allJobsIdsObject:b}}=(0,V.yq)(),w=null==b?void 0:b[h],{data:k}=(0,ek._)(),_=(null==k?void 0:k.possible_not_a_match_reasons)||{},{data:S,isLoading:I,isError:z}=nF({matchesfor:null==p?void 0:p.jobid,investigateSearchCriteriaForTcid:null==p?void 0:p.tcid,onlyMatchScore:!0,onlyMatchFromIds:null==p?void 0:p.tcid}),A=(null==S?void 0:null===(s=S.results)||void 0===s?void 0:s.not_matching)||[],D=JSON.parse(JSON.stringify((null==p?void 0:p.criteriaMatchEvaluations)||{}));Object.keys(D).forEach(e=>{var n,t;(null==D?void 0:null===(n=D[e])||void 0===n?void 0:n.verdict)!=="MATCH"&&(D[e].reason=null===(t=null==j?void 0:j.find(n=>n.questionId===e))||void 0===t?void 0:t.question,A.push(e))});let O=()=>{var e,n,t,i,l,o,r;let a=null==w?void 0:w.expRange;a.minVanity||(a.minVanity=null==a?void 0:a.min),a.maxVanity||(a.maxVanity=null==a?void 0:a.max);let d=!1;((null==a?void 0:a.min)!==(null==a?void 0:a.minVanity)||(null==a?void 0:a.max)!==(null==a?void 0:a.maxVanity))&&(d=!0);let s={skills:null==w?void 0:w.skills,mandatorySkills:null==w?void 0:w.mandatorySkills,expRange:a,mandatorySkillsMatchType:null==w?void 0:w.mandatorySkillsMatchType,mandatorySkillsBooleanString:null==w?void 0:w.mandatorySkillsBooleanString,different_matchmaking_exp:d,tags:null==w?void 0:null===(e=w.matchPreferences)||void 0===e?void 0:e.tags,remoteType:null==w?void 0:w.remoteType,locations:null==w?void 0:null===(n=w.locations)||void 0===n?void 0:null===(t=n.slice)||void 0===t?void 0:t.call(n),matchLocalCandidates:null==w?void 0:w.matchLocalCandidates,timezoneConstraint:{...(null==w?void 0:w.timezoneConstraint)||{}},timezone:{...(null==w?void 0:w.timezone)||{}}
1,tagCategory:null==x?void 0:null===(i=x.tag_to_tagcat)||void 0===i?void 0:i[null==w?void 0:null===(l=w.matchPreferences)||void 0===l?void 0:null===(o=l.tags)||void 0===o?void 0:o[0]]};return(null==s?void 0:null===(r=s.timezoneConstraint)||void 0===r?void 0:r.min)!==void 0&&(s.timezoneConstraint.min=8-s.timezoneConstraint.min),s},P=(null==f?void 0:null===(u=f.permissions)||void 0===u?void 0:u.editJobs)||w.originallyCreatedBy===f._id||(null==f?void 0:null===(v=f.permissions)||void 0===v?void 0:v.editOwnedJobs)&&w.createdBy._id===f._id;return(0,i.jsxs)(nB,{className:"application-card-inner-cta",children:[I&&(0,i.jsx)(n$,{children:(0,i.jsx)(C.a,{})}),!I&&z&&(0,i.jsx)(y.x,{height:60,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",children:(0,i.jsx)(r.x,{color:"grey-7",children:"An unexpected error occured"})}),!I&&(null==A?void 0:A.length)>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.x,{fontWeight:"bold",children:[null==A?void 0:A.length," reason",(null==A?void 0:A.length)===1?"":"s"," why this isn't a match"]}),(0,i.jsx)(es.L,{size:10}),(0,i.jsx)(nQ,{children:null==A?void 0:A.map(e=>{let{description:n,label:t,editable:l}=_[e]||{};return(0,i.jsx)(nH,{children:(0,i.jsxs)("li",{children:[n||(null==D?void 0:D[e].reason)||e," ",P&&!(null==D?void 0:D[e])&&(0,i.jsx)(o.x,{className:"application-card-inner-cta",renderAs:"span",...!l&&{href:"/profile/job-setup/".concat(h)},...l&&(["locations","skills","experience"].includes(e)?{onClick:()=>{let n=O();(0,nZ.h7)("UpdateJobDetails",{data:{jobId:h,info_to_update:[e],formData:n}})}}:{href:"/profile/job-setup/".concat(h)}),children:l?"Edit ".concat(t," in job"):"Edit job"})]})},e)})})]})]})};function nY(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function nX(){let e=nY([""]);return nX=function(){return e},e}function nK(){let e=nY(["\n display: flex;\n flex-direction: column;\n"]);return nK=function(){return e},e}function n0(){let e=nY(["\n background-color: ",";\n padding: 2px 6px;\n border-radius: 3px;\n"]);return n0=function(){return e},e}function n1(){let e=nY(["\n ","\n align-items: center;\n cursor: pointer;\n gap: 5px;\n"]);return n1=function(){return e},e}function n5(){let e=nY(["\n align-self: flex-start;\n background-color: ",";\n padding: 2px 6px;\n border-radius: 3px;\n cursor: default;\n"]);return n5=function(){return e},e}function n2(){let e=nY(["\n max-width: 200px;\n"]);return n2=function(){return e},e}g.ZP.div.withConfig({componentId:"sc-e3849913-0"})(nX());let n8=g.ZP.div.withConfig({componentId:"sc-e3849913-1"})(nK()),n3=g.ZP.div.withConfig({componentId:"sc-e3849913-2"})(n0(),(0,Z.gJ)("--grey-2")),n7=g.ZP.div.withConfig({componentId:"sc-e3849913-3"})(n1(),F.kC),n6=g.ZP.div.withConfig({componentId:"sc-e3849913-4"})(n5(),(0,Z.gJ)("--success-light")),n4=g.ZP.div.withConfig({componentId:"sc-e3849913-5"})(n2()),n9=e=>{let{application:n}=e,{data:t}=(0,ew.T)(),l=null==t?void 0:t.permissions;return(null==l?void 0:l.viewMatchScore)?(0,i.jsx)(n8,{children:(null==n?void 0:n.isAMatch)?(0,i.jsx)(M.z,{maxWidth:200,variant:"tooltip",flyoutElement:(0,i.jsx)(n4,{children:(0,i.jsx)(r.x,{color:"grey-3",children:"Estimated match score of candidate based on your job details"})}),onVisibilityChange:()=>{(0,s.j)("Hovered to see match score details on ats page",{jobid:null==n?void 0:n.jobid,applicationid:null==n?void 0:n.id,tcid:null==n?void 0:n.tcid})},children:(0,i.jsx)(n6,{children:(0,i.jsxs)(r.x,{fontWeight:"bold",size:"xs",color:"success-base",children:[Math.round(n.matchScore),"%"," ",(0,i.jsx)(r.x,{renderAs:"span",children:"match"})]})})}):(0,i.jsx)(M.z,{className:"application-card-inner-cta",variant:"popover",align:"center",flyoutElement:(0,i.jsx)(nG,{application:n}),onVisibilityChange:()=>{(0,s.j)("Hovered to see match score details on ats page",{jobid:null==n?void 0:n.jobid,applicationid:null==n?void 0:n.id,tcid:null==n?void 0:n.tcid,not_a_match:!0})},children:(0,i.jsxs)(n7,{className:"application-card-inner-cta",children:[(0,i.jsx)(n3,{children:(0,i.jsx)(r.x,{size:"sm",color:"grey-7",children:"Not a match"})}),(0,i.jsx)(r.x,{size:"sm",color:"grey-7",textDecoration:"underline",children:"Why?"})]})})}):null};var te=t(55184);function tn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function tt(){let e=tn(["\n filter: blur(4px);\n "]);return tt=function(){return e},e}function ti(){let e=tn(["\n ","\n"]);return ti=function(){return e},e}let tl=(0,g.ZP)(p.x).withConfig({componentId:"sc-8e1da638-0"})(ti(),e=>e.unlocked?"":(0,g.iv)(tt())),to=()=>{var e,n,t,l,a,d;let{applicationCardData:u,stageId:v}=(0,I.a0)(),p=(0,c.useRouter)(),g=null===(e=p.query)||void 0===e?void 0:null===(n=e.job)||void 0===n?void 0:null===(t=n.toString)||void 0===t?void 0:t.call(n),h=null==u?void 0:u.unlocked,f=null==u?void 0:null===(l=u.teamApplicantData)||void 0===l?void 0:l.name,{data:x}=(0,U.c)({data:{jobId:g}}),m=(null==x?void 0:null===(a=x.modifiedStagesDataIdObj)||void 0===a?void 0:a[v])||{},j=null!==(d=null==m?void 0:m.type)&&void 0!==d?d:null==u?void 0:u.stagetype;return(0,i.jsxs)(y.x,{display:"flex",flexDirection:"column",gap:5,children:[(0,i.jsxs)(y.x,{display:"flex",flexDirection:"row",alignItems:"center",gap:5,children:[(0,i.jsx)(tl,{bold:!0,unlocked:h,children:h?f:"Cutshort user"}),!(null==u?void 0:u.isAMatch)&&"sent"!==j&&(0,i.jsx)(n9,{application:u}),"sent"===j&&(0,i.jsx)(nw,{application:u})]}),(null==u?void 0:u.confirmedMeetingTime)&&(0,i.jsx)(nD,{}),(0,i.jsxs)(y.x,{display:"flex",flexDirection:"row",gap:5,alignItems:"center",children:[(null==u?void 0:u.resume_name)&&(0,i.jsx)(r.x,{size:"sm",children:(0,i.jsx)(o.x,{children:"Resume"})}),(0,i.jsx)(te.e,{context:"applicationCard",userId:null==u?void 0:u.csuid,candidateSocialData:null==u?void 0:u.teamApplicantData,trackHandler:e=>
1{(0,s.j)("Clicked to view ".concat(e," profile on stage card"),{stage_type:j})}})]})]})};function tr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function ta(){let e=tr(["\n filter: blur(4px);\n "]);return ta=function(){return e},e}function td(){let e=tr(["\n ","\n"]);return td=function(){return e},e}let ts=(0,g.ZP)(r.x).withConfig({componentId:"sc-55f80008-0"})(td(),e=>e.unlocked?"":(0,g.iv)(ta())),tc=()=>{var e,n;let{applicationCardData:t}=(0,I.a0)(),l=null==t?void 0:t.unlocked,o=null==t?void 0:null===(e=t.teamApplicantData)||void 0===e?void 0:e.name,a=null==t?void 0:null===(n=t.teamApplicantData)||void 0===n?void 0:n.experience;return(0,i.jsxs)(y.x,{display:"flex",flexDirection:"column",gap:2,children:[(0,i.jsx)(y.x,{display:"flex",flexDirection:"row",alignItems:"center",gap:5,children:(0,i.jsx)(ts,{fontWeight:"bold",unlocked:l,children:l?o:"Cutshort user"})}),a&&(0,i.jsxs)(r.x,{size:"sm",color:"grey-7",children:[a," yr",1===a?"":"s"]})]})};var tu=t(2771),tv=t(13686),tp=t(84756);function tg(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function th(){let e=tg(["\n ","\n border: 1px solid ",";\n border-radius: 50%;\n height: 13px;\n width: 13px;\n svg {\n color: ",";\n }\n"]);return th=function(){return e},e}function tf(){let e=tg(["\n ","\n border: 1px solid ",";\n border-radius: 50%;\n height: 13px;\n width: 13px;\n"]);return tf=function(){return e},e}function tx(){let e=tg(["\n width: 200px;\n"]);return tx=function(){return e},e}let tm=g.ZP.div.withConfig({componentId:"sc-3dfcc2a2-0"})(th(),F.si,(0,Z.gJ)("--success-base"),(0,Z.gJ)("--success-base")),tj=g.ZP.div.withConfig({componentId:"sc-3dfcc2a2-1"})(tf(),F.si,(0,Z.gJ)("--grey-7")),tb=g.ZP.div.withConfig({componentId:"sc-3dfcc2a2-2"})(tx()),ty=e=>{var n,t;let{type:l}=e,{applicationCardData:o}=(0,I.a0)(),a=null==o?void 0:null===(n=o.teamApplicantData)||void 0===n?void 0:n.phone_not_verified,d=null==o?void 0:null===(t=o.teamApplicantData)||void 0===t?void 0:t.email_not_verified,s=null==o?void 0:o.customApplicantPhone;return"phone"===l&&a?(0,i.jsx)(M.z,{variant:"tooltip",maxWidth:200,flyoutElement:(0,i.jsx)(tb,{children:(0,i.jsx)(r.x,{color:"grey-1",textAlign:"center",children:"Phone number was found in the resume but not verified by the candidate yet"})}),children:(0,i.jsx)(tj,{children:(0,i.jsx)(r.x,{size:"xs",color:"grey-7",children:"i"})})}):"email"===l&&d?(0,i.jsx)(M.z,{variant:"tooltip",maxWidth:200,flyoutElement:(0,i.jsx)(tb,{children:(0,i.jsx)(r.x,{color:"grey-1",textAlign:"center",children:"Email was found in the resume but not verified by the candidate yet"})}),children:(0,i.jsx)(tj,{children:(0,i.jsx)(r.x,{size:"xs",color:"grey-7",children:"i"})})}):(0,i.jsx)(M.z,{variant:"tooltip",maxWidth:200,flyoutElement:(0,i.jsx)(tb,{children:(0,i.jsxs)(r.x,{color:"grey-1",textAlign:"center",children:["email"===l&&"Email","phone"===l&&"Phone number"," ","email"!==l&&("phone"!==l||s)?"has been verified by your team":"has been verified by the candidate"]})}),children:(0,i.jsx)(tm,{children:(0,i.jsx)(_.J,{type:"tick",size:11})})})};var tw=t(61906),tk=t(31041);let t_=()=>(0,Y.useMutation)(e=>(0,X.Be)(e));var tC=t(96977),tS=t(93951);function tI(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function tz(){let e=tI(["\n display: flex;\n flex-shrink: 0;\n img {\n opacity: 0.7;\n }\n"]);return tz=function(){return e},e}function tA(){let e=tI(["\n ","\n cursor: pointer;\n"]);return tA=function(){return e},e}function tD(){let e=tI(["\n row-gap: 3px;\n"]);return tD=function(){return e},e}function tO(){let e=tI(["\n ","\n padding: 2px 5px;\n border-radius: 5px;\n color: ",";\n vertical-align: baseline;\n overflow-wrap: break-word;\n word-break: break-word;\n font-weight: 400;\n &:hover {\n background-color: ",";\n text-decoration: none;\n }\n"]);return tO=function(){return e},e}function tP(){let e=tI(["\n & > div {\n margin-left: 5px;\n display: inline-block;\n }\n"]);return tP=function(){return e},e}function tE(){let e=tI(["\n filter: blur(4px);\n "]);return tE=function(){return e},e}function tT(){let e=tI(["\n ","\n"]);return tT=function(){return e},e}let tM=g.ZP.div.withConfig({componentId:"sc-73d065b4-0"})(tz()),tR=g.ZP.div.withConfig({componentId:"sc-73d065b4-1"})(tA(),F.si),tF=(0,g.ZP)(y.x).withConfig({componentId:"sc-73d065b4-2"})(tD()),tZ=(0,g.ZP)(o.x).withConfig({componentId:"sc-73d065b4-3"})(tO(),F.si,(0,Z.gJ)("--grey-9"),(0,Z.gJ)("--grey-2")),tN=(0,g.ZP)(r.x).withConfig({componentId:"sc-73d065b4-4"})(tP()),tq=(0,g.ZP)(r.x).withConfig({componentId:"sc-73d065b4-5"})(tT(),e=>
1e.unlocked?"":(0,g.iv)(tE())),tJ=()=>{var e,n,t,l,a,d,v,p,g,h,f,x,m,j,b;let w=(0,c.useRouter)(),k=null===(e=w.query.job)||void 0===e?void 0:e.toString(),{data:{allJobsIdsObject:_}}=(0,V.yq)(),{track:C}=(0,s.z)(),{applicationCardTrackEventHelper:S}=(0,tk.O)(),{data:z}=(0,ew.T)(),{applicationCardData:A,stageId:D}=(0,I.a0)(),O=(0,tC._)(),{mutateAsync:P}=(0,tS.i)(),{data:E}=(0,U.c)({data:{jobId:k},options:{enabled:!!k}}),{isAdminUser:T}=(0,ed.O)(),F=null==E?void 0:null===(n=E.modifiedStagesDataIdObj)||void 0===n?void 0:n[D],{updateApplicationCard:Z}=(0,eJ.y)({selectedJobId:k}),{mutateAsync:N}=t_(),[q,J]=(0,u.useState)(!1),[L,W]=(0,u.useState)(!1),B=null==A?void 0:A.unlocked,$=null==A?void 0:null===(t=A.teamApplicantData)||void 0===t?void 0:t.name,Q=null==A?void 0:null===(l=A.teamApplicantData)||void 0===l?void 0:l.phone,H=null==A?void 0:null===(a=A.teamApplicantData)||void 0===a?void 0:a.emailid,[G,Y]=(0,u.useState)(H||""),[X,K]=(0,u.useState)(null==$?void 0:null===(d=$.split)||void 0===d?void 0:null===(v=d.call($," "))||void 0===v?void 0:v[0]),[ee,en]=(0,u.useState)(null==$?void 0:null===(p=$.split)||void 0===p?void 0:null===(g=p.call($," "))||void 0===g?void 0:g[1]),[et,ei]=(0,u.useState)(!1),[el,eo]=(0,u.useState)(!1),[er,ea]=(0,u.useState)(!1),[ec,eu]=(0,u.useState)(""),[ev,ep]=(0,u.useState)(""),[eg,eh]=(0,u.useState)(!1),[ef,ex]=(0,u.useState)(!1),em=null==$?void 0:null===(h=$.split)||void 0===h?void 0:null===(f=h.call($," "))||void 0===f?void 0:f[0],ej=async()=>{X&&ee||eF.$.error({content:"First and last names are mandatory"}),ei(!0);let e="".concat(X," ").concat(ee);try{await Z({applicationCardId:null==A?void 0:A.id,updateObject:{customApplicantName:e}}),eF.$.success({content:"Applicant name updated successfully"}),J(!1)}catch(e){eF.$.error({errorResponse:e})}ei(!1)},eb=async()=>{let e="91"!==ev||(null==ec?void 0:ec.length)===10;if(!e){eF.$.error({content:"Enter valid phone number"});return}eh(!0);try{let e=[];el&&e.push(N({messageId:A.threadid,status:"pending"})),e.push(Z({applicationCardId:null==A?void 0:A.id,updateObject:{customApplicantPhone:ec,customApplicantPhoneCode:ev}})),await Promise.all(e),eF.$.success({content:"Applicant phone updated successfully"}),S(A,"Applicant phone number updated manually"),ea(!1)}catch(e){eF.$.error({errorResponse:e})}eh(!1)},ey=async()=>{ex(!0);try{let e=await O.mutateAsync({email:G,skip_sso_check:!1,allowPersonalEmail:!0});(null==e?void 0:e.no_user_found)?(console.log("editApplicantEmail will update email",G,"in user id",null==A?void 0:A.csuid),await P({user_id:null==A?void 0:A.csuid,forceUpdateEmail:G}),eF.$.success({content:"Applicant email updated successfully"}),W(!1)):eF.$.error({content:"Email is already associated with another account"})}catch(e){eF.$.error({errorResponse:e})}ex(!1)};return q?(0,i.jsxs)(y.x,{display:"flex",flexDirection:"column",gap:10,children:[(0,i.jsxs)(y.x,{display:"flex",gap:5,children:[(0,i.jsx)(tu.I,{inputSize:"sm",inputProps:{value:X,onChange:e=>{K(e.target.value)},style:{width:"120px"}}}),(0,i.jsx)(tu.I,{inputSize:"sm",inputProps:{value:ee,onChange:e=>{en(e.target.value)},style:{width:"120px"}}})]}),et?(0,i.jsx)(R.z,{label:"Saving...",disabledText:"Saving...",size:"sm"}):(0,i.jsxs)(y.x,{display:"flex",gap:15,alignItems:"center",children:[(0,i.jsx)(R.z,{label:"Save",size:"sm",onClick:ej}),(0,i.jsx)(R.z,{variant:"link",size:"sm",label:"Cancel",onClick:()=>{J(!1)}})]})]}):er?(0,i.jsxs)(y.x,{display:"flex",flexDirection:"column",gap:10,children:[(0,i.jsx)(tp._,{disableVerifyNumber:!0,platform:"mobile",placeholder:"Enter phone number",onChange:e=>{eu(e.number),ep(e.phoneCode)}}),(null==_?void 0:null===(b=_[k])||void 0===b?void 0:b.hiringMode)==="lightning"?(0,i.jsx)(tv.J,{selected:el,disabled:eg,onChange:e=>{eo(e.target.checked)},label:"Mark this as pending status in data validation"}):null,eg?(0,i.jsx)(R.z,{label:"Saving...",disabledText:"Saving...",size:"sm"}):(0,i.jsxs)(y.x,{display:"flex",gap:15,alignItems:"center",children:[(0,i.jsx)(R.z,{label:"Save",size:"sm",onClick:eb}),(0,i.jsx)(R.z,{variant:"link",size:"sm",label:"Cancel",onClick:()=>{ea(!1)}})]})]}):L?(0,i.jsxs)(y.x,{display:"flex",flexDirection:"column",gap:10,children:[(0,i.jsx)(tu.I,{inputSize:"sm",inputProps:{value:G,onChange:e=>{Y(e.target.value)},style:{width:"300px"}}}),ef?(0,i.jsx)(R.z,{label:"Saving...",disabledText:"Saving...",size:"sm"}):(0,i.jsxs)(y.x,{display:"flex",gap:15,alignItems:"center",children:[(0,i.jsx)(R.z,{label:"Save",size:"sm",onClick:ey}),(0,i.jsx)(R.z,{variant:"link",size:"sm",label:"Cancel",onClick:()=>{W(!1)}})]})]}):(0,i.jsxs)(y.x,{display:"flex",flexDirection:"column",gap:5,children:[(0,i.jsxs)(y.x,{display:"flex",flexDirection:"row",alignItems:"center",gap:5,flexWrap:"wrap",children:[(0,i.jsxs)(tN,{fontWeight:"bold",size:"lg",children:[(0,i.jsxs)(tq,{fontWeight:"bold",size:"lg",unlocked:B,children:[B&&$,!B&&"Cutshort user"]}),B&&(0,i.jsx)(M.z,{variant:"tooltip",flyoutElement:(0,i.jsx)(r.x,{color:"grey-1",children:"Edit c
1andidate's name"}),children:(0,i.jsx)(tR,{onClick:()=>J(!0),children:(0,i.jsx)(tw.h,{iconName:"edit",variant:"solid",borderRadius:"full",wrapperSize:20,svgSize:14})})})]}),!(null==A?void 0:A.isAMatch)&&(null==F?void 0:F.type)!=="sent"&&(0,i.jsx)(n9,{application:A}),(0,i.jsx)(te.e,{context:"applicationCard",userId:null==A?void 0:A.csuid,candidateSocialData:null==A?void 0:A.teamApplicantData,trackHandler:e=>{C("Clicked to view ".concat(e," profile on stage card"),{stage_type:null==F?void 0:F.type})}})]}),(0,i.jsxs)(tF,{display:"flex",alignItems:"center",gap:20,flexWrap:"wrap",children:[(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",children:[(0,i.jsx)(tM,{children:(0,i.jsx)(tw.h,{iconName:"phone",variant:"icon-only",borderRadius:"full",hoverable:!1,color:"grey-7",wrapperSize:18,svgSize:16})}),Q&&(0,i.jsxs)(i.Fragment,{children:[(null==A?void 0:A.unlocked)?(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",children:[(0,i.jsx)(tZ,{href:"tel:".concat(Q),target:"_blank",children:Q}),(0,i.jsx)(ty,{type:"phone"})]}):(0,i.jsx)(y.x,{padding:"0 0 0 5px",display:"flex",alignItems:"center",children:(0,i.jsx)(r.x,{color:"grey-7",children:"Unlock to view"})}),T&&(0,i.jsx)(y.x,{padding:"0 0 0 5px",display:"flex",alignItems:"center",children:(0,i.jsx)(o.x,{href:"https://wa.me/91".concat(Q,"?text=").concat(encodeURIComponent("Hey ".concat(em,", this is ").concat(null==z?void 0:z.firstName," from Cutshort on behalf of ").concat(null==z?void 0:null===(x=z.hiringStatus)||void 0===x?void 0:null===(m=x.hiringAtCompanies)||void 0===m?void 0:null===(j=m[0])||void 0===j?void 0:j.companyName,"."))),target:"_blank",children:"DM on WhatsApp"})})]}),(!Q||T)&&(0,i.jsxs)(y.x,{display:"inline-flex",children:[!Q&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(es.L,{axis:"vertical",size:5}),(0,i.jsx)(r.x,{children:"N/A"})]}),(0,i.jsx)(es.L,{axis:"vertical",size:5}),(0,i.jsx)(R.z,{label:"Add phone",onClick:()=>{ea(!0)},variant:"link"})]})]}),(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",children:[(0,i.jsx)(tM,{children:(0,i.jsx)(tw.h,{iconName:"mail",variant:"icon-only",borderRadius:"full",hoverable:!1,color:"grey-7",
1wrapperSize:20,svgSize:16})}),H&&((null==A?void 0:A.unlocked)?(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",children:[(0,i.jsx)(tZ,{href:"mailto:".concat(H),target:"_blank",children:H}),(0,i.jsx)(ty,{type:"email"})]}):(0,i.jsx)(r.x,{color:"grey-7",children:"Unlock to view"})),!H&&(0,i.jsx)(r.x,{color:"grey-8",children:"N/A"}),T&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(es.L,{axis:"vertical",size:5}),(0,i.jsx)(R.z,{label:"Add email",onClick:()=>{W(!0)},variant:"link"})]})]})]})]})},tL=()=>{let{variant:e}=(0,I.a0)();return(0,i.jsxs)(i.Fragment,{children:["sm"===e&&(0,i.jsx)(nM,{}),"base"===e&&(0,i.jsx)(to,{}),"lg"===e&&(0,i.jsx)(tJ,{}),"search"===e&&(0,i.jsx)(tc,{})]})};var tW=t(81763),tU=t(99990),tV=t(26988),tB=t(35189),t$=t(51940);let tQ=()=>{var e,n,t;let{applicationCardData:l,variant:o}=(0,I.a0)(),{data:a}=(0,ek._)(),d="lg"===o,s=(null==l?void 0:null===(e=l.dataValidationStatus)||void 0===e?void 0:e.status)||"completed",c=null===(n=null==a?void 0:null===(t=a.dataValidationStatusTypes)||void 0===t?void 0:t.find(e=>(null==e?void 0:e._id)===s))||void 0===n?void 0:n.clientAutomationLabel;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(y.x,{flexShrink:0,children:(0,i.jsx)(tw.h,{iconName:null==c?void 0:c.icon,variant:"icon-only",hoverable:!1,color:null==c?void 0:c.color,wrapperSize:d?18:17,svgSize:d?18:17})}),(0,i.jsx)(r.x,{color:null==c?void 0:c.color,size:d?"base":"sm",children:null==c?void 0:c.label})]})};var tH=t(48815);function tG(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function tY(){let e=tG(["\n ","\n svg {\n color: ",";\n }\n img {\n opacity: 0.7;\n }\n"]);return tY=function(){return e},e}function tX(){let e=tG(["\n border-radius: 5px;\n"]);return tX=function(){return e},e}let tK=g.ZP.div.withConfig({componentId:"sc-1b17f29d-0"})(tY(),F.si,e=>{let{color:n}=e;return(0,Z.gJ)("--".concat(n))}),t0=(0,g.ZP)(y.x).withConfig({componentId:"sc-1b17f29d-1"})(tX()),t1=(e,n,t)=>{var i,l,o;let r=(0,ek.x)();if("data_validation"===n&&(null==t?void 0:null===(i=t.dataValidationStatus)||void 0===i?void 0:i.status))return null===(l=null==r?void 0:null===(o=r.dataValidationStatusTypes)||void 0===o?void 0:o.find(e=>{var n;return e._id===(null==t?void 0:null===(n=t.dataValidationStatus)||void 0===n?void 0:n.status)}))||void 0===l?void 0:l.backgroundColor;switch(e){case"skipped":return"grey-2";case"failed":return"danger-light";case"pending":return"warning-light";default:return"success-light"}},t5=()=>{var e,n,t,l,a,d,v,p,g,h,f,x,m,j,b,w,k,C,z,A,D,O,P,E,T,M;let{applicationCardData:R,variant:F,stageId:Z}=(0,I.a0)(),N=(0,c.useRouter)(),q=null===(e=N.query)||void 0===e?void 0:null===(n=e.job)||void 0===n?void 0:null===(t=n.toString)||void 0===t?void 0:t.call(n),J="lg"===F,{data:L}=(0,U.c)({data:{jobId:q}}),W=(null==L?void 0:null===(l=L.modifiedStagesDataIdObj)||void 0===l?void 0:l[Z])||{},{data:V,isLoading:B}=(0,tU.i)(),{data:Q}=(0,ew.T)(),H=(0,tB.x)(),{applicationCardTrackEventHelper:G}=(0,tk.O)(),{data:Y}=(0,ek._)(),{allTestIdsObj:X}=null!=V?V:{},K=(null==Y?void 0:Y.possible_stage_automations)||[],ee=null==Q?void 0:null===(a=Q.permissions)||void 0===a?void 0:a.view_detailed_test_report,en=(0,u.useMemo)(()=>(0,t$.Xy)(K,"_id"),[]),et=null==W?void 0:null===(d=W.automations)||void 0===d?void 0:null===(v=d[0])||void 0===v?void 0:v.type,ei=null==W?void 0:null===(p=W.automations)||void 0===p?void 0:null===(g=p[0])||void 0===g?void 0:g.meta,el=null==ei?void 0:null===(h=ei.test_ids)||void 0===h?void 0:null===(f=h[0])||void 0===f?void 0:f._id,eo=null==R?void 0:null===(x=R.stageStatus)||void 0===x?void 0:x[null==W?void 0:W.id],er=null==R?void 0:null===(m=R.teamApplicantData)||void 0===m?void 0:null===(j=m.testsTaken)||void 0===j?void 0:j[el],ea=null==er?void 0:er.provider,ed=null==eo?void 0:null===(b=eo.automationStatus)||void 0===b?void 0:null===(w=b[et])||void 0===w?void 0:w.status,ec=null==eo?void 0:null===(k=eo.automationStatus)||void 0===k?void 0:null===(C=k[et])||void 0===C?void 0:C.externalApplicationLink,eu=null==R?void 0:R.confirmedMeetingTime,ev=null==eo?void 0:eo.meetingCancelled,ep=null==R?void 0:R.confirmedMeetingTimeHasPassed,eg="send_meeting_request"===et&&(eu||ev),eh="send_audio_screening"===et&&(null==eo?void 0:eo.audioResponse),ef="screening"===et&&(null==eo?void 0:eo.screeningSubmitted),ex="send_test"===et&&er,em=null==R?void 0:null===(z=R.teamApplicantData)||void 0===z?void 0:z.isUserDeleted;return em?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t0,{...J&&{backgroundColor:"grey-2",padding:"5px 10px 5px 10px"},display:"flex",flexDirection:"row",alignItems:"center",gap:10,children:(0,i.jsx)(r.x,{color:"grey-7",size:J?"base":"sm",children:J?"This user account has been deleted":"User account deleted"})}),(0,i.jsx)(es.L,{size:15})]}):eg&&!J?(0,i.jsxs)(y.x,{padding:"0px 0px 10px 0px",children:[ep&&(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",gap:5,children:[(0,i.jsx)(tK,{color:"grey-7",children:(0,i.jsx)(_.J,{src:"/calendar_b.png",size:13})}),(0,i.jsxs)(r.x,{color:"grey-7",size:"sm",children:["Interview was on"," ",$()(eu).format("D MMM, h:mma")]})]}),ev&&(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",gap:5,children:[(0,i.jsx)(tK,{color:"danger-base",children:(0,i.jsx)(_.J,{src:"/calendar_r.png",size:13})}),(0,i.jsx)(r.x,{color:"danger-base",size:"sm",children:"Interview has been cancelled"})]}),eu&&!ep&&(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",gap:5,children:[(0,i.jsx)(_.J,{src:"/calendar_t.png",size:13}),(0,i.jsxs)(r.x,{color:"teal-base",size:"sm",children:["Interview:"," ",$()(eu||new Date).format("D MMM, h:mma")]})]})]}):ef&&!J?(0,i.jsx)(t0,{padding:"0px 0px 10px 0px",...J&&ed&&{backgroundColor:"success-light",padding:"5px 10px 5px 10px"},children:!ep&&(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",gap:5,children:[(0,i.jsx)(tK,{color:"teal-base",children:(0,i.jsx)(_.J,{src:"/screening_t.png",size:11})}),(0,i.jsx)(r.x,{color:"teal-base",size:"sm",children:"Questionnaire answered"})]})}):ex&&!J?(0,i.jsxs)(y.x,{padding:"0px 0px 10px 0px",children:[B&&(0,i.jsx)(S.O,{height:16,variant:"rounded-rectangle"}),!B&&(0,i.jsx)(i.Fragment,{children:(null==X?void 0:X[el])?(0,i.jsx)(y.x,{children:(null==er?void 0:er.score)<(null==X?void 0:null===(E=X[el])||void 0===E?void 0:E.pass_cutoff)?(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",gap:5,children:[(0,i.jsx)(tK,{color:"danger-base",children:(0,i.jsx)(_.J,{src:"/test_icon_r.png",size:13})}),(0,i.jsxs)(r.x,{color:"danger-base",size:"sm",children:[(0,i.jsx)(r.x,{color:"danger-base",fontWeight:"bold",renderAs:"span",size:"sm",children:"Failed"})," ","the test"," ",(null==er?void 0:er.testReportLink)&&(0,i.jsx)(o.x,{className:"application-card-inner-cta",href:ee?(0,tH.rX)((null==er?void 0:er.testReportLink)||"","format=pdf"):"",target:"_blank",onClick:e=>{(0,s.j)("Clicked to view test report of applicant in stage on ats page"),H("view_detailed_test_report",e)},children:"View report"})]})]}):(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",gap:5,children:[(0,i.jsx)(tK,{color:"teal-base",children:(0,i.jsx)(_.J,{src:"/test_icon_t.png",size:13})}),(0,i.jsxs)(r.x,{color:"teal-base",size:"sm",children:[(0,i.jsx)(r.x,{color:"teal-base",fontWeight:"bold",renderAs:"span",size:"sm",children:(null==er?void 0:er.score)>=(null==X?void 0:null===(T=X[el])||void 0===T?void 0:T.topper_cutoff)?"Excelled":"Passed"})," ",(null==er?void 0:er.score)>=(null==X?void 0:null===(M=X[el])||void 0===M?void 0:M.topper_cutoff)&&"in"," ","the test"," ",(null==er?void 0:er.testReportLink)&&(0,i.jsx)(o.x,{className:"application-card-inner-cta",href:ee?(0,tH.rX)((null==er?void 0:er.testReportLink)||"","format=pdf"):"",target:"_blank",onClick:e=>{(0,s.j)("Clicked to view test report of applicant in stage on ats page"),H("view_detailed_test_report",e)},children:"View report"})]})]})}):(0,i.jsxs)(y.x,{display:"flex",alignItems:"center",gap:5,children:["codility"===ea&&(0,i.jsx)(_.J,{src:"/codility_skill_logo.png",size:J?14:11}),"hackerrank"===ea&&(0,i.jsx)(_.J,{src:"/hackerrank_skill_logo.png",size:J?16:13}),"hackerearth"===ea&&(0,i.jsx)(_.J,{src:"/hackerearth_skill_logo.png",size:J?16:13}),(0,i.jsxs)(r.x,{color:"teal-base",fontWeight:"bold",size:"sm",children:["Test score"," ","hackerrank"===ea?(0,i.jsxs)(r.x,{color:"teal-base",renderAs:"span",size:"sm",children:[null==er?void 0:er.percentageScore,"%"]}):(0,i.jsxs)(r.x,{color:"teal-base",renderAs:"span",size:"sm",children:[null==er?void 0:er.score,"/",null==er?void 0:er.maxScore]})]})]})})]}):eg||ef||eh||ex?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t0,{...J&&ed&&{backgroundColor:t1(ed,et,R),padding:"5px 10px 5px 10px"},display:"flex",flexDirection:"row",alignItems:"center",gap:10,children:["skipped"===ed&&(0,i.jsx)(r.x,{color:"grey-7",size:J?"base":"sm",children:"Automation has been skipped"}),"failed"===ed&&(0,i.jsx)(r.x,{color:"danger-base",size:J?"base":"sm",children:"Automation failed"}),"pending"===ed&&(0,i.jsx)(r.x,{color:"warning-base",size:J?"base":"sm",children:null==en?void 0:null===(A=en[et])||void 0===A?void 0:A.voila_pending_text}),"started"===ed&&(0,i.jsx)(tV.Oe,{children:(0,i.jsx)(r.x,{color:"success-base",size:J?"base":"sm",children:null==en?void 0:null===(D=en[et])||void 0===D?void 0:D.voila_working_text})}),"completed"===ed&&(0,i.jsx)(y.x,{display:"flex",gap:5,alignItems:"center",children:"data_validation"===et&&(null==R?void 0:null===(O=R.dataValidationStatus)||void 0===O?void 0:O.status)?(0,i.jsx)(tQ,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(tK,{color:"success-base",children:(0,i.jsx)(_.J,{type:"tick",size:J?16:13})}),(0,i.jsx)(r.x,{color:"success-base",size:J?"base":"sm",children:null==en?void 0:null===(P=en[et])||void 0===P?void 0:P.voila_done_text})]})}),ec&&(0,i.jsx)(r.x,{size:J?"base":"sm",children:(0,i.jsx)(o.x,{target:"_blank",href:ec,renderAs:"span",onClick:()=>{G(R,"Clicked to view ATS application on ats page")},children:"View in ATS"})})]}),ed&&(0,i.jsx)(es.L,{size:10})]})};var t2=t(18440),t8=t(71521),t3=t(30114);function t7(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function t6(){let e=t7(["\n position: relative;\n\n ","\n\n & > "," {\n &:hover {\n background: ",";\n }\n }\n"]);return t6=function(){return e},e}function t4(){let e=t7(["\n opacity: 0;\n"]);return t4=function(){return e},e}let t9=g.ZP.div.withConfig({componentId:"sc-bab12066-0"})(t6(),e=>e.variant&&"lg"!==e.variant&&"cursor: pointer;",t3.U,(0,Z.gJ)("--grey-1"));function ie(){var e,n;let t=(e=["\n align-items: center;\n background-color: #fff;\n position: absolute;\n right: 0;\n top: 0;\n ",":hover & {\n display: flex;\n }\n ","\n"],n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}})));return ie=function(){return t},t}g.ZP.div.withConfig({componentId:"sc-bab12066-1"})(t4());let it=g.ZP.div.withConfig({componentId:"sc-d12243d4-0"})(ie(),t9,e=>{let{initialHidden:n}=e;return n?"display: none;":"display: flex;"}),ii=()=>{let{stageId:e,applicationId:n}=(0,I.a0)(),t=(0,t2.n2)(n=>n.state[e]),l=(0,P.$k)(n,t);return(0,i.jsx)(it,{className:"application-card-inner-cta",initialHidden:!l,children:(0,i.jsx)(tv.J,{onChange:()=>{(0,s.j)("Clicked to toggle application selection on ats page"),l?(0,t8.Vb)({stageId:e,applicationId:n}):(0,t8.Uy)({stageId:e,applicationId:n})},selected:!!l},e)})},il=()=>{let{variant:e}=(0,I.a0)(),n=(0,eb.a)(ey.VB.tabletM),t=["base","sm"].includes(e);return(0,i.jsxs)(y.x,{position:"relative",children:["search"!==e&&"lg"!==e&&(0,i.jsx)(t5,{}),(0,i.jsxs)(y.x,{display:"flex",flexDirection:"row",gap:10,alignItems:"flex-start",children:[(0,i.jsx)(tW.W,{size:(()=>{switch(e){case"sm":return 30;case"search":return 35;case"lg":return n?30:60;default:return 50}})()}),(0,i.jsx)(tL,{})]}),t&&(0,i.jsx)(ii,{})]})},io=()=>{var e,n,t;let{applicationId:o,applicationCardData:r}=(0,I.a0)();return(0,i.jsxs)(l.Z,{variant:"elevated",explicitBorder:!0,padding:{all:10},children:[(0,i.jsx)(b,{cardData:{_id:null==r?void 0:r.tcid,genderStatus:{confidence:(null==r?void 0:null===(e=r.teamApplicantData)||void 0===e?void 0:null===(n=e.genderStatus)||void 0===n?void 0:n.confidence)||1},createdBy:{__un:null==r?void 0:null===(t=r.teamApplicantData)||void 0===t?void 0:t.name,_id:null==r?void 0:r.csuid}},variant:"pipeline",margin:"-10px -10px 10px -10px"}),(0,i.jsx)(il,{}),(0,i.jsx)(es.L,{size:10}),(0,i.jsx)(ng,{})]},o)};var ir=t(46752),ia=t(20818),id=t(34277),is=t(36854);function ic(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function iu(){let e=ic(["\n flex-shrink: 0;\n"]);return iu=function(){return e},e}function iv(){let e=ic(["\n ","\n gap: 4px;\n svg {\n color: var(--brand-color);\n }\n"]);return iv=function(){return e},e}function ip(){let e=ic(["\n ","\n margin-left: -2px;\n img {\n opacity: 0.6;\n }\n"]);return ip=function(){return e},e}function ig(){let e=ic(["\n div {\n background: ",";\n }\n"]);return ig=function(){return e},e}g.ZP.div.withConfig({componentId:"sc-455b08eb-0"})(iu()),(0,g.ZP)(o.x).withConfig({componentId:"sc-455b08eb-1"})(iv(),F.si);let ih=g.ZP.div.withConfig({componentId:"sc-455b08eb-2"})(ip(),F.si);g.ZP.div.withConfig({componentId:"sc-455b08eb-3"})(ig(),(0,Z.gJ)("--accent-light"));let ix=e0()(()=>t.e(4728).then(t.bind(t,64728)).then(e=>e.ApplicationCardSaveListFlyout),{loadableGenerated:{webpack:()=>[64728]},ssr:!1,loading:()=>(0,i.jsx)(y.x,{width:332,padding:5,display:"flex",centerContent:!0,children:(0,i.jsx)(C.a,{})})}),im=e=>{var n,t;let{cardId:l}=e,[o,r]=(0,u.useState)(["aa"]),{data:a,isLoading:d}=(0,ia.T)(),{variant:c,applicationCardData:v}=(0,I.a0)(),{threadid:p}=v||{},{tcLabels:g}=a||{},{data:h,isInitialLoading:f}=(0,id.d)({threadId:p},{enabled:!!p&&"lg"===c,onSettled:()=>{is.P6.setState(e=>({...e,conversationsLoading:!1}))}}),x=(null==h?void 0:null===(n=h[0])||void 0===n?void 0:null===(t=n.seekerSignal)||void 0===t?void 0:t.tclabels)||[];return(0,u.useEffect)(()=>
1{if(!d&&!f){var e;let n=(null===(e=null==g?void 0:g.filter(e=>null==x?void 0:x.includes(null==e?void 0:e._id)))||void 0===e?void 0:e.map(e=>null==e?void 0:e._id))||[];r(n)}},[d,f]),(0,i.jsxs)(y.x,{display:"flex",renderAs:"span",alignItems:"center",children:[(0,i.jsx)(ih,{children:(0,i.jsx)(tw.h,{hoverable:!1,variant:"icon-only",iconName:"bookmark",svgSize:18,wrapperSize:20})}),f||d?(0,i.jsx)(S.O,{width:130,height:20.7,variant:"rounded-rectangle"}):(0,i.jsx)(e9.z,{variant:"popover",positions:["bottom"],flyoutElement:(0,i.jsx)(ix,{setSavedList:r,tclabels:o,cardId:l}),onVisibilityChange:()=>{(0,s.j)("Clicked to toggle label flyout on ats page")},children:(0,i.jsx)(R.z,{label:(null==o?void 0:o.length)>0?"Saved in ".concat(o.length," ").concat((0,et.Rr)("list",o.length)):"Save to a list",variant:"link"})})]})};var ij=t(62577);function ib(){var e,n;let t=(e=["\n padding: 10px;\n border-radius: 5px;\n background-color: #f8f8f8;\n display: flex;\n flex-direction: column;\n gap: 5px;\n"],n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}})));return ib=function(){return t},t}let iy=g.ZP.div.withConfig({componentId:"sc-2c0607a0-0"})(ib()),iw={"do-select":{imageSrc:"/doselect_skill_logo.png",width:20,height:13},codility:{imageSrc:"/codility_skill_logo.png",width:20,height:11},hackerrank:{imageSrc:"/hackerrank_skill_logo.png",width:20,height:13},hackerearth:{imageSrc:"/hackerearth_skill_logo.png",width:20,height:13}},ik=e=>{let{testsTaken:n}=e,{data:t,isLoading:l}=(0,tU.i)(),o=Object.keys(n||{}).map(e=>({...n[e],id:e})).filter(e=>{var n;return!(null==t?void 0:null===(n=t.allTestIdsObj)||void 0===n?void 0:n[null==e?void 0:e.id])});return l?(0,i.jsx)(y.x,{backgroundColor:"grey-2",borderRadius:"base",padding:"5px 0",display:"flex",centerContent:!0,children:(0,i.jsx)(C.a,{})}):(0,i.jsx)(iy,{children:null==o?void 0:o.map(e=>{var n,t,l;return(0,i.jsxs)(y.x,{centerContent:!0,gap:5,children:[(0,i.jsx)(y.x,{flexShrink:0,children:(null==iw?void 0:iw[null==e?void 0:e.provider])&&(0,i.jsx)(eN.d,{src:null==iw?void 0:null===(n=iw[null==e?void 0:e.provider])||void 0===n?void 0:n.imageSrc,width:null==iw?void 0:null===(t=iw[null==e?void 0:e.provider])||void 0===t?void 0:t.width,height:null==iw?void 0:null===(l=iw[null==e?void 0:e.provider])||void 0===l?void 0:l.height})}),(0,i.jsxs)(y.x,{flexGrow:1,children:["do-select"===e.provider&&(0,i.jsxs)(r.x,{renderAs:"span",children:["DoSelect test score"," ",(0,i.jsxs)(r.x,{renderAs:"span",fontWeight:"bold",children:[e.score," / ",e.maxScore]})]}),"codility"===e.provider&&(0,i.jsxs)(r.x,{renderAs:"span",children:["Codility test score"," ",(0,i.jsxs)(r.x,{renderAs:"span",fontWeight:"bold",children:[e.score," / ",e.maxScore]})]}),"hackerrank"===e.provider&&(0,i.jsxs)(r.x,{renderAs:"span",children:["HackerRank test score"," ",(0,i.jsxs)(r.x,{renderAs:"span",fontWeight:"bold",children:[e.percentageScore,"%"]})]}),"hackerearth"===e.provider&&(0,i.jsxs)(r.x,{renderAs:"span",children:["HackerEarth test score"," ",(0,i.jsxs)(r.x,{renderAs:"span",fontWeight:"bold",children:[e.percentageScore,"%"]})]})]}),(null==e?void 0:e.testReportLink)&&(0,i.jsx)(ij.z,{variant:"link",renderAs:"a",href:e.testReportLink,target:"_blank",label:"Full report",onClick:()=>{(0,s.j)("Clicked to view full test report on ats page")}})]})})})},i_=()=>{var e;let{variant:n,applicationCardData:t}=(0,I.a0)(),l="lg"===n;return(0,i.jsxs)(y.x,{display:"flex",flexDirection:"column",children:[l&&!!(null==t?void 0:t._has_external_test_results)&&(0,i.jsx)(ik,{testsTaken:null==t?void 0:null===(e=t.teamApplicantData)||void 0===e?void 0:e.testsTaken}),l&&(0,i.jsx)(y.x,{padding:"5px 0px",children:(0,i.jsx)(im,{cardId:null==t?void 0:t.tcid,tclabels:null==t?void 0:t.tclabels})}),(0,i.jsx)(y.x,{display:"flex",gap:5,flexDirection:"column",padding:"base"===n?"0px 10px 0px":"5px 0px",children:(0,i.jsx)(ir.y,{variant:n})})]})},iC=()=>{var e,n,t;let{applicationCardData:o}=(0,I.a0)();return(0,i.jsxs)(l.Z,{variant:"outlined",padding:{all:0},children:[(0,i.jsx)(b,{cardData:{_id:null==o?void 0:o.tcid,genderStatus:{confidence:(null==o?void 0:null===(e=o.teamApplicantData)||void 0===e?void 0:null===(n=e.genderStatus)||void 0===n?void 0:n.confidence)||1},createdBy:{__un:null==o?void 0:null===(t=o.teamApplicantData)||void 0===t?void 0:t.name,_id:null==o?void 0:o.csuid}},variant:"pipeline"}
1),(0,i.jsx)(y.x,{padding:10,children:(0,i.jsx)(il,{})}),(0,i.jsx)(i_,{}),(0,i.jsx)(y.x,{padding:10,children:(0,i.jsx)(ng,{})})]},o.id)};function iS(){var e,n;let t=(e=["\n max-height: 300px;\n overflow: auto;\n margin-bottom: 20px;\n white-space: pre-wrap;\n flex-shrink: 0;\n @media "," {\n width: 100%;\n }\n"],n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}})));return iS=function(){return t},t}let iI=g.ZP.div.withConfig({componentId:"sc-9d860640-0"})(iS(),ey.VB.mobileL),iz=()=>{let{applicationCardData:e}=(0,I.a0)();return(0,i.jsxs)(iI,{children:[(0,i.jsx)(r.x,{fontWeight:"bold",children:"Accomplishments"}),(null==e?void 0:e.comment)?(0,i.jsx)(r.x,{children:(null==e?void 0:e.unlocked)?null==e?void 0:e.comment:null==e?void 0:e.redacted_comment}):(0,i.jsx)(r.x,{color:"grey-7",children:"No accomplishments mentioned"})]})};var iA=t(60513),iD=t(39844),iO=t(28717),iP=t(31643),iE=t(51344);let iT=e=>{var n,t,l,a,d,s,c,v,p,g;let{jobId:h}=e,{isAdminUser:f}=(0,ed.O)(),{id:x}=(0,K.Z)(),{data:m}=(0,U.c)({data:{jobId:h}}),{applicationCardData:j}=(0,I.a0)(),b=(0,u.useMemo)(()=>{var e;return Object.values(null!==(e=null==m?void 0:m.modifiedStagesDataIdObj)&&void 0!==e?e:{}).find(e=>{var n,t;return(null==e?void 0:null===(n=e.automations)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.type)==="export_to_ats"})},[m]),w=null==b?void 0:null===(n=b.automations)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:null===(l=t.meta)||void 0===l?void 0:l.ats_provider,{data:k,isInitialLoading:_}=(0,iE.M)({data:{workspaceId:x,jobId:null===(a=null==b?void 0:null===(d=b.automations)||void 0===d?void 0:null===(s=d[0])||void 0===s?void 0:null===(c=s.meta)||void 0===c?void 0:null===(v=c.configValues)||void 0===v?void 0:v.find(e=>"jobs"===e._id))||void 0===a?void 0:a.value,source:w}}),C=(0,u.useMemo)(()=>{var e;let n={};return null==k||null===(e=k.stages)||void 0===e||e.forEach(e=>{n[e.id]=e}),n},[k]),{data:S}=(0,iP.D)({data:{source:w,workspaceId:x}}),z=(0,u.useMemo)(()=>{var e;let n={};return null==S||null===(e=S.jobs)||void 0===e||e.forEach(e=>{n[e.id]=e}),n},[S]),{data:A,isInitialLoading:D}=(0,iO.D)({data:{source:w,workspaceId:x,email:null==j?void 0:null===(p=j.teamApplicantData)||void 0===p?void 0:p.emailid},options:{enabled:iD.kQ.indexOf(w)>-1&&!!(null==j?void 0:null===(g=j.teamApplicantData)||void 0===g?void 0:g.emailid)}}),O=(null==A?void 0:A.applications)||[];return f&&-1!==iD.kQ.indexOf(w)?(0,i.jsxs)(y.x,{children:[(0,i.jsx)(y.x,{padding:"5px 10px",backgroundColor:"brand-lightest",borderRadius:"base",children:D?"Checking applications on ".concat(w,"..."):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.x,{renderAs:"span",fontWeight:"bold",children:[null==O?void 0:O.length," application",(null==O?void 0:O.length)!==1&&"s"," on ",w,(null==O?void 0:O.length)>0&&":"]})," ",null==O?void 0:O.map((e,n)=>{var t,l,a,d,s;return(0,i.jsxs)(u.Fragment,{children:[n>0&&" | ",(0,i.jsx)(r.x,{renderAs:"span",children:(null===(t=z[null==e?void 0:e.forPostingId])||void 0===t?void 0:t.title)||(null==e?void 0:e.forPostingId)||"No job id"})," ",(0,i.jsx)(y.x,{display:"inline-block",children:(0,i.jsx)(M.z,{variant:"popover",align:"center",flyoutElement:(0,i.jsxs)(y.x,{width:200,children:[(0,i.jsxs)(r.x,{size:"sm",color:"grey-7",children:[$()(new Date(null==e?void 0:e.created_date)).format("DD MMM YYYY"),(null==e?void 0:null===(l=e.sources)||void 0===l?void 0:l.length)>0&&" | ".concat(null==e?void 0:null===(a=e.sources)||void 0===a?void 0:a.join(", ")),(null==e?void 0:e.archived_date)&&" | Archived"]}),(null==e?void 0:null===(d=e.stage_changes)||void 0===d?void 0:d.length)>0&&(0,i.jsx)(es.L,{size:5}),_?"Loading...":null==e?void 0:null===(s=e.stage_changes)||void 0===s?void 0:s.map((n,t)=>{var l;return(0,i.jsxs)(y.x,{display:"flex",gap:5,children:[(0,i.jsxs)(y.x,{flexShrink:0,flexDirection:"column",display:"flex",alignItems:"center",children:[(0,i.jsx)(y.x,{width:1,backgroundColor:t>0?"grey-4":null,height:8}),(0,i.jsx)(y.x,{width:4,height:4,backgroundColor:"grey-6",borderRadius:"full",flexShrink:0}),t<e.stage_changes.length-1&&(0,i.jsx)(y.x,{width:1,backgroundColor:"grey-4",flexGrow:1})]}),(0,i.jsxs)(y.x,{flexGrow:1,children:[(0,i.jsx)(r.x,{size:"sm",renderAs:"span",children:null===(l=C[null==n?void 0:n.to_stage_id])||void 0===l?void 0:l.title})," ",(0,i.jsx)(r.x,{size:"sm",color:"grey-7",renderAs:"span",children:$()(new Date(n.updated_date)).format("DD MMM")})]})]},n.updated_date)})]}),children:(0,i.jsx)(o.x,{children:"More"})})})]},null==e?void 0:e.id)})]})}),(0,i.jsx)(es.L,{size:10})]}):null},iM=()=>{var e,n,t;let l=(0,c.useRouter)(),o=(0,eb.a)(ey.VB.tabletL),r=(0,eb.a)(ey.VB.mobileM),{applicationCardData:a}=(0,I.a0)(),{isAdminUser:d}=(0,ed.O)(),{data:s}=(0,ek._)(),u=null===(e=l.query)||void 0===e?void 0:null===(n=e.job)||void 0===n?void 0:n.toString(),{stageStatus:v}=a||{},p=(null==s?void 0:s.possible_ats_stages)||{},{data:g}=(0,U.c)({data:{jobId:u}}),h="",f="",x=!1,m=!1;(null==g?void 0:g.modifiedStagesDataIdObj)&&Object.keys((null==g?void 0:g.modifiedStagesDataIdObj)||{}
1).forEach(e=>{var n,t,i,l;(null===(n=null==g?void 0:g.modifiedStagesDataIdObj[e])||void 0===n?void 0:n.type)===(null==p?void 0:null===(t=p.accepted)||void 0===t?void 0:t.type)&&(h=e),(null===(i=null==g?void 0:g.modifiedStagesDataIdObj[e])||void 0===i?void 0:i.type)===(null==p?void 0:null===(l=p.offered)||void 0===l?void 0:l.type)&&(f=e)}),Object.keys(v||{}).forEach(e=>{e===h&&(x=!0),e===f&&(m=!0)});let j=null==a?void 0:null===(t=a.offerData)||void 0===t?void 0:t.offeredSalary,b=d&&(j||x||m);return(0,i.jsxs)(y.x,{display:"flex",flexDirection:"column",width:"100%",children:[b&&(0,i.jsxs)(y.x,{maxWidth:r?"100%":300,children:[(0,i.jsx)(iA.z,{iconRequired:!0,applicationCardData:a}),(0,i.jsx)(es.L,{size:10})]}),(0,i.jsx)(t5,{}),(0,i.jsx)(iT,{jobId:u}),(0,i.jsxs)(y.x,{display:"flex",flexDirection:o?"column":"row",justifyContent:"space-between",gap:10,margin:"0 0 10px 0",children:[(0,i.jsxs)(y.x,{display:"flex",flexDirection:"column",gap:10,flexBasis:"60%",flexGrow:1,children:[(0,i.jsx)(il,{}),(0,i.jsx)(i_,{}),o&&(0,i.jsx)(y.x,{children:(0,i.jsx)(iz,{})})]}),!o&&(0,i.jsx)(y.x,{flexBasis:"40%",children:(0,i.jsx)(iz,{})})]}),(0,i.jsx)(ng,{})]})},iR=()=>{let{applicationId:e}=(0,I.a0)();return(0,i.jsxs)(l.Z,{variant:"outlined",padding:{all:0},children:[(0,i.jsx)(y.x,{padding:10,children:(0,i.jsx)(il,{})}),(0,i.jsx)(y.x,{padding:"0 10px",children:(0,i.jsx)(i_,{})}),(0,i.jsx)(y.x,{padding:"5px 10px 10px",children:(0,i.jsx)(ng,{})})]},e)};var iF=t(97785);function iZ(){var e,n;let t=(e=["\n position: absolute;\n box-shadow: 0 0 0 1px #3498db;\n pointer-events: none;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: 5px;\n background: rgba(52, 152, 219, 0.1);\n opacity: ",";\n ","\n"],n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}})));return iZ=function(){return t},t}let iN=g.ZP.div.withConfig({componentId:"sc-29cd4402-0"})(iZ(),e=>{let{selected:n}=e;return n?.6:0},e=>{let{animate:n}=e;return n&&iF.$M}),iq=()=>{let{stageId:e,applicationId:n}=(0,I.a0)(),[t]=(0,is.Op)(),l=(0,t2.n2)(n=>n.state[e]),o=(0,P.$k)(n,l);return(0,i.jsx)(iN,{selected:o,animate:t===n})};function iJ(e){return e.nativeEvent instanceof MouseEvent}function iL(e){let{nativeEvent:n}=e;return window.TouchEvent?n instanceof TouchEvent:"touches"in n}var iW=t(19894),iU=t(48226);let iV=(0,u.memo)(e=>{let{variant:n="base",applicationId:t,applicationCardData:l,trackHandler:o}=e,r=(0,D.a)(O.VB.tabletM),{isOnMobile:a}=(0,iU.O)(),d=["sm","base"].includes(n),c=null==l?void 0:l.stageid,v=(0,u.useRef)("idle"),p=function(e,n){let{threshold:t=400,onStart:i,onFinish:l,onCancel:o,phase:r="bubble"}=n,a=u.useRef(!1),d=u.useRef(!1),s=u.useRef(null);return u.useMemo(()=>{if("function"!=typeof e)return{};let n=n=>{(iJ(n)||iL(n))&&(i&&i(n),d.current=!0,s.current=setTimeout(()=>{e(n),a.current=!0},t))},c=e=>{(iJ(e)||iL(e))&&(a.current?l&&l(e):d.current&&o&&o(e),a.current=!1,d.current=!1,s.current&&window.clearTimeout(s.current))};return"bubble"===r?{onTouchStart:n,onTouchEnd:c,onMouseDown:n,onMouseUp:c,onMouseLeave:c}:{onTouchStartCapture:n,onTouchEndCapture:c,onMouseDownCapture:n,onMouseUpCapture:c,onMouseLeaveCapture:c}},[e,t,o,l,i])}(()=>{var e,n;(0,iW.tp)([20]),(0,s.j)("Toggled application selection by long pressing on ats page"),v.current="success";let i=null===(e=t2.n2.getState())||void 0===e?void 0:null===(n=e.state)||void 0===n?void 0:n[c],l=(0,P.$k)(t,i);l?(0,t8.Vb)({stageId:c,applicationId:t}):(0,t8.Uy)({stageId:c,applicationId:t})},{threshold:500,onStart:()=>{v.current="started"},onCancel:()=>{v.current="cancelled"}});return(0,i.jsx)(I.Bn,{value:{applicationId:t,variant:n,applicationCardData:l,stageId:c},children:(0,i.jsxs)(t9,{"data-application-id":t,variant:n,onClickCapture:e=>{if("success"===v.current){e.stopPropagation();return}(0,s.j)("Clicked on stage card on ats page",{skipAnalyticsEvent:["amplitude"]});let n=e.target;n.closest(".application-card-inner-cta")||(null==o||o(),(0,P.cF)({data:{isOnMediumTablet:r,applicationId:t,applicationData:l,source:"stage-column"}}))},...d&&a&&{...p},children:[d&&(0,i.jsx)(iq,{}),"sm"===n&&(0,i.jsx)(io,{}
1),"base"===n&&(0,i.jsx)(iC,{}),"lg"===n&&(0,i.jsx)(iM,{}),"search"===n&&(0,i.jsx)(iR,{})]})})})},67369:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});let i="@Voila "},25620:function(e,n,t){"use strict";t.d(n,{w:function(){return l}});let i=["pph23","prioritytrial","startup_support","rec7","freedom_smb","freedom_smb2","freedom_mid","freedom_enterprise"];function l(e){if(!e)return!1;if("lightning"===e.hiringMode)return!0;let n=e.planOfWorkspace;return!!n&&i.includes(n)}},35930:function(e,n,t){"use strict";t.d(n,{G9:function(){return o},Jj:function(){return l},cq:function(){return r}});var i=t(23336);let l=async e=>{let{workspaceId:n,...t}=e;try{let e=await i.hi.post("/api/auth/employer/ai-call/update-config?workspaceId=".concat(n),t);if(e.ok)return await e.json();throw await e.json()}catch(e){throw console.error("update job failed",e),e}},o=async e=>{let{workspaceId:n,jobId:t}=e;try{let e=await i.hi.get("/api/auth/employer/ai-call/config-for-job/".concat(t,"?workspaceId=").concat(n));if(e.ok)return await e.json();throw await e.json()}catch(e){throw console.error("get ai calling config failed",e),e}},r=async e=>{let{talentCardId:n}=e;try{let e=await i.hi.get("/api/auth/shadmin/ai-call/call-responses?talentCardId=".concat(n));if(e.ok)return await e.json();throw await e.json()}catch(e){throw console.error("get ai call responses failed",e),e}}},98527:function(e,n,t){"use strict";t.d(n,{OI:function(){return r},hL:function(){return a},nn:function(){return o},wA:function(){return l}});var i=t(23336);let l=async(e,n)=>{try{let t=await i.hi.get("/api/auth/generate-ai-result/".concat(e,"?jobId=").concat(n));if(t.ok)return await t.json();throw await t.json()}catch(e){throw console.error("generate AI results failed",e),await e}},o=async e=>{try{let n=await i.hi.post("/api/auth/ai-search/prepare-ats-applications-for-qa",e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("generate AI results failed",e),await e}},r=async(e,n)=>{try{let t=await i.hi.get("/api/auth/default-ai-results-status/".concat(e,"?jobId=").concat(n));if(t.ok)return await t.json();throw await t.json()}catch(e){throw console.error("get default AI prompt failed",e),await e}},a=async(e,n)=>{try{let t=await i.hi.post("/api".concat(e.workspaceId?"/auth/employer":"","/ai-search/explain-search-relevance"),e),l=t.body.getReader(),o=new TextDecoder("utf-8");for(;;){let{value:e,done:t}=await l.read();if(t)break;null==n||n(o.decode(e,{stream:!0}))}}catch(e){throw await e}}},85966:function(e,n,t){"use strict";t.d(n,{EY:function(){return v},FQ:function(){return s},KW:function(){return j},MV:function(){return p},RT:function(){return c},Tr:function(){return r},VA:function(){return f},Y5:function(){return o},Zj:function(){return x},av:function(){return d},eN:function(){return g},jJ:function(){return b},o6:function(){return h},qo:function(){return y},tF:function(){return u},ws:function(){return m},zJ:function(){return a}});var i=t(74303),l=t(23336);let o=async e=>{try{let n=await l.hi.get("/conversations-v2/candidate",null!=e?e:{});if(n.ok)return await n.json()}catch(e){throw console.error("get-candidate-conversations failed",e),e}throw Error("Something went wrong! Please try again later.")},r=async(e,n,t)=>{try{let i=await l.hi.get("/loadthread-v2/".concat(e),null!=n?n:{},t?{Cookie:t}:{},{redirect:"error"});if(i.ok)return await i.json()}catch(e){throw console.error("get-loadthread failed",e),e}throw Error("Something went wrong! Please try again later.")},a=async e=>{try{let n=await l.hi.post("/markthreadasread",{threadid:e});if(n.ok)return await n.json()}catch(e){throw console.error("markthreadasread failed",e),e}throw Error("Something went wrong! Please try again later.")},d=async()=>{try{let e=await l.hi.get("/conversations-pending-rating-by-me");if(e.ok)return await e.json()}catch(e){throw console.error("Conversations pending rating failed",e),e}throw Error("Something went wrong! Please try again later.")},s=async e=>{try{let n=await l.hi.post("/submit-job-rating/".concat(e.threadid),e);if(n.ok)return await n.json()}catch(e){throw console.error("Submit job rating failed",e),e}throw Error("Something went wrong! Please try again later.")},c=async e=>{try{let n=await l.hi.get("/get-available-meeting-slots",null!=e?e:{});if(n.ok)return await n.json()}catch(e){throw console.error("get-available-meeting-slots failed",e),e}throw Error("Something went wrong! Please try again later.")},u=async e=>new Promise((n,t)=>{let i=l.hi.post("/submituserinput",e);setTimeout(async()=>{try{let e=await i;if(e.ok)n(await e.json());else throw Error("Something went wrong! Please try again later.")}catch(e){console.error("submituserinput failed",e),t(e)}},3e3)}),v=async e=>{try{let n=await l.hi.post("/submit-job-rejection-feedback",e);if(n.ok)return await n.json()}catch(e){throw console.error("Submit job rejection feeback failed",e),e}throw Error("Something went wrong! please try again later.")},p=async e=>{try{let n=await l.hi.post("/meeting/cancel",e);if(n.ok)return await n.json()}catch(e){throw console.error("Cancel meeting failed",e),e}throw Error("Something went wrong! please try again later.")},g=async e=>{try{let n=await l.hi.post("/markconversationstatus/".concat(e.thread_id),e);if(n.ok)return await n.json()}catch(e){throw console.error("mark conversation status failed",e),e}throw Error("Something went wrong! Please try again later.")},h=async e=>{try{let n=await l.hi.post("/update-message/".concat(e.messageId),e);
1if(n.ok)return await n.json()}catch(e){throw console.error("update-message failed",e),e}throw Error("Something went wrong! Please try again later.")},f=async e=>{try{let n=await l.hi.get("/bot-messages",{message_ids:e});if(n.ok)return await n.json()}catch(e){throw console.error("bot-messages failed",e),e}throw Error("Something went wrong! Please try again later.")},x=async function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var t;let o=await l.hi.post("/sendreply/".concat(null!==(t=null==e?void 0:e.context)&&void 0!==t?t:"jobthread").concat(i.m4.queryFromObject(null!=n?n:{})),e);if(o.ok)return await o.json()}catch(e){throw console.error("sendreply/jobthread failed",e),e}throw Error("Something went wrong! Please try again later.")},m=async e=>{try{let n=await l.hi.post("/api/auth/save-audio/update",e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("/api/auth/save-audio/update failed",e),e}},j=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let n=await l.hi.get("/api/auth/save-audio/list",e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("GET /api/auth/save-audio/list failed",e),e}},b=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let n=await l.hi.post("/track-received-push-notification",e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("POST /track-received-push-notification failed",e),e}},y=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let n=await l.hi.post("/markJobAsIrrelevant",e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("POST /markJobAsIrrelevant failed",e),e}}},46955:function(e,n,t){"use strict";t.d(n,{It:function(){return a},OK:function(){return r},P8:function(){return l},ok:function(){return o}});var i=t(23336);let l=async e=>{try{let n=await i.hi.post("/reportsuccessforcredits",e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("report hiring failed",e),e}},o=async()=>{try{let e=await i.hi.post("/getUnRepliedMsgClearReward");if(e.ok)return await e.json();throw await e.json()}catch(e){throw console.error("getUnreadMessagesCredits failed",e),e}},r=async()=>{try{let e=await i.hi.post("/likedfacebookpage");if(e.ok)return await e.json();throw await e.json()}catch(e){throw console.error("likedfacebookpage failed",e),e}},a=async()=>{try{let e=await i.hi.post("/followedtwitterhandle");if(e.ok)return await e.json();throw await e.json()}catch(e){throw console.error("followedtwitterhandle failed",e),e}}},97434:function(e,n,t){"use strict";t.d(n,{Il:function(){return d},Wb:function(){return a},nf:function(){return r},wP:function(){return s}});var i=t(74303),l=t(23336),o=t(86958);let r=async e=>{try{let n=await l.hi.post("/reqempverification",e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("request employer verification failed",e),e}},a=async e=>{try{let n=await l.hi.post("/add-company-workspace",e),t=await (0,o.g)(n);if(n.ok)return t;throw t}catch(e){throw console.error("add company workspace failed",e),e}},d=async function(e){var n;let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null!==(n=null==e?void 0:e.context)&&void 0!==n?n:"";try{let n=await l.hi.post("/sendreply/".concat(o).concat(i.m4.queryFromObject(null!=t?t:{})),e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("replyToApplicant failed",e),e}},s=async e=>{if(!e)return{company:null};try{let n=await l.hi.get("/lookup-company-by-email-domain?email=".concat(encodeURIComponent(e)));if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("lookupCompanyByEmailDomain failed",e),e}}},87858:function(e,n,t){"use strict";t.d(n,{dn:function(){return a},lU:function(){return r},o3:function(){return o},xJ:function(){return d}});var i=t(23336),l=t(86958);let o=async(e,n)=>{try{let t=await i.hi.get("/get-my-screening-questions",{...null==n?void 0:n.searchQuery,workspaceId:e});if(t.ok){let e=await t.json(),n=(0,l.ww)(e);return n}throw await t.json()}catch(e){throw console.error("get screening questions failed",e),e}},r=async e=>{try{let n=await i.hi.post("/update-screening-questions",e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("update screening questions failed",e),e}},a=async e=>{try{let n=await i.hi.post("/setup-stage-automation-on-job",e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("stage automation setup failed",e),e}},d=async e=>{try{let n=await i.hi.post("/api/auth/employer/data-validation/job/questions/upsert",e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("Update data validation questions failed",e),e}}},93499:function(e,n,t){"use strict";t.d(n,{Bu:function(){return r},eQ:function(){return d},mX:function(){return a},xP:function(){return o}});var i=t(23336),l=t(40795);let o=async e=>{try{let n=await i.hi.post("/google-sheet-automation",e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("testGoogleSheetAutomation failed",e),e}},r=async e=>{try{let n=await i.hi.post("/changeconversationassignee",e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("assignApplicationTo failed",e),e}},a=async e=>{try{let n=await i.hi.post("/move-application-to-another-job",e);if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("moveApplicationToAnotherJob failed",e),e}},d=async e=>{try{let n=await i.hi.get("/findjssignals/q".concat(l.m4.queryFromObject(e)));if(n.ok)return await n.json();throw await n.json()}catch(e){throw console.error("investigateMatchCriteria failed",e),e}}},47887:function(e,n,t){"use strict";t.d(n,{f:function(){return l}});var i=t(6847);let l=(0,i.Z)(()=>"matchScore")},35815:function(e,n,t){"use strict";t.d(n,{PO:function(){return r},fY:function(){return l},lc:function(){return a},yG:function(){return o}});var i=t(6847);let l=(0,i.Z)(()=>({files:[],error_files:[]})),o=(0,i.Z)(()=>null),r=(0,i.Z)(()=>({searchText:"",filterId:null})),a=(0,i.Z)(()=>({filterId:null}))},10086:function(e,n,t){"use strict";t.d(n,{H:function(){return a}});var i=t(44847),l=t(23763),o=t(47887);let r=(0,l.y)(o.f);r.debugLabel="applicationsSortAtom";let a=()=>(0,i.KO)(r)},11416:function(e,n,t){"use strict";t.d(n,{X:function(){return a}});var i=t(44847),l=t(23763),o=t(35815);let r=(0,l.y)(o.lc);r.debugLabel="filterIdAtom";let a=()=>(0,i.KO)(r)},28447:function(e,n,t){"use strict";t.d(n,{d:function(){return o}});
1var i=t(22126),l=t(93499);let o=()=>(0,i.useMutation)(e=>(0,l.Bu)(e))},96977:function(e,n,t){"use strict";t.d(n,{_:function(){return o}});var i=t(22126),l=t(49930);let o=()=>(0,i.useMutation)(e=>(0,l.mm)(e))},70878:function(e,n,t){"use strict";t.d(n,{h:function(){return o}});var i=t(46955),l=t(22126);let o=()=>(0,l.useMutation)(()=>(0,i.ok)())},60839:function(e,n,t){"use strict";t.d(n,{a:function(){return o}});var i=t(22126),l=t(8733);let o=()=>(0,i.useMutation)(e=>(0,l.Hv)(e))},571:function(e,n,t){"use strict";t.d(n,{B:function(){return r}});var i=t(22126),l=t(82138),o=t(15851);let r=()=>{let{data:e}=(0,o.T)(),n=null==e?void 0:e.admin_logged_in;return(0,i.useMutation)(e=>{let{event:t}=e;return n&&console.log("[Tracking interaction]",t),(0,l.M5)(e)})}},81684:function(e,n,t){"use strict";t.d(n,{l:function(){return a}});var i=t(49930),l=t(29465),o=t(22126),r=t(15851);let a=e=>{let{id:n}=(0,l.Z)(),{refetch:t}=(0,r.T)();return(0,o.useMutation)(e=>{let{tcId:t,context:l,jobId:o,threadId:r,belongsToEvent:a,skipNotification:d,filtersApplied:s}=e||{},c={...t&&{tcid:t},...l&&{context:l},...o&&{job_id:o},...r&&{threadid:r},...a&&{belongsToEvent:a},...d&&{skip_notification:d},...s&&{filtersApplied:s},workspaceId:n};return(0,i.mr)(c)},{mutationKey:[e||"unlockTalentCard"],onSuccess:()=>{t()}})}},96968:function(e,n,t){"use strict";t.d(n,{a:function(){return x}});var i=t(22126),l=t(94802),o=t(69091),r=t(91987),a=t(10086),d=t(15851),s=t(32582),c=t(85061),u=t(90770),v=t(98949),p=t(36721),g=t(39844),h=t(11416);t(13017).env.NEXT_PUBLIC_STAGE_ENV;var f=t(71521);t(14823);let x=e=>{var n,t,x,m,j,b,y,w,k;let{data:_,options:C}=e,{jobId:S,stageId:I}=_,[z]=(0,h.X)(),A=null!==(t=null==_?void 0:_.filterId)&&void 0!==t?t:null==z?void 0:z.filterId,D=(0,i.useQueryClient)(),{data:{allJobsIdsObject:O}}=(0,s.yq)(),{data:P}=(0,v._)(),{data:E}=(0,d.T)(),[T]=(0,a.H)(),{data:M}=(0,c.c)({data:{jobId:S}}),{db:R,sdk:{firestore:F}}=null!==(x=o.c.getState())&&void 0!==x?x:{},{collection:Z,query:N,where:q,orderBy:J,limit:L,startAfter:W}=null!=F?F:{},U=null==O?void 0:O[S],V=(null==M?void 0:M.modifiedStagesDataIdObj)||{},B=null==V?void 0:V[I],$=(null==B?void 0:B.type)==="candidates",Q=(null==B?void 0:B.type)==="sent",H=$||Q,G="addedToCurrentStageOn",Y=(null==U?void 0:U.originallyCreatedOn)||(null==U?void 0:U.creationDate);+new Date(Y)>1677609e6&&(G="lastApplicationActivityOn");let X=Z(R,p.l.applications_collection);if(X=N(X,q("isMarkedDeleted","==",!1)),(null==_?void 0:_.ofJobId)&&(X=N(X,q("jobid","==",null==_?void 0:_.ofJobId))),(null==_?void 0:_.jobId)||(null==_?void 0:_.teamid))X=N(X,q("teamid","==",null!==(j=null==_?void 0:_.teamid)&&void 0!==j?j:null==U?void 0:null===(m=U.teamid)||void 0===m?void 0:m._id));else{let e=[];null==E||null===(b=E.hiringStatus)||void 0===b||null===(y=b.workspaces)||void 0===y||y.forEach(n=>{var t;null==n||null===(t=n.teams)||void 0===t||t.forEach(n=>{(null==n?void 0:n.teamId)&&e.push(null==n?void 0:n.teamId)})}),e.length>0&&(X=N(X,q("teamid","in",e.slice(0,10))))}I&&(X=N(X,q("stageid","==",I))),A&&(X=N(X,q("showInFiltersIds","array-contains",A))),(null==E?void 0:null===(n=E.permissions)||void 0===n?void 0:n.viewAllJobApplications)||(X=N(X,q("assignee","array-contains",null==E?void 0:E._id))),(null==_?void 0:_.in_stages)&&(X=N(X,q("stageid","in",null==_?void 0:_.in_stages.splice(0,10)))),(null==_?void 0:_.exportedToATS)&&(X=N(X,q("ATSExportStatus.ats","==",null==_?void 0:_.exportedToATS))),$&&"matchScore"===T&&(null==_?void 0:_.isAMatch)!==void 0&&(X=N(X,q("isAMatch","==",null==_?void 0:_.isAMatch))),$&&"matchScore"===T&&(X=N(X,J("isAMatch","desc")),+new Date(Y)>17367102e5&&(X=N(X,J("shortlistingCriteriaScore","desc")))),Q&&"matchScore"===T&&!A&&(X=N(X,J("shortlistingCriteriaScore","desc")));let K=!1;if(null==_?void 0:_.updateByCandidateOn){let e;(e=new Date((null==_?void 0:_.updateByCandidateOn)==="last_week"?Date.now()-6048e5:(null==_?void 0:_.updateByCandidateOn)==="last_month"?Date.now()-2592e6:null==_?void 0:_.updateByCandidateOn)).getTime&&(K=!0,X=N(X,q("updateByCandidateOn",">",e)),X=N(X,J("updateByCandidateOn","desc")))}if(!K&&!(Q&&"matchScore"===T&&!A)){let e=A&&Q&&"matchScore"===T?G:T,n=_.order_by||(H?e:G);"competenceScore"===n&&(n="versionedCompetenceScore.".concat(P.currentVersionOfCompetenceAlgo)),X=N(X,(null==_?void 0:_.get_before)?J(n):J(n,"desc"))}X=N(X,L(null!==(w=null==_?void 0:_.limit)&&void 0!==w?w:g.PX)),((null==_?void 0:_.get_before)||(null==_?void 0:_.get_after))&&(X=N(X,W((null==_?void 0:_.get_before)||(null==_?void 0:_.get_after))));let ee=(0,r.useCallback)(async e=>{if(!e||!Array.isArray(e))return;let n=async()=>Promise.all(e.map(async e=>{let n=await (0,l.Ew)({applicationCard:e,selectedJob:U});return n}));console.log("\uD83D\uDE80 ~ window.Worker not supported");let t=await n();return{modifiedApplicationCards:t.filter(Boolean)}},[S]),en=e=>{("added"===e||"removed"===e)&&D.invalidateQueries({queryKey:["stageCounts",S,I,A||"default"]})};return(0,u.Q)({options:{queryKey:[...(0,f.ow)(I||(null==_?void 0:_.ofJobId)),...A?[A]:[],...H?[T]:["addedToCurrentStageOn"]],getNextPageParam:(e,n)=>{var t;let i=(null==_?void 0:_.limit)||g.PX;if((null==e?void 0:null===(t=e.modifiedApplicationCards)||void 0===t?void 0:t.length)>=i)return n.length+1},...(null==_?void 0:_.realtime)!==!1&&{cacheTime:0},...C},select:ee,projection:l.x2,firebaseQuery:X,realtime:null===(k=null==_?void 0:_.realtime)||void 0===k||k,...!1!==_.realtime&&{onChangeCallback:en},..._.limit&&{limit:_.limit}})}},34277:function(e,n,t){"use strict";t.d(n,{d:function(){return a}});var i=t(10566),l=t(5442),o=t(91987),r=t(66797);let a=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{threadId:t,searchParams:a}=e,d=(0,o.useCallback)(e=>{let n=(0,l.ZP)(e=>{var n,t;e._req_sender_id=(null==e?void 0:null===(n=e.sender)||void 0===n?void 0:n._id)||(null==e?void 0:e.sender),e.locked_message=(0,r.Fe)(null==e?void 0:e.message,{name:null==e?void 0:null===(t=e.sender)||void 0===t?void 0:t.name}),"sendMessageViaVoila"===e.messageType&&delete e.chatbotContext;let i=null==e?void 0:e.jobSignalContext,l=null==e?void 0:e.jobSignal,o=null==e?void 0:e.seekerSignalContext,a=null==e?void 0:e.seekerSignal;i&&delete e.jobSignalContext,l&&delete e.jobSignal,o&&delete e.seekerSignalContext,a&&delete e.seekerSignal,(null!=i?i:l)&&(e.jobSignal=i||l),(null!=o?o:a)&&(e.seekerSignal=o||a)}),t=[e.thread.firstMessage,...e.thread.messages].sort((e,n)=>new Date(e.creationDate).getTime()-new Date(n.creationDate).getTime());return t.map(n)},[]);return(0,i.U)({threadId:t,searchParams:a},{enabled:!!t,select:d,staleTime:0,...n})}},13750:function(e,n,t){"use strict";t.d(n,{H:function(){return o}});
1var i=t(22126),l=t(35930);let o=e=>{let{tcid:n}=e;return(0,i.useQuery)(["ai-call-responses",n],()=>(0,l.cq)({talentCardId:n}),{enabled:!!n})}},28717:function(e,n,t){"use strict";t.d(n,{D:function(){return r},X:function(){return d}});var i=t(22126),l=t(39078),o=t(91987);let r=e=>{let{data:n,options:t}=e;return(0,i.useQuery)(["useGetExternalAtsApplications",n],()=>{let e=async()=>{var e;let t=await (0,l.Wb)(n);return(null==t?void 0:null===(e=t.applications)||void 0===e?void 0:e.length)&&(t.applications.forEach(e=>{var n,t,i;if((null===(n=e.stage_changes)||void 0===n?void 0:n.length)&&e.stage_changes.sort((e,n)=>+new Date(n.updated_date)-+new Date(e.updated_date)),null==e?void 0:null===(t=e.other_applications)||void 0===t?void 0:t.length){let n=null==e?void 0:null===(i=e.other_applications)||void 0===i?void 0:i.find(e=>!!(null==e?void 0:e.posting_id));n&&(e.forPostingId=null==n?void 0:n.posting_id)}else e.posting_id&&(e.forPostingId=e.posting_id)}),t.applications.sort((e,n)=>+new Date(n.createdAt)-+new Date(e.createdAt))),t};return e()},t)},a=e=>{let{data:n,options:t}=e;return(0,i.useQuery)(["useGetExternalAtsApplication",n],()=>{let e=async()=>{let e={...n};"greenhouse"===e.source?(e.exportedCandidateId=e.exportedApplicationId,delete e.exportedApplicationId):delete e.jobId;let t=await (0,l.qg)(e);if(null==t?void 0:t.application){var i,o,r,a,d,s,c,u;if((null==t?void 0:null===(i=t.application)||void 0===i?void 0:null===(o=i.stage_changes)||void 0===o?void 0:o.length)&&t.application.stage_changes.sort((e,n)=>+new Date(n.updated_date)-+new Date(e.updated_date)),null==t?void 0:null===(r=t.application)||void 0===r?void 0:null===(a=r.other_applications)||void 0===a?void 0:a.length){let e=null==t?void 0:null===(s=t.application)||void 0===s?void 0:null===(c=s.other_applications)||void 0===c?void 0:c.find(e=>!!(null==e?void 0:e.posting_id));e&&(t.application.forPostingId=null==e?void 0:e.posting_id)}t.application.allApplicationsOfContact=[];let n=null==t?void 0:null===(d=t.application)||void 0===d?void 0:d.contact;if(n&&"lever"===e.source){let i=await (0,l.Wb)({contactId:n,createdAfter:+new Date(new Date().setMonth(new Date().getMonth()-6)),source:e.source,workspaceId:e.workspaceId}),o=null==i?void 0:null===(u=i.applications)||void 0===u?void 0:u.map(e=>{var n,i,l,o;let r={...e};if((null==r?void 0:null===(n=r.stage_changes)||void 0===n?void 0:n.length)&&r.stage_changes.sort((e,n)=>+new Date(n.updated_date)-+new Date(e.updated_date)),null==r?void 0:null===(i=r.other_applications)||void 0===i?void 0:i.length){let e=null==r?void 0:null===(o=r.other_applications)||void 0===o?void 0:o.find(e=>!!(null==e?void 0:e.posting_id));e&&(r.forPostingId=null==e?void 0:e.posting_id)}return(null==r?void 0:r.archived_date)&&r.forPostingId===t.application.forPostingId&&(t.application.archived_date=Math.max((null==t?void 0:null===(l=t.application)||void 0===l?void 0:l.archived_date)||0,r.archived_date)),r});(null==o?void 0:o.length)&&(o.sort((e,n)=>+new Date(n.createdAt)-+new Date(e.createdAt)),t.application.allApplicationsOfContact=o)}}return t.application};return e()},{enabled:!!n,...t})};function d(e){let{exportedApplicationIds:n=[],jobId:t,source:i,workspaceId:l}=e,[r,d]=(0,o.useState)(0),[s,c]=(0,o.useState)([]),[u,v]=(0,o.useState)(!0),{data:p,error:g,isInitialLoading:h}=a({data:r<n.length?{exportedApplicationId:n[r],jobId:t,source:i,workspaceId:l}:null});return(0,o.useEffect)(()=>{v(!0),d(0),c([])},[n]),(0,o.useEffect)(()=>{!h&&r<n.length&&i&&(p&&c(e=>e.find(e=>e.id===p.id)?e:[...e,p]),r<n.length-1?d(r+1):v(!1),g&&console.log("Error fetching application:",g))},[p,h,g,r,n.length,i]),{exportedApplications:s,isLoading:u,loadedCount:r}}},31643:function(e,n,t){"use strict";t.d(n,{D:function(){return o}});var i=t(22126),l=t(39078);let o=e=>{let{data:n,options:t}=e;return(0,i.useQuery)(["useGetInternalAtsJobs",n],()=>(0,l.eJ)(n),{...t,enabled:!!n.source})}},51344:function(e,n,t){"use strict";t.d(n,{M:function(){return o}});var i=t(22126),l=t(39078);let o=e=>{let{data:n,options:t}=e;return(0,i.useQuery)(["useGetExternalAtsStages",n],()=>(0,l.EY)(n),{...t,enabled:!!n.source})}},64626:function(e,n,t){"use strict";t.d(n,{o:function(){return r}});
1var i=t(22126),l=t(87858),o=t(29465);let r=(e,n)=>{let{id:t}=(0,o.Z)();return(0,i.useQuery)(["getScreeningQuestions",t,null==e?void 0:e.searchQuery],()=>(0,l.o3)(t,e),{...n})}},10566:function(e,n,t){"use strict";t.d(n,{U:function(){return r},f:function(){return o}});var i=t(22126),l=t(96863);let o=e=>["thread-data",e],r=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{threadId:t,searchParams:r}=e,{select:a,...d}=n;return(0,i.useQuery)(o(t),()=>(0,l.ow)({threadId:t,searchParams:r,select:a}),{retry:!1,...d})}},31041:function(e,n,t){"use strict";t.d(n,{O:function(){return a}});var i=t(98949),l=t(32582),o=t(85061),r=t(12776);let a=()=>{let{track:e}=(0,r.z)(),{data:n}=(0,i._)(),{data:t}=(0,l.yq)(),{allJobsIdsObject:a}=t||{},d=(t,i,l)=>{var r,d,s,c,u,v,p,g,h,f,x,m,j,b,y;let w=(0,o.F)(null==t?void 0:t.jobid),k={...l};k.applicationid=null==t?void 0:t.id,k.context="application",k.tcid=null==t?void 0:t.tcid,(null==t?void 0:null===(r=t.teamApplicantData)||void 0===r?void 0:r.trustScoreStatus)&&(null==t?void 0:null===(d=t.teamApplicantData)||void 0===d?void 0:null===(s=d.trustScoreStatus)||void 0===s?void 0:s.enabled)&&(k.trustScoreEnabled=null==t?void 0:null===(c=t.teamApplicantData)||void 0===c?void 0:c.trustScoreStatus.enabled),k.jobid=null==t?void 0:t.jobid,(null==a?void 0:a[null==t?void 0:t.jobid])&&(k.jobtag=(null==a?void 0:null===(g=a[null==t?void 0:t.jobid])||void 0===g?void 0:g.matchPreferences)&&(null==a?void 0:null===(h=a[null==t?void 0:t.jobid])||void 0===h?void 0:h.matchPreferences.tags)?null==a?void 0:null===(f=a[null==t?void 0:t.jobid])||void 0===f?void 0:null===(x=f.matchPreferences)||void 0===x?void 0:null===(m=x.tags)||void 0===m?void 0:m[0]:void 0,k.jobstack=null==a?void 0:null===(j=a[null==t?void 0:t.jobid])||void 0===j?void 0:j.stack),k.unlocked=null==t?void 0:t.unlocked,k.stageid=null==t?void 0:t.stageid,k.isCSD=!!(null==t?void 0:t.belongsToCollections)&&!!(null==t?void 0:null===(u=t.belongsToCollections)||void 0===u?void 0:u.cutshort_curated_new),k.CPQI=null==t?void 0:null===(v=t.versionedCompetenceScore)||void 0===v?void 0:v[null==n?void 0:n.currentVersionOfCompetenceAlgo],k.eligible_for_free_unlock=!!(null==t?void 0:t.eligible_for_free_unlock),(null==w?void 0:null===(p=w.modifiedStagesDataIdObj)||void 0===p?void 0:p[null==t?void 0:t.stageid])&&(k.stage_type=null==w?void 0:null===(b=w.modifiedStagesDataIdObj)||void 0===b?void 0:null===(y=b[null==t?void 0:t.stageid])||void 0===y?void 0:y.type),e(i,k)};return{applicationCardTrackEventHelper:d}}},64130:function(e,n,t){"use strict";t.d(n,{$:function(){return k}});var i=t(22126),l=t(72046),o=t(66555),r=t(85966),a=t(80308),d=t(91987),s=t(59684),c=t(66797),u=t(70878),v=t(34005),p=t(97434);let g=e=>{let{mutationKey:n}=e;return(0,i.useMutation)(e=>{let{data:n,queryParam:t}=e;return(0,p.Il)(n,t)},{mutationKey:[...n]})},h=()=>(0,i.useMutation)(e=>(0,r.tF)(e));var f=t(571),x=t(15851),m=t(34277),j=t(10566),b=t(35189),y=t(12776),w=t(31041);let k=e=>{let{applicationData:n,applicationId:t,jobId:p,stageData:k,stageId:_}=e,{track:C}=(0,y.z)(),{data:S}=(0,x.T)(),I=(0,b.x)(),z=h(),A=g({mutationKey:["replyToApplicant","applicationCardModal"]}),{data:D}=(0,m.d)({threadId:null==n?void 0:n.threadid}),O=(0,i.useMutation)(r.zJ),P=(0,u.h)(),E=(0,f.B)(),T=(0,v.N)(),{applicationCardTrackEventHelper:M}=(0,w.O)(),R=(null==k?void 0:k.type)==="candidates"?"application_review":"application_engage",{trackActivityComplete:F}=(0,a.m)(R,{jobid:p,applicationid:t,current_stage_id:_,current_stage_title:null==k?void 0:k.title,current_stage_type:null==k?void 0:k.type}),[Z,N]=(0,d.useState)(!1),q=async e=>{try{var i,r,a;let{isVoilaActive:d,message:u,options:v,successCallback:p}=e;if(N(!0),(null==S?void 0:null===(i=S.planStatus)||void 0===i?void 0:i.name)==="free"&&!(null==n?void 0:n.unlocked)){I("message_applications"),N(!1);return}let g=(new Date().getTime()+Math.random()).toString(),h={threadid:null==n?void 0:n.threadid,message:u,receiverid:null==n?void 0:n.csuid},f=+new Date;if(o.E.setQueryData((0,j.f)(null==n?void 0:n.threadid),e=>(0,l.D5)(e,{message:{message:u,locked_message:(0,c.Fe)(u,{name:null==S?void 0:S.firstName}),sentStatus:"sending",clientResourceId:g,_id:f.toString(),sender:S,chatbotContext:d?"user_message":void 0}})),null==p||p(),d){h.chatbot_context="user_message",(null==v?void 0:v.not_free_text)||(h.free_text=!0),(null==h?void 0:h.free_text)&&(h={...h,...(null===(r=null==D?void 0:D.at(-1))||void 0===r?void 0:r.freeTextOption)&&(null===(a=null==D?void 0:D.at(-1))||void 0===a?void 0:a.freeTextOption)}
1),(null==v?void 0:v.botcontext)&&(h.botcontext=v.botcontext),(null==v?void 0:v.value)&&(h.value=v.value),(null==v?void 0:v.miscData)&&(h.miscData=v.miscData);try{let e=await z.mutateAsync(h);N(!1);let t=null==e?void 0:e.saved_message,i=(null==e?void 0:e.next_messages)||[];o.E.setQueryData((0,j.f)(null==n?void 0:n.threadid),e=>(0,l.Iv)(e,{messageId:f.toString(),recipe:()=>({...t,sentStatus:"sent"})}));for(let e=0;e<(null==i?void 0:i.length);e+=1)o.E.setQueryData((0,j.f)(null==n?void 0:n.threadid),n=>(0,l.D5)(n,{message:{...null==i?void 0:i[e],sentStatus:"sent"},afterMessageId:null==t?void 0:t._id}))}catch(e){C("Failed to send voila automation message",{message:u,threadId:null==n?void 0:n.threadid,applicationId:t}),o.E.setQueryData((0,j.f)(null==n?void 0:n.threadid),e=>(0,l.Iv)(e,{messageId:f.toString(),recipe:e=>({...e,sentStatus:"failed"})})),N(!1)}}else{try{let e=await (null==A?void 0:A.mutateAsync({data:h,queryParam:{resourceId:g}}));o.E.setQueryData((0,j.f)(null==n?void 0:n.threadid),n=>(0,l.Iv)(n,{messageId:f.toString(),recipe:n=>({...n,...null==e?void 0:e.message,sentStatus:"sent"})})),(null==v?void 0:v.brief_message)&&(null==E||E.mutate({event:"employer_messaged_without_unlocking",applicationid:n.id,tcid:n.tcid,jobid:n.jobid}),C("Emp messaged candidate from incoming stage",{thread:h.threadid,message:h.message}),null==T||T.mutate({subject:"Emp messaged candidate from incoming stage",message:"".concat(null==S?void 0:S.name," from ").concat(null==S?void 0:S.company," (value score ").concat(null==S?void 0:S.empValueScore,"<br> admin link https://cutshort.io/shadmin/jobs?createdbyid=").concat(null==S?void 0:S._id,"<br> user id ").concat(null==S?void 0:S._id,"<br> phone ").concat(null==S?void 0:S.cellphoneNumber,"<br> email ").concat(null==S?void 0:S.primaryEmailId,") messaged candidate from incoming stage - (").concat(JSON.stringify(h),") - application https://cutshort.io/profile/workflow?application=").concat(null==n?void 0:n.id,"<br> job ").concat(null==n?void 0:n.jobid)})),M(n,"Sent message to candidate from UI"),F({complete_reason:"sent_message"}),N(!1),O.mutate(null==n?void 0:n.threadid)}catch(e){C("Failed to send reply message",{message:u,threadId:null==n?void 0:n.threadid,applicationId:t}),o.E.setQueryData((0,j.f)(null==n?void 0:n.threadid),e=>(0,l.Iv)(e,{messageId:f.toString(),recipe:e=>({...e,sentStatus:"failed"})})),(null==v?void 0:v.brief_message)&&(null===s.$||void 0===s.$||s.$.error({content:"Your message could not be sent. Please try again"})),N(!1)}await P.mutateAsync()}}catch(e){M(n,"Failed to send message to candidate from UI")}};return{sendMessage:q,isSendingMessage:Z}}},34794:function(e,n,t){"use strict";t.d(n,{Q:function(){return o}});var i=t(85061),l=t(27688);let o=e=>{var n,t;let o=(0,l.useRouter)(),r=null==o?void 0:null===(n=o.query)||void 0===n?void 0:null===(t=n.job)||void 0===t?void 0:t.toString(),{data:a}=(0,i.c)({data:{jobId:r}}),{modifiedStagesDataIdObj:d}=a||{};return null==d?void 0:d[e]}},69105:function(e,n,t){"use strict";t.d(n,{r:function(){return c}});var i=t(98949),l=t(15851),o=t(91987),r=t(80827),a=t.n(r);let d={socketRef:null},s=()=>{var e;return null===(e=d.socketRef)||void 0===e?void 0:e.current},c=(e,n)=>{let t=(0,o.useRef)(null),r=(0,o.useRef)(n);r.current=n;let[c,u]=(0,o.useState)(0),{isFetched:v}=(0,i._)(),{data:p,isFetched:g}=(0,l.T)(),h=v&&g&&c;(0,o.useEffect)(()=>{h&&s().emit("add_new_user",{req_user_id:null==p?void 0:p._id,is_admin_faking_login:!!(null==p?void 0:p.admin_faking_user)})},[h]),(0,o.useEffect)(()=>{if(!s()){let e=a()("https://socket.cutshort.io",{transports:["websocket"]});t.current=e,d.socketRef=t;let n=()=>{u(e=>e+1)};e.on("connect",n)}let n=async e=>{r.current(e)};return s().on(e,n),()=>{s().off(e,n)}},[e])}},31745: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.