1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6671],{99494:function(e,l,t){var a=t(52322),o=t(10055),n=t(15613),s=t(2784),i=t(11122),r=t(98320);let c=()=>{let[e,l]=(0,s.useState)(!1),{t}=(0,i.$G)("buttons");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(o.z,{className:"fixed right-2 bottom-2 z-30",onClick:()=>l(!0),children:[(0,a.jsx)(n.JO,{name:"bellRinging"}),t("receiveJobAlerts")]}),(0,a.jsx)(r.Z,{isOpen:e,onClose:()=>l(!1)})]})};l.Z=c},98320:function(e,l,t){var a=t(52322),o=t(6812),n=t(4102),s=t(70937),i=t(45372),r=t(2156),c=t(74789),d=t(11122),u=t(2784),m=t(63955),b=t(94449),f=t(5632),h=t(76413),p=t(79384),x=t(43919),g=t(32911),v=t(796);let y=e=>{var l;let{isOpen:t,onClose:y,jobTitle:j,location:N,brandId:I,companyId:_,denominationId:S,isCompanyPage:w=!1}=e,D=(0,f.useRouter)(),{t:C,i18n:{language:L}}=(0,d.$G)("forms"),{t:T}=(0,d.$G)("validationMessages"),{t:E}=(0,d.$G)("buttons"),[M,A]=(0,u.useState)(!1),[U,k]=(0,u.useState)(!1),[O,z]=(0,u.useState)(!1),[P,R]=(0,u.useState)([]),[B,J]=(0,u.useState)(0),[F,V]=(0,u.useState)({acceptPolicies:!1,acceptContacts:!1}),[G,W]=(0,u.useState)(),[Q]=(0,n.P92)(),[H]=(0,n.NXY)(),{data:$}=(0,n.bLT)(),{data:Z}=(0,n.ySV)(void 0,{skip:!t}),K=(0,b.v9)(n.etS),Y=null==K?void 0:K.userId;(0,u.useEffect)(()=>{t&&(0,x.XK)()},[t]),(0,u.useEffect)(()=>{if("undefined"!=typeof document)return t?document.body.classList.add(p.IBMPlexSans.variable):document.body.classList.remove(p.IBMPlexSans.variable),()=>document.body.classList.remove(p.IBMPlexSans.variable)},[t]);let q=(0,u.useMemo)(()=>({placeholder:e=>({...e,fontFamily:'var(--font-ibmplexsans), "IBM Plex Sans", sans-serif',fontWeight:400,fontSize:"1rem",lineHeight:"19px",color:"#303133"}),control:e=>({...e,fontFamily:'var(--font-ibmplexsans), "IBM Plex Sans", sans-serif',fontSize:"1rem",lineHeight:"19px",fontWeight:400,color:"#303133"}),valueContainer:e=>({...e,fontFamily:'var(--font-ibmplexsans), "IBM Plex Sans", sans-serif',fontSize:"1rem",lineHeight:"19px",fontWeight:400}),singleValue:e=>({...e,fontFamily:'var(--font-ibmplexsans), "IBM Plex Sans", sans-serif',fontSize:"1rem",lineHeight:"19px",fontWeight:400,color:"#303133"}),multiValue:e=>({...e,fontFamily:'var(--font-ibmplexsans), "IBM Plex Sans", sans-serif',fontSize:"1rem",lineHeight:"19px",fontWeight:400}),multiValueLabel:e=>({...e,fontFamily:'var(--font-ibmplexsans), "IBM Plex Sans", sans-serif',fontSize:"1rem",lineHeight:"19px",fontWeight:400,color:"#303133"}),menuPortal:e=>({...e,zIndex:99999,fontFamily:'var(--font-ibmplexsans), "IBM Plex Sans", sans-serif'}),menu:e=>({...e,fontFamily:'var(--font-ibmplexsans), "IBM Plex Sans", sans-serif',fontSize:"1rem",fontWeight:400}),menuList:e=>({...e,fontFamily:'var(--font-ibmplexsans), "IBM Plex Sans", sans-serif',fontSize:"1rem",fontWeight:400}),option:e=>({...e,fontFamily:'var(--font-ibmplexsans), "IBM Plex Sans", sans-serif',fontSize:"1rem",lineHeight:"19px",fontWeight:400,color:"#303133"})}),[]),X=(0,u.useMemo)(()=>{let e=[];
1if(Z&&Z.forEach(l=>{e.push({value:l.id,text:l.label,filterId:n.QaA.JOB_DENOMINATION})}),null==$?void 0:$.jobs){let l=$.jobs.filter(e=>e.filterId===n.QaA.BRAND);l.forEach(l=>{e.push({value:l.id,text:l.label,filterId:n.QaA.BRAND})});let t=$.jobs.filter(e=>e.filterId===n.QaA.COMPANY);t.forEach(l=>{e.push({value:l.id,text:l.label,filterId:n.QaA.COMPANY})})}return e},[Z,$]),{register:ee,formState:{errors:el},setValue:et,watch:ea,trigger:eo,getValues:en,clearErrors:es}=(0,m.cI)({resolver:(0,o.X)((0,n.TLM)(T)),mode:"onChange",defaultValues:{email:Y&&(null==K?void 0:K.email)||"",jobTitleDenominationsIds:[],brandsIds:[],companyIds:[],googleLocations:[],locations:[]}}),ei=ea("jobTitleDenominationsIds")||[],er=ea("brandsIds")||[],ec=ea("companyIds")||[],ed=(0,u.useMemo)(()=>{let e=[];return ei.forEach(l=>{let t=X.find(e=>e.value===l&&e.filterId===n.QaA.JOB_DENOMINATION);t&&e.push({value:t.value,text:t.text})}),er.forEach(l=>{let t=X.find(e=>e.value===l&&e.filterId===n.QaA.BRAND);t&&e.push({value:t.value,text:t.text})}),ec.forEach(l=>{let t=X.find(e=>e.value===l&&e.filterId===n.QaA.COMPANY);t&&e.push({value:t.value,text:t.text})}),e},[ei,er,ec,X]),eu=e=>{var l,t,a,o;return e.cityId?{id:e.cityId,type:"city",name:(null===(l=e.label.split(",")[0])||void 0===l?void 0:l.trim())||e.label,displayName:e.label,cityId:e.cityId,regionId:e.regionId||null,countryId:e.countryId||null}:null!=e.id&&null==e.regionId&&null==e.countryId?{id:e.id,type:"city",name:(null===(t=e.label.split(",")[0])||void 0===t?void 0:t.trim())||e.label,displayName:e.label,cityId:e.id,regionId:null,countryId:null}:e.regionId?{id:e.regionId,type:"region",name:(null===(a=e.label.split(",")[0])||void 0===a?void 0:a.trim())||e.label,displayName:e.label,cityId:null,regionId:e.regionId,countryId:e.countryId||null}:e.countryId?{id:e.countryId,type:"country",name:(null===(o=e.label.split(",")[0])||void 0===o?void 0:o.trim())||e.label,displayName:e.label,cityId:null,regionId:null,countryId:e.countryId}:null};(0,u.useEffect)(()=>{Y&&(null==K?void 0:K.email)&&et("email",K.email,{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0})},[Y,null==K?void 0:K.email,et]),(0,u.useEffect)(()=>{if(!t||!(null==Z?void 0:Z.length))return;if(null!=S&&Z.some(e=>e.id===S)){et("jobTitleDenominationsIds",[S],{shouldDirty:!0,shouldValidate:!0}),z(!0);return}if(O||!(null==j?void 0:j.label))return;let e=Z.find(e=>e.id===(null==j?void 0:j.id)||e.label.toLowerCase()===j.label.toLowerCase());if(e){et("jobTitleDenominationsIds",[e.id],{shouldDirty:!0,shouldValidate:!0}),z(!0);return}let l=Z.find(e=>e.label.toLowerCase().includes(j.label.toLowerCase())||j.label.toLowerCase().includes(e.label.toLowerCase()));l&&(et("jobTitleDenominationsIds",[l.id],{shouldDirty:!0,shouldValidate:!0}),z(!0))},[t,j,Z,et,O,S]),(0,u.useEffect)(()=>{t&&null!=I&&et("brandsIds",[I],{shouldDirty:!0,shouldValidate:!0})},[t,I,et]),(0,u.useEffect)(()=>{t&&null!=_&&et("companyIds",[_],{shouldDirty:!0,shouldValidate:!0})},[t,_,et]),(0,u.useEffect)(()=>{if(t&&N){let e=eu(N);if(e){R([e]);let l={cityId:e.cityId,regionId:e.regionId,countryId:e.countryId};et("locations",[l],{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0}),et("googleLocations",[],{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0})}}},[t,N,et]);let em=e=>{if("string"==typeof e)try{let l=JSON.parse(e);if(l&&l.results&&l.results.length>0){let t={id:0,type:"city",name:l.results[0].formatted_address||"Google Maps Location",displayName:l.results[0].formatted_address||"Google Maps Location",cityId:null,regionId:null,countryId:null};R([t]),et("googleLocations",[e]),et("locations",[])}else{console.error("Invalid Google Maps data structure:",l);return}}catch(e){console.error("Error parsing Google Maps data:",e)}else{R([e]);let l={cityId:e.cityId||null,regionId:e.regionId||null,countryId:e.countryId||null};et("locations",[l]),et("googleLocations",[])}},eb=e=>{R([]),et("locations",[]),et("googleLocations",[])},ef=e=>{e.acceptPolicies&&W(void 0),V(e)},eh=()=>Y||F.acceptPolicies?(W(void 0),!0):(W(T("fields.terms.required")),!1),ep=e=>{let l=e.jobTitleDenominationsIds||[];if(0===l.length&&(null==j?void 0:j.filterId)===n.QaA.JOB_POSITION&&(null==j?void 0:j.label)&&Z){let e=Z.find(e=>e.label.toLowerCase()===j.label.toLowerCase());if(e)l=[e.id];else{let e=Z.find(e=>e.label.toLowerCase().includes(j.label.toLowerCase())||j.label.toLowerCase().includes(e.label.toLowerCase()));e&&(l=[e.id])}}if(Y){let t={jobTitleDenominationsIds:l,brandsIds:e.brandsIds||[],companyIds:e.companyIds||[],googleLocations:e.googleLocations,locations:e.locations,userId:Y};H(t).then(e=>{A(!0)}).catch(e=>{console.error("Error creating alert for registered user:",e),k(!0)})}else{let t={jobTitleDenominationsIds:l,brandsIds:e.brandsIds||[],companyIds:e.companyIds||[],googleLocations:e.googleLocations,locations:e.locations,email:e.email,acceptPolicies:F.acceptPolicies,acceptContacts:F.acceptContacts};Q(t).then(e=>{A(!0)}).catch(e=>{console.error("Error creating alert for non-registered user:",e),k(!0)})}},ex=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];y(e),z(!1),R([]),J(0),V({acceptPolicies:!1,acceptContacts:!1}),W(void 0),setTimeout(()=>{A(!1),k(!1)},300)},eg=async()=>{let e=await eo(void 0,{shouldFocus:!1}),l=eh();if(e&&l){let e=en();ep(e)}else J(e=>e+1)},ev=()=>{D.push(h.zS.path[L]),ex(!0)},ey=()=>{D.push("/"),ex(!0)};return(0,a.jsxs)(a.Fragment,{children:[U&&(0,a.jsx)("div",{className:"fixed bottom-4 left-4 right-4 sm:left-4 sm:right-auto z-[99999]",children:(0,a.jsx)(g.F,{variant:"error",onClose:()=>k(!1),role:"alert",children:C("alertModal.createError")})}),(0,a.jsx)(i.u,{isOpen:t,onClose:ex,closeOnClickAction:!1,centered:M,title:C(M?"alertModal.alertSaved":"alertModal.alertSavedTitleFalse"),subtitle:C(M?"alertModal.alertSavedSubtitleTrue":"alertModal.alertSavedSubtitleFalse"),buttonOneText:M?Y?E("backToHome"):void 0:E("save"),buttonTwoText:E(M?Y?"goToAlerts":"close":"cancel"),onPrimaryAction:M?Y?ey:void 0:eg,onSecondaryAction:M?Y?ev:()=>ex(!0):()=>ex(!1),children:!M&&(0,a.jsx)("div",{className:"flex flex-col gap-6 md:gap-10",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(r.V,{id:"email",type:"email",label:"Email",placeholder:Y?null==K?void 0:K.email:"[email protected]",disabled:!!Y,isRequired:!0,isError:!!el.email,...ee("email"),labelGap:"mb-2"}),el.email&&(0,a.jsx)("span",{className:"text-error-600 text-sm -mt-2",children:el.email.message}),(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[!w&&(0,a.jsxs)("div",{className:"flex flex-col w-full",children:[X.length>0&&(0,a.jsx)(s.L,{className:"w-full",labelClassName:"text-base text-carbon-800",styles:q,type:"filter",options:X.map(e=>({value:e.value,text:e.text})),id:"jobNameAlert",label:C("alertModal.alertJobtitle"),iconName:"briefcase",placeholder:ei.length+er.length+ec.length>=1?T("locationSelector.maxSelectionsReached"):C("alertModal.alertJobtitlePlaceholder"),isMulti:!0,required:!0,isSearchable:!0,renderValueOutside:!0,value:ed,onMenuOpen:()=>es("jobTitleDenominationsIds"),onChange:e=>{if(!e||!Array.isArray(e)){et("jobTitleDenominationsIds",[],{shouldDirty:!0,shouldValidate:!0}),et("brandsIds",[],{shouldDirty:!0,shouldValidate:!0}),et("companyIds",[],{shouldDirty:!0,shouldValidate:!0});return}let l=[],t=[],a=[];
1e.forEach(e=>{let o="object"==typeof e&&void 0!==e.value?e.value:"number"==typeof e?e:null;if(null!==o){let e=X.find(e=>e.value===o);e&&(e.filterId===n.QaA.JOB_DENOMINATION?l.push(o):e.filterId===n.QaA.BRAND?t.push(o):e.filterId===n.QaA.COMPANY&&a.push(o))}}),et("jobTitleDenominationsIds",l,{shouldDirty:!0,shouldValidate:!0}),et("brandsIds",t,{shouldDirty:!0,shouldValidate:!0}),et("companyIds",a,{shouldDirty:!0,shouldValidate:!0});let o=l.length+t.length+a.length;0===o&&eo("jobTitleDenominationsIds")},disabled:ei.length+er.length+ec.length>=1,menuPortalTarget:"undefined"!=typeof document?document.body:void 0,menuPosition:"fixed"},B),ei.length+er.length+ec.length>=1&&(0,a.jsx)("span",{className:"text-carbon-700 text-sm mt-2 block",role:"status",children:T("locationSelector.maxSelectionsReached")}),el.jobTitleDenominationsIds&&0===ei.length&&0===er.length&&0===ec.length&&(0,a.jsx)("span",{className:"text-error-600 text-sm mt-1",children:null===(l=el.jobTitleDenominationsIds)||void 0===l?void 0:l.message})]}),(0,a.jsxs)("div",{className:"flex flex-col w-full",children:[(0,a.jsx)(c.N,{label:C("alertModal.alertLocation"),id:"locationAlert",placeholder:C("generic.locations.selectPlaceholder"),isRequired:!0,selectedLocations:P,onAddLocation:em,onRemoveLocation:eb,maxSelections:1,clearInputOnSelection:!0,isError:!!el.locations}),el.locations&&(0,a.jsx)("span",{className:"text-error-600 text-sm",children:el.locations.message})]})]}),!Y&&(0,a.jsx)(v.I,{value:F,onChange:ef,links:{termsOfUse:h.I8.path[L],privacyPolicy:h.AE.path[L]},error:G})]})})})]})};l.Z=y},26952:function(e,l,t){var a=t(52322),o=t(76413),n=t(11122),s=t(39097),i=t.n(s);let r=e=>{var l,t,s,r,c,d,u,m,b,f;let{data:h}=e,{t:p}=(0,n.$G)("topSearches"),{i18n:{language:x}}=(0,n.$G)(),g=(null==h?void 0:null===(l=h.topJobTitle)||void 0===l?void 0:l.length)>0||(null==h?void 0:null===(t=h.topRegion)||void 0===t?void 0:t.length)>0||(null==h?void 0:null===(s=h.topCity)||void 0===s?void 0:s.length)>0||(null==h?void 0:null===(r=h.topSector)||void 0===r?void 0:r.length)>0||(null==h?void 0:null===(c=h.topArea)||void 0===c?void 0:c.length)>0;if(!g)return null;let v=e=>{if(null==e?void 0:e.searchUrl)return o.mt.path[x].replace(":slug*",e.searchUrl.replace("/","")||"")};return(0,a.jsxs)("div",{className:"full-bleed-container",children:[(0,a.jsx)("div",{className:"full-bleed-bg bg-alabaster-50"}),(0,a.jsxs)("section",{className:"full-bleed-content flex flex-col gap-6 md:gap-10 py-10 md:pt-20 md:pb-10",children:[(0,a.jsxs)("header",{className:"text-center flex flex-col gap-2",children:[(0,a.jsx)("h2",{className:"font-medium text-[26px] md:text-[40px] text-carbon-800 font-abcgintonord",children:p("title")}),(0,a.jsx)("p",{className:"text-carbon-800 text-base",children:p("subtitle")})]}),(0,a.jsxs)("article",{className:"grid grid-cols-2 lg:flex lg:justify-between gap-4 lg:gap-0",children:[(null==h?void 0:null===(d=h.topJobTitle)||void 0===d?void 0:d.length)>0&&(0,a.jsxs)("ul",{className:"flex flex-col md:gap-2",children:[(0,a.jsxs)("li",{className:"font-bold text-carbon-800 text-base md:text-xl py-2 px-4 md:p-2",children:[p("tag")," ",p("position")]}),null==h?void 0:h.topJobTitle.map(e=>(0,a.jsx)("li",{className:"text-sm md:text-base text-carbon-800 cursor-pointer py-2 px-4 md:p-2",children:(0,a.jsx)(i(),{href:v(e),children:x.startsWith("en")?"".concat(e.label," ").concat(p("job")):"".concat(p("job")," ").concat(e.label)})},e.id))]}),(null==h?void 0:null===(u=h.topRegion)||void 0===u?void 0:u.length)>0&&(0,a.jsxs)("ul",{className:"flex flex-col md:gap-2",children:[(0,a.jsxs)("li",{className:"font-bold text-carbon-800 text-base md:text-xl py-2 px-4 md:p-2",children:[p("tag")," ",p("province")]}),null==h?void 0:h.topRegion.map(e=>(0,a.jsx)("li",{className:"text-sm md:text-base text-carbon-800 cursor-pointer py-2 px-4 md:p-2",children:(0,a.jsx)(i(),{href:v(e),children:x.startsWith("en")?"".concat(e.label," ").concat(p("job")):"".concat(p("job")," ").concat(e.label)})},e.id))]}),(null==h?void 0:null===(m=h.topCity)||void 0===m?void 0:m.length)>0&&(0,a.jsxs)("ul",{className:"flex flex-col md:gap-2",children:[(0,a.jsxs)("li",{className:"font-bold text-carbon-800 text-base md:text-xl py-2 px-4 md:p-2",children:[p("tag")," ",p("city")]}),null==h?void 0:h.topCity.map(e=>(0,a.jsx)("li",{className:"text-sm md:text-base text-carbon-800 cursor-pointer py-2 px-4 md:p-2",children:(0,a.jsx)(i(),{href:v(e),children:x.startsWith("en")?"".concat(e.label," ").concat(p("job")):"".concat(p("job")," ").concat(e.label)})},e.id))]}),(null==h?void 0:null===(b=h.topSector)||void 0===b?void 0:b.length)>0&&(0,a.jsxs)("ul",{className:"flex flex-col md:gap-2",children:[(0,a.jsxs)("li",{className:"font-bold text-carbon-800 text-base md:text-xl py-2 px-4 md:p-2",children:[p("tag")," ",p("industry")]}),null==h?void 0:h.topSector.map(e=>(0,a.jsx)("li",{className:"text-sm md:text-base text-carbon-800 cursor-pointer py-2 px-4 md:p-2",children:(0,a.jsx)(i(),{href:v(e),children:x.startsWith("en")?"".concat(e.label," ").concat(p("job")):"".concat(p("job")," ").concat(e.label)})},e.id))]}),(null==h?void 0:null===(f=h.topArea)||void 0===f?void 0:f.length)>0&&(0,a.jsxs)("ul",{className:"flex flex-col md:gap-2",children:[(0,a.jsxs)("li",{className:"font-bold text-carbon-800 text-base md:text-xl py-2 px-4 md:p-2",children:[p("tag")," ",p("area")]}),null==h?void 0:h.topArea.map(e=>(0,a.jsx)("li",{className:"text-sm md:text-base text-carbon-800 cursor-pointer py-2 px-4 md:p-2",children:(0,a.jsx)(i(),{href:v(e),children:x.startsWith("en")?"".concat(e.label," ").concat(p("job")):"".concat(p("job")," ").concat(e.label)})},e.id))]})]})]})]})};l.Z=r},1860:function(e,l,t){t.d(l,{r:function(){return i}});var a=t(4102),o=t(2784),n=t(94449),s=t(34613);let i=()=>{let e=(0,n.v9)(a.PRA),{data:l,refetch:t}=(0,a.VPs)(void 0,{skip:!(null==e?void 0:e.userId)}),[i]=(0,a.Bch)(),[r]=(0,a.JD1)(),[c,d]=(0,o.useState)({}),u=(0,o.useCallback)(async a=>{if((null==e?void 0:e.userId)&&(null==a?void 0:a.id))try{let o=null==l?void 0:l.some(e=>e.offerId===a.id),n=c[a.id],u=void 0!==n?n:o;d(e=>({...e,[a.id]:!u})),u?await r({offerId:a.id}):await i({userId:e.userId,offerId:a.id}),(0,s.QK)("job_offer_favorited",{job_offer_id:String(a.id),action:u?"remove":"add"}),await t(),d(e=>{let l={...e};return delete l[a.id],l})}catch(e){console.error("Error managing favorite:",e),d(e=>{let l={...e};return delete l[a.id],l})}},[e,l,c,i,r,t]),m=(0,o.useCallback)(e=>void 0!==c[e]?c[e]:null==l?void 0:l.some(l=>l.offerId===e),[l,c]);return{favorites:l,handleFavorite:u,isFavorite:m,isLoggedIn:!!(null==e?void 0:e.userId)}}},63457:function(e,l,t){t.d(l,{Th:function(){return i},Un:function(){return s}});var a=t(52322);function o(e){let l;let t=[],o=0,s=/<ul\s*([^>]*?)>([\s\S]*?)<\/ul>/gi;for(;null!==(l=s.exec(e));){if(l.index>
1o){let a=e.substring(o,l.index);t.push(...n(a))}let s=l[2],i=function(e){let l;let t=[],o=/<li\s*([^>]*?)>([\s\S]*?)<\/li>/gi;for(;null!==(l=o.exec(e));){let e=l[2];t.push((0,a.jsxs)("li",{className:"flex items-start",children:[(0,a.jsx)("span",{className:"mr-2 mt-1 text-carbon-800",children:"â¢"}),(0,a.jsx)("span",{className:"flex-1",children:n(e)})]},"li-".concat(t.length)))}return t}(s);t.push((0,a.jsx)("ul",{className:"space-y-2 my-2",children:i},"ul-".concat(t.length))),o=l.index+l[0].length}if(o<e.length){let l=e.substring(o);t.push(...n(l))}return t}function n(e){let l=e.replace(/<br\s*\/?>/gi,"___BR___");l=(l=l.replace(/<(em|i)([^>]*?)>(.*?)<\/(em|i)>/gi,"___EM_START___$3___EM_END___")).replace(/<(strong|b)([^>]*?)>(.*?)<\/(strong|b)>/gi,"___STRONG_START___$3___STRONG_END___");let t=l.split(/(___BR___|___EM_START___|___EM_END___|___STRONG_START___|___STRONG_END___)/),o=[],n=null,s=[];for(let e=0;e<t.length;e++){let l=t[e];switch(l){case"___BR___":n?s.push((0,a.jsx)("br",{},"br-".concat(e))):o.push((0,a.jsx)("br",{},"br-".concat(e)));break;case"___EM_START___":n="em",s=[];break;case"___EM_END___":"em"===n&&(o.push((0,a.jsx)("em",{children:s},"em-".concat(e))),n=null,s=[]);break;case"___STRONG_START___":n="strong",s=[];break;case"___STRONG_END___":"strong"===n&&(o.push((0,a.jsx)("strong",{children:s},"strong-".concat(e))),n=null,s=[]);break;default:l&&(n?s.push(l):o.push(l))}}return o}function s(e){let{content:l,className:t}=e;return(0,a.jsx)("span",{className:t,children:o(l)})}function i(e){let{content:l,className:t,linkReplacements:n={},language:s="en"}=e;return(0,a.jsx)("div",{className:t,children:(e=>{let l;let t=[],n=0,s=/<(a|span)\s+([^>]*?)>(.*?)<\/\1>/gi;for(;null!==(l=s.exec(e));){if(l.index>n){let a=e.substring(n,l.index);t.push(...o(a))}let s=l[1].toLowerCase(),i=l[2],r=l[3];if("a"===s){let e=i.match(/href\s*=\s*["']([^"']+)["']/i),l=i.match(/class\s*=\s*["']([^"']+)["']/i);if(e){let n=e[1],s=l?l[1]:"";t.push((0,a.jsx)("a",{href:n,className:s,children:o(r)},"link-".concat(t.length)))}else t.push(...o(r))}else if("span"===s){let e=i.match(/class\s*=\s*["']([^"']+)["']/i),l=e?e[1]:"";t.push((0,a.jsx)("span",{className:l,children:o(r)},"span-".concat(t.length)))}n=l.index+l[0].length}if(n<e.length){let l=e.substring(n);t.push(...o(l))}return t})(l)})}t(2784)},34348:function(e,l,t){t.d(l,{o:function(){return d}});var a=t(52322),o=t(2784),n=t(10055),s=t(5153),i=t(15613),r=t(9526),c=t(11122);let d=(0,o.forwardRef)((e,l)=>{let{children:t,disabled:d=!1,placeholder:u="Search job...",placeholder2:m="Search location...",onClick:b,size:f="big",job:h="",location:p="",jobs:x=[],locations:g=[],selectedJobUrl:v="",selectedLocationUrl:y="",isLoading:j=!1,onLocationClear:N,onJobClear:I,getSuggestionKind:_=()=>"job"}=e,{t:S}=(0,c.$G)(["common","searchHero"]),[w,D]=(0,o.useState)(h),[C,L]=(0,o.useState)(void 0),[T,E]=(0,o.useState)(p),[M,A]=(0,o.useState)(!1),[U,k]=(0,o.useState)([]),[O,z]=(0,o.useState)([]),[P,R]=(0,o.useState)(!1),[B,J]=(0,o.useState)(v),[F,V]=(0,o.useState)(y),[G,W]=(0,o.useState)(-1),[Q,H]=(0,o.useState)(-1),[$,Z]=(0,o.useState)(!1),[K,Y]=(0,o.useState)(!1),q=(0,o.useRef)(null),X=(0,o.useRef)(null),ee=(0,o.useMemo)(()=>(0,r.Z)(g),[g]);(0,o.useImperativeHandle)(l,()=>({focusJobInput:()=>{var e;null==(e=X.current)||e.focus()}})),(0,o.useEffect)(()=>{var e;if(v){let l=x.find(e=>e.searchUrl===v);l&&(D(l.label),J(l.searchUrl),L(null==(e=l.orderBy)?void 0:e.id))}},[v,x]),(0,o.useEffect)(()=>{if(y){let e=ee.find(e=>e.searchUrl===y);e&&(E(e.displayName||e.label),V(e.searchUrl))}},[y,ee]),(0,o.useEffect)(()=>{M||D(h)},[h,M]),(0,o.useEffect)(()=>{E(p)},[p]);let el=(e,l)=>{if(e.length<3)return[];let t=e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return l.filter(e=>e.label.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").includes(t)).sort((e,l)=>{let a=_(e),o=_(l);if("job"===a&&"brand"===o)return -1;if("brand"===a&&"job"===o)return 1;let n=e.label.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,""),s=l.label.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,""),i=et(n,t),r=et(s,t);return i!==r?r-i:n.length-s.length})},et=(e,l)=>{let t=0;return e===l&&(t+=100),e.startsWith(l)&&(t+=50),RegExp("\\b".concat(l),"i").test(e)&&(t+=30),e.
1includes(l)&&(t+=10),t+=Math.max(0,20-e.length)},ea=e=>{let l=e.target.value;D(l);let t=el(l,x);k(t),Z(t.length>0),W(-1),J("")},eo=e=>{let l=e.target.value;E(l);let t=(0,r.w)(ee,l);z(t),Y(t.length>0),H(-1),V("")},en=e=>{var l;if(!(!$||0===U.length))switch(e.key){case"ArrowDown":e.preventDefault(),W(e=>e<U.length-1?e+1:0);break;case"ArrowUp":e.preventDefault(),W(e=>e>0?e-1:U.length-1);break;case"Enter":if(e.preventDefault(),G>=0&&G<U.length){let e=U[G];ei({label:e.label,searchUrl:e.searchUrl,jobDenominationId:null==(l=e.orderBy)?void 0:l.id},"job")}break;case"Escape":k([]),Z(!1),W(-1)}},es=e=>{if(!(!K||0===O.length))switch(e.key){case"ArrowDown":e.preventDefault(),H(e=>e<O.length-1?e+1:0);break;case"ArrowUp":e.preventDefault(),H(e=>e>0?e-1:O.length-1);break;case"Enter":if(e.preventDefault(),Q>=0&&Q<O.length){let e=O[Q];ei({label:e.label,searchUrl:e.searchUrl,displayName:e.displayName},"location")}break;case"Escape":z([]),Y(!1),H(-1)}},ei=(e,l)=>{if("job"===l){if(D(e.label),J(e.searchUrl),L(e.jobDenominationId),k([]),Z(!1),W(-1),F){R(!0);let l={jobDenominationId:e.jobDenominationId,job:e.label,location:T,selectedJobUrl:e.searchUrl,selectedLocationUrl:F};b(l).finally(()=>R(!1))}}else if(E(e.displayName||e.label),V(e.searchUrl),z([]),Y(!1),H(-1),B){R(!0);let l={jobDenominationId:C,job:w,location:e.displayName||e.label,selectedJobUrl:B,selectedLocationUrl:e.searchUrl};b(l).finally(()=>R(!1))}},er=e=>{var l,t;e.preventDefault(),R(!0);let a={job:w,selectedJobUrl:B||void 0,jobDenominationId:C},o={location:T,selectedLocationUrl:F||void 0},n=U,s=O;if(w.length>=3&&!B&&0===U.length&&(n=el(w,x)),T.length>=3&&!F&&0===O.length&&(s=(0,r.w)(ee,T)),w.length>=3&&!B&&n.length>0){let e=n[0];a={job:e.label,selectedJobUrl:e.searchUrl,jobDenominationId:null==(l=e.orderBy)?void 0:l.id},D(e.label),J(e.searchUrl),L(null==(t=e.orderBy)?void 0:t.id),Z(!1),k([])}if(T.length>=3&&!F&&s.length>0){let e=s[0];o={location:e.displayName||e.label,selectedLocationUrl:e.searchUrl},E(e.displayName||e.label),V(e.searchUrl),Y(!1),z([])}let i={jobDenominationId:a.jobDenominationId,job:a.job,location:o.location,selectedJobUrl:a.selectedJobUrl,selectedLocationUrl:o.selectedLocationUrl};b(i).finally(()=>R(!1))},ec=e=>{q.current&&!q.current.contains(e.target)&&(k([]),z([]),Z(!1),Y(!1),W(-1),H(-1))};return(0,o.useEffect)(()=>(document.addEventListener("mousedown",ec),()=>{document.removeEventListener("mousedown",ec)}),[]),(0,a.jsxs)("form",{ref:q,className:"md:mt-2 bg-alabaster-50 md:bg-white-50 pl-4 py-4 pr-4 md:pl-10 flex flex-col md:flex-row md:gap-10 gap-3 md:rounded-lg w-full z-10 md:drop-shadow-[0_2px_16px_rgba(0,0,0,0.08)]",onSubmit:er,children:[(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-2 md:gap-10 w-full md:items-center",children:[(0,a.jsxs)("div",{className:"relative w-full md:w-2/4",children:[(0,a.jsxs)("div",{className:"relative flex items-center",children:[(0,a.jsx)(i.JO,{name:"job",size:"default",className:"absolute left-4"}),(0,a.jsx)("input",{ref:X,placeholder:u,className:"w-full px-4 py-2 pl-12 bg-white-50 text-base text-carbon-800 font-bold placeholder:font-normal placeholder:text-carbon-700 focus:outline-none focus:border-carbon-800 placeholder:disabled:text-carbon-700 disabled:text-carbon-700",disabled:d,value:w,onChange:ea,onKeyDown:en}),w&&(0,a.jsx)("button",{type:"button",onClick:()=>{A(!0),D(""),J(""),k([]),L(void 0),Z(!1),W(-1),null==I||I(),setTimeout(()=>{A(!1)},100)},className:"absolute right-3 p-1 hover:bg-gray-100 rounded-full transition-colors","aria-label":"Clear job",children:(0,a.jsx)(i.JO,{name:"xMark",size:"default",className:"text-carbon-700 hover:text-carbon-700"})})]}),U.length>0&&(0,a.jsx)("ul",{className:"absolute bg-white-50 w-full max-h-40 overflow-y-auto z-10 rounded-md scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100 hover:scrollbar-thumb-gray-400 mt-5",children:U.map((e,l)=>(0,a.jsxs)("li",{className:"flex items-center gap-2 px-4 py-2 cursor-pointer ".concat(l===G?"bg-cream-100":"hover:bg-gray-100"),onClick:()=>{var l;return ei({label:e.label,searchUrl:e.searchUrl,jobDenominationId:null==(l=e.orderBy)?void 0:l.id},"job")},children:["job"===_(e)?(0,a.jsx)(i.JO,{name:"job",size:"default"}):(0,a.jsx)(i.JO,{name:"enterprise",size:"default"}),(0,a.jsx)("span",{className:"text-gray-900 text-sm",children:e.label})]},"".concat(e.id,"-").concat(e.label)))})]}),(0,a.jsx)(s.i,{direction:"y",className:"md:h-10"}),(0,a.jsxs)("div",{className:"relative w-full md:w-2/4",children:[(0,a.jsxs)("div",{className:"relative flex items-center",children:[(0,a.jsx)(i.JO,{name:"location",size:"default",className:"absolute left-4"}),(0,a.jsx)("input",{placeholder:m,className:"w-full px-4 py-2 pl-12 bg-white-50 text-base font-bold placeholder:font-normal text-carbon-700 text-carbon-800 focus:outline-none focus:border-carbon-800 placeholder:text-carbon-700 placeholder:disabled:text-carbon-700 disabled:text-carbon-700",disabled:d,value:T,onChange:eo,onKeyDown:es}),T&&(0,a.jsx)("button",{type:"button",onClick:()=>{E(""),V(""),z([]),Y(!1),H(-1),null==N||N()},className:"absolute right-3 p-1 hover:bg-gray-100 rounded-full transition-colors","aria-label":"Clear location",children:(0,a.jsx)(i.JO,{name:"xMark",size:"default",className:"text-carbon-700 hover:text-carbon-700"})})]}),O.length>0&&(0,a.jsx)("ul",{className:"absolute bg-white-50 w-full max-h-60 overflow-y-auto z-10 rounded-md scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100 hover:scrollbar-thumb-gray-400 mt-5 border border-gray-200 shadow-lg",children:O.map((e,l)=>(0,a.jsxs)("li",{className:"flex items-center gap-3 px-4 py-3 cursor-pointer border-b border-gray-100 last:border-b-0 ".concat(l===Q?"bg-cream-100":"hover:bg-gray-50"),onClick:()=>ei({label:e.label,searchUrl:e.searchUrl,displayName:e.displayName},"location"),children:[(0,a.jsx)(i.JO,{name:"location",size:"default",className:"text-gray-500 flex-shrink-0"}),(0,a.jsxs)("div",{className:"flex flex-col flex-1 min-w-0",children:[(0,a.jsx)("span",{className:"text-gray-900 text-sm font-medium truncate",children:e.displayName}),(0,a.jsx)("span",{className:"text-xs text-gray-500 capitalize",children:"city"===e.type?S("locations.city"):"region"===e.type?S("locations.region"):S("locations.country")})]})]},"".concat(e.id,"-").concat(e.label)))})]})]}),(0,a.jsx)(n.z,{type:"submit",isLoading:j||P,children:t})]})})},39141:function(e,l,t){t.d(l,{Z:function(){return o}});var a=t(52322);function o(e){let{on:l,label:t,onChange:o,inverse:n=!1,disabled:s=!1,className:i="",...r}=e,c=()=>{!s&&o&&o(!l)};return(0,a.jsxs)("div",{className:"flex gap-2 items-center ".concat(n?"flex-row-reverse":""," ").concat(s?"cursor-not-allowed opacity-60":"cursor-pointer"," ").concat(i),onClick:c,...r,children:[t&&(0,a.jsx)("span",{className:"text-sm ".concat(l?"text-carbon-800":"text-carbon-700"," ").concat(s?"text-carbon-700":""),children:t}),(0,a.jsxs)("div",{className:"relative inline-block w-[36px] h-[20px]",children:[(0,a.jsx)("div",{className:"absolute inset-0 transition-colors duration-300 ease-in-out ".concat(l?"bg-tangaroa-950":"bg-carbon-600"," ").concat(s?"bg-carbon-300":""," rounded-full")}),(0,a.jsx)("div",{className:"absolute left-[2px] bottom-[2px] w-[16px] h-[16px] bg-white-50 rounded-full transition-transform duration-300 ease-in-out ".concat(l?"translate-x-[16px]":"translate-x-0")})]})]})}},9526:function(e,l,t){function a(e){return e.map(e=>({...e,displayName:e.displayName||e.label,type:function(e){var l;let t=null!==(l=e.type)&&void 0!==l?l:e.searchFilterType;return 0===t?"country":1===t?"region":"city"}(e)}))}function o(e,l){return function(e,l){if(!l||l.length<3)return[];let t=l.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return e.filter(e=>{let l=e.label.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,""),a=e.displayName.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return l.includes(t)||a.includes(t)}).sort((e,l)=>{let a=e.label.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,""),o=l.label.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,""),n=a.startsWith(t),s=o.startsWith(t),i=a===t,r=o===t;if(i&&!r)return -1;if(!i&&r)return 1;if(i&&r){if("city"===e.type&&"city"!==l.type)return -1;if("city"!==e.type&&"city"===l.type)return 1;if("region"===e.type&&"country"===l.type)return -1;if("country"===e.type&&"region"===l.type)return 1}if(n&&!s)return -1;if(!n&&s)return 1;if(n&&s){let t={city:1,region:2,country:3},a=t[e.type],o=t[l.type];if(a!==o)return a-o}return e.label.localeCompare(l.label)})}(e,l)}t.d(l,{Z:function(){return a},w:function(){return 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.