PageSourceSearch

https://www.asgardhire.ai/assets/profile-ready._cvId.lazy-seVLdytt.js

js asgardhire.ai collected 2026-09-24 14:30:19 UTC 13,790 bytes, 1 lines download raw bytes

1import{fe as U,n as K,u as q,aW as X,a8 as Z,r as p,d0 as ee,d2 as te,eQ as se,d3 as re,eR as I,j as e,C as P,ft as ae,af as w,aa as F,bf as oe,B as O,W as S,_ as ne,bm as ie,b as le,c as de}from"./index-BsFCnAyK.js";import{C as ce}from"./CandidateNavbar-DafeAjAM.js";import{P as me}from"./PublicFooter-CmBMeQSX.js";import{b as ue}from"./useEnhanceCv-0TU3j1PH.js";import{E as xe}from"./EnhancePanels-Bb12J3AN.js";import{a as pe,b as fe,M as he,f as M}from"./jobShared-BLiLnkwc.js";import{b as be,i as ge}from"./recsWarmGate-BCQW5xg8.js";import{e as ye}from"./exploreJobsEntry-CCJglOjx.js";import{M as je}from"./map-pin-4thXq3S3.js";import{B as ve}from"./bookmark-BZV-XNFn.js";import"./formatDistanceToNow-CDssafZe.js";import"./en-US-BZ0UpF_e.js";import"./bell-D5Dez9VA.js";import"./info-9XFw6zKV.js";import"./list-checks-DGe487JT.js";const H=5;function we(t,s){const r=t.toLocaleString();return s?`${r}+`:r}function Ne({loading:t,total:s,preview:r,isLowerBound:a}){if(t)return{tabBlurb:"Finding roles that fit your CV…",panelLabel:"Finding roles that fit your CV…",exploreLabel:"See all jobs"};if(s<=0)return{tabBlurb:"Roles picked from your new CV",panelLabel:"From your new CV",exploreLabel:"See all jobs"};const i=we(s,a),n=s===1&&!a?"job":"jobs",l=`${i} ${n} match your profile`;return{tabBlurb:l,panelLabel:r>0?`${l} · showing the top ${r}`:l,exploreLabel:`See all ${i} ${n}`}}function ke({job:t,saved:s,isSaving:r,onOpen:a,onSave:i}){const n=t.match_reasons?.slice(0,2).join(" · ");return e.jsxs("div",{className:"group flex w-full items-start gap-2 rounded-2xl border border-border bg-card p-4 transition-all hover:-translate-y-0.5 hover:border-primary/35 hover:shadow-md",children:[e.jsxs("button",{type:"button",onClick:a,"aria-label":`View ${t.title}`,className:"flex min-w-0 flex-1 items-start gap-3 text-left",children:[e.jsx("span",{className:w("flex h-11 w-11 shrink-0 items-center justify-center rounded-xl text-sm font-bold shadow-sm ring-1 ring-black/5",pe(t.company_name)),children:fe(t.company_name)}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:" text-[15px] font-medium leading-snug tracking-[-0.025em] text-foreground group-hover:text-primary",children:t.title}),typeof t.match_score=="number"&&t.match_score>=0&&e.jsx(he,{score:Math.round(t.match_score)})]}),e.jsx("span",{className:"mt-1 block text-sm font-semibold text-muted-foreground",children:t.company_name}),e.jsxs("span",{className:"mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[t.location&&e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(je,{size:12})," ",t.location]}),t.work_type&&e.jsx("span",{children:M(t.work_type)}),t.job_type&&e.jsx("span",{children:M(t.job_type)})]}),n&&e.jsxs("span",{className:"mt-2 flex items-start gap-1.5 text-xs leading-snug text-primary",children:[e.jsx(F,{size:12,className:"mt-0.5 shrink-0"}),e.jsxs("span",{children:[e.jsx("span",{className:"font-semibold",children:"Why it matches:"})," ",n]})]})]}),e.jsx(S,{size:17,className:"mt-1 shrink-0 text-muted-foreground/60 transition-transform group-hover:translate-x-0.5 group-hover:text-primary"})]}),e.jsx("button",{type:"button",onClick:i,disabled:r,"aria-label":s?`Unsave ${t.title}`:`Save ${t.title}`,title:s?"Remove from saved jobs":"Save job",className:"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-border text-muted-foreground transition-colors hover:border-primary/30 hover:bg-primary/5 hover:text-primary disabled:opacity-50",children:e.jsx(ve,{size:16,className:s?"fill-primary text-primary":""})})]})}function Ce(){return e.jsx("div",{className:"animate-pulse rounded-2xl border border-border bg-card p-4",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"h-11 w-11 rounded-xl bg-muted"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx("div",{className:"h-4 w-2/3 rounded bg-muted"}),e.jsx("div",{className:"h-3 w-1/3 rounded bg-muted"}
1),e.jsx("div",{className:"h-3 w-1/2 rounded bg-muted"})]})]})})}function $({done:t,label:s}){return e.jsxs("span",{className:w("inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-semibold",t?"border-success/40 bg-success/10 text-success":"border-warning/40 bg-warning/10 text-warning"),children:[t?e.jsx(P,{size:12,strokeWidth:3}):e.jsx("span",{className:"h-2.5 w-2.5 rounded-full border-2 border-current"}),s]})}function _e(){const[t,s]=p.useState(!1);return p.useEffect(()=>{if(typeof window.matchMedia!="function")return;const r=window.matchMedia("(hover: hover) and (pointer: fine)"),a=()=>s(r.matches);return a(),r.addEventListener("change",a),()=>r.removeEventListener("change",a)},[]),t}function E({selected:t,icon:s,title:r,collapsedBlurb:a,badge:i,recommended:n,onHover:l,onSelect:u}){return e.jsxs("button",{type:"button","aria-expanded":t,"aria-controls":"feature-panel",onClick:u,onMouseEnter:l,className:w("flex w-full cursor-pointer items-start gap-3 rounded-3xl border bg-card p-5 text-left shadow-sm transition-[border-color,box-shadow] duration-200 motion-reduce:transition-none",t?n?"border-primary/40 shadow-md":"border-muted-foreground/40 shadow-md":"border-border hover:border-muted-foreground/40"),children:[e.jsx("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary",children:s}),e.jsxs("span",{className:"min-w-0 flex-1",children:[i&&e.jsx("span",{className:"mb-1.5 inline-flex rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-bold uppercase tracking-[0.14em] text-primary",children:i}),e.jsx("span",{className:"block text-lg font-medium tracking-[-0.03em] text-foreground",children:r}),e.jsx("span",{className:"mt-1 block text-sm leading-relaxed text-muted-foreground",children:a})]}),e.jsx(le,{size:18,className:w("mt-1 shrink-0 text-muted-foreground transition-transform duration-200 motion-reduce:transition-none",t&&"rotate-180 text-primary")})]})}function Se({analysis:t,isLoading:s,onReviewCv:r,onFixStep:a}){return e.jsxs("div",{children:[e.jsx("h2",{className:"mb-4 text-xl font-medium tracking-[-0.03em] text-foreground",children:"Your new CV"}),e.jsx(xe,{analysis:t,loading:s,onFixStep:a}),e.jsxs("div",{className:"mt-6",children:[e.jsxs("button",{type:"button",onClick:r,className:"inline-flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl border border-primary/25 bg-card px-4 py-3 text-sm font-bold text-primary transition-colors hover:bg-primary/5",children:["Review your CV ",e.jsx(S,{size:16})]}),e.jsx("p",{className:"mt-3 text-center text-xs text-muted-foreground",children:"Edit, download or print anytime"})]})]})}function Le({jobs:t,jobsLoading:s,savedOverrides:r,isSaving:a,exploreLabel:i,onOpenJob:n,onSaveJob:l,onExploreJobs:u}){return e.jsxs("div",{className:"flex flex-col gap-3",children:[s?Array.from({length:H}).map((d,f)=>e.jsx(Ce,{},f)):t.length>0?t.map(d=>e.jsx(ke,{job:d,saved:r[d.job_id]??d.is_saved,isSaving:a,onOpen:()=>n(d.job_id),onSave:()=>l(d)},d.job_id)):e.jsxs("div",{className:"rounded-2xl border border-dashed border-muted-foreground/40 bg-muted/50 px-5 py-10 text-center",children:[e.jsx(O,{className:"mx-auto h-8 w-8 text-muted-foreground/60"}),e.jsx("p",{className:"mt-3 font-semibold text-muted-foreground",children:"Your matches are being prepared"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Explore available roles while we refine your recommendations."})]}),e.jsxs("button",{type:"button",onClick:u,className:"mt-2 inline-flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl bg-primary px-4 py-3.5 text-sm font-bold text-primary-foreground transition-colors hover:bg-primary/90",children:[i," ",e.jsx(S,{size:16})]})]})}function Re({platformLocked:t,atsScore:s,analysis:r,analysisLoading:a,jobsLoading:i,jobs:n,jobsTabBlurb:l,matchCountLabel:u,exploreLabel:d,savedOverrides:f,isSaving:N,onStartAutoApply:h,onReviewCv:L,onFixStep:b,onExploreJobs:k,onOpenJob:C,onSaveJob:g}){const _=_e(),x=t?"jobs":"auto-apply",[c,y]=p.useState(x);p.useEffect(()=>{y(x)},[x]);const m=v=>y(v),j=v=>{_&&m(v)};return e.jsxs("section",{className:"mt-6",children:[e.jsxs("div",{className:w("grid gap-4 md:grid-cols-2",!t&&"lg:grid-cols-3"),children:[!t&&e.jsx(E,{selected:c==="auto-apply",icon:e.jsx(F,{size:20}),title:"We’ll apply for you",collapsedBlurb:"We send your CV to jobs that fit — after a few extra answers.",badge:"Recommended · 2 minutes",recommended:!0,onHover:()=>j("auto-apply"),onSelect:()=>m("auto-apply")}),e.jsx(E,{selected:c==="cv",icon:e.jsx(oe,{size:20}),title:"Check your CV",collapsedBlurb:typeof s=="number"?`ATS score ${s}/100`:"We rewrote it so hiring systems can read it.",onHover:()=>j("cv"),onSelect:()=>m("cv")}),e.jsx(E,{selected:c==="jobs",icon:e.jsx(O,{size:20}),title:"Browse matching jobs",collapsedBlurb:l,onHover:()=>j("jobs"),onSelect:()=>m("jobs")})]}),e.jsxs("div",{id:"feature-panel",className:"mt-4 rounded-3xl border border-border bg-card p-5 shadow-sm sm:p-6",children:[c==="auto-apply"&&!t&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-medium tracking-[-0.03em] text-foreground",children:"We’ll apply for you"}),e.jsx("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:"Your CV is ready. Application forms still ask things it doesn’t cover — right to work and where you’ll work. Answer those once and we apply for you."}),e.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[e.jsx($,{done:!0,label:"CV ready"}),e.jsx($,{done:!1,label:"A few extra answers"})]}),e.jsxs("div",{className:"mt-5 flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsxs("button",{type:"button",onClick:h,className:"inline-flex cursor-pointer items-center justify-center gap-2 rounded-xl bg-primary px-5 py-3 text-sm font-semibold text-primary-foreground transition-colors hover:bg-primary/90",children:["Start — about 2 minutes",e.jsx(S,{size:16})]}),e.jsx("button",{type:"button",onClick:()=>m("jobs"),className:"inline-flex cursor-pointer items-center justify-center rounded-xl px-5 py-2.5 text-sm font-semibold text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground",children:"Skip, I’ll browse"})]})]}),c==="cv"&&e.jsx(Se,{analysis:r,isLoading:a,onReviewCv:L,onFixStep:b}),c==="jobs"&&e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-medium tracking-[-0.03em] text-foreground",children:"Jobs that fit you"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:u})]}),e.jsxs("span",{className:"inline-flex w-fit items-center gap-1.5 rounded-full bg-muted px-3 py-1 text-xs font-semibold text-muted-foreground",children:[e.jsx(F,{size:12,className:"text-primary"})," From your new CV"]})]}),e.jsx(Le,{jobs:n,jobsLoading:i,savedOverrides:f,isSaving:N,exploreLabel:d,onOpenJob:C,onSaveJob:g,onExploreJobs:k})]})]})]})}function Be(){const{cvId:t}=U({from:"/_candidate/profile-ready/$cvId"}),s=K(),a=q().user?.profile?.sub,{access:i}=X(),n=i?.unlocked===!1,l=Z(),[u,d]=p.useState({}
1),f=ue(a,t,!!(a&&t)),N=f.data?.analysis,h=ee(),L=h.data?.filters?.default_values,{countryIds:b,cityIds:k}=te(L),C=!!b?.length,g=h.isSuccess&&C,_=se({country_ids:b,city_ids:k},{enabled:g,rankingVariant:I}),x=re({country_ids:b,city_ids:k,sort_by:"best_match"},{enabled:be({useRecsEndpoint:C,willWarm:g,warmSettled:_.isFetched}),rankingVariant:I}),c=p.useMemo(()=>x.data?.pages.flatMap(o=>o.data??[])??[],[x.data]),y=p.useMemo(()=>c.slice(0,H),[c]),m=x.data?.pages[0],j=m?.total??m?.pagination?.total??c.length,v=!!m?.total_is_lower_bound,T=ge({willWarm:g,warmSettled:_.isFetched}),V=h.isLoading||x.isLoading||T,Q=async o=>{const W=u[o.job_id]??o.is_saved,z=!W;d(B=>({...B,[o.job_id]:z}));try{await l.mutateAsync({jobId:o.job_id,save:z})}catch{d(B=>({...B,[o.job_id]:W})),ne.error("Couldn't update your saved jobs. Please try again.")}},D=()=>{s({to:"/create-resume",search:{cv:t,step:"preview"}})},Y=o=>{s({to:"/create-resume",search:{cv:t,step:o}})},A=o=>{s({to:"/explore-jobs",search:{...ye("fresh"),...o?{job:o}:{}}})},J=N?.ats_score,R=Ne({loading:V,total:j,preview:y.length,isLowerBound:v}),G=()=>{s({to:ie(),search:{return_to:"auto-apply"}})};return e.jsxs("div",{className:"min-h-screen flex flex-col bg-muted/50 font-funnel",children:[e.jsx(ce,{}),e.jsxs("main",{className:"flex-1 w-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 sm:py-12",children:[e.jsxs("section",{className:"rounded-3xl border border-border bg-card px-5 py-6 text-center shadow-sm sm:px-8 sm:py-7",children:[e.jsx("span",{className:"mx-auto mb-3 flex h-11 w-11 items-center justify-center rounded-full bg-success/20 text-success shrink-0",children:e.jsx(P,{size:23,strokeWidth:3})}),e.jsx("p",{className:"mb-2 text-xs font-bold uppercase tracking-[0.18em] text-success",children:"CV uploaded"}),e.jsx("h1",{className:"text-3xl font-medium tracking-[-0.045em] text-foreground sm:text-4xl",children:"We found jobs that match you"}),e.jsx("p",{className:"mx-auto mt-3 max-w-2xl text-base text-muted-foreground sm:text-lg",children:"Hover or tap a card to open it."})]}),!n&&e.jsx(ae,{className:"mt-6"}),e.jsx(Re,{platformLocked:n,atsScore:typeof J=="number"?J:void 0,analysis:N,analysisLoading:f.isLoading,jobsLoading:V,jobs:y,jobsTabBlurb:R.tabBlurb,matchCountLabel:R.panelLabel,exploreLabel:R.exploreLabel,savedOverrides:u,isSaving:l.isPending,onStartAutoApply:G,onReviewCv:D,onFixStep:Y,onExploreJobs:()=>A(),onOpenJob:o=>A(o),onSaveJob:o=>void Q(o)})]}),e.jsx(me,{})]})}const De=de("/_candidate/profile-ready/$cvId")({component:Be});export{De as Route};

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.