PageSourceSearch

https://www.jobs.ch/public/scripts/modern/chunk-src_common_lib_Fac…n-dynamic_tracking_queue-f80d9e.fa5fad81.js

js jobs.ch collected 2026-09-24 18:35:04 UTC 50,989 bytes, 2 lines download raw bytes

1"use strict";(globalThis.webpackChunk_jobcloud_b2c_frontend=globalThis.webpackChunk_jobcloud_b2c_frontend||[]).push([["src_common_lib_Facet_utils_treeUtils_ts-src_common_modules_application-dynamic_tracking_queue-f80d9e"],{47538(e,t,a){a.d(t,{Nt:()=>n,ON:()=>c,R$:()=>s,WL:()=>r,e5:()=>o,k:()=>i});a(84775),a(78944),a(83871),a(97512),a(18910),a(58968);const i=(e,t)=>t.reduce(((a,{facets:r,id:n})=>({...a,[n]:{...r?{children:r.map((e=>e.id))}:{},id:n,...e&&~e?{parent:e}:{},...e&&~e?{siblings:t.map((e=>e.id))}:{}},...r?i(n,r):{}})),{}),r=e=>(t=[])=>{const a=t.reduce(((t,a)=>{const{children:i=[]}=e[a]||{};return[...t,...i]}),[]);return t.filter((e=>!a.includes(e)))},n=e=>(t=[])=>{const a=t.reduce(((t,a)=>{const{children:i=[]}=e[a]||{};return[...t,...i]}),[]);return[...new Set([...t,...a])]},s=e=>(t,a)=>{const{children:i=[],id:r,parent:n,siblings:s=[]}=e[a.id?a.id:0]||{};switch(a.type){case"clear":return[];case"remove":return t.filter((e=>e!==r&&e!==n&&!(i||[]).includes(e)));case"reset":return a.ids||[];default:return[...new Set([...t||[],r,...i.length?i:[],...s.length&&s.every((e=>(t||[]).includes(e)||e===r))&&n?[n]:[]])]}},o=(e=[])=>e.reduce(((e,t)=>[...e,t.id,...t.facets?o(t.facets):[]]),[]),c=e=>Array.isArray(e)?e:"string"==typeof e||"number"==typeof e?[e]:[]},46044(e,t,a){a.d(t,{B9:()=>n,LV:()=>o,gA:()=>l,kf:()=>c,vd:()=>s});a(84775);var i=a(67397),r=a.n(i);const n=e=>
1!(!r().parseOneAddress(e)||!/.+@.+\.[a-zA-Z]{2,}$/.test(e)||e.trim().includes(" ")),s=(e,t={})=>{const{year:a,month:i,day:r}=e,{noDay:n,noMonth:s,noYear:o}=t,c=parseInt(a||"",10),l=parseInt(i||"",10),d=parseInt(r||"",10);return!(!n&&(isNaN(d)||d<1||d>31)||!s&&(isNaN(l)||l<1||l>12)||!o&&(isNaN(c)||c<999||c>2200))},o=(e={})=>!(new Date((e.year||"")+"-"+(e.month||"")+"-"+(e.day||""))>new Date),c=e=>/^[0-9]*$/.test(e||""),l=e=>/^[0-9a-z]*$/i.test(e||"")},99294(e,t,a){a.d(t,{En:()=>g,Fj:()=>y,GV:()=>i,RI:()=>h,Tg:()=>s,Wp:()=>m,_2:()=>c,gn:()=>p,oL:()=>o,of:()=>n,qD:()=>r,wV:()=>l,wb:()=>f,xz:()=>u,yh:()=>d});const i=["certificates","cv","motivationLetter","other"],r=["delivery-failed-job-closed","draft","external"],n=["contactInfo","cv","coverLetter","otherDocuments","additionalInfo","ignored","formData"],s="formData",o={contactInfo:["gender","firstName","lastName","phone","email"],cv:["cv"],coverLetter:["motivationalLetter","motivationLetter"],otherDocuments:["certificates","other"],additionalInfo:["zipCode","availability","workPermit","lastOccupation","address","city","country","dateOfBirth","nationality"],ignored:["allowRecruiterToKeepData","allowSpottedToProcessData"],[s]:[]},c=Object.values(o).flat(),l=["jobFit"],d={motivationLetter:"motivation",other:"other",certificates:"certificates",cv:"cv"},u={m:"male",f:"female"},y={male:"m",female:"f",diverse:void 0},p={certificates:["degree-certificate"],motivationLetter:["motivation"],other:["other","portfolio","letter-of-reference"],cv:["cv"]},m={APPLY_ONCE:"23bd9dbf-6b9b-41cd-a99e-4844bcf3077f",DOCUMENTS_MAX_SIZE:"5e76a190-6248-0fc9-067c-99fbd8dd7263",MEDIA_API_EXCEPTION:"f47ac10b-58cc-4372-a567-0e02b2c3d479",MEDIA_API_ID_NOT_EXISTS:"ca491dd5-0198-4488-9c8d-6cc470fc7b3b",MEDIA_API_TIMEOUT:"db57983b-9d3e-42d7-b95c-8c436de1e438",METADATA_INVALID:"7dea012b-c1d7-4350-b87b-e181f0c447c9",METADATA_TIMEOUT:"555fd020-ef05-458b-bd73-06bd3d70181b",STATUS_CHANGE_INVALID:"8e179f1b-97aa-4560-a02f-2a8b42e49df7",UNSUPPORTED_FIELDS:"e4b4bcb1-d20f-ae45-f6c9-c45e1806fbbd",UNSUPPORTED_DEFINITION:"59c36783-04d6-c184-24de-ae35ba4ec264"},g={filter:{limit:1e5,offset:0}},h={fileUploadErrors:!1,fileUploadInProgress:!1,applicationSavingInProgress:!1},f=["fileUploadErrors","fileUploadInProgress","applicationSavingInProgress"]},98400(e,t,a){a.d(t,{H:()=>p});a(84775),a(78944),a(97512),a(27025),a(18910),a(50750);var i=a(46922);const r=(e,t,a)=>{const i=e.find((e=>e.name===t));return!(!i||"singleSelect"!==i.type&&"multiSelect"!==i.type)&&(i.options?.some((e=>e.value===a))??!1)},n=e=>Array.isArray(e)&&e.length>0?[...e]:"string"==typeof e&&e?e.trim():"boolean"==typeof e||"number"==typeof e?e:void 0;var s=a(71483),o=a(18960),c=a(90701),l=a(99294),d=a(85629);const u="create",y="draft";class p{address;allowRecruiterToKeepData;allowSpottedToProcessData;availability;certificates;city;country;cv;dateOfBirth;device;email;firstName;gender;id;interviewStatus;job;jobFit=null;lastName;lastOccupation;locale;motivationLetter;motivationalLetter;nationality;other;phone;status;updatedAt;workPermit;zipCode;[l.Tg];constructor(e={status:y,id:u}){this.address=e.address,this.allowRecruiterToKeepData=e.allowRecruiterToKeepData,this.allowSpottedToProcessData=e.allowSpottedToProcessData,this.availability=e.availability,this.city=e.city,this.country=e.country,this.dateOfBirth=e.dateOfBirth,this.email=e.email,this.firstName=e.firstname,this.gender=e.gender,this.id=e.id||u,this.job=e.job,this.lastName=e.lastname,this.lastOccupation=e.lastOccupation,this.locale=e.locale||o.Hg.get(),this.motivationalLetter=e.motivationalLetter,this.nationality=e.nationality,this.phone=e.phone,this.status=e.status,this.updatedAt=e.updatedAt,this.workPermit=e.workPermit,this.zipCode=e.zipCode,this.jobFit=e.jobFit??null,this.cv=(()=>{const t=(e.documents||[]).filter((e=>"cv"===e.tag)).at(0);return void 0!==t?[(0,s.d)(t)]:[]})(),this.motivationLetter=(e.documents||[]).filter((e=>"motivation"===e.tag)).map((e=>(0,s.d)(e))),this.certificates=(e.documents||[]).filter((e=>"certificates"===e.tag)).map((e=>(0,s.d)(e))),this.other=(e.documents||[]).filter((e=>"other"===e.tag)).map((e=>(0,s.d)(e))),this[l.Tg]=e.formData||{}}hasFinalSuccessStatus(){return!["draft","delivery-failed"].includes(this.status)}isPreviouslySavedOrSubmitted(){return this.id!==u}static createFromUserData({applicationDefinition:e,user:t,candidate:a,documents:i=[]}){return(new p).extendWithUserData(e,t).extendWithCandidateData(e,a).extendWithProfileDocuments(i||[])}static getSavePayload(e,t,a=y,i=!1){const r={id:t,status:a},{[l.Tg]:s={},...o}=e;for(const[e,t]of Object.entries(o)){if(void 0===t)continue;if(l.wV.includes(e))continue;if(!l._2.includes(e))continue;const a=n(t);void 0!==a&&(r[e]=a)}i&&"number"==typeof e.jobFit?.jobFitScore&&(r.jobFit={jobFitScore:e.jobFit.jobFitScore,jobFitVariant:d.Q4});for(const[e,t]of Object.entries(s)){if(void 0===t)continue;const a=n(t);void 0!==a&&(r[l.Tg]=r[l.Tg]||{},r[l.Tg][e]=a)}return r}static getSubmitPayload(e,t,a=!1){return{...p.getSavePayload(e,t,y,a),status:"send"}}static createFromInstance(e,t){return Object.assign(Object.create(this.prototype),e,t)}static rehydrate(e){return e instanceof p?e:Object.create(this.prototype,Object.getOwnPropertyDescriptors(e))}extendWithUserData(e,t){return t?(e.length<=0||(e.find((e=>"email"===e.name))&&(this.email=t.email),e.find((e=>"firstName"===e.name))&&(this.firstName=t.firstName),e.find((e=>"lastName"===e.name))&&(this.lastName=t.lastName)),this):this}extendWithCandidateData(e,t){return t?(e.length<=0||(void 0!==t.gender&&e.find((e=>"singleSelect"===e.type&&"gender"===e.name&&e.options?.some((e=>e.value===l.xz[t.gender]))))&&(this.gender=l.xz[t.gender]),e.find((e=>"phone"===e.name))&&(this.phone=(0,c.dV)(t.phone)),e.find((e=>"dateOfBirth"===e.name))&&(this.dateOfBirth=t.dateOfBirth),e.find((e=>"zipCode"===e.name))&&(this.zipCode=t.zipCode),e.find((e=>"city"===e.name))&&(this.city=t.city),t.countryCode&&r(e,"country",t.countryCode)&&(this.country=t.countryCode),t.nationalityCode&&r(e,"nationality",t.nationalityCode)&&(this.nationality=t.nationalityCode),t.workPermit&&r(e,"workPermit",t.workPermit)&&(this.workPermit=t.workPermit),t.cancellationPeriod&&r(e,"availability",t.cancellationPeriod)&&
1(this.availability=t.cancellationPeriod)),this):this}extendWithProfileDocuments(e){const t=e.at(0);return t?(this.cv=[(0,i.a)(t.document,{linkedMediaApiId:t.linkedMediaApiId,tag:"cv"})],this):this}}},34824(e,t,a){a.d(t,{bV:()=>m,cr:()=>u,dx:()=>p});var i=a(62939),r=a(59846),n=a(2175),s=a(94956),o=a(18474),c=a(18218),l=a(98400),d=a(93274);const u="dynamic-application",y=e=>async t=>(0,o.A)(await t.wire(d.Lo).getApplicationById(e)).result,p=e=>({queryFn:y(e),queryKey:[u]}),m=()=>{const e=(0,s.A)(),{application_id:t=""}=(0,r.g)(),a=!!(0,c.sg)().data,o=(0,i.I)({queryKey:[u],enabled:!!t&&(0,n.A)(t)&&a,queryFn:async()=>y(t)(e),select:e=>l.H.rehydrate(e)});return{application:o.data,isDynamicApplicationError:o.isError,isDynamicApplicationLoading:o.isLoading,invalidateDynamicApplicationData:()=>e.get("query.client").invalidateQueries({queryKey:[u]})}}},53950(e,t,a){a.d(t,{RJ:()=>y,l6:()=>u,wx:()=>l});a(78944),a(18910);var i=a(62939),r=a(94956),n=a(18474),s=a(18218),o=a(98400),c=a(93274);const l="user-dynamic-applications",d=e=>async t=>(0,n.A)(await e.wire(c.Lo).getUserApplications(t)).result,u=e=>({queryFn:t=>d(t)(e),queryKey:[l]}),y=e=>{const t=(0,r.A)(),a=!!(0,s.sg)().data,n=(0,i.I)({queryKey:[l],enabled:a,queryFn:async()=>d(t)(e),select:(e=[])=>e.map((e=>o.H.rehydrate(e)))});return{userDynamicApplications:n.data,isUserDynamicApplicationsError:n.isError,isLoadingUserDynamicApplications:n.isLoading}}},93274(e,t,a){a.d(t,{Lo:()=>l,k6:()=>o});a(78944),a(97512),a(18910);var i=a(74124),r=a(18960),n=a(18218),s=a(98400);class o extends Error{constructor(e){super(e),this.name="DynamicApplicationError"}}class c{constructor(e,t,a,i,r){this.fetchService=e,this.reduxService=t,this.locale=a,this.user=i,this.baseApiRoute=r}getApplicationById=async e=>{const t=await this.fetchService.fetch(`${this.baseApiRoute}application/${e}`,{credentials:"include"});return t.ok?{ok:t.ok,statusCode:t.statusCode,result:new s.H(t.result)}:t};getApplicationsByVacancyId=async e=>{const t=await this.fetchService.fetch(`${this.baseApiRoute}application`,{query:{jobId:e,"applicationMethods[]":["INTERNAL"]}});return t.ok?{ok:!0,statusCode:t.statusCode,result:t.result._embedded.results.map((e=>new s.H(e)))}:t};getUserApplications=async(e={})=>{const{filter:t,sorting:a}=e,i=await this.fetchService.fetch(`${this.baseApiRoute}application`,{query:{"applicationMethods[]":t?.applicationMethods,"applicationStatuses[]":t?.applicationStatuses,interviewStatus:t?.interviewStatus,limit:t?.limit||20,offset:t?.offset,jobId:t?.vacancyId,sortColumn:a?.sortColumn,sortOrder:a?.sortOrder}});return i.ok?{ok:!0,statusCode:i.statusCode,result:i.result._embedded.results.map((e=>new s.H(e)))}:i};getApplicationDefinition=async e=>await this.fetchService.fetch(`${this.baseApiRoute}application/definition/${e}`,{query:{load_dynamic_form:!0}});createAnonymousApplication=async(e,t)=>{const a=await this.fetchService.fetch(`${this.baseApiRoute}application/${e}`,{method:"POST",body:this.enrichWithMetadata(t)});return!a.ok&&a.result&&this.logError(a.result,a.statusCode),a.ok?{ok:!0,statusCode:a.statusCode,result:new s.H(a.result)}:a};createApplication=async(e,t)=>{const a=await this.fetchService.fetch(`${this.baseApiRoute}application/${e}`,{method:"POST",body:this.enrichWithMetadata(t)});return!a.ok&&a.result&&this.logError(a.result,a.statusCode),a.ok?{ok:!0,statusCode:a.statusCode,result:new s.H(a.result)}:a};updateApplication=async e=>{const{id:t}=e,a=await this.fetchService.fetch(`${this.baseApiRoute}application/${t}`,{method:"PUT",body:this.enrichWithMetadata(e)});return!a.ok&&a.result&&this.logError(a.result,a.statusCode),a.ok?{ok:!0,statusCode:a.statusCode,result:new s.H(a.result)}:a};patchApplication=async(e,t)=>this.fetchService.fetch(`${this.baseApiRoute}application/${e}`,{method:"PATCH",body:t});deleteApplication=async e=>this.fetchService.fetch(`${this.baseApiRoute}application/${e}`,{method:"DELETE"});logError=(e,t)=>{if(429===t)return;const{title:a,violations:r}=e;i.v.error(new o(a),{tags:{"error.code":t,"has.user":!!this.user,"error.violation":r?.[0]?.propertyPath||r?.[0]?.message||a||t},extras:{"API response":e,"API violations":r}}
1)};enrichWithMetadata=e=>({...e,device:this.reduxService.getState().mobileDetect.isMobile?"web_mobile":"web_desktop",locale:this.locale})}const l=e=>new c(e.get("core.fetch"),e.get("core.redux"),e.get("core.locale"),e.get("query.client").getQueryData(n.qv),r.Ok.APPLICATION_SERVICE);l.identifier="dynamic.application.service"},46922(e,t,a){a.d(t,{a:()=>r});var i=a(71483);const r=(e,t)=>(0,i.d)({createdAt:e.createdAt||(new Date).toISOString(),fileName:e.fileName||"",fileSize:e.fileSize,fileType:e.fileType,isFromProfile:!0,isPrivate:!e.visible,mediaApiId:t.linkedMediaApiId,mediaApiUrl:e.mediaApiUrl,originalMediaApiId:e.mediaApiId,tag:t.tag})},71483(e,t,a){a.d(t,{d:()=>r});var i=a(97229);const r=e=>{const t=e._links?.media?.href;return{createdAt:e.createdAt,fileName:e.fileName,fileSize:e.fileSize,fileType:e.fileType,id:e.mediaApiId,isFromProfile:e.isFromProfile||!1,isPrivate:!!e.isPrivate,link:t,originalMediaApiId:e.originalMediaApiId,tag:e.tag,token:t?(0,i.parseUrl)(t).query.token:void 0}}},32034(e,t,a){a.d(t,{A:()=>l});a(78944),a(27025);var i=a(25532),r=a(32979),n=a(5574),s=a(51037),o=a(26752),c=a(50906);const l=async({params:{application_id:e,vacancy_id:t},di:a})=>{if(!e||!t)return;const{dispatch:l,getState:d}=a.get("core.redux"),u=d();if((0,o.A)(u)?.id===e)return;const y=a.wire(c.q);await(0,r.C)(a,[(0,n.Ei)(a,t)]);const p=(0,n.iq)(a,t)?.applicationServiceToken;if(!p)return l((0,i.mX)());const{ok:m,result:g}=await y.getApplication(e,p);if(l(m?(0,s.nZ)(g):(0,s.nz)(g)),!d().application.userList.list.find((t=>t.id===e)))return l((0,i.mX)());await l((0,s.$7)(e))}},52434(e,t,a){a.d(t,{A:()=>u});var i=a(67014),r=a(67625),n=a(80497),s=a(70580),o=a(19164),c=a(78230),l=a(54228);const d="trackedJobApplicationSent",u=(e,t,a,u="dynamic")=>{const y=(0,i.Gq)(d,"localStorage")??{};if(y[a.id])return;const{queue:p}=e.get("core.tealium"),{trackingCollector:m}=e.get("core.trackingCollector"),g="email"===u,h=(0,n.zZ)(t),f=g?h?"email_form_no_cover_letter":"email_form":h?"form_no_cover_letter":"form";p({event_name:"job_application_sent",event_details:(0,r.i)(t.id)??"no login wall",event_funnel_name:g?"job_application_email_funnel":"job_application_funnel",event_funnel_step:g?"2":"3",job_application_data:[{attachments:!!Object.keys(a.documents||{}).length}],job_offer_name:"TEXT"===t.layoutType?"free-crawled":"",...m([...o.Lb.tealiumJobCollection,(0,o.Xc)(f),c.Ge,c.u5,c.ne,(0,s.A)("experiment_application_sent")],l.r.Tealium)}),(0,i.SO)({...y,[a.id]:!0},d,"localStorage")}},49331(e,t,a){a.d(t,{A:()=>L});a(78944),a(27025);var i=a(44007),r=a(41711),n=a(73128),s=a(42253),o=a(49975),c=a(96777),l=a(18960),d=a(79179),u=a(59033),y=a(53420),p=a(52695);const m=()=>{const e=(0,c.A)(),t=(0,d.NO)();return t?.salaryTotal?null:(0,p.jsxs)(u.so,{bg:"white",border:"b300",borderRadius:"r16",flexDirection:{base:"column-reverse",sm:"row"},gap:{base:"s8",sm:"s24"},maxWidth:"[768px]",mx:{base:"s16",sm:"auto"},px:{base:"s16",sm:"s24"},py:{base:"s32",sm:"s24"},children:[(0,p.jsxs)(u.i,{textAlign:{base:"center",sm:"initial"},children:[(0,p.jsx)(u.H4,{mb:"s8",textStyle:"title3",children:e("application_detail.salary_teaser.title")}),(0,p.jsx)(u.P,{mb:"s24",textStyle:"body1",children:e("application_detail.salary_teaser.body")}),(0,p.jsx)(u.N_,{buttonWrap:"button","data-cy":"salary-teaser-cta",eventData:{event_component_type:"landing_salary_acquisition"},state:{clickOrigin:"application_success-salary_acquisition_cta"},to:{route:l.JZ.SALARY_ACQUISITION},width:{base:"100%",sm:"auto"},children:(0,p.jsx)(u.Oz,{buttonSize:"sm",buttonType:"outlined",children:e("application_detail.salary_teaser.cta")})})]}),(0,p.jsx)(u._V,{alt:"Fair salary","aria-hidden":"true",height:"[150px]",mx:"auto",src:y,width:"[174px]"})]})};a(18910);var g=a(6799),h=a(80825),f=a(9651),b=a(29916),v=a(50253),A=a(90701),_=a(70119),S=a(31098),x=a(15950),I=a(60812),q=a(10056);const j=e=>{const t=(0,g.c)(7),{hash:a,search:i}=e;let r;t[0]!==a?(r={hash:a},t[0]=a,t[1]=r):r=t[1];const{data:n}=(0,x.RU)(r),s=(0,c.A)(),o=(0,S.A)(a,i.query);let l;return t[2]!==o||t[3]!==n||t[4]!==i.query||t[5]!==s?(l=!n&&i.query.term.length<=I.R?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.K0,{buttonSize:"sm",buttonType:"blended",display:{md:"none"},flexShrink:0,icon:(0,p.jsx)(q.A,{}),ml:"s16",onClick:()=>o(),title:s("recent_searches.set_up_job_alert"),transform:"translateY(-7px)"}),(0,p.jsxs)(u.$n,{buttonSize:"sm",buttonType:"blended","data-cy":"job-alert-button",display:{base:"none",md:"flex"},flexShrink:0,ml:"s16",onClick:()=>o(),transform:"translateY(-7px)",children:[(0,p.jsx)(q.A,{mr:"s8"}),s("recent_searches.set_up_job_alert")]})]}):null,t[2]=o,t[3]=n,t[4]=i.query,t[5]=s,t[6]=l):l=t[6],l};var w=a(66839);const T=e=>{const t=(0,g.c)(42),{isLast:a,search:r}=e,n=(0,c.A)(),s=(0,h.r)(r);(0,h.Qd)(r);const d=(0,_.A)(C),y=(0,o.A)();let m;t[0]!==d||t[1]!==y||t[2]!==r.query?(m=(0,b.C)({route:l.JZ.VACANCY_SEARCH_PARAMS,query:{term:"",...(0,v.a7)(r.query,d)}},y),t[0]=d,t[1]=y,t[2]=r.query,t[3]=m):m=t[3];const f=m,S=(0,h.U3)(r,d),x=(0,h.iB)(r);let I,q,T,k,D,E,O,N,P,L,$,F;t[4]!==a?(I=!a&&{borderBottom:"b300",pb:"s16"},t[4]=a,t[5]=I):I=t[5],t[6]!==s?.meta.totalHits?(q=s?.meta.totalHits.toString()||"0",t[6]=s?.meta.totalHits,t[7]=q):q=t[7],t[8]!==q?(T={event_c
1omponent_type:"recent_searches",event_details:q},t[8]=q,t[9]=T):T=t[9],t[10]===Symbol.for("react.memo_cache_sentinel")?(k=(0,i.gO)(),t[10]=k):k=t[10],t[11]!==r.query?.term||t[12]!==n?(D=(0,A.BB)(r.query?.term)||n("recent_searches.all_jobs"),t[11]=r.query?.term,t[12]=n,t[13]=D):D=t[13],t[14]!==D?(E=(0,p.jsx)(u.L9,{className:k,children:D}),t[14]=D,t[15]=E):E=t[15],t[16]!==s?.meta.totalHits?(O=!!s?.meta.totalHits&&(0,p.jsx)(u.Ex,{alignSelf:"flex-start",badgeColor:"red",badgeType:"dot"}),t[16]=s?.meta.totalHits,t[17]=O):O=t[17],t[18]!==T||t[19]!==E||t[20]!==O||t[21]!==f?(N=(0,p.jsxs)(u.N_,{display:"flex",eventData:T,gap:"s8",mb:"s8",textStyle:"title4",to:f,visited:"none",children:[E,O]}),t[18]=T,t[19]=E,t[20]=O,t[21]=f,t[22]=N):N=t[22],t[23]===Symbol.for("react.memo_cache_sentinel")?(P=(0,p.jsx)(w.A,{flexShrink:0,iconSize:"xxs"}),t[23]=P):P=t[23],t[24]===Symbol.for("react.memo_cache_sentinel")?(L=(0,i.gO)(),t[24]=L):L=t[24],t[25]!==S?($=(0,p.jsxs)(u.so,{alignItems:"center",gap:"s8",children:[P,(0,p.jsx)(u.L9,{className:L,"data-cy":"recent-search-item-location",textStyle:"caption1",children:S})]}),t[25]=S,t[26]=$):$=t[26],t[27]!==$||t[28]!==N?(F=(0,p.jsxs)(u.i,{children:[N,$]}),t[27]=$,t[28]=N,t[29]=F):F=t[29];const R=s?.meta.searchHash||"";let U,G,B,M;return t[30]!==r||t[31]!==R?(U=(0,p.jsx)(j,{hash:R,search:r}),t[30]=r,t[31]=R,t[32]=U):U=t[32],t[33]!==F||t[34]!==U?(G=(0,p.jsxs)(u.so,{justifyContent:"space-between",mb:"s8",children:[F,U]}),t[33]=F,t[34]=U,t[35]=G):G=t[35],t[36]!==x?(B=x&&(0,p.jsx)(u.L9,{className:(0,i.gO)({lines:2}),color:"gray.700",textStyle:"body2",children:x}),t[36]=x,t[37]=B):B=t[37],t[38]!==G||t[39]!==B||t[40]!==I?(M=(0,p.jsxs)(u.Li,{...I,"data-cy":"recent-search-item",listStyleType:"none",mt:"s16",children:[G,B]}),t[38]=G,t[39]=B,t[40]=I,t[41]=M):M=t[41],M};function C(e){return e.metaData.geoTags}const k=()=>{const e=(0,g.c)(30),t=(0,c.A)(),[a,i]=(0,r.useState)(!1),[n,s]=(0,h.ok)();let o,l,d,y,m,b,v,A,_,S,x,I,q,j,w,C;if(e[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{i(!0)},l=[],e[0]=o,e[1]=l):(o=e[0],l=e[1]),(0,r.useEffect)(o,l),!a||!n.length)return null;if(e[2]===Symbol.for("react.memo_cache_sentinel")?(d={base:"s8",sm:"s24"},e[2]=d):d=e[2],e[3]===Symbol.for("react.memo_cache_sentinel")?(y={base:"s16",sm:"auto"},m={base:"s16",sm:"s24"},b={base:"s32",sm:"s24"},e[3]=y,e[4]=m,e[5]=b):(y=e[3],m=e[4],b=e[5]),e[6]!==t?(v=t("recent_searches.title"),e[6]=t,e[7]=v):v=e[7],e[8]!==v?(A=(0,p.jsx)(u.H2,{textStyle:"title1",children:v}),e[8]=v,e[9]=A):A=e[9],e[10]!==t?(_=t("recent_searches.clear_button"),e[10]=t,e[11]=_):_=e[11],e[12]!==s||e[13]!==_?(S=(0,p.jsx)(u.$n,{buttonSize:"sm",buttonType:"blended","data-cy":"recent-searches-clear-button",onClick:s,children:_}),e[12]=s,e[13]=_,e[14]=S):S=e[14],e[15]!==A||e[16]!==S?(x=(0,p.jsxs)(u.so,{justifyContent:"space-between",children:[A,S]}),e[15]=A,e[16]=S,e[17]=x):x=e[17],e[18]!==n){let t;e[20]!==n.length?(t=(e,t)=>(0,p.jsx)(T,{isLast:t===n.length-1,search:e},`recent-search-${e.date}`),e[20]=n.length,e[21]=t):t=e[21],I=n.map(t),e[18]=n,e[19]=I}else I=e[19];return e[22]!==I?(q=(0,p.jsx)(u.so,{justifyContent:"space-between",children:(0,p.jsx)(u.Ul,{width:"100%",wordBreak:"break-all",children:I})}),e[22]=I,e[23]=q):q=e[23],e[24]!==x||e[25]!==q?(j=(0,p.jsxs)(u.so,{bg:"white",flexDirection:"column",gap:d,maxWidth:"[768px]",mx:y,px:m,py:b,children:[x,q]}),e[24]=x,e[25]=q,e[26]=j):j=e[26],e[27]===Symbol.for("react.memo_cache_sentinel")?(w=(0,p.jsx)(f.A,{}),e[27]=w):w=e[27],e[28]!==j?(C=(0,p.jsxs)(p.Fragment,{children:[j,w]}),e[28]=j,e[29]=C):C=e[29],C};var D=a(21074),E=a(4694),O=a(25549),N=a(76023),P=a(97282);const L=({application:e,vacancy:t,type:a})=>{const l=(0,c.A)(),d=(0,r.useRef)(null),y=(0,o.A)();(0,r.useEffect)((()=>{d.current?.focus()}),[]);const g=t?.trackingLinks?.find((e=>"application_send"===e.type));return(0,p.jsxs)(u.gZ,{className:(0,i.kL)(),mt:"s8",px:{base:"s0",sm:"s16"},children:["dynamic"===a?(0,p.jsx)(O.A,{applicationId:e.id,vacancy:t}):!!g?.url&&(0,p.jsx)(N.A,{src:g.url}),(0,p.jsxs)(u.so,{alignItems:"center",flexDirection:"column",my:{base:"s48",sm:"s64"},px:"s16",textAlign:{base:"center",sm:"initial"},children:[(0,p.jsx)(u._V,{alt:"Application confirmation","aria-hidden":"true",height:{base:"[120px]",sm:"[128px]"},mx:"auto",src:P,width:{base:"[120px]",sm:"[128px]"}}),(0,p.jsx)(u.H1,{"data-clarity-mask":"true","data-cy":"application-sent-title",mb:"s24",outline:"none",pt:{base:"s24",sm:"s32"},ref:d,tabIndex:-1,textStyle:"display2",children:l("dynamic"===a?"application_detail.confirmation.dynamic.title":"application_detail.confirmation.email.title",{first_name:e.firstname})}),(0,p.jsx)(u.P,{"data-cy":"application-sent-body",textStyle:"body1",children:l("application_detail.confirmation.body",{email:e.email})})]}),(0,p.jsx)(m,{}),(0,p.jsxs)(u.nC,{my:{base:"s48",sm:"s64"},px:{base:"s16",sm:"s0"},children:[(0,p.jsx)(u.i,{mb:"s48",children:(0,p.jsx)(D.A,{title:l("application_detail.confirmation.discover_similar_jobs"),vacancyId:t?.id})}),(0,p.jsx)(E.A,{}),n.j5.is("jobup")&&y===s.h.DE?null:(0,p.jsx)(k,{my:"s64"})]})]})}},3194(e,t,a){a.d(t,{Ay:()=>y,Ti:()=>l,yr:()=>u});var i=a(62939),r=a(94956),n=a(18474),s=a(18218),o=a(50906);const c=["user/issue-token"],l=e=>e.get("query.client").getQueryData(c),d=async e=>(0,n.A)(await e.wire(o.q).getToken()).result.jwt,u=e=>({queryKey:c,queryFn:()=>d(e)}),y=()=>{const e=(0,r.A)(),t=e.get("query.client").getQueryData(s.qv);return(0,i.I)({queryKey:c,queryFn:()=>d(e),enabled:!!t})}},48426(e,t,a){a.d(t,{V:()=>j});a(84775),a(78944),a(50750);var i=a(97229),r=a(25532),n=a(86756),s=a(98789),o=a(32979),c=a(3194),l=a(18218),d=a(54994),u=a(14503),y=a(29154),p=a(51037),m=a(26752),g=a(31876);a(27025),a(45853);var h=a(32034),f=a(4584),b=a(30296);a(46978);var v=a(2175),A=a(99294);var _=a(34824),S=a(53950);const x=(e,t,a)=>{const i=((e,t)=>({...e.country&&!t?.countryCode?{country_code:e.country}:{},...e.dateOfBirth&&!t?.dateOfBirth?{date_of_birth:e.dateOfBirth?e.dateOfBirth:null}:{},...e.firstName&&!t?.firstName?{first_name:e.firstName}:{},...e.gender&&!t?.gender?{gender:A.Fj[e.gender||"diverse"]}:{},...e.lastName&&!t?.lastName?{last_name:e.lastName}:{},...e.nationality&&!t?.nationalityCode?{nationality_code:e.nationality}:{},...e.phone&&!t?.phone?{phone:e.phone}:{},...e.workPermit&&!t?.workPermit?{work_permit:e.workPermit}:{}}))(t,a?.candidate),r=[];Object.keys(i).length&&r.push(e.patchCandidateDetail(i)),!(0,s.Vv)(a?.careers||[],[g.J.JOB])[0]&&t.lastOccupation&&r.push(e.postCareer({title:t.lastOccupation,type:g.J.JOB}
1)),r.length>0&&Promise.all(r)},I=(e,t,a,i)=>{const r=t.getQueryData(u.qv)||[],n=i?.cv||[];if(n?.length<1)return;const s=n[0];if(s&&!q(r,s)){const{fileName:i,id:r,token:n}=s;r&&i&&"string"==typeof n&&(e.linkAddAndTagDocument({id:r,fileName:i,tag:"cv",token:n}),a.queue({event_name:"user_document_upload",event_funnel_name:"job_application_funnel",user_document_type:["cv"]}),t.invalidateQueries({queryKey:u.qv}))}},q=(e,t)=>e.some((e=>e.tags?.includes("cv")&&(e.fileName===t.fileName||e.mediaApiId===t.originalMediaApiId))),j=async({params:e,di:t,navigate:a})=>t.get("core.redux").getState().featureFlags.includes("application-form-screening-questions")&&"DYNAMIC_APPLICATION_SUCCESS"===t.get("core.location").getRouteKey()?(async({params:{application_id:e,vacancy_id:t},di:a})=>{if(a.get("seo.meta").setRobotsTag("noindex"),!(0,v.A)(t)||!(0,v.A)(e))return a.get("core.redux").dispatch((0,r.mX)());const i=!!a.get("query.client").getQueryData(l.qv),n=[a.wire(b.x).getExistingOrFetch(t),(0,o.C)(a,[(0,_.dx)(e)])];i&&n.push((0,o.C)(a,[y.VB,u.Q3,(0,d.O)({page:1,rows:3}),(0,S.l6)(A.En)]));const[s]=await Promise.allSettled(n);if("fulfilled"!==s.status||void 0===s.value)return a.get("core.redux").dispatch((0,r.mX)());const c=a.get("query.client").getQueryData([_.cr]);if(!c)return a.get("core.redux").dispatch((0,r.mX)());if(i){const e=a.get("query.client").getQueryData(y.VB.queryKey);x(a.wire(f.$),c,e),I(a.wire(f.$),a.get("query.client"),a.get("core.tealium"),c)}})({params:e,di:t,navigate:a}):(async({params:e,di:t})=>{const{vacancy_id:a}=e;t.get("seo.meta").setRobotsTag("noindex");const{dispatch:v,getState:A}=t.get("core.redux"),_=t.get("query.client");await(0,h.A)({di:t,params:e});const S=t.wire(b.x);if(!await S.getExistingOrFetch(a))return void v((0,r.mX)());const x=A(),I=(0,m.A)(x);if(!I)return void v((0,r.mX)());if(t.get("query.client").getQueryData(l.qv)){await(0,o.C)(t,[(0,c.yr)(t)]);const e=(0,c.Ti)(t);await Promise.all([(0,o.C)(t,[y.VB,(0,d.O)({page:1,rows:3})]),e&&v((0,p.getUserApplicationsList)(e,{},{limit:1e5,offset:0}))]);const a=t.wire(f.$),r=_.getQueryData(y.VB.queryKey),l=(0,n.qL)(I,r?.candidate);Object.keys(l).length&&a.patchCandidateDetail(l),!(0,s.Vv)(r?.careers||[],[g.J.JOB])[0]&&I.lastOccupation&&a.postCareer({title:I.lastOccupation,type:g.J.JOB});const m=_.getQueryData(u.qv)||[],h=I.documents?.cv;h&&((e,t,a)=>{t.forEach((t=>{const i=a.find((e=>e.mediaApiId===t.originalMediaApiId));i?.id&&!i?.tags?.includes("cv")&&e.createDocumentTag(i.id,"cv")}))})(a,h,m);const b=I?.documents?.cv?.[0];if(b&&!((e,t)=>e.some((e=>e.tags?.includes("cv")&&(e.fileName===t.fileName||e.mediaApiId===t.originalMediaApiId))))(m,b)){const{fileName:e,link:r,mediaApiId:n}=b,s=r?(0,i.parseUrl)(r).query.token:"";if(n&&e&&"string"==typeof s){a.linkAddAndTagDocument({id:n,fileName:e,tag:"cv",token:s});const i={event_name:"user_document_upload",event_funnel_name:"job_application_funnel",user_document_type:["cv"]};t.get("core.tealium").queue(i),_.invalidateQueries({queryKey:u.qv})}}}})({params:e,di:t,navigate:a})},67625(e,t,a){a.d(t,{H:()=>n,i:()=>s});var i=a(67014);const r="applicationLoginWall",n=(e,t)=>{if(!e)return;const a=!e.isPaid,n=t||(a?"hard login wall":"soft login wall");(0,i.SO)({loginWall:n,vacancyId:e.id},r,"localStorage")},s=e=>{const t=(0,i.Gq)(r,"localStorage");if(t)return(0,i.Ai)(r,"localStorage"),t.vacancyId===e?t.loginWall:void 0}},54994(e,t,a){a.d(t,{O:()=>p,m:()=>y});a(84775),a(82822);var i=a(62939),r=a(97229),n=a(94956),s=a(74124),o=a(18474),c=a(18218),l=a(24043),d=a(17785);const u=e=>async t=>{const a=t.get("core.redux").getState(),i=(0,o.A)(await t.get("core.fetch").fetch("user/bookmark/job?"+(0,r.stringify)(e),{preventNavigateToLogin:!0}));return i.ok||!a.featureFlags.includes("bookmarks-sentry-logging")?(0,d.Y)(i.result):(s.v.error(new Error("Failed to load vacancy bookmarks"),{extras:{"API response":JSON.stringify(i.result,null,2),"Response status":i.statusCode,"Request data":JSON.stringify(e)}}),null)},y=e=>{const t=(0,n.A)(),{data:a}=(0,c.sg)();return(0,i.I)({queryFn:async()=>u(e)(t),queryKey:[...l.Lx,e],enabled:!!a})},p=e=>({queryFn:u(e),queryKey:[...l.Lx,e]})},88973(e,t,a){a.d(t,{h:()=>s,w:()=>o});var i=a(22973),r=a.n(i),n=a(57265);const s=(e,t,a,i=!0)=>(s,o)=>{let c=a;return c||(c=o().auth.currentUser&&o().auth.currentUser.uuid),c&&"default"!==c&&i&&(c=r()(c)),s({type:n.j.SET,token:e,value:t,userId:c})},o=(e,t,a=!0)=>(i,s)=>{let o=t;return o||(o=s().auth.currentUser&&s().auth.currentUser.uuid),o&&"default"!==o&&a&&(o=r()(o)),i({type:n.j.UNSET,token:e,userId:o})}},45128(e,t,a){a.d(t,{li:()=>g,mV:()=>p,jW:()=>m,$b:()=>y});var i=a(41711),r=a(22973),n=a.n(r);const s=(e,t,a)=>a?{..."default"==a?e.default:t&&a===n()(t?.uuid)?e[n()(t.uuid)]:{}}:{...e.default||{},...t?e[n()(t.uuid)]:{}};var o=a(1444),c=a(70119),l=a(18218),d=a(88973);
1a(92567);const u=e=>e.localFlags.flags;function y(){const e=(0,o.A)();return(0,i.useCallback)(((t,a,i)=>e((0,d.h)(t,a,i))),[e])}function p(){const{data:e}=(0,l.sg)();return(0,c.A)((t=>s(u(t),e)))}const m=()=>{const{data:e}=(0,l.sg)();return(0,c.A)((t=>((e,t)=>{const a={...e};return t&&delete a[n()(t.uuid)],delete a.default,a})(u(t),e)))},g=e=>{const{data:t}=(0,l.sg)();return(0,c.A)((a=>s(u(a),t,e)))}},37184(e,t,a){a.d(t,{x:()=>r});var i=a(77099);const r=e=>({type:i.b.ADD_GEO_TAG,payload:e})},22342(e,t,a){a.d(t,{A:()=>o});var i=a(64897),r=a(69462),n=a(77099);const s=(0,r.A)({},{[n.b.ADD_GEO_TAG]:(e,t)=>({...e,[t.payload.id]:t.payload})}),o=(0,i.HY)({geoTags:s})},45185(e,t,a){a.d(t,{Y:()=>d,P:()=>u});a(84775),a(78944),a(97512),a(27025),a(18910);var i=a(37184),r=a(18960),n=a(40976);const s=async(e,t,a)=>{const i=await e.fetch(r.Ok.METADATA_API+"gis-tag/"+t);if(i.ok)return(0,n.OJ)(a)(i.result)},o=["city-","canton-","region-","zip-"],c=e=>o.some((t=>e.startsWith(t))),l=e=>["city","canton"].includes(e.subType),d=async(e,t)=>Promise.all(t.filter(c).map((async t=>{const a=Object.values(e.get("core.redux").getState().metaData.geoTags).filter(l).find((e=>e.tag.current===t));if(a)return{geoTag:t,locationShape:a};const r=await s(e.get("core.fetch"),t,e.get("core.locale"));return r&&"canton"===r.subType?(e.get("core.redux").dispatch((0,i.x)(r)),{geoTag:t,locationShape:r}):void 0}))),u=(e,t)=>{if(e)return"city"===e.subType||"region"===e.subType?e.name.current:"canton"===e.subType?e.name.current+" ("+t("typeahead.location.subtype.canton")+")":"zip"===e.subType?`${e.shortName.current} (${e.code})`:void 0}},4756(e,t,a){a.d(t,{A:()=>c});var i=a(38849),r=a(93495),n=a(49242),s=a(41131),o=a(52695);const c=({control:e,defaultValue:t,name:a,rules:c,shouldUnregister:l,transformer:{format:d,parse:u}={},...y})=>{const p=(0,n.A)("application-form-screening-questions");return(0,o.jsx)(i.xI,{control:e,defaultValue:t,name:a,render:({field:{onBlur:e,onChange:t,value:a,...i},fieldState:{error:r}})=>(0,o.jsx)(s.A,{...i,error:r?.message,...c?.required?{required:!0}:{},...y,onBlur:t=>{e?.(),y.onBlur?.(t)},onChange:e=>{u?.(e),t?.(e),y.onChange?.(e)},value:d?.(a)??a}),rules:p?c:(0,r.Y1)(c),shouldUnregister:l})}},93495(e,t,a){a.d(t,{L8:()=>r,Ut:()=>n,Y1:()=>s});var i=a(46044);const r=/^\s*\+?\s*(\d\s*){9,21}$/,n=({required:e,validate:t,...a}={},r)=>{const n=e=>!e?.trim()||(0,i.B9)(e)||r;return"function"==typeof t?{validate:{validate:t,validateEmail:n}}:"object"==typeof t?{validate:{...t,validateEmail:n}}:{validate:n,...a}},s=({required:e,validate:t,...a}={})=>{if(!e)return{validate:t,...a};let i="";"string"==typeof e?i=e:"object"==typeof e&&(i=e.message);const r=e=>!!e?.trim()||i;return"function"==typeof t?{validate:{trimmedRequired:r,validate:t}}:"object"==typeof t?{validate:{trimmedRequired:r,...t}}:{validate:r,...a}}},79018(e,t,a){a.d(t,{D:()=>i});const i="recentSearches"},80825(e,t,a){a.d(t,{Qd:()=>x,U3:()=>I,iB:()=>q,ok:()=>_,r:()=>S});a(78944),a(97512),a(18910);var i=a(6799),r=a(41711),n=a(67014),s=a(94956),o=a(73128),c=a(45185),l=a(1428),d=a(18960),u=a(42253),y=a(53352),p=a(90701),m=a(49975),g=a(96777),h=a(37184),f=a(40976),b=a(79018),v=a(63348);const A=()=>{const e=(0,n.Gq)(b.D,"localStorage",[]);return(0,l.L8)(e).map(l.nS)},_=()=>{const e=(0,i.c)(6);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],e[0]=t):t=e[0];const[a,s]=(0,r.useState)(t);let o,c,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{s(A());const e=e=>{e.storageArea===window.localStorage&&e.key===b.D&&s(A())};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},c=[],e[1]=o,e[2]=c):(o=e[1],c=e[2]),(0,r.useEffect)(o,c),e[3]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{s([]),(0,n.Ai)(b.D,"localStorage")},e[3]=l):l=e[3];const d=l;let u;return e[4]!==a?(u=[a,d],e[4]=a,e[5]=u):u=e[5],u},S=e=>{const t=(0,i.c)(10),{date:a,query:n}=e,o=(0,s.A)(),[c,l]=(0,r.useState)();let d;t[0]!==o?(d=o.wire(v.T),t[0]=o,t[1]=d):d=t[1];const p=d;let m;e:{if(n.publicationDate){const e=24*parseInt(n.publicationDate,10)*60*60*1e3,i=new Date(a).getTime();let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=(new Date).getTime(),t[2]=r):r=t[2];const s=r-e;if(i<s){let e;t[3]!==s?(e=(0,y.Y)(s,u.h.EN,"date_api"),t[3]=s,t[4]=e):e=t[4],m=e;break e}}m=a}const g=m;let h,f;return t[5]!==g||t[6]!==n||t[7]!==p?(h=()=>{(async()=>{const{publicationDate:e,...t}=n,a=await p.search(t,{publicationDateFrom:g,publicationDateTo:(0,y.Y)((new Date).setUTCHours(23,0,0,0),u.h.EN,"date_api")});a.ok&&l(a.result)})()},f=[g,n,p],t[5]=g,t[6]=n,t[7]=p,t[8]=h,t[9]=f):(h=t[8],f=t[9]),(0,r.useEffect)(h,f),c},x=e=>{const t=(0,i.c)(8),{query:a}=e,n=(0,s.A)(),o=(0,m.A)();let c;t[0]!==n?(c=n.get("core.redux"),t[0]=n,t[1]=c):c=t[1];const{dispatch:l}=c;let u,y;t[2]!==n||t[3]!==l||t[4]!==o||t[5]!==a.geoShapeIds?(u=()=>{(async()=>{a.geoShapeIds&&a.geoShapeIds.length&&await Promise.all(a.geoShapeIds.map((async e=>{const t=await n.get("core.fetch").fetch(d.Ok.METADATA_API+"gis/"+e);if(!t.ok)return;const a=(0,f.OJ)(o)(t.result);l((0,h.x)(a))})))})()},y=[n,l,o,a.geoShapeIds],t[2]=n,t[3]=l,t[4]=o,t[5]=a.geoShapeIds,t[6]=u,t[7]=y):(u=t[6],y=t[7]),(0,r.useEffect)(u,y)},I=(e,t)=>{const a=(0,i.c)(6),r=(0,g.A)();let n;return a[0]!==t||a[1]!==e.query.geoShapeIds||a[2]!==e.query.locations||a[3]!==e.query.regionIds||a[4]!==r?(n=[...e.query.regionIds.map((e=>r(`regions.${e}`))),...e.query.locations.map(j),...(e.query.geoShapeIds||[]).map((e=>t[e])).map((e=>
1(0,c.P)(e,r))).filter(Boolean)].join(", ")||r("recent_searches.all_locations"),a[0]=t,a[1]=e.query.geoShapeIds,a[2]=e.query.locations,a[3]=e.query.regionIds,a[4]=r,a[5]=n):n=a[5],n},q=e=>{const t=(0,i.c)(33),a=(0,g.A)();let r,n;if(t[0]!==e.query.employmentGrades[0]||t[1]!==e.query.employmentGrades[1]?(r=0!==e.query.employmentGrades[0]||100!==e.query.employmentGrades[1]?[`${e.query.employmentGrades[0]||0} - ${e.query.employmentGrades[1]||100}%`]:[],t[0]=e.query.employmentGrades[0],t[1]=e.query.employmentGrades[1],t[2]=r):r=t[2],t[3]!==e.query.benefitIds||t[4]!==e.query.categoryIds[0]||t[5]!==e.query.categoryIds.length||t[6]!==e.query.employmentTypeIds||t[7]!==e.query.industryIds||t[8]!==e.query.languageIds||t[9]!==e.query.positionIds||t[10]!==e.query.publicationDate||t[11]!==e.query.segmentIds||t[12]!==a||t[13]!==r){let i,s,c,l,d,u,y;t[15]!==a?(i=e=>a(`employment_type.${e}`),t[15]=a,t[16]=i):i=t[16],t[17]!==e.query.categoryIds[0]||t[18]!==e.query.categoryIds.length||t[19]!==a?(s=e.query.categoryIds.length?[a(`categories.${e.query.categoryIds[0]}`)]:[],t[17]=e.query.categoryIds[0],t[18]=e.query.categoryIds.length,t[19]=a,t[20]=s):s=t[20],t[21]!==a?(c=e=>a(`industries.${e}`),t[21]=a,t[22]=c):c=t[22],t[23]!==e.query.publicationDate||t[24]!==a?(l=e.query.publicationDate?[`${a("quick_filter.publication_date.title")} ${a(`publication_dates.${e.query.publicationDate}`)}`]:[],t[23]=e.query.publicationDate,t[24]=a,t[25]=l):l=t[25],t[26]!==a?(d=e=>a(`company_segments_badge.${e}`),t[26]=a,t[27]=d):d=t[27],t[28]!==a?(u=e=>a(`employment_position_${e}`),t[28]=a,t[29]=u):u=t[29],t[30]!==e.query.benefitIds||t[31]!==a?(y=o.j5.is("jobup")?[...new Set(e.query.benefitIds.map((e=>a(`benefit.${e}`))))]:[],t[30]=e.query.benefitIds,t[31]=a,t[32]=y):y=t[32],n=[...r,...e.query.employmentTypeIds.map(i),...o.j5.is("jobs")?e.query.languageIds.map((e=>a(`language_skills.${e}`))):[],...s,...e.query.industryIds.map(c),...l,...e.query.segmentIds.map(d),...e.query.positionIds.map(u),...y],t[3]=e.query.benefitIds,t[4]=e.query.categoryIds[0],t[5]=e.query.categoryIds.length,t[6]=e.query.employmentTypeIds,t[7]=e.query.industryIds,t[8]=e.query.languageIds,t[9]=e.query.positionIds,t[10]=e.query.publicationDate,t[11]=e.query.segmentIds,t[12]=a,t[13]=r,t[14]=n}else n=t[14];return n.join(", ")};function j(e){return(0,p.ip)(e)}},1428(e,t,a){a.d(t,{L8:()=>d,nG:()=>u,nS:()=>m});a(82822),a(78944),a(97512),a(18910);var i=a(67014),r=a(99930),n=a(50253),s=a(19357),o=a(42253),c=a(53352),l=a(79018);const d=e=>{if(!e)return[];try{const t="string"==typeof e?JSON.parse(e):e;return Array.isArray(t)?t:[]}catch{return[]}},u=e=>{const t=e.get("core.redux").getState().vacancy?.query;if(!t||!(0,s.oM)(t))return;const a=(0,i.Gq)(l.D,"localStorage"),r=d(a).map(m),n=y(t,r);(0,i.SO)(JSON.stringify(n),l.D,"localStorage"),"undefined"!=typeof window&&window.dispatchEvent(new StorageEvent("storage",{key:l.D,storageArea:window.localStorage}))},y=(e,t,a=new Date)=>{const i=p(e),r=t.filter((e=>p(e.query)!==i));return[{query:e,date:(0,c.Y)(a,o.h.EN,"date_api")},...r.slice(0,2)]},p=e=>(0,s.Te)(e),m=e=>({date:e.date,query:(0,n._e)(r.A.of(e.query))})},21074(e,t,a){a.d(t,{A:()=>f});a(78944),a(18910);var i=a(94956),r=a(53221),n=a(18960),s=a(18218),o=a(96777),c=a(75247),l=a(64244),d=a(8916),u=a(13756),y=a(75882),p=a(59033),m=a(69825),g=a(52695);const h=()=>{const e=(0,i.A)(),{data:t}=(0,s.sg)(),a=!(r=t,{isLoggedOut:!r,userHasActiveEmail:!!r?.emailVerified,userHasInactiveEmail:!r?.emailVerified}).isLoggedOut;var r;const{navigateToLogin:c}=e.get("auth.service"),l=e.get("core.location"),d=(0,o.A)();return(0,g.jsx)(p.i,{pt:"s24",textAlign:"center",children:a?(0,g.jsx)(p.N_,{buttonWrap:"button",display:"inline-block",eventData:{event_component_type:"all_recommended_jobs"},to:{route:n.JZ.LANDINGPAGE_RICO},width:{base:"100%",md:"auto"},children:(0,g.jsx)(p.Oz,{buttonType:"outlined",width:"100%",children:d("rico.show_all")})}):(0,g.jsx)(p.$n,{buttonType:"outlined",onClick:({currentTarget:e})=>c({authSource:"rico_landingpage",cancelTo:{pathname:l.getLocation().pathname,query:l.getQuery()},successTo:{route:n.JZ.LANDINGPAGE_RICO}}
1,{eventData:{event_component_type:"all_recommended_jobs"},trigger:e}),width:{base:"100%",md:"auto"},children:d("rico.show_all")})})},f=({vacancyId:e,title:t})=>{const{data:a}=(0,s.sg)(),{isSet:f}=(0,d.Ay)("recommendations_opt_out"),b=!a,v=!f,{navigateToLogin:A}=(0,i.A)().get("auth.service"),_=(0,o.A)(),S=(0,c.A)(e),x=(0,u.A)();return S.length?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(p.H2,{id:"rico-links",pb:"s8",textStyle:"title3",children:t}),(0,g.jsx)(p.L9,{display:"block",pb:{md:"s8"},children:b?(0,r.A)({mixedString:_("home.rico.sub_title.logged_out"),components:{account:(0,g.jsx)(p.VS,{onClick:({currentTarget:e})=>A({authSource:"rico_landingpage"},{eventData:{event_component_type:"login_recommended_jobs"},trigger:e}),underline:"full",visited:"none"})}}):v?_("home.rico.sub_title.active_email"):(0,r.A)({mixedString:_("home.rico.sub_title.inactive_email"),components:{settings:(0,g.jsx)(p.N_,{eventData:{event_component_type:"login_recommended_jobs"},to:{route:n.JZ.USER_SETTINGS},underline:"full",visited:"none"})}})}),(0,g.jsx)(l.VF.Provider,{value:{event_component_type:"recommended_jobs"},children:(0,g.jsx)(m.A,{children:S.map((e=>(0,g.jsx)(y.A,{onClick:x,vacancy:e},e.id)))})}),S.length>=3&&(0,g.jsx)(p.so,{justifyContent:"center",children:(0,g.jsx)(h,{})})]}):null}},98065(e,t,a){a.d(t,{EF:()=>d,IF:()=>c,OT:()=>u});var i=a(62939),r=a(94956),n=a(18474),s=a(18960),o=a(54671);const c=({limit:e})=>["recommendation-collection/job/",e],l=e=>async({limit:t})=>{const a=e.get("core.cookie").get("session_id");if(!a)return null;const i=e.get("core.fetch"),r=(0,n.A)(await i.fetch(`${s.Ok.RICO_API}job/recommendations/${a}?limit=${t}`));return(0,o.i)(r.result.recommendations)},d=({limit:e})=>({queryKey:c({limit:e}),queryFn:t=>l(t)({limit:e})}),u=({limit:e},t=!0)=>{const a=(0,r.A)(),n=a.get("core.cookie").get("session_id");return(0,i.I)({queryFn:async()=>l(a)({limit:e}),queryKey:c({limit:e}),enabled:!!n&&t})}},5326(e,t,a){a.d(t,{IF:()=>c,Pf:()=>u,Zg:()=>d,eC:()=>l});var i=a(62939),r=a(94956),n=a(18474),s=a(18960),o=a(54671);const c=({limit:e,vacancyId:t})=>["recommendation-collection/job/",t,e],l=e=>async({limit:t,vacancyId:a})=>{if(!a)return null;const i=e.get("core.fetch"),r=(0,n.A)(await i.fetch(`${s.Ok.RICO_API}recommendation-collection/job/${a}?limit=${t}`));return(0,o.i)(r.result.recommendations)},d=({limit:e,vacancyId:t})=>({queryKey:c({limit:e,vacancyId:t}),queryFn:a=>l(a)({limit:e,vacancyId:t})}),u=({limit:e,vacancyId:t},a=!0)=>{const n=(0,r.A)();return(0,i.I)({queryFn:async()=>l(n)({limit:e,vacancyId:t}),queryKey:c({limit:e,vacancyId:t}),enabled:a})}},75247(e,t,a){a.d(t,{A:()=>s});var i=a(41711),r=a(98065),n=a(5326);const s=(e,t=3)=>{const{data:a,isError:s,isSuccess:o}=(0,n.Pf)({limit:t,vacancyId:e||null},!!e),c=!e||s||o&&!a?.results?.length,{data:l}=(0,r.OT)({limit:t},c);return(0,i.useMemo)((()=>a?.results||l?.results||[]),[l?.results,a?.results])}},54671(e,t,a){a.d(t,{i:()=>r});a(78944),a(18910),a(58968),a(50750);var i=a(3746);const r=e=>{const t=e.reduce(((e,{job:t,jobId:a})=>e.some((e=>e.id===a))?e:[...e,{...t,id:a,isPaid:!0,employmentTypeIds:t?.employmentTypeIds?.map(String)}]),[]);return{results:t.map((e=>(0,i.A)(e))),meta:{numPages:0,searchHash:void 0,totalHits:t.length||0,showingResultsFor:void 0,originalSearchQuery:void 0,splitByInitial:void 0,aggregations:{place:[],synonymCollection:[]},baseOptions:{},facets:{}},numPages:0,currentPage:0}}},96157(e,t,a){a.d(t,{U:()=>o});a(82822);var i=a(74124),r=a(18960);class n extends Error{constructor(e){super(e),this.name="SalaryServiceError"}}class s{fetchService;reduxStore;constructor(e,t){this.fetchService=e,this.reduxStore=t}executeGET=async(e,t,a)=>{const{cantonCode:i,...n}=t,s=await this.fetchService.fetch(r.Ok.SALARY_API+e,{...a||{},query:{...i&&"CH"!==i.toUpperCase()?{cantonCode:i.toUpperCase()}:{},...n}});return!s.ok&&this.isLoggingAllowed(e,s)&&this.logRequestError(`Salary service GET request failed - ${e}`,t,s,e),s};executePOST=async(e,t,a)=>{const i=await this.fetchService.fetch(r.Ok.SALARY_API+e,{body:t,method:"POST",...a||{}});return i.ok||this.logRequestError(`Salary service POST request failed - ${e}`,t,i,e),i};logRequestError=(e,t,a,r)=>{i.v.error(new n(e),{tags:{"error.code":a.statusCode},extras:{"API response":JSON.stringify(a.result,null,2),"Request data":JSON.stringify(t,null,2),"Request path":r,"Response status":a.statusCode}})};isLoggingAllowed=(e,t)=>("salary/user-has-salary-feedback"!==e||404!==t.statusCode)&&("salary/user"!==e||404!==t.statusCode);getProfessionsByIndustry=(e,t)=>this.executeGET("salary/professions-statistics",{industryId:e.toString(),cantonCode:t});getSalariesByAgeGender=(e,t)=>
1this.executeGET("salary/gender-age-statistics",{cantonCode:t,jobTitle:e});getSalariesByCantons=e=>this.executeGET("salary/canton-statistics",{jobTitle:e});getUserSalaryToken=()=>this.fetchService.fetch("user/salary-api/issue-token");getUserSalary=(e,t,a)=>this.executeGET("salary/user",{userId:e,platform:t},{headers:{Authorization:`Bearer ${a}`}});getSalaryFeedback=(e,t,a)=>this.executeGET("salary/user-has-salary-feedback",{jobTitle:e,userId:a,cantonCode:t});getSalariesGross=(e,t)=>this.executeGET("salary/gross-salary-statistics",{jobTitle:t,cantonCode:e});getSalariesByIndustry=(e,t)=>this.executeGET("salary/industry-statistics",{cantonCode:e,jobTitle:t});getSalariesTrend=(e,t)=>this.executeGET("salary/salary-trend-statistics",{cantonCode:t,jobTitle:e});getSalariesByWorkExperience=(e,t)=>this.executeGET("salary/work-experience-statistics",{cantonCode:t,jobTitle:e});getSalaryEstimation=({companyId:e,jobId:t,jobTitle:a,cantonCode:i,industryId:r,occupationalFieldId:n})=>this.executeGET("salary/salary-estimation",{companyId:e,jobId:t,jobTitle:a,cantonCode:i,industryId:r,occupationalFieldId:n});postSalaryFeedback=e=>this.executePOST("salary/user-feedback",e);saveSalary=e=>this.executePOST("salary/post",e)}const o=e=>new s(e.get("core.fetch"),e.get("core.redux"));o.identifier="salary.service"},79179(e,t,a){a.d(t,{HO:()=>d,NO:()=>h,RR:()=>u,UV:()=>p,Zr:()=>y});var i=a(62939),r=a(94956),n=a(73128),s=a(18474),o=a(97175),c=a(18218),l=a(96157);const d="salary/user",u="user/salary-api/issue-token",y=(e,t)=>({queryFn:g(e,t),queryKey:[d]}),p=()=>({queryFn:m,queryKey:[u]}),m=async e=>(0,s.A)(await e.wire(l.U).getUserSalaryToken()).result,g=(e,t)=>async a=>(0,s.A)(await a.wire(l.U).getUserSalary(e,n.j5.get(),t)).result,h=()=>{const{data:e}=(()=>{const e=(0,r.A)(),{data:{uuid:t}={}}=(0,c.sg)(),{data:a,isError:n}=(0,i.I)({queryKey:[u],queryFn:async()=>m(e),enabled:!!t}),s=a?.jwt;return(0,i.I)({queryFn:async()=>g(t||"",s)(e),queryKey:[d],enabled:!!s&&!n})})(),[t]=(0,o.G)("user_salary"),a=t();try{return e||JSON.parse(a||"{}")}catch{return{}}}},71008(e,t,a){a.d(t,{A:()=>s});var i=a(41711),r=a(97175),n=a(2739);const s=e=>{const[t]=(0,r.n)("ab_experiments");return(0,i.useMemo)((()=>(0,n.a)(t,e)),[t,e])}},4694(e,t,a){a.d(t,{A:()=>b,D:()=>f});a(84775);var i=a(41711),r=a(94956),n=a(73128),s=a(49975),o=a(96777),c=a(45128),l=a(71008),d=a(59033),u=a(929),y=a(52695);const p="CHI-2258-survey",m={COMPANY:"company",DYNAMIC_APPLICATION_SUCCESS:"application",EMAIL_APPLICATION_SUCCESS:"application",SALARY_SEARCH:"salary",VACANCY_DETAIL:"jobdetail",VACANCY_SEARCH:"srp"},g={jobs:"hatsjobs",jobup:"hatsjobup"}[n.j5.get()],h=["LANDINGPAGE_RICO","VACANCY_SEARCH"],f=({onClose:e,...t})=>{const a=(0,o.A)(),c=(0,s.A)(),l=(0,r.A)().get("core.location").getRouteKey(),p=(0,i.useMemo)((()=>((e,t)=>`https://eu.surveymonkey.com/r/${g}?touchpoint=${e?m[e]:""}&platform=${n.j5.get()}.ch&lang=${t}`)(l,c)),[l,c]);return(0,y.jsxs)(d.Zp,{alignItems:"center",boxShadow:"[none]",display:"flex",flexDirection:"column",p:"s16",...t,children:[(0,y.jsx)(d._V,{alt:"","aria-hidden":"true",decoding:"async",imageSize:"illustration",intrinsicHeight:200,intrinsicWidth:200,loading:"lazy",mb:{base:"s8",sm:"s16"},src:u,width:"[200px]"}),(0,y.jsx)(d.H2,{mb:"s8",textAlign:"center",textStyle:"title4",width:"100%",children:a("survey.text.title")}),(0,y.jsx)(d.P,{mb:"s16",textAlign:"center",width:"100%",children:a("survey.text.body",{tenant:n.j5.get()})}),(0,y.jsx)(d.e9,{buttonWrap:"button",display:"inline-flex",eventData:{event_component_type:"hat-survey"},href:p,onClick:e,target:"_blank",width:{base:"100%",sm:"auto"},children:(0,y.jsx)(d.Oz,{buttonType:"outlined",width:"100%",children:a("survey.text.button")})})]})},b=e=>{const t=(0,r.A)().get("core.location").getRouteKey(),a=(0,l.A)(t&&h.includes(t)?"CHI-2258-survey-srp":p),n=(0,c.$b)(),s=(0,c.mV)(),[o,d]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{d("disabled"!==a&&!s[p])}),[s[p],a]),o?(0,y.jsx)(f,{onClose:()=>n(p,!0),...e}):null}},25549(e,t,a){a.d(t,{A:()=>l});a(78944),a(27025);var i=a(41711),r=a(74124);a(84775);const n=(e,t,a)=>`${e}${e.includes("?")?"&":"?"}${t}=${encodeURIComponent(a)}`;var s=a(76023),o=a(52695);const c=new Set,l=({applicationId:e,vacancy:t})=>{const a=t?.trackingLinks?.find((e=>"application_send"===e.type))?.url;return(0,i.useEffect)((()=>{a&&!e&&r.v.error(new Error("Missing applicationId for the application_send tracking pixel"),{extras:{VacancyId:t?.id}})}),[e,a,t?.id]),(0,i.useEffect)((()=>{a&&e&&c.add(e)}),[e,a]),e&&a&&!c.has(e)?(0,o.jsx)(s.A,{src:n(a,"applicationId",e)}):null}},76023(e,t,a){a.d(t,{A:()=>s});var i=a(59946),r=a(59033),n=a(52695);const s=({src:e})=>{const t=(0,i.pE)("j_src");return(0,n.jsx)(r._V,{alt:"","aria-hidden":"true",border:"none","data-cy":"pixel",fetchPriority:"low",height:"[1px]",loading:"lazy",position:"absolute",src:t&&e+`&j_src=${t}`||e,width:"[1px]"})}},78230(e,t,a){a.d(t,{Ge:()=>r,Ot:()=>n,ne:()=>o,u5:()=>s});var i=a(30296);const r=({di:e})=>{const t=e.wire(i.x).getSelectedVacancy(),a=t?.company;return{company_id:a?.id?.toString()||null}},n=({di:e})=>{const t=e.wire(i.x).getSelectedVacancy()?.company;return{company_location:t?.city}},s=({di:e})=>{const t=e.wire(i.x).getSelectedVacancy()?.company;return{company_name:t?.name}},o=({di:e})=>{const t=e.wire(i.x).getSelectedVacancy()?.industry;return{company_industry_id:`${t||""}`}}},8916(e,t,a){a.d(t,{Ay:()=>u,F1:()=>c,Mc:()=>d,Us:()=>s,nX:()=>l,oK:()=>o});
1a(92567);var i=a(41711),r=a(94956),n=a(18218);const s=()=>{const{data:{flags:e}={flags:{}}}=(0,n.sg)();return e},o=async(e,t,a)=>{const i=a.getQueryData(n.qv);if(!i)return{ok:!1,error:"No user found"};const r={...i.flags},s={...i.flags,[e]:(new Date).toDateString()};a.setQueryData(n.qv,{...i,flags:s});const o=await t.fetch(`${n.WT}/flag`,{body:{flag:e},method:"PUT"});return o.ok||a.setQueryData(n.qv,{...i,flags:r}),o},c=async(e,t,a)=>{const i=a.getQueryData(n.qv);if(!i)return{ok:!1,error:"No user found"};const r={...i.flags},{[e]:s,...o}=i.flags;a.setQueryData(n.qv,{...i,flags:o});const c=await t.fetch(`${n.WT}/flag/${e}`,{method:"DELETE"});return c.ok||a.setQueryData(n.qv,{...i,flags:r}),c},l=()=>{const e=(0,r.A)();return{setFlag:async t=>o(t,e.get("core.fetch"),e.get("query.client"))}},d=()=>{const e=(0,r.A)();return{deleteFlag:async t=>c(t,e.get("core.fetch"),e.get("query.client"))}},u=e=>{const{data:{flags:t}={}}=(0,n.sg)(),a=!!t?.[e],{setFlag:r}=l(),{deleteFlag:s}=d();return(0,i.useMemo)((()=>({isSet:a,setFlag:(t=!0)=>t?r?.(e):s?.(e)})),[s,e,a,r])}},89016(e,t,a){a.d(t,{R1:()=>s,pC:()=>r,uB:()=>n});var i=a(20902);const r=e=>({type:i.g.SET_ADJOINING_POINTER,payload:e}),n=(e,t,a=!1)=>({type:i.g.ADD_ADJOINING_VACANCY_LIST,prepend:a,pageNumber:t,payload:e}),s=()=>({type:i.g.RESET_LAST_POSITION})},13756(e,t,a){a.d(t,{A:()=>o});var i=a(6799),r=a(1444),n=a(96888),s=a(89016);const o=()=>{const e=(0,i.c)(2),t=(0,r.A)();let a;return e[0]!==t?(a=()=>{t((0,n.yx)(void 0,void 0,"vacancy")),t((0,s.R1)())},e[0]=t,e[1]=a):a=e[1],a}},10056(e,t,a){a.d(t,{A:()=>n});var i=a(59033),r=a(52695);const n=e=>(0,r.jsx)(i.In,{...e,children:(0,r.jsx)("path",{d:"M12 22q-.825 0-1.412-.587A1.93 1.93 0 0 1 10 20h4q0 .824-.588 1.413A1.93 1.93 0 0 1 12 22m-7-3a.97.97 0 0 1-.713-.288A.97.97 0 0 1 4 18a.97.97 0 0 1 .287-.712A.97.97 0 0 1 5 17h1v-7q0-2.074 1.25-3.688Q8.5 4.7 10.5 4.2v-.7q0-.624.438-1.063A1.45 1.45 0 0 1 12 2q.624 0 1.063.438.437.437.437 1.062v.7q.25.05.475.112.225.063.425.188.35.199.525.563a.82.82 0 0 1 0 .737q-.175.375-.538.538a.9.9 0 0 1-.737.012 4.7 4.7 0 0 0-.9-.287A4.3 4.3 0 0 0 12 6q-1.65 0-2.825 1.175T8 10v7h8v-2q0-.5.313-.75a1.07 1.07 0 0 1 1.375 0Q18 14.5 18 15v2h1q.424 0 .712.288.288.287.288.712c0 .425-.096.52-.288.712A.97.97 0 0 1 19 19zm13-9h-2a.97.97 0 0 1-.713-.287A.97.97 0 0 1 15 9q0-.424.287-.713A.97.97 0 0 1 16 8h2V6a.97.97 0 0 1 .288-.713A.97.97 0 0 1 19 5a.97.97 0 0 1 .712.287Q20 5.575 20 6v2h2a.97.97 0 0 1 .712.287Q23 8.575 23 9c0 .425-.096.52-.288.713A.97.97 0 0 1 22 10h-2v2a.97.97 0 0 1-.288.713A.97.97 0 0 1 19 13a.97.97 0 0 1-.712-.287A.97.97 0 0 1 18 12z"})})},32527(e,t,a){e.exports=a.p+"images/6e86dcdcea636193a00a.svg"},53420(e,t,a){e.exports=a.p+"images/482fbbed46c77bbb6bc9.svg"},929(e,t,a){e.exports=a.p+"images/d404b65bc33072483199.svg"},97282(e,t,a){e.exports=a.p+"images/dd1e7813777e686df8cb.svg"}}]);
2//# sourceMappingURL=chunk-src_common_lib_Facet_utils_treeUtils_ts-src_common_modules_application-dynamic_tracking_queue-f80d9e.fa5fad81.js.map

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.