PageSourceSearch

https://progress-hub.work180.com/_next/static/chunks/pages/e/[empl…/employer-profile/jobs-3d835ea9dc744fbf.js

js work180.com collected 2026-10-03 22:23:21 UTC 40,346 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7228],{27392:function(e,i,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/e/[employerId]/employer-profile/jobs",function(){return l(34241)}])},87318:function(e,i,l){"use strict";l.d(i,{$:function(){return j}});var s=l(74817),a=l(55840),n=l(69155),o=l(5240),t=l(72509),r=l(8429),c=l(24910),d=l(42050),p=l(26795),u=l(71248);let j=e=>{let{employer:i,isIntroRequired:l,isOpen:j,onClose:x,onSuccess:h}=e,m=(0,p.q)(),_=(0,a.pm)(),b=(0,d.V)(r.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.GET_APPLICATION_RECIPIENT_LIST_API(i)),y=(0,d.V)(r.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.SET_APPLICATION_RECIPIENT_LIST_API(i)),[E,g]=(0,u.useState)([]),[v,f]=(0,u.useState)(!1),[k,S]=(0,u.useState)(!1),[O,P]=(0,u.useState)([]);(0,u.useEffect)(()=>{j&&(async()=>{f(!0);try{let e=[...(await b({employerId:i.id})).users].sort((e,i)=>e.userName.localeCompare(i.userName));g(e);let l=e.filter(e=>e.isApplicationRecipient).map(e=>e.userId);P(l)}catch(e){(0,c.xy)(e)}finally{f(!1)}})()},[j,i.id,b]);let w=e=>{P(i=>i.includes(e)?i.filter(i=>i!==e):[...i,e])},L=async()=>{S(!0);try{let e=E.map(e=>e.userId).filter(e=>!O.includes(e));O.length>0&&await y({users:O,isApplicationRecipient:!0}),e.length>0&&await y({users:e,isApplicationRecipient:!1}),h&&await h(),R(),_.success(m("jobs:quick_apply_job_update_success"))}catch(e){(0,c.xy)(e),_.error(m("jobs:quick_apply_job_update_failure"))}finally{S(!1)}},R=()=>{x()};return(0,s.jsxs)(t.u_,{isOpen:j,maxWidth:"max-w-xl",onClose:R,children:[(0,s.jsx)(t.xB,{children:(0,s.jsx)(a.xv,{size:"xl",weight:"bold",color:"deepSea",children:l?m("jobs:quick_apply_modal_header"):m("jobs:quick_apply_notification_settings")})}),(0,s.jsx)(t.hz,{children:(0,s.jsxs)(a.Kq,{gap:"md",children:[l&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.xv,{size:"md",color:"deepSea",children:m("jobs:quick_apply_modal_description")}),(0,s.jsx)(o.i,{}),(0,s.jsxs)(a.Kq,{gap:"sm",children:[(0,s.jsx)(a.xv,{size:"lg",weight:"bold",color:"deepSea",children:m("jobs:quick_apply_content_header")}),(0,s.jsxs)(a.Kq,{gap:"xs",children:[(0,s.jsx)(a.xv,{size:"md",weight:"bold",color:"deepSea",children:m("jobs:quick_apply_contact_details_header")}),(0,s.jsx)(a.xv,{size:"md",color:"deepSea",children:m("jobs:quick_apply_contact_details_name")}),(0,s.jsx)(a.xv,{size:"md",color:"deepSea",children:m("jobs:quick_apply_contact_details_email")}),(0,s.jsx)(a.xv,{size:"md",color:"deepSea",children:m("jobs:quick_apply_contact_details_number")})]}),(0,s.jsxs)(a.Kq,{gap:"xs",children:[(0,s.jsx)(a.xv,{size:"md",weight:"bold",color:"deepSea",children:m("jobs:quick_apply_resume_header")}),(0,s.jsx)(a.xv,{size:"md",color:"deepSea",children:m("jobs:quick_apply_resume")}),(0,s.jsx)(a.xv,{size:"md",color:"deepSea",children:m("jobs:quick_apply_cover_letter")})]}),(0,s.jsxs)(a.Kq,{gap:"xs",children:[(0,s.jsx)(a.xv,{size:"md",weight:"bold",color:"deepSea",children:m("jobs:quick_apply_right_to_work_header")}),(0,s.jsx)(a.xv,{size:"md",color:"deepSea",children:m("jobs:quick_apply_right_to_work_description")})]})]})]}),(0,s.jsxs)(a.Kq,{gap:"sm",children:[l&&(0,s.jsx)(a.xv,{size:"xl",weight:"bold",color:"deepSea",children:m("jobs:quick_apply_notification_settings")}),(0,s.jsx)(a.xv,{size:"md",color:"deepSea",children:m("jobs:quick_apply_notification_description")}),(0,s.jsx)(o.i,{}),(0,s.jsx)(a.xv,{size:"md",weight:"bold",color:"deepSea",children:m("jobs:quick_apply_available_to_notify")}),(0,s.jsxs)(a.Kq,{gap:"xs",children:[v?(0,s.jsx)(a.xv,{size:"md",color:"deepSea",children:m("jobs:quick_apply_loading_users")}):E.map(e=>(0,s.jsxs)("label",{htmlFor:"user".concat(e.userId),className:"flex cursor-pointer items-center gap-2",children:[(0,s.jsx)(n.M,{color:"deepsea",id:"user".concat(e.userId),name:"user".concat(e.userId),checked:O.includes(e.userId),onChange:()=>w(e.userId)}),(0,s.jsx)(a.xv,{size:"md",weight:"normal",color:"deepSea",children:e.userName})]})),(0,s.jsx)(a.xv,{size:"sm",weight:"normal",color:"deepSea",children:m("jobs:quick_apply_contact_am")})]})]})]})}),(0,s.jsxs)(t.mz,{children:[(0,s.jsx)(a.zx,{radius:"md",variant:"outline-cherry",label:m("common:cancel"),size:"sm",onClick:R}),(0,s.jsx)(a.u,{position:"top",label:0===O.length?m("jobs:quick_apply_enable_tooltip"):void 0,children:(0,s.jsx)("span",{children:(0,s.jsx)(a.zx,{radius:"md",label:l?m("jobs:quick_apply_enable"):m("common:update"),size:"sm",disabled:0===O.length,loading:!!k&&"Saving",onClick:L})})})]})]})}},34241:function(e,i,l){"use strict";l.r(i),l.d(i,{__N_SSP:function(){return I},default:function(){return T}});var s=l(74817),a=l(55840),n=l(56219),o=l(8429),t=l(24910),r=l(9236),c=l(80742),d=l(58997),p=l(42050),u=l(82222),j=l(26795),x=l(23849),h=l.n(x),m=l(56800),_=l.n(m),b=l(36497),y=l(71248),E=l(74048);let g="NEW_JOB";var v=l(53493),f=l(87318);let k=e=>{var i,l,x,m,k,O,P,w;let{jobId:L,canEdit:R,allowInternalApplications:I,employer:T,handleClose:M}=e,z=(0,j.q)(),A=(0,a.pm)(),q=(0,b.useRouter)(),{hasFlag:C}=(0,r.ye)(),N=(0,y.useMemo)(()=>C("quick_apply"),[C]),Y=(0,y.useMemo)(()=>C("remirror_text_editor"),[C]),[D,F]=(0,y.useState)(!1),[B,J]=(0,y.useState)(T.isEntitledToQuickApply),{setUnsaved:Q}=(0,u.T)(z("common:unsaved_warning")),[K,V]=(0,y.useState)(!1),[G,W]=(0,y.useState)(null),[U,X]=(0,y.useState)([]),[$,H]=(0,y.useState)([]),[Z,ee]=(0,y.useState)([]),[ei,el]=(0,y.useState)(!1),[es,ea]=(0,y.useState)(!1),[en,eo]=(0,y.useState)(!1),[et,er]=(0,y.useState)(!1),[ec,ed]=(0,y.useState)(!1),[ep,eu]=(0,y.useState)(!1),ej=(0,p.V)(o.h3.EMPLOYER.E
1MPLOYER_PROFILE.JOBS.GET_JOB_API(T)),ex=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.GET_JOB_OPTIONS_API(T)),[eh,em]=(0,y.useState)([]),e_=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.GET_LOCATION_AUTOCOMPLETIONS_API(T)),eb=(0,y.useMemo)(()=>h()(async e=>{try{let i=(await e_({locationDescription:e})).map(e=>({value:e.placeId,name:e.description}));em(i)}catch(e){(0,t.xy)(e),A.error(z("jobs:job_location_autocomplete_failure"))}},300),[e_,z,A]),ey=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.CREATE_JOB_API(T)),eE=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.UPDATE_JOB_API(T)),eg=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.UPDATE_JOB_STATUS_API(T)),ev=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.CREATE_QUICK_APPLY_ENTITLEMENT_API(T)),ef=async e=>{if(G){eu(!0);try{await eg({id:G.id,status:e}),A.success(z("jobs:update_job_status_success",{status:e})),e===E.By.Expired?ea(!0):await q.replace(q.asPath,void 0,{scroll:!1})}catch(i){A.error(z("jobs:update_job_status_failed",{status:e})),(0,t.xy)(i)}finally{Q(!1),eu(!1)}}},ek=async()=>{B||(await ev({employerId:T.id}),J(!0),er(!1)),F(!1)};(0,y.useEffect)(()=>{let e=async()=>{let{disciplineOptions:e,levelOfExperienceOptions:i,workTypeOptions:l}=await ex();X(e),H(i),ee(l)};return V(!0),el(!1),e().catch(e=>{(0,t.xy)(e),el(!0)}).finally(()=>{V(!1)}),()=>{el(!1)}},[ex]),(0,y.useEffect)(()=>{let e=async()=>{V(!0),el(!1);let{job:e}=await ej({id:L});W(e)},i=async()=>{let e=new Date;e.setDate(e.getDate()+30);let i={added:null,applicationEmail:null,applicationLink:null,applicationType:null,expired:null,internalApplicationsCount:null,levelOfExperience:null,reference:null,shortDescription:null,updated:null,updatedBy:null,updatedByUser:null,description:"",disciplines:[],id:"",isFlexible:!1,isRegionLimitedRemote:!1,isRemote:!1,jobLocations:[],jobWorkTypes:[],slug:"",title:"",expireAt:e,employer:{id:T.id},sourceType:E.PO.Manual};V(!0),el(!1),W(i)};return L===g?i().catch(e=>{(0,t.xy)(e),el(!0)}).finally(()=>{V(!1)}):e().catch(e=>{(0,t.xy)(e),el(!0)}).finally(()=>{V(!1)}),()=>{el(!1),W(null)}},[T.id,ej,ex,L]),(0,y.useEffect)(()=>{es&&M(!0)},[M,es]);let eS=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.CREATE_CONTENT_IMAGE_PRESIGNED_URL_API(T)),eO=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.SET_CONTENT_IMAGE_API(T)),eP=async e=>{try{let i=await eS({contentType:(0,d.V4)(e)});if(i.signedUrl){if((await (0,d.ez)(e,i.signedUrl)).ok)return(await eO({imageId:i.id})).url;A.error(z("jobs:insert_content_image_failure"))}}catch(e){(0,t.xy)(e),A.error(z("jobs:insert_content_image_failure"))}return""},ew=["true","false"].map(e=>({name:z("jobs:job_isRegionLimitedRemote_".concat(e)),value:e})),eL=Object.values(E.vQ).filter(e=>I||e===(null==G?void 0:G.applicationType)||e!==E.vQ.Work_180).map(e=>({name:z("jobs:job_applicationType_".concat(e)),value:e})),eR=Object.values(E.vQ).sort((e,i)=>e===E.vQ.Work_180?-1:i===E.vQ.Work_180?1:0).map(e=>({name:z("jobs:quick_apply_application_type_".concat(e)),value:e})),eI=L!==g,eT=eI&&!!(null==G?void 0:G.sourceType)&&G.sourceType===E.PO.PullAutomation,eM=!R||eT||!!(null==G?void 0:G.expired),ez=G?"".concat("https://work180.com","/").concat((0,c.B)(T.region),"/for-women/job/").concat(G.id,"/").concat(G.slug):"",eA=e=>{let[i,l]=_()(e,e=>null==G?void 0:G.jobLocations.some(i=>i.id===e.value)),s=[];return i.forEach(e=>s.push({id:e.value})),l.forEach(e=>s.push({placeId:e.value})),s};return(0,s.jsxs)(a.u_,{isOpen:!0,position:"right",maxWidth:"max-w-5xl",onClose:()=>M(!1),children:[(0,s.jsx)(a.Kq,{height:"h-fit",padding:"pd-[md,sm,0]",children:ei?(0,s.jsx)(a.o4,{type:"error",message:z("jobs:bar_error")}):K?(0,s.jsx)(a.xu,{alignX:"center",alignY:"center",minHeight:"min-h-screen",children:(0,s.jsx)(a.$j,{size:"lg",ariaLabel:"Loading"})}):G&&(0,s.jsxs)(a.Kq,{gap:"md",children:[eT&&(0,s.jsx)(a.o4,{type:"warning",message:z("jobs:bar_automated_job_warning")}),(0,s.jsx)(n.J9,{initialValues:{title:null!==(l=G.title)&&void 0!==l?l:"",reference:null!==(x=G.reference)&&void 0!==x?x:"",workTypes:G.jobWorkTypes.map(e=>({name:e.name,value:e.id})),disciplines:G.disciplines.map(e=>({name:e.name,value:e.id})),locations:G.jobLocations.map(e=>({name:e.label,value:e.id}
1)),isFlexible:G.isFlexible,isRemote:G.isRemote,isRegionLimitedRemote:G.isRegionLimitedRemote,experience:null!==(m=null===(i=G.levelOfExperience)||void 0===i?void 0:i.id)&&void 0!==m?m:null,expireAt:G.expireAt?new Date(G.expireAt):null,applicationLink:null!==(k=G.applicationLink)&&void 0!==k?k:"",applicationType:G.applicationType,applicationEmail:null!==(O=G.applicationEmail)&&void 0!==O?O:"",description:null!==(P=G.description)&&void 0!==P?P:"",shortDescription:null!==(w=G.shortDescription)&&void 0!==w?w:""},initialTouched:{applicationEmail:!0,applicationLink:!0},validationSchema:eM?null:(0,v.Ry)().shape({title:(0,v.Z_)().trim().required(),workTypes:(0,v.IX)().min(1),disciplines:(0,v.IX)().min(1),isRemote:(0,v.O7)().required(),locations:(0,v.IX)().when("isRemote",{is:!1,then:e=>e.min(1)}),applicationType:(0,v.nK)().oneOf(Object.values(E.vQ)).required(),applicationEmail:(0,v.Z_)().email(z("common:enter_email_validation")).when("applicationType",{is:e=>(!N||e!==E.vQ.Work_180)&&(E.vQ.Email===e||E.vQ.Work_180===e),then:e=>e.required()}),applicationLink:(0,v.Z_)().trim().url().when("applicationType",{is:E.vQ.External,then:e=>e.required()}),description:(0,v.Z_)().trim().required()}),onSubmit:async(e,i)=>{var l,s;let{setSubmitting:a,resetForm:n}=i;if(eo(!1),er(!1),e.applicationType===E.vQ.Work_180&&!B){er(!0),a(!1);return}let o={applicationEmail:""!==e.applicationEmail?e.applicationEmail.trim():null,applicationLink:""!==e.applicationLink?e.applicationLink.trim():null,applicationType:null!==(l=e.applicationType)&&void 0!==l?l:E.vQ.Work_180,description:e.description.trim(),disciplines:e.disciplines.map(e=>e.value),experience:e.experience,expireAt:e.expireAt,isFlexible:e.isFlexible,isRegionLimitedRemote:e.isRegionLimitedRemote,isRemote:e.isRemote,locations:eA(e.locations),reference:""!==e.reference?e.reference.trim():null,shortDescription:""!==e.shortDescription?e.shortDescription.trim():null,title:e.title.trim(),updatedByUser:null!==(s=null==G?void 0:G.updatedByUser)&&void 0!==s?s:null,workTypes:e.workTypes.map(e=>e.value)};try{if(eI){let e={id:null==G?void 0:G.id,employerId:T.id,...o};await eE({jobInput:e})}else{let e={employerId:T.id,...o};await ey({jobInput:e})}A.success(z("jobs:job_publish_success_title"),z("jobs:job_publish_success_message")),ea(!0)}catch(e){(0,t.xy)(e),eo(!0)}finally{a(!1),Q(!1),n({values:{title:e.title.trim(),reference:e.reference.trim(),workTypes:e.workTypes,disciplines:e.disciplines,locations:e.locations,isFlexible:e.isFlexible,isRemote:e.isRemote,isRegionLimitedRemote:e.isRegionLimitedRemote,experience:e.experience,expireAt:e.expireAt,applicationType:e.applicationType,applicationLink:e.applicationLink.trim(),applicationEmail:e.applicationEmail.trim(),description:e.description.trim(),shortDescription:e.shortDescription.trim()}})}},children:e=>{var i,l,t,r,c,d,p,u;let{values:j,errors:x,touched:h,setFieldTouched:m,setFieldValue:_,isValid:b,dirty:y,isSubmitting:g}=e;return(0,s.jsx)(n.l0,{className:"w-full",children:(0,s.jsxs)(a.Kq,{borderRadius:"md",borderColor:"mint",borderStyle:"solid",children:[(0,s.jsxs)(a.xu,{bgColor:"mint",padding:"pd-[sm,md]",alignX:"between",alignY:"center",borderRadius:"sm",children:[(0,s.jsx)(a.xu,{children:(0,s.jsx)("h3",{children:z("jobs:bar_header")})}),(0,s.jsxs)(a.xu,{gap:"xs",alignX:"right",children:[G.applicationType===E.vQ.Work_180&&!!G.internalApplicationsCount&&(0,s.jsx)(a.Qj,{size:"sm",variant:"deepSea",label:z("jobs:view_applications",{count:G.internalApplicationsCount}),href:"".concat(o.h3.EMPLOYER.EMPLOYER_PROFILE.APPLICATIONS.INDEX(T),"?jobId=").concat(G.id)}),!!(null==G?void 0:G.expired)&&(0,s.jsx)(a.zx,{variant:"cherry",label:z("jobs:update_job_republish"),size:"sm",loading:!!ep&&"Submitting",type:"button",onClick:async()=>{await ef(E.By.Active)}})]})]}),(0,s.jsxs)(a.Kq,{padding:"pd-[md]",gap:"xs",children:[!eT&&(0,s.jsx)(S,{fieldName:"title",label:z("jobs:job_title"),required:!0,children:(0,s.jsx)(a.II,{id:"title",name:"title",placeholder:null!==(i=z("jobs:job_title"))&&void 0!==i?i:"",value:j.title,hasError:!!x.title,readOnly:eM,onChange:e=>{m("title",!0),_("title",e.currentTarget.value),Q(!0)}})}),(0,s.jsx)(S,{fieldName:"reference",label:z("jobs:job_reference"),children:(0,s.jsx)(a.II,{id:"reference",name:"reference",placeholder:null!==(l=z("jobs:job_reference"))&&void 0!==l?l:"",value:j.reference,hasError:!!h.reference&&!!x.reference,readOnly:eM,onChange:e=>{m("reference",!0),_("reference",e.currentTarget.value),Q(!0)}})}),(0,s.jsx)(S,{fieldName:"workTypes",label:z("jobs:job_workTypes"),zIndex:"z-10",required:!0,children:(0,s.jsx)(a._j,{hasError:!!x.workTypes,canEdit:!eM,options:Z,selectedOption:Z.filter(e=>j.workTypes.some(i=>i.value===e.value)),onDeselect:e=>{_("workTypes",j.workTypes.filter(i=>i.value!==e.value)),Q(!0)},onChange:e=>{m("workTypes",!0),_("workTypes",e),Q(!0)}})}),(0,s.jsx)(S,{fieldName:"disciplines",label:z("jobs:job_discipline"),zIndex:"z-[9]",required:!0,children:(0,s.jsx)(a._j,{hasError:!!x.disciplines,canEdit:!eM,options:U,selectedOption:U.filter(e=>j.disciplines.some(i=>i.value===e.value)),onChange:e=>{m("disciplines",!0),_("disciplines",e),Q(!0)},onDeselect:e=>{_("disciplines",j.disciplines.filter(i=>i.value!==e.value)),Q(!0)}})}),(0,s.jsx)(S,{fieldName:"locations",label:z("jobs:job_locations"),zIndex:"z-[8]",required:!0,children:(0,s.jsxs)(a.r
1j,{colsGap:"sm",rowGap:"xs",colsSM:10,children:[(0,s.jsx)(a.P4,{spanSM:7,children:(0,s.jsx)(a.$y,{options:eh,selectedOptions:j.locations,canEdit:!eM,placeholder:null!==(t=z("jobs:job_location_field_placeholder"))&&void 0!==t?t:"",searchPlaceholder:null!==(r=z("jobs:job_location_search_placeholder"))&&void 0!==r?r:"",hasError:!!x.locations,onSearch:eb,onSelect:e=>_("locations",[...j.locations,e]),onDeselect:e=>_("locations",j.locations.filter(i=>i.value!==e.value))})}),(0,s.jsx)(a.P4,{spanSM:3,justifySelf:"start",justifySelfSM:"end",children:(0,s.jsxs)(a.xu,{gap:"sm",children:[(0,s.jsxs)(a.xu,{gap:"xs",alignY:"center",width:"w-fit",children:[(0,s.jsx)("label",{htmlFor:"isFlexible",children:(0,s.jsx)(a.xv,{size:"md",weight:"bold",children:z("jobs:job_isFlexible")})}),(0,s.jsx)(a.MV,{id:"isFlexible",name:"isFlexible",checked:j.isFlexible,disabled:eM,onChange:e=>{m("isFlexible",!0),_("isFlexible",e.currentTarget.checked),Q(!0)}})]}),(0,s.jsxs)(a.xu,{gap:"xs",alignY:"center",width:"w-fit",children:[(0,s.jsx)("label",{htmlFor:"isRemote",children:(0,s.jsx)(a.xv,{size:"md",weight:"bold",children:z("jobs:job_isRemote")})}),(0,s.jsx)(a.MV,{id:"isRemote",name:"isRemote",checked:j.isRemote,disabled:eM,onChange:e=>{m("isRemote",!0),_("isRemote",e.currentTarget.checked),Q(!0)}})]})]})})]})}),j.isRemote&&(0,s.jsx)(S,{fieldName:"isRegionLimitedRemote",label:z("jobs:job_isRegionLimitedRemote"),zIndex:"z-[7]",children:(0,s.jsx)(a.Ri,{canEdit:!eM,options:ew,selectedOption:ew.find(e=>e.value===j.isRegionLimitedRemote.toString()),onChange:e=>{m("isRegionLimitedRemote",!0),_("isRegionLimitedRemote","true"===e.value),Q(!0)}})}),G.expired?(0,s.jsx)(S,{fieldName:"expired",label:z("jobs:job_expired"),children:(0,s.jsx)(a.xv,{size:"sm",color:"grey500",children:z("common:date_short",{date:new Date(G.expired)})})}):(0,s.jsx)(S,{fieldName:"expireAt",label:z("jobs:job_expired"),zIndex:"z-[6]",children:(0,s.jsxs)(a.rj,{rowGap:"xs",colsSM:10,children:[(0,s.jsx)(a.P4,{spanSM:8,children:(0,s.jsx)(a.Mt,{name:"expireAt",value:null!==(c=j.expireAt)&&void 0!==c?c:void 0,futureDateOnly:!0,readonly:eM,hasError:!!x.expireAt,onChange:e=>{m("expireAt",!0),_("expireAt",e),Q(!0)},onClear:()=>{_("expireAt",void 0),Q(!0)}})}),(0,s.jsx)(a.P4,{spanSM:2,justifySelfSM:"end",justifySelf:"stretch",children:(0,s.jsx)(a.xu,{alignY:"center",children:(0,s.jsx)(a.zx,{minWidth:"min-w-[120px]",label:z("jobs:update_job_expire"),size:"sm",onClick:()=>ed(!0)})})})]})}),(0,s.jsx)(S,{fieldName:"experience",label:z("jobs:job_experience"),zIndex:"z-[5]",children:(0,s.jsx)(a.Ri,{hasError:!!x.experience,canEdit:!eM,options:$,enableClear:!!j.experience,selectedOption:$.find(e=>e.value===j.experience),onChange:e=>{m("experience",!0),_("experience",e.value),Q(!0)}})}),N?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(S,{fieldName:"applicationTypeCheckboxes",label:z("jobs:job_applicationType"),zIndex:"z-[3]",required:!0,children:(0,s.jsx)(a.xu,{gap:"md",children:eR.map(e=>(0,s.jsxs)(a.xu,{gap:"xs",alignY:"center",width:"w-fit",children:[(0,s.jsx)(a.MV,{id:"applicationType".concat(e.value),name:"applicationType".concat(e.value),checked:j.applicationType===e.value,disabled:eM,onChange:i=>{i.currentTarget.checked&&(m("applicationType",!0),m("applicationEmail",!0),m("applicationLink",!0),_("applicationType",e.value),Q(!0),e.value!==E.vQ.Work_180||B?er(!1):(F(!0),er(!0)))}}),(0,s.jsx)("label",{htmlFor:"applicationType".concat(e.value),children:(0,s.jsx)(a.xv,{size:"md",children:e.name})})]},e.value))})}),j.applicationType===E.vQ.Work_180&&R&&(0,s.jsxs)(S,{fieldName:"notificationSettings",label:"",zIndex:"z-[2]",children:[(0,s.jsx)(a.zx,{variant:"outline-deepSea",radius:"md",label:z("jobs:quick_apply_notification_settings"),size:"sm",onClick:()=>F(!0)}),et&&(0,s.jsx)(a.xu,{padding:"pd-[xs,0,0,0]",children:(0,s.jsx)(a.o4,{type:"error",message:z("jobs:quick_apply_entitlement_required")})})]})]}):(0,s.jsx)(S,{fieldName:"applicationType",label:z("jobs:job_applicationType"),zIndex:"z-[4]",required:!0,children:(0,s.jsx)(a.Ri,{hasError:!!x.applicationType,canEdit:!eM,options:eL,enableClear:!!j.applicationType,selectedOption:eL.find(e=>e.value===j.applicationType),onChange:e=>{m("applicationType",!0),m("applicationEmail",!0),m("applicationLink",!0),_("applicationType",e.value),Q(!0)}})}),(j.applicationType===E.vQ.Email||j.applicationType===E.vQ.Work_180&&!N)&&(0,s.jsx)(S,{fieldName:"applicationEmail",label:z("jobs:job_applicationEmail"),required:!0,children:(0,s.jsx)(a.II,{id:"applicationEmail",name:"applicationEmail",placeholder:null!==(d=z("jobs:job_applicationEmail"))&&void 0!==d?d:"",value:j.applicationEmail,hasError:!!h.applicationEmail&&!!x.applicationEmail,readOnly:eM,onChange:e=>{m("applicationEmail",!0),_("applicationEmail",e.currentTarget.value),Q(!0)}})}),j.applicationType===E.vQ.External&&(0,s.jsx)(S,{fieldName:"applicationLink",label:z("jobs:job_applicationLink"),required:!0,children:(0,s.jsxs)(a.r
1j,{rowGap:"xs",colsSM:10,children:[(0,s.jsx)(a.P4,{spanSM:8,children:(0,s.jsx)(a.II,{id:"applicationLink",name:"applicationLink",placeholder:null!==(p=z("jobs:job_applicationLink"))&&void 0!==p?p:"",value:j.applicationLink,hasError:!!h.applicationLink&&!!x.applicationLink,readOnly:eM,onChange:e=>{m("applicationLink",!0),_("applicationLink",e.currentTarget.value),Q(!0)}})}),j.applicationLink&&(0,s.jsx)(a.P4,{spanSM:2,justifySelfSM:"end",justifySelf:"stretch",children:(0,s.jsx)(a.xu,{alignY:"center",children:(0,s.jsx)(a.Qj,{label:z("common:view"),href:j.applicationLink,size:"sm",externalLink:!0,rightIcon:"external-link"})})})]})}),eI&&(0,s.jsx)(S,{fieldName:"slug",label:z("jobs:job_slug"),children:(0,s.jsxs)(a.rj,{rowGap:"xs",colsSM:10,children:[(0,s.jsx)(a.P4,{spanSM:8,children:(0,s.jsx)(a.II,{id:"slug",name:"slug",placeholder:null!==(u=z("jobs:job_slug"))&&void 0!==u?u:"",value:ez,readOnly:!0,onChange:()=>{}})}),G.slug&&(0,s.jsx)(a.P4,{spanSM:2,justifySelfSM:"end",justifySelf:"stretch",children:(0,s.jsx)(a.xu,{alignY:"center",children:(0,s.jsx)(a.Qj,{label:z("common:view"),href:ez,size:"sm",externalLink:!0,rightIcon:"external-link"})})})]})}),(0,s.jsx)(S,{fieldName:"description",label:z("jobs:job_description"),required:!0,children:Y?(0,s.jsx)(a.bR,{id:"description",value:j.description,height:300,type:"full",hasError:!!h.description&&!!x.description,handleUpload:eP,disabled:eM,onChange:e=>{m("description",!0),_("description",e)},onDirty:()=>{Q(!0)}}):(0,s.jsx)(a.LD,{id:"description",value:j.description,height:"300",type:"full",hasError:!!h.description&&!!x.description,handleUpload:eP,disabled:eM,onChange:e=>{m("description",!0),_("description",e)},onDirty:()=>{Q(!0)}})}),(0,s.jsx)(S,{fieldName:"shortDescription",label:z("jobs:job_shortDescription"),children:(0,s.jsx)(a.Kx,{name:"shortDescription",value:j.shortDescription,placeholder:z("jobs:job_shortDescription_placeholder",{sizeLimit:200}),maxLength:200,readOnly:eM,onChange:e=>{m("shortDescription",!0),_("shortDescription",e.currentTarget.value),Q(!0)}})}),eI&&(0,s.jsxs)(a.Kq,{gap:"xs",margin:"mg-[md,0]",children:[(0,s.jsx)(S,{fieldName:"added",label:z("jobs:job_added"),children:(0,s.jsx)(a.xv,{size:"sm",color:"grey500",children:z("common:date_short",{date:G.added?new Date(G.added):new Date})})}),(0,s.jsx)(S,{fieldName:"updated",label:z("jobs:job_updated"),children:(0,s.jsx)(a.xv,{size:"sm",color:"grey500",children:z("common:date_short",{date:G.updated?new Date(G.updated):new Date})})}),(0,s.jsx)(S,{fieldName:"updatedBy",label:z("jobs:job_updatedBy"),children:(0,s.jsx)(a.xv,{size:"sm",color:"grey500",children:G.updatedByUser||G.updatedBy})})]}),!eM&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.zx,{label:z("common:save"),size:"sm",loading:!!g&&"Submitting",type:"submit",disabled:!y||!b||j.applicationType===E.vQ.Work_180&&!B}),en&&(0,s.jsx)(a.o4,{type:"error",message:z("jobs:job_publish_failure")})]})]})]})})}})]})}),(0,s.jsx)(f.$,{employer:T,isIntroRequired:!0,isOpen:D,onClose:()=>F(!1),onSuccess:ek}),(0,s.jsxs)(a.u_,{isOpen:ec,onClose:()=>ed(!1),children:[(0,s.jsx)(a.xB,{children:z("jobs:expire_dialogue_header")}),(0,s.jsx)(a.hz,{children:z("jobs:expire_dialogue_description")}),(0,s.jsxs)(a.mz,{children:[(0,s.jsx)(a.zx,{variant:"outline-deepSea",label:z("common:go_back"),size:"sm",onClick:()=>ed(!1)}),(0,s.jsx)(a.zx,{label:z("jobs:expire_dialogue_button"),size:"sm",loading:!!ep&&"Submitting",onClick:async()=>{await ef(E.By.Expired),Q(!1),ed(!1)}})]})]})]})},S=e=>{let{fieldName:i,label:l,zIndex:n="z-0",required:o=!1,children:t}=e;return(0,s.jsxs)(a.rj,{columns:10,rowGap:"xs",zIndex:n,children:[(0,s.jsx)(a.P4,{span:10,spanSM:2,children:(0,s.jsx)(a.xu,{alignY:"center",children:(0,s.jsx)("label",{htmlFor:i,children:(0,s.jsxs)(a.xv,{size:"sm",weight:"bold",children:[o&&"*",l]})})})}),(0,s.jsx)(a.P4,{span:10,spanSM:8,children:t})]})},O=(e,i)=>{if(null===e||0===e.length)return i("job-location:job_label_not_specified");if(1===e.length)return e.toString();let l=[];e=[...e].sort();for(let s=0;s<e.length;s++){if(3===s){l.push(i("job-location:job_label_and_more"));break}
10===s?l.push(e[s]):l.push(s===e.length?i("job-location:job_label_and",{location:e[s]}):", ".concat(e[s]))}return l.join("")},P=(e,i,l,s,a,n)=>{let o=[];return i?(o.push(n("job-location:job_label_remote")),s?("au"===a&&o.push(n("job-location:job_label_au_nz")),"uk"===a&&o.push(n("job-location:job_label_uk_eu")),"us"===a&&o.push(n("job-location:job_label_us"))):o.push(n("job-location:job_label_global"))):o.push(O(e,n)),l&&o.push(n("job-location:job_label_flexible_options")),o.join("")},w=e=>{var i,l;let{job:n,employer:c,canEdit:d,canEditApplications:u,href:x}=e,h=(0,j.q)(),m=(0,a.pm)(),_=new Map([[E.hY.Empty,h("jobs:gender_bias_empty")],[E.hY.Feminine,h("jobs:gender_bias_feminine")],[E.hY.Masculine,h("jobs:gender_bias_masculine")],[E.hY.Neutral,h("jobs:gender_bias_neutral")],[E.hY.StronglyFeminine,h("jobs:gender_bias_strongly_feminine")],[E.hY.StronglyMasculine,h("jobs:gender_bias_strongly_masculine")]]),[b,g]=(0,y.useState)((null==n?void 0:n.isQuickApply)||(null==n?void 0:n.applicationType)===E.vQ.Work_180),{hasFlag:v}=(0,r.ye)(),f=(0,y.useMemo)(()=>v("quick_apply"),[v]);(0,y.useEffect)(()=>{g((null==n?void 0:n.isQuickApply)||(null==n?void 0:n.applicationType)===E.vQ.Work_180)},[null==n?void 0:n.isQuickApply,null==n?void 0:n.applicationType]);let k=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.SET_JOB_QUICK_APPLY_API(c)),S=async()=>{let e=!b;g(e);try{await k({jobId:n.id,quickApply:e}),m.success(h("jobs:quick_apply_job_update_success"))}catch(i){(0,t.xy)(i),g(!e),m.error(h("jobs:quick_apply_job_update_failure"))}},O=!!(null==n?void 0:n.sourceType)&&n.sourceType===E.PO.PullAutomation;return(0,s.jsxs)(a.Kq,{role:"listitem",borderColor:n.expired?"cloud":"mint",borderStyle:"solid",padding:"pd-[md]",borderRadius:"md",children:[(0,s.jsxs)(a.rj,{columns:2,colsSM:3,colsMD:12,gap:"sm",children:[(0,s.jsx)(a.P4,{span:2,spanSM:2,spanMD:5,children:(0,s.jsxs)(a.Kq,{children:[(0,s.jsx)(a.xv,{size:"xs",children:h("jobs:column_job")}),(0,s.jsx)(a.xv,{size:"md",weight:"bold",children:n.title}),n.reference&&(0,s.jsx)(a.xv,{size:"xs",children:h("jobs:reference_number",{refNum:n.reference})})]})}),(0,s.jsx)(a.P4,{spanSM:1,spanMD:2,justifySelfSM:"end",justifySelfMD:"start",children:(0,s.jsxs)(a.Kq,{children:[(0,s.jsx)(a.xv,{size:"xs",children:h("jobs:column_location")}),(0,s.jsx)(a.xv,{size:"md",weight:"bold",children:P(null!==(l=n.jobLocations)&&void 0!==l?l:[],n.isRemote,n.isFlexible,n.isRegionLimitedRemote,n.region,h)})]})}),(0,s.jsx)(a.P4,{spanSM:1,spanMD:2,justifySelf:"end",justifySelfSM:"start",children:n.expired?(0,s.jsxs)(a.Kq,{children:[(0,s.jsx)(a.xv,{size:"xs",children:h("jobs:column_expired")}),(0,s.jsx)(a.xv,{size:"md",weight:"bold",children:h("common:date_short",{date:new Date(n.expired)})})]}):(0,s.jsxs)(a.Kq,{children:[(0,s.jsx)(a.xv,{size:"xs",children:h("jobs:column_created")}),(0,s.jsx)(a.xv,{size:"md",weight:"bold",children:n.added?h("common:date_short",{date:new Date(n.added)}):""})]})}),(0,s.jsx)(a.P4,{spanSM:1,spanMD:2,justifySelfSM:"center",justifySelfMD:"start",children:(0,s.jsxs)(a.Kq,{children:[(0,s.jsx)(a.xv,{size:"xs",children:h("jobs:column_gender_bias")}),(0,s.jsx)(a.xv,{size:"md",weight:"bold",children:(null===(i=n.genderBiasResult)||void 0===i?void 0:i.coding)?_.get(n.genderBiasResult.coding):""})]})}),(0,s.jsx)(a.P4,{justifySelf:"end",children:(0,s.jsx)(a.Qj,{label:d&&!O?h("common:edit"):h("common:view"),size:"sm",href:x,shallow:!0,scroll:!1,variant:n.expired?"deepSea":"mint"})})]}),f&&c.isEntitledToQuickApply&&(0,s.jsx)(a.Kq,{padding:"pd-[xs,0,0,0]",children:(0,s.jsxs)(a.xu,{alignX:"between",alignY:"top",children:[u&&n.applicationType!==E.vQ.Work_180?(0,s.jsxs)("label",{htmlFor:"quickApplySwitch-jobCardAllowed",className:"flex cursor-pointer items-center gap-2 rounded-none border-0 bg-transparent p-0 text-inherit",children:[(0,s.jsx)(a.rs,{id:"quickApplySwitch-jobCardAllowed",color:"deepSea",label:h("jobs:quick_apply"),size:"xs",value:b,disabled:!1,onChange:S}),(0,s.jsx)("span",{className:"text-deepsea-400 whitespace-nowrap",children:h("jobs:quick_apply")})]}):(0,s.jsx)(a.u,{label:u?h("jobs:quick_apply_internal_tooltip"):h("jobs:quick_apply_not_authorized_tooltip"),children:(0,s.jsxs)("label",{htmlFor:"quickApplySwitch-NotAllowed",className:"flex cursor-not-allowed items-center gap-2 rounded-none border-0 bg-transparent p-0 text-inherit",children:[(0,s.jsx)(a.rs,{id:"quickApplySwitch-NotAllowed",color:"deepSea",label:h("jobs:quick_apply"),size:"xs",value:b,disabled:!0,onChange:S}),(0,s.jsx)("span",{className:"text-deepsea-400 whitespace-nowrap",children:h("jobs:quick_apply")})]})}),b&&(0,s.jsx)(a.xu,{flexWrap:"nowrap",alignY:"center",gap:"xs",alignX:"right",children:(0,s.jsx)(a.Qj,{variant:"outline-deepSea",radius:"md",label:h("jobs:quick_apply_view_applications",{count:n.internalApplicationsCount||0}
1),size:"sm",href:n.internalApplicationsCount?o.h3.EMPLOYER.EMPLOYER_PROFILE.APPLICATIONS.JOB_ID(c,n.id):o.h3.EMPLOYER.EMPLOYER_PROFILE.APPLICATIONS.INDEX(c)})})]})})]})},L=e=>{let{employer:i,canEditApplications:l,activeJobSources:n,jobAutomation:o,isQuickApply:t,onQuickApplyChange:c}=e,d=(0,j.q)(),{hasFlag:p}=(0,r.ye)(),u=(0,y.useMemo)(()=>p("quick_apply"),[p]),[x,h]=(0,y.useState)(!1),[m,_]=(0,y.useState)(!1);return(0,s.jsxs)(a.UQ,{bgColor:"deepSea",borderColor:"deepSea",borderStyle:"solid",label:(0,s.jsx)(a.xu,{padding:"pd-[xs]",children:(0,s.jsx)("h3",{className:"text-cloud-400!",children:d("jobs:job_sources")})}),defaultOpen:!0,children:[(0,s.jsxs)(a.rj,{columns:1,colsSM:3,colsMD:4,colsLG:5,padding:"pd-[md]",rowGap:"sm",children:[(0,s.jsx)("h4",{children:d("jobs:active_jobs")}),(0,s.jsx)(a.P4,{spanSM:2,spanMD:3,spanLG:4,children:n.length>0?(0,s.jsxs)(a.Kq,{borderStyle:"solid",borderColor:"deepSea",width:"w-auto",children:[(0,s.jsxs)(a.xu,{padding:"pd-[xs,sm]",bgColor:"deepSea",borderRadius:"sm",children:[(0,s.jsx)("h4",{className:"text-cloud-400! w-1/2",children:d("jobs:source")}),(0,s.jsx)("h4",{className:"text-cloud-400! w-1/2 text-end sm:text-start",children:d("jobs:job_count")})]}),n.map((e,i)=>(0,s.jsxs)(a.xu,{padding:"pd-[xs,sm]",children:[(0,s.jsxs)(a.xu,{alignY:"center",gap:"xs",children:[(0,s.jsx)("p",{children:d("jobs:source_type_".concat(e.sourceType))}),(0,s.jsx)(a.u,{maxWidth:"max-w-fit",label:d("jobs:source_type_".concat(e.sourceType,"_tooltip")),children:(0,s.jsx)(a.JO,{size:"sm",icon:"circle-question",strokeColor:"cherry400"})})]}),(0,s.jsx)("p",{className:"w-full text-end sm:text-start",children:e.count})]},i))]}):(0,s.jsx)("p",{children:d("jobs:no_active_jobs")})}),(0,s.jsx)("h4",{children:d("jobs:job_automation")}),(0,s.jsx)(a.P4,{spanSM:2,spanMD:3,spanLG:4,children:(0,s.jsx)("p",{children:(null==o?void 0:o.status)==="ENABLED"?d("jobs:job_automation_enabled"):d("jobs:job_automation_disabled")})}),(null==o?void 0:o.status)==="ENABLED"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h4",{children:d("jobs:source_information")}),(0,s.jsx)(a.P4,{spanSM:2,spanMD:3,spanLG:4,children:o.jobAutomationType&&(e=>{switch(e){case E.TH.Browser:return(0,s.jsxs)(a.Kq,{gap:"xs",children:[(0,s.jsxs)(a.xu,{children:[(0,s.jsx)(a.JO,{size:"md",icon:"star-solid-black"}),(0,s.jsx)(a.JO,{size:"md",icon:"star-outline-black"}),(0,s.jsx)(a.JO,{size:"md",icon:"star-outline-black"}),(0,s.jsx)(a.JO,{size:"md",icon:"star-outline-black"}),(0,s.jsx)(a.Vm,{width:"w-2"}),(0,s.jsx)("p",{children:d("jobs:automation_type_browser_header")})]}),(0,s.jsx)("p",{children:d("jobs:automation_type_browser_desc")})]});case E.TH.FullData:return(0,s.jsxs)(a.Kq,{gap:"xs",children:[(0,s.jsxs)(a.xu,{children:[(0,s.jsx)(a.JO,{size:"md",icon:"star-solid-black"}),(0,s.jsx)(a.JO,{size:"md",icon:"star-solid-black"}),(0,s.jsx)(a.JO,{size:"md",icon:"star-solid-black"}),(0,s.jsx)(a.JO,{size:"md",icon:"star-solid-black"}),(0,s.jsx)(a.Vm,{width:"w-2"}),(0,s.jsx)("p",{children:d("jobs:automation_type_full_data_header")})]}),(0,s.jsx)("p",{children:d("jobs:automation_type_full_data_desc")})]});case E.TH.Html:return(0,s.jsxs)(a.Kq,{gap:"xs",children:[(0,s.jsxs)(a.xu,{children:[(0,s.jsx)(a.JO,{size:"md",icon:"star-solid-black"}),(0,s.jsx)(a.JO,{size:"md",icon:"star-solid-black"}),(0,s.jsx)(a.JO,{size:"md",icon:"star-outline-black"}),(0,s.jsx)(a.JO,{size:"md",icon:"star-outline-black"}),(0,s.jsx)(a.Vm,{width:"w-2"}),(0,s.jsx)("p",{children:d("jobs:automation_type_html_header")})]}),(0,s.jsx)("p",{children:d("jobs:automation_type_html_desc")})]});case E.TH.PartialData:return(0,s.jsxs)(a.Kq,{gap:"xs",children:[(0,s.jsxs)(a.xu,{children:[(0,s.jsx)(a.JO,{size:"md",icon:"star-solid-black"}),(0,s.jsx)(a.JO,{size:"md",icon:"star-solid-black"}),(0,s.jsx)(a.JO,{size:"md",icon:"star-solid-black"}),(0,s.jsx)(a.JO,{size:"md",icon:"star-outline-black"}),(0,s.jsx)(a.Vm,{width:"w-2"}),(0,s.jsx)("p",{children:d("jobs:automation_type_partial_data_header")})]}),(0,s.jsx)("p",{children:d("jobs:automation_type_partial_data_desc")})]});default:return""}})(o.jobAutomationType)}),(null==o?void 0:o.jobLink)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h4",{children:d("jobs:source_url")}),(0,s.jsx)(a.P4,{spanSM:2,spanMD:3,spanLG:4,children:(0,s.jsx)("p",{className:"break-words",children:o.jobLink})})]})]}),u&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h4",{children:d("jobs:quick_apply")}),(0,s.jsx)(a.P4,{spanSM:2,spanMD:3,spanLG:4,children:(0,s.jsxs)(a.Kq,{gap:"sm",children:[(0,s.jsx)(a.xu,{alignY
1:"center",gap:"sm",children:(0,s.jsx)(a.u,{maxWidth:"max-w-fit",label:l?"":d("jobs:quick_apply_not_authorized_tooltip"),children:(0,s.jsxs)("label",{htmlFor:"quickApplySwitch-jobSources",className:"flex items-center gap-2 rounded-none border-0 bg-transparent p-0 text-inherit ".concat(l?"cursor-pointer":"cursor-not-allowed"),children:[(0,s.jsx)(a.rs,{id:"quickApplySwitch-jobSources",color:"deepSea",label:d("jobs:quick_apply_description"),size:"xs",value:t,disabled:!l,onChange:l?()=>{t?c(!1):(_(!0),h(!0))}:()=>{}}),(0,s.jsx)("span",{className:"text-deepsea-400 whitespace-nowrap",children:d("jobs:quick_apply_description")})]})})}),(0,s.jsx)(a.u,{maxWidth:"max-w-fit",label:l?"":d("jobs:quick_apply_not_authorized_tooltip"),children:(0,s.jsx)(a.zx,{variant:"outline-deepSea",disabled:!l,radius:"md",label:d("jobs:quick_apply_notification_settings"),size:"sm",onClick:()=>{_(!i.isEntitledToQuickApply),h(!0)}})})]})})]})]}),(0,s.jsx)(f.$,{employer:i,isIntroRequired:m,isOpen:x,onClose:()=>{h(!1),_(!1)},onSuccess:()=>{m&&c(!0),h(!1),_(!1),m&&!i.isEntitledToQuickApply&&setTimeout(()=>{window.location.reload()},300)}})]})};var R=l(83201),I=!0,T=e=>{var i,l,n,r,c,d,u,x;let{data:m,error:_}=e,v=(0,j.q)(),f=(0,a.pm)(),S=(0,b.useRouter)(),{getBreadcrumbItems:O}=(0,o.$l)(),[P,I]=(0,y.useState)(null!==(i=null==m?void 0:m.employer.isQuickApply)&&void 0!==i&&i),[T,M]=(0,y.useState)(null!==(l=null==m?void 0:m.employer.isEntitledToQuickApply)&&void 0!==l&&l),[z,A]=(0,y.useState)(null!==(n=null==m?void 0:m.jobs)&&void 0!==n?n:[]),[q,C]=(0,y.useState)(null!==(r=null==m?void 0:m.initialHasNextPage)&&void 0!==r&&r),[N,Y]=(0,y.useState)(null!==(c=null==m?void 0:m.initialEndCursor)&&void 0!==c?c:null),[D,F]=(0,y.useState)(E.By.Active),[B,J]=(0,y.useState)(0),[Q,K]=(0,y.useState)(null!==(d=null==m?void 0:m.activeJobsCount)&&void 0!==d?d:0),[V,G]=(0,y.useState)(null!==(u=null==m?void 0:m.expiredJobsCount)&&void 0!==u?u:0),[W,U]=(0,y.useState)(""),[X,$]=(0,y.useState)(!1),H=(0,y.useMemo)(()=>{var e,i,l;return{id:null!==(e=null==m?void 0:m.employer.id)&&void 0!==e?e:"",slug:null!==(i=null==m?void 0:m.employer.slug)&&void 0!==i?i:"",region:null!==(l=null==m?void 0:m.employer.region)&&void 0!==l?l:E.yp.Us,isQuickApply:P,isEntitledToQuickApply:T}},[null==m?void 0:m.employer.id,null==m?void 0:m.employer.slug,null==m?void 0:m.employer.region,T,P]),Z=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.CREATE_QUICK_APPLY_ENTITLEMENT_API(H)),ee=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.CREATE_JOB_QUICK_APPLY_API(H)),ei=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.REMOVE_JOB_QUICK_APPLY_API(H)),el=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.GET_JOBS_API(H)),es=(0,y.useCallback)(async e=>{I(e);try{e?(await ee({employerId:H.id}),T||(await Z({employerId:H.id}),M(!0))):(await ei({employerId:H.id}),f.success(v("jobs:quick_apply_job_update_success")));let{jobs:i,hasNextPage:l,endCursor:s,activeCount:a,expiredCount:n}=await el({after:null,keyword:W,status:D});A(i),C(l),Y(null!=s?s:null),K(a),G(n)}catch(e){I(P),(0,t.xy)(e),f.error(v("jobs:quick_apply_job_update_failure"))}},[P,el,W,D,ee,H.id,T,f,v,Z,ei]),ea=O(H),en=(0,R.useSearchParams)().get("jobId"),eo=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.REQUEST_JOBS_PAGE_TESTIMONIAL_IMAGE_API({id:H.id,slug:H.slug})),et=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.SET_TESTIMONIAL_IMAGE_API(H)),er=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.SET_JOBS_PAGE_TESTIMONIAL_API({id:H.id,slug:H.slug})),ec=(0,p.V)(o.h3.EMPLOYER.EMPLOYER_PROFILE.DELETE_TESTIMONIAL_API({id:H.id,slug:H.slug})),ed=(0,y.useMemo)(()=>h()(async(e,i)=>{$(!0);try{let{jobs:l,hasNextPage:s,endCursor:a,activeCount:n,expiredCount:o,isQuickApply:t}=await el({after:null,keyword:e,status:i});A(l),C(s),Y(null!=a?a:null),K(n),G(o),I(t)}catch(e){(0,t.xy)(e)}finally{$(!1)}},300),[el]),ep=(0,y.useCallback)(async()=>{$(!0);try{let{jobs:e,hasNextPage:i,endCursor:l}=await el({after:N,keyword:W,status:D});A([...z,...e]),C(i),Y(null!=l?l:null)}catch(e){(0,t.xy)(e)}finally{$(!1)}},[N,z,el,W,D]),eu=async e=>{J(e);let i=0===e?E.By.Active:1===e?E.By.Expired:null;$(!0);try{let{jobs:e,endCursor:l,hasNextPage:s,isQuickApply:a}=await el({status:i,after:null,keyword:W});A(e),F(i),C(s),Y(null!=l?l:null),I(a)}catch(e){(0,t.xy)(e)}finally{$(!1)}};if(_)return(0,s.jsxs)(a.Nn,{children:[(0,s.jsxs)(a.V1,{children:[(0,s.jsx)("h1",{children:v("common:nav_jobs")}),(0,s.jsx)("div",{className:"hidden lg:block",children:(0,s.jsx)(a.aG,{items:ea})})]}),(0,s.jsx)(a.NP,{children:v(_,{pageName:v("common:nav_jobs")})})]});let{testimonial:ej,canEdit:ex,canEditApplications:eh,allowInternalApplications:em,jobAutomation:e_,activeJobSources:eb,employerName:ey}=m;return(0,s.jsxs)(a.Nn,{children:[(0,s.jsxs)(a.V1,{children:[(0,s.jsx)("h1",{children:v("common:nav_jobs")}),(0,s.jsx)("div",{className:"hidden lg:block",children:(0,s.jsx)(a.aG,{items:ea})})]}),(0,s.jsxs)(a.NP,{children:[(0,s.jsx)("h2",{children:v("jobs:testimonials_header")}),(0,s.jsx)(a.XE,{testimonial:ej,employerName:ey,employerStatus:E.xI.Active,canEdit:ex,requestTestimonialImage:eo,updateTestimonialImage:et,updateTestimonial:er,deleteTestimonial:ec})]}),(0,s.jsxs)(a.NP,{children:[(0,s.jsx)("div",{className:"top-4 z-10 bg-white outline-[16px] outline-white md:sticky",children:(0,s.jsxs)(a.Kq,{gap:"sm",children:[(0,s.jsxs)(a.xu,{alignX:"between",children:[(0,s.jsx)("h2",{children:v("jobs:job_listings")}),(0,s.jsx)(a.Qj,{label:"Create new job",size:"sm",href:{pathname:o.h3.EMPLOYER.E
1MPLOYER_PROFILE.JOBS.INDEX(H),query:{jobId:g}},shallow:!0,scroll:!1})]}),(0,s.jsx)(L,{canEditApplications:eh,employer:H,activeJobSources:eb,jobAutomation:e_,isQuickApply:P,onQuickApplyChange:es}),(0,s.jsx)(a.xu,{width:"w-80",children:(0,s.jsx)(a.II,{placeholder:null!==(x=v("jobs:search_placeholder"))&&void 0!==x?x:"",icon:"magnifying-glass",value:W,onChange:e=>{U(e.target.value),ed(e.target.value,D)},onClear:()=>{U(""),ed(null,D)}})}),(0,s.jsxs)(a.mQ,{selectedIndex:B,onChange:eu,children:[(0,s.jsxs)(a.OK,{children:[v("jobs:tab_active")," ",v("jobs:tab_count",{count:Q})]}),(0,s.jsxs)(a.OK,{children:[v("jobs:tab_expired")," ",v("jobs:tab_count",{count:V})]}),(0,s.jsxs)(a.OK,{children:[v("jobs:tab_all")," ",v("jobs:tab_count",{count:Q+V})]})]})]})}),(0,s.jsx)(a.Kq,{role:"list",gap:"md",children:z.length>0?z.map(e=>(0,s.jsx)(w,{job:e,employer:H,canEdit:m.canEdit,canEditApplications:eh,href:{pathname:o.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.INDEX(H),query:{jobId:e.id}}},e.id)):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.o4,{type:"warning",message:v("jobs:no_filter_results")}),(0,s.jsx)(a.zx,{label:v("common:clear_filters"),size:"sm",variant:"deepSea",onClick:()=>{J(0),U(""),ed(null,null)}})]})}),q&&(0,s.jsx)(a.$l,{onObserve:ep}),X&&(0,s.jsx)(a.xu,{alignX:"center",children:(0,s.jsx)(a.$j,{size:"lg",ariaLabel:"Loading"})}),en&&(0,s.jsx)(k,{jobId:en,canEdit:ex,allowInternalApplications:em,employer:H,handleClose:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];S.push(o.h3.EMPLOYER.EMPLOYER_PROFILE.JOBS.INDEX(H),void 0,{shallow:!e,scroll:!1})}})]})]})}}},function(e){e.O(0,[3201,2888,9774,179],function(){return e(e.s=27392)}),_N_E=e.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.