1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="7456d41b-79ed-4524-90b3-3b4fa625077a",e._sentryDebugIdIdentifier="sentry-dbid-7456d41b-79ed-4524-90b3-3b4fa625077a")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5855],{95432:function(e,r,t){var n=t(52322),i=t(47023),a=t(19613),l=t(30900),s=t(61231),o=t(23627),c=t(97203),d=t(76467),u=t(88393),_=t(13980),E=t.n(_),p=t(2784),v=t(47831);let f=new Map([["participant_removed",{title:"This review is no longer assigned to you",description:"It was removed from the cycle, so there is nothing left to decline."}],["illegal_participant_transition",{title:"This review can no longer be declined",description:"It has already been submitted, cancelled or left to expire."}]]),h={title:"Review declined, but this page did not update",description:"The decline went through. Refresh the page to see its new status."},R={title:"We could not decline this review",description:"Something went wrong on our end. Refresh the page and try again."},g=(e,r,t)=>{var n,i;let l=null!==(i=null!==(n=null==e?void 0:e.declined_reason)&&void 0!==n?n:null==e?void 0:e.reason)&&void 0!==i?i:"";return"declined_reason_too_long"!==r?l:[l,"Your reason is ".concat((0,a.Ao)(t)," characters. Shorten it and try again.")].filter(Boolean).join(" ")},m=e=>{let{reason:r,fieldErrors:t}=e;return f.has(r)||!!g(t,r,"")},b=(e,r)=>"You have answered ".concat(e," of ").concat(r," ").concat(1===r?"question":"questions",". ").concat(1===e?"It":"They"," will not be submitted."),x=e=>{let{show:r,onClose:t,participant:_,rpid:E,subject:x=null,maxCharacters:D,answeredCount:y,questionCount:C,onDeclined:w}=e,I=null!=E?E:null==_?void 0:_.rpid,[N,A]=(0,p.useState)(""),[T,L]=(0,p.useState)(""),[P,O]=(0,p.useState)(null),S=(0,p.useRef)(!1),j=(0,p.useRef)(!0);(0,p.useEffect)(()=>(j.current=!0,()=>{j.current=!1}),[]);let{track:F}=(0,o.Ke)({app:"portal"}),U=e=>{(0,u.N2)(e,"DeclineReviewModal.onDeclined"),O(h)},V=(0,s.qy)({rpid:I,shouldToast:e=>!j.current||!m(e),onSuccess:(e,r)=>{try{Promise.resolve(w(r.rpid)).catch(U)}catch(e){U(e)}try{F(l.dW.PERF_REVIEW_DECLINED,{has_reason:!!r.reason,relationship:null==_?void 0:_.relationship,surface:l.S9.PERFORMANCE_REVIEWS})}catch(e){(0,u.N2)(e,"DeclineReviewModal.track")}},onError:(e,r)=>{let{reason:t,fieldErrors:n}=(0,s.AN)(e),i=f.get(t);if(i){O(i);return}S.current=!1,L(g(n,t,null==r?void 0:r.reason))}}),{isSending:M=!1,wasAccepted:Z=!1,refusedReason:q=null}=V,k=V.isPending||M,W=Z||!!q,B=Z&&!V.isSuccess&&h||f.get(q)||null,G=null!=P?P:B,Y=()=>{t()},K=k?"Close":"Cancel",H=(0,a.tP)(N,D),z=Number.isFinite(y)&&Number.isFinite(C)&&y>0;return(0,n.jsx)(c.B,{centerY:!0,fullWidth:!0,maxWidth:"480px",onClose:Y,show:r,title:"Decline review",children:(0,n.jsxs)("form",{className:"flex flex-col gap-4 fs-exclude","data-hj-suppress":!0,"data-hs-do-not-collect":"true",onSubmit:e=>{if(e.preventDefault(),!I){(0,u.N2)(Error("DeclineReviewModal submitted with no rpid"),"DeclineReviewModal.submit"),O(R);return}S.current||k||W||H||(S.current=!0,L(""),V.mutate({rpid:I,reason:N.trim()||void 0}))},children:[!!G&&(0,n.jsxs)("div",{className:"flex flex-col gap-1 rounded-lg border border-red-200 bg-red-50 p-4",role:"alert",children:[(0,n.jsx)(d.Z,{color:"text-red",variant:"labelValue",children:G.title}),(0,n.jsx)(d.Z,{color:"text-gray-700",variant:"bodySmall",children:G.description})]}),!G&&(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)(d.Z,{variant:"body",children:"Declining removes this review from your pending queue, and you will not be able to submit it afterwards. You can add a reason below if you want to explain why."}),!!z&&(0,n.jsx)(d.Z,{variant:"body",weight:"font-medium",children:b(y,C)})]}),(0,n.jsxs)("div",{className:"p-3 bg-gray-50 rounded-lg",children:[(0,n.jsx)(d.Z,{className:"block",variant:"label",children:"Employee"}),(0,n.jsx)(d.Z,{variant:"labelValue",children:(0,v.Qp)(x)})]}),!G&&(0,n.jsx)(a.ZP,{error:T,label:"Reason (optional)",maxLength:D,name:"decline_reason",onChange:A,placeholder:"Why are you declining this review?",rows:4,value:N}),(0,n.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[!!G&&(0,n.jsx)(i.Z,{design:"secondary",onClick:Y,type:"button",children:"Close"}),!G&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.Z,{design:"secondary",onClick:Y,type:"button",children:K}),(0,n.jsx)(i.Z,{disabled:k||H||W,isLoading:k,type:"submit",children:k?"Declining...":"Decline review"})]})]})]})})};x.propTypes={show:E().bool.isRequired,onClose:E().func.isRequired,participant:E().shape({rpid:E().string,relationship:E().string}
1).isRequired,rpid:E().string,subject:E().shape({rsid:E().string,job_title_snapshot:E().string,user:E().shape({uid:E().string,name:E().string})}),maxCharacters:E().number,answeredCount:E().number,questionCount:E().number,onDeclined:E().func.isRequired},r.Z=x},47831:function(e,r,t){t.d(r,{Qp:function(){return s}});var n=t(52322),i=t(13980),a=t.n(i),l=t(76467);let s=e=>e?e.user?e.user.name||"Unnamed employee":"Former employee":"Employee removed from this cycle",o=e=>{let{subject:r}=e,t=null==r?void 0:r.job_title_snapshot;return(0,n.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,n.jsx)(l.Z,{variant:"labelValue",children:s(r)}),!!t&&(0,n.jsx)(l.Z,{variant:"caption",children:t})]})};o.propTypes={subject:a().shape({rsid:a().string,job_title_snapshot:a().string,user:a().shape({uid:a().string,name:a().string})})},r.ZP=o},16049:function(e,r,t){var n=t(52322),i=t(2369),a=t(92942),l=t(13980),s=t.n(l),o=t(2784),c=t(47023);let d=e=>{let{home:r,links:t}=e,l=e=>"undefined"===e?"unknown":e;return(0,n.jsx)("nav",{"aria-label":"Breadcrumb",children:(0,n.jsxs)("ul",{className:"flex w-full flex-row items-center breadcrumbs overflow-x-auto py-2 md:py-4",children:[(0,n.jsx)("li",{className:"flex items-center",children:(0,n.jsx)(c.Z,{asDefaultATag:!0,className:"!px-0 !py-0",design:"plain",href:r,children:(0,n.jsx)(a.FontAwesomeIcon,{className:"text-lg text-gray-400 hover:text-blue-dark",icon:i.J9Y,size:"sm"})})}),t.map((e,r)=>{let s=r+1===t.length,d="Link"===e.nodeType||"a"===e.nodeType;return(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)("li",{"aria-hidden":"true",className:"text-sm flex items-center",children:(0,n.jsx)(a.FontAwesomeIcon,{className:"text-xs text-gray-400 px-2",icon:i._tD,size:"xs"})}),(0,n.jsxs)("li",{className:"font-medium text-sm flex items-center",children:[!!d&&(0,n.jsx)("a",{"aria-current":s?"page":void 0,className:"text-sm whitespace-nowrap ".concat(s?"text-blue-dark":""),href:e.href,children:l(e.name)}),"Button"===e.nodeType&&(0,n.jsx)(c.Z,{asDefaultATag:!0,className:"text-blue-dark",design:"plain",href:e.href,children:l(e.name)}),!!(!d&&"Button"!==e.nodeType)&&(0,n.jsx)("span",{className:"text-sm whitespace-nowrap",children:l(e.name)})]})]},"".concat(e.href,"-").concat(r))})]})})};d.propTypes={home:s().string.isRequired,links:s().arrayOf(s().shape({nodeType:s().oneOf(["Link","a","Button"]).isRequired,href:s().string.isRequired,name:s().string.isRequired}))},d.defaultProps={links:[]},r.Z=d},19613:function(e,r,t){t.d(r,{Ao:function(){return d},tP:function(){return _}});var n=t(52322),i=t(12524),a=t.n(i),l=t(13980),s=t.n(l),o=t(2784),c=t(76467);let d=e=>[...null!=e?e:""].length,u=e=>Number.isFinite(e)&&e>0,_=(e,r)=>!!u(r)&&!((null!=e?e:"").length<=r)&&d(e)>r,E=e=>{let{name:r,value:t="",onChange:i,onBlur:l,maxLength:s,label:E,ariaLabelledBy:p,description:v,error:f,required:h=!1,rows:R=4,placeholder:g,disabled:m=!1,className:b,ariaDescribedBy:x}=e,D=(0,o.useId)(),y="".concat(D,"-").concat(r),C="".concat(D,"-counter"),w=v?"".concat(D,"-description"):void 0,I=f?"".concat(D,"-error"):void 0,N="".concat(D,"-overflow"),A=d(t),T=u(s),L=_(t,s),P=[x,w,T?C:void 0,L?N:void 0,I].filter(Boolean).join(" ")||void 0,O=(0,o.useCallback)(e=>{i(e.target.value)},[i]);return(0,n.jsxs)("div",{className:a()("flex flex-col gap-1",b),children:[!!E&&(0,n.jsxs)(c.Z,{as:"label",htmlFor:y,variant:"label",children:[E,!!h&&(0,n.jsx)("span",{"aria-hidden":"true",className:"text-red-400 text-xs ml-1",children:"*"})]}),(0,n.jsx)("textarea",{"aria-describedby":P,"aria-invalid":!!f||L||void 0,"aria-labelledby":E?void 0:p,"aria-required":h||void 0,className:a()("w-full appearance-none rounded-lg border bg-white px-3 py-2 leading-tight text-gray-700","transition-colors duration-200 focus:outline-none focus:ring-2 focus:border-transparent","disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed",f||L?"border-red-400 focus:ring-red-500":"border-gray-300 focus:ring-blue-500"),disabled:m,id:y,name:r,onBlur:l,onChange:O,placeholder:g,rows:R,value:null!=t?t:""}),(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[!!v&&(0,n.jsx)(c.Z,{color:"text-gray-500",id:w,variant:"caption",children:v}),!!L&&(0,n.jsxs)(c.Z,{color:"text-red-400",id:N,variant:"caption",children:["Shorten this by ",A-s," characters to save it."]}),!!f&&(0,n.jsx)(c.Z,{color:"text-red-400",id:I,variant:"caption",children:f})]}),!!T&&(0,n.jsxs)(c.Z,{className:"shrink-0 whitespace-nowrap",color:L?"text-red-400":"text-gray-500",id:C,variant:"caption",children:[A,"/",s," characters"]})]})]})};E.propTypes={name:s().string.isRequired,value:s().string,onChange:s().func.isRequired,onBlur:s().func,maxLength:s().number,label:s().string,ariaLabelledBy:s().string,description:s().string,error:s().string,required:s().bool,rows:s().number,placeholder:s().string,disabled:s().bool,className:s().string,ariaDescribedBy:s().string},r.ZP=E},30900:function(e,r,t){t.d(r,{S9:function(){return a},V$:function(){return i},dW:function(){return n}});let n=Object.freeze({CV_ANALYZER_VIEWED:"cv_analyzer_viewed",CV_ANALYZER_UPLOAD_STARTED:"cv_analyzer_upload_started",CV_ANALYZER_UPLOAD_SUCCEEDED:"cv_analyzer_upload_succeeded",CV_ANALYZER_UPLOAD_FAILED:"cv_analyzer_upload_failed",CV_ANALYZER_RESULTS_VIEWED:"cv_analyzer_results_viewed",CV_ANALYZER_IMPORT_CLICKED:"cv_analyzer_import_clicked",CV_ANALYZER_IMPORT_SUCCEEDED:"cv_analyzer_import_succeeded",CV_ANALYZER_IMPROVE_CLICKED:"cv_analyzer_improve_clicked",CV_ANALYZER_IMPROVE_STARTED:"cv_analyzer_improve_started",CV_ANALYZER_IMPROVE_CONFIRMED:"cv_analyzer_improve_confirmed",CV_BUILDER_VIEWED:"cv_builder_viewed",CV_MANAGER_CREATE_CLICKED:"cv_manager_create_clicked",CV_CREATE_SUBMITTED:"cv_create_submitted",CV_CREATE_SUCCEEDED:"cv_create_succeeded",CV_TEMPLATE_SELECTED:"cv_template_selected",CV_DOWNLOAD_CLICKED:"cv_download_clicked",CV_DOWNLOAD_SUCCEEDED:"cv_download_succeeded",CV_TRIAL_STARTED:"cv_trial_started",HIRING_EXPORT_CONFIGURATOR_VIEWED:"hiring_export_
1configurator_viewed",HIRING_EXPORT_DATASET_SELECTED:"hiring_export_dataset_selected",HIRING_EXPORT_GENERATE_SUBMITTED:"hiring_export_generate_submitted",HIRING_EXPORT_GENERATE_SUCCEEDED:"hiring_export_generate_succeeded",HIRING_EXPORT_QUEUED:"hiring_export_queued",HIRING_EXPORT_GENERATE_FAILED:"hiring_export_generate_failed",HIRING_EXPORT_DOWNLOAD_CLICKED:"hiring_export_download_clicked",HIRING_EXPORT_RETRY_CLICKED:"hiring_export_retry_clicked",HIRING_EXPORT_DELETE_CLICKED:"hiring_export_delete_clicked",PAYWALL_SHOWN:"paywall_shown",UPGRADE_CLICKED:"upgrade_clicked",UPGRADE_PLAN_SELECTED:"upgrade_plan_selected",UPGRADE_CHECKOUT_SUBMITTED:"upgrade_checkout_submitted",UPGRADE_CHECKOUT_PENDING:"upgrade_checkout_pending",UPGRADE_CHECKOUT_FAILED:"upgrade_checkout_failed",PERF_ORG_DEPT_CREATED:"perf_org_dept_created",PERF_ORG_BULK_ASSIGNED:"perf_org_bulk_assigned",PERF_ORG_COVERAGE_VIEWED:"perf_org_coverage_viewed",PERF_REVIEW_INBOX_VIEWED:"perf_review_inbox_viewed",PERF_REVIEW_FORM_OPENED:"perf_review_form_opened",PERF_REVIEW_DRAFT_SAVED:"perf_review_draft_saved",PERF_REVIEW_SUBMITTED:"perf_review_submitted",PERF_REVIEW_SUBMIT_FAILED:"perf_review_submit_failed",PERF_REVIEW_DECLINED:"perf_review_declined",PERF_CYCLE_BUILDER_VIEWED:"perf_cycle_builder_viewed",PERF_CYCLE_STEP_COMPLETED:"perf_cycle_step_completed",PERF_CYCLE_CREATED:"perf_cycle_created",PERF_CYCLE_LAUNCH_SUBMITTED:"perf_cycle_launch_submitted",PERF_CYCLE_LAUNCH_SUCCEEDED:"perf_cycle_launch_succeeded",PERF_CYCLE_LAUNCH_FAILED:"perf_cycle_launch_failed",PERF_CYCLE_LAUNCH_STALLED:"perf_cycle_launch_stalled",PERF_CYCLE_LIST_VIEWED:"perf_cycle_list_viewed",PERF_CYCLE_CLOSED:"perf_cycle_closed",PERF_CYCLE_RELEASED:"perf_cycle_released",PERF_REMINDER_SENT_MANUAL:"perf_reminder_sent_manual",PERF_NOMINEES_APPROVED:"perf_nominees_approved",PERF_MODERATION_DECIDED:"perf_moderation_decided",PERF_RESULTS_ACKNOWLEDGED:"perf_results_acknowledged",PERF_APPEAL_RAISED:"perf_appeal_raised",PERF_APPEAL_DECIDED:"perf_appeal_decided",PERF_RESULTS_VIEWED:"perf_results_viewed",PERF_PEERS_NOMINATED:"perf_peers_nominated"}),i=Object.freeze({SUBSCRIPTION_REQUIRED:"subscription_required",CV_PARSE_LIMIT:"cv_parse_limit",CV_DOWNLOAD_LIMIT:"cv_download_limit",CV_COUNT_LIMIT:"cv_count_limit",PREMIUM_TEMPLATE:"premium_template",IMPROVE_CREDITS:"improve_credits",DATA_EXPORT:"data_export",PERFORMANCE_MODULE:"performance_module"}),a=Object.freeze({CV_ANALYZER:"cv_analyzer",CV_BUILDER:"cv_builder",CV_MANAGER:"cv_manager",HIRING_EXPORT:"hiring_export",DOWNLOAD_CENTER:"download_center",ORG_STRUCTURE:"org_structure",PERFORMANCE_REVIEWS:"performance_reviews",DASHBOARD:"dashboard",ACCOUNT:"account",BILLING:"billing"})},61231:function(e,r,t){t.d(r,{Cz:function(){return I},fM:function(){return w},WL:function(){return N},z8:function(){return V},AN:function(){return P},qy:function(){return G},jg:function(){return B},rv:function(){return Z},Ui:function(){return M},hx:function(){return q},Hq:function(){return k}});var n=t(59820),i=t(14010),a=t(87686),l=t(2784),s=t(78298),o=t(21895);function c(e,r){return e.findAll(r.filters).map(e=>r.select?r.select(e):e.state)}var d=t(60418),u=t(62202),_=t(88393),E=t(47477),p=t(82036),v=t(84475),f=t(45558);let h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(p.JW,"tenant/").concat((0,E.d_)(),"/").concat(e)},R="reviewInbox",g="reviewParticipant",m=["declineReviewParticipant"],b=new Set(["participant_removed","illegal_participant_transition"]),x=e=>{let{reason:r}=e;return b.has(r)},D={inboxRoot:[R],reviewRoot:[g],review:e=>[g,e]},y=e=>Object.fromEntries(Object.entries(e).filter(e=>{let[,r]=e;return!!r})),C=function(){let{userId:e,status:r,page:t,perPage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[R,e,y({status:r,page:t,per_page:n})]},w={FEATURE_DISABLED:"feature_disabled",SUBSCRIPTION_REQUIRED:"subscription_required",FORBIDDEN:"forbidden"},I=new Set(["participant_removed","subject_removed","review_window_closed","submission_final","illegal_participant_transition"]),N=(e,r)=>!!r&&(null==e?void 0:e.can_decline)===!0&&((null==e?void 0:e.can_save_draft)===!0||(null==e?void 0:e.can_submit)===!0),A=new Set(["__proto__","constructor","prototype"]),T=e=>{let r=null==e?void 0:e.reason;return"string"!=typeof r||A.has(r)?null:r},L=(e,r)=>403!==e?T(r):(null==r?void 0:r.subscription_required)?w.SUBSCRIPTION_REQUIRED:(null==r?void 0:r.reason)==="reviews_disabled"?w.FEATURE_DISABLED:w.FORBIDDEN,P=function(e){var r,t;let{fallback:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null==e?void 0:null===(r=e.response)||void 0===r?void 0:r.status;return{status:i,reason:L(i,null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data),message:(0,f.g8)(i,e,{fallback:n}),fieldErrors:(0,f._I)(e)}},O=(e,r)=>{try{return!e(r)}catch(e){return(0,_.N2)(e,"toastReviewError.shouldToast"),!1}},S=(e,r)=>{let{fallback:t,context:n,shouldToast:i,toastId:a}=r,l=P(e,{fallback:t});if((0,_.N2)(e,n,{statusCode:l.status}),401!==l.status&&403!==l.status&&!(i&&O(i,l))){if(a){u.default.error(l.message,{id:a});return}u.default.error(l.message)}},j=e=>{let{reason:r}=e;return I.has(r)},F=["rating_value","cannot_assess","text_value","choice_value"],U=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(e=>({...Object.fromEntries(F.filter(r=>Object.prototype.hasOwnProperty.call(null!=e?e:{},r)).map(r=>[r,e[r]])),question:null==e?void 0:e.rcqid}))},V=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new Map(e.map(e=>[e.rcqid,e]))},M=function(){let{userId:e,status:r,page:t,perPage:i,enabled:a=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=C({userId:e,status:r,page:t,perPage:i}),[,,o]=s,c=!(0,E.Xu)()||!e,u=(0,n.a)({queryKey:s,enabled:!!a&&!c,queryFn:async()=>(await d.Z.get(h("users/".concat(e,"/reviews")),{params:o,headers:(0,v.g0)({realm:"hr"})})).data}),_=(0,l.useMemo)(()=>u.error?P(u.error,{fallback:"We could not load your reviews. Please try again."}):null,[u.error]);return{...u,isMissingContext:c,reviewError:_}},Z=function(){let{rpid:e,enabled:r=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!(0,E.Xu)()||!e,i=(0,n.a)({queryKey:D.review(e),enabled:!!r&&!t,queryFn:async()=>{var r;return null===(r=(await d.Z.get(h("review-participants/".concat(e)),{headers:(0,v.g0)({realm:"hr"})})).data)||void 0===r?void 0:r.data}}),a=(0,l.useMemo)(()=>i.error?P(i.error,{fallback:"We could not load this review. Please try again."}
1):null,[i.error]);return{...i,isMissingContext:t,reviewError:a}},q=function(){let{onSuccess:e,onError:r,onSettled:t,onMutate:n,...l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=(0,i.NL)();return(0,a.D)({...l,mutationFn:async e=>{var r;let{rpid:t,answers:n}=e;return null===(r=(await d.Z.patch(h("review-participants/".concat(t,"/draft")),{answers:U(n)},{headers:(0,v.g0)({realm:"hr"})})).data)||void 0===r?void 0:r.data},onMutate:n,onSuccess:(r,t,n)=>{s.invalidateQueries({queryKey:D.inboxRoot}),null==e||e(r,t,n)},onError:(e,t,n)=>{S(e,{fallback:"This review can no longer be saved. Reload the page to see its current status.",context:"useSaveReviewDraft",shouldToast:j,toastId:"review-draft-terminal"}),null==r||r(e,t,n)},onSettled:t})},k=function(){let{onSuccess:e,onError:r,onSettled:t,onMutate:n,...l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=(0,i.NL)();return(0,a.D)({...l,mutationFn:async e=>{var r;let{rpid:t,answers:n}=e;return null===(r=(await d.Z.post(h("review-participants/".concat(t,"/submit")),{answers:U(n)},{headers:(0,v.g0)({realm:"hr"})})).data)||void 0===r?void 0:r.data},onMutate:n,onSuccess:(r,t,n)=>{s.invalidateQueries({queryKey:D.inboxRoot}),s.invalidateQueries({queryKey:D.reviewRoot}),null==e||e(r,t,n)},onError:(e,t,n)=>{S(e,{fallback:"Failed to submit your review. Please try again.",context:"useSubmitReview"}),null==r||r(e,t,n)},onSettled:t})},W=e=>r=>{var t;return!!e&&(null===(t=r.state.variables)||void 0===t?void 0:t.rpid)===e},B=function(){let{rpid:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,r){let t=(0,i.NL)(void 0);return function(e={},r){let t=(0,i.NL)(r).getMutationCache(),n=l.useRef(e),a=l.useRef();return a.current||(a.current=c(t,e)),l.useEffect(()=>{n.current=e}),l.useSyncExternalStore(l.useCallback(e=>t.subscribe(()=>{let r=(0,s.Q$)(a.current,c(t,n.current));a.current!==r&&(a.current=r,o.V.schedule(e))}),[t]),()=>a.current,()=>a.current)}({filters:{...e,status:"pending"}},t).length}({mutationKey:m,predicate:W(e)})>0},G=function(){let{rpid:e,onSuccess:r,onError:t,onSettled:n,onMutate:l,shouldToast:s,...o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=(0,i.NL)(),u=W(e),_=B({rpid:e}),E=c.getMutationCache().find({mutationKey:m,predicate:e=>u(e)&&("success"===e.state.status||"error"===e.state.status&&x(P(e.state.error)))});return{...(0,a.D)({...o,mutationKey:m,mutationFn:async e=>{var r;let{rpid:t,reason:n}=e;return null===(r=(await d.Z.post(h("review-participants/".concat(t,"/decline")),{reason:null!=n?n:null},{headers:(0,v.g0)({realm:"hr"}),timeout:3e4})).data)||void 0===r?void 0:r.data},onMutate:l,onSuccess:(e,t,n)=>{c.invalidateQueries({queryKey:D.inboxRoot}),c.invalidateQueries({queryKey:D.reviewRoot}),null==r||r(e,t,n)},onError:(e,r,n)=>{x(P(e))&&(c.invalidateQueries({queryKey:D.inboxRoot}),c.invalidateQueries({queryKey:D.reviewRoot})),S(e,{fallback:"Failed to decline this review. Please try again.",context:"useDeclineReview",shouldToast:s}),null==t||t(e,r,n)},onSettled:n}),isSending:_,wasAccepted:(null==E?void 0:E.state.status)==="success",refusedReason:(null==E?void 0:E.state.status)==="error"?P(E.state.error).reason:null}}},75588:function(e,r,t){var n=t(52322),i=t(13980),a=t.n(i);t(2784);var l=t(16049),s=t(76467);let o=e=>{let{tenantName:r,breadcrumbs:t,title:i,description:a,actions:o,titleProps:c,fullWidth:d=!0}=e;return(0,n.jsxs)("div",{className:d?"w-full":"container mx-auto px-4 md:px-8 lg:px-12",children:[(0,n.jsx)("div",{children:(0,n.jsx)(l.Z,{home:"/hr/".concat(r,"/"),links:t})}),(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 py-4",children:[(0,n.jsxs)("div",{...c,children:[(0,n.jsx)(s.Z,{variant:"heading1",children:i}),!!a&&(0,n.jsx)(s.Z,{className:"mt-1",variant:"bodySmall",children:a})]}),!!o&&(0,n.jsx)("div",{className:"flex items-center gap-3",children:o})]})]})};o.propTypes={tenantName:a().string.isRequired,breadcrumbs:a().arrayOf(a().shape({href:a().string.isRequired,name:a().string.isRequired,nodeType:a().string})).isRequired,title:a().node.isRequired,description:a().string,actions:a().node,titleProps:a().object,fullWidth:a().bool},r.Z=o}}]);
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.