PageSourceSearch

https://careerplatform.io/assets/resume-profile-CCuVPukq.js

js careerplatform.io collected 2026-10-02 01:59:48 UTC 26,311 bytes, 11 lines download raw bytes

1import{c as re,r as m,j as e,aa as te,P as ne,a as P,bd as oe,e as ie,b as Y,ae as V,B as C,au as ce,H as R,be as T,t as N,av as de,aw as ue,ax as pe,a8 as S,X as xe}from"./index-P6gp-aZt.js";import{g as he,p as W,u as ge,d as me}from"./resume-profile.functions-CIogRmkh.js";import{m as E,b as D,n as F,f as M,p as ve,a as fe}from"./UseResumeProfileButton-CMFYfwWj.js";import{p as X}from"./resume-upload-button-D1k6awBz.js";import{I as c}from"./input-DjMejl9x.js";import{L as q}from"./label-B0ZEWUZ2.js";import{S as je,a as ye,b as be,c as _e,d as Ce}from"./select-Bzii2Fl6.js";import{A as Ne,a as we,b as ke,c as Se,d as Pe,e as Ye,f as Re,g as Me}from"./alert-dialog-DPoGxQZH.js";import{S as Ae}from"./sparkles-CbR3YTJF.js";import{P as G}from"./pencil-Cpv9QQl1.js";import{U as H}from"./upload-CgNiXXHX.js";import{C as ze}from"./circle-check-B_xEoGS9.js";import{P as Le}from"./plus-CkA4ULrC.js";import"./extension-auth-B_JeSTLN.js";import"./check-DAebpxbK.js";import"./resume-source-hygiene-BnELtta6.js";import"./index-BlJmuZBX.js";import"./index-BRxJuvAA.js";import"./index-m4kp8mBg.js";import"./index-BiqmPxq4.js";import"./index-CJpCmuXZ.js";import"./chevron-up-DODsEh--.js";import"./index-CIfkDh8u.js";const Ee=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]],De=re("file-up",Ee);function Fe(s,o=[]){let d=[];function u(r,n){const x=m.createContext(n);x.displayName=r+"Context";const h=d.length;d=[...d,n];const v=y=>{const{scope:j,children:k,...g}=y,z=j?.[s]?.[h]||x,L=m.useMemo(()=>g,Object.values(g));return e.jsx(z.Provider,{value:L,children:k})};v.displayName=r+"Provider";function f(y,j){const k=j?.[s]?.[h]||x,g=m.useContext(k);if(g)return g;if(n!==void 0)return n;throw new Error(`\`${y}\` must be used within \`${r}\``)}return[v,f]}const p=()=>{const r=d.map(n=>m.createContext(n));return function(x){const h=x?.[s]||r;return m.useMemo(()=>({[`__scope${s}`]:{...x,[s]:h}}),[x,h])}};return p.scopeName=s,[u,Te(p,...o)]}function Te(...s){const o=s[0];if(s.length===1)return o;const d=()=>{const u=s.map(p=>({useScope:p(),scopeName:p.scopeName}));return function(r){const n=u.reduce((x,{useScope:h,scopeName:v})=>{const y=h(r)[`__scope${v}`];return{...x,...y}},{});return m.useMemo(()=>({[`__scope${o.scopeName}`]:n}),[n])}};return d.scopeName=o.scopeName,d}var Ie=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],K=Ie.reduce((s,o)=>{const d=te(`Primitive.${o}`),u=m.forwardRef((p,r)=>{const{asChild:n,...x}=p,h=n?d:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(h,{...x,ref:r})});return u.displayName=`Primitive.${o}`,{...s,[o]:u}},{}),I="Progress",$=100,[$e]=Fe(I),[Oe,Be]=$e(I),Q=m.forwardRef((s,o)=>{const{__scopeProgress:d,value:u=null,max:p,getValueLabel:r=Ue,...n}=s;(p||p===0)&&!O(p)&&console.error(Ve(`${p}`,"Progress"));const x=O(p)?p:$;u!==null&&!B(u,x)&&console.error(We(`${u}`,"Progress"));const h=B(u,x)?u:null,v=A(h)?r(h,x):void 0;return e.jsx(Oe,{scope:d,value:h,max:x,children:e.jsx(K.div,{"aria-valuemax":x,"aria-valuemin":0,"aria-valuenow":A(h)?h:void 0,"aria-valuetext":v,role:"progressbar","data-state":ee(h,x),"data-value":h??void 0,"data-max":x,...n,ref:o})})});Q.displayName=I;var J="ProgressIndicator",Z=m.forwardRef((s,o)=>{const{__scopeProgress:d,...u}=s,p=Be(J,d);return e.jsx(K.div,{"data-state":ee(p.value,p.max),"data-value":p.value??void 0,"data-max":p.max,...u,ref:o})});Z.displayName=J;function Ue(s,o){return`${Math.round(s/o*100)}%`}function ee(s,o){return s==null?"indeterminate":s===o?"complete":"loading"}function A(s){return typeof s=="number"}function O(s){return A(s)&&!isNaN(s)&&s>0}function B(s,o){return A(s)&&!isNaN(s)&&s<=o&&s>=0}function Ve(s,o){return`Invalid prop \`max\` of value \`${s}\` supplied to \`${o}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${$}\`.`}function We(s,o){return`Invalid prop \`value\` of value \`${s}\` supplied to \`${o}\`. The \`value\` prop must be:
2  - a positive number
3  - less than the value passed to \`max\` (or ${$} if no \`max\` prop is set)
4  - \`null\` or \`undefined\` if the progress is indeterminate.
5
6Defaulting to \`null\`.`}var ae=Q,Xe=Z;const se=m.forwardRef(({className:s,value:o,...d},u)=>e.jsx(ae,{ref:u,className:ne("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",s),...d,children:e.jsx(Xe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(o||0)}%)`}})}));
6se.displayName=ae.displayName;const qe={full_name:"",email:"",phone:"",location:"",country:"",target_role:"",headline_title:null,years_of_experience:null,linkedin_url:"",portfolio_url:"",professional_summary:"",work_experience:[],education:[],projects:[],volunteer:[],awards:[],skills:[],certifications:[],languages:[],work_authorization:"",job_preferences:{desired_titles:[],desired_locations:[],remote_preference:"",employment_type:""},expected_salary:{min:null,max:null,currency:"USD",visible:!1},eeo_data:{},raw_resume_text:null};function b(s,o){switch(o){case"personal":return!!(s.full_name&&s.email);case"summary":return!!(s.professional_summary&&s.professional_summary.trim().length>20);case"work":return(s.work_experience?.length??0)>0;case"education":return(s.education?.length??0)>0;case"projects":return(s.projects?.length??0)>0;case"volunteer":return(s.volunteer?.length??0)>0;case"awards":return(s.awards?.length??0)>0;case"skills":return(s.skills?.length??0)>0;case"certifications":return(s.certifications?.length??0)>0;case"languages":return(s.languages?.length??0)>0;default:return!1}}function ba(){const s=P(he),o=oe(),{data:d,isLoading:u,refetch:p}=ie({queryKey:["resume-profile"],queryFn:()=>s()}),[r,n]=m.useState("empty");m.useEffect(()=>{u||n(d?"view":"empty")},[d,u]);const x=async()=>{await o.invalidateQueries({queryKey:["resume-profile"]}),await p()};return u?e.jsx("div",{className:"container mx-auto px-4 py-12 flex items-center justify-center",children:e.jsx(Y,{className:"size-6 animate-spin text-muted-foreground"})}):e.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-4xl",children:[e.jsx("h1",{className:"text-3xl font-bold mb-6",children:"Resume Profile"}),r==="empty"&&e.jsx(Ge,{onStarted:()=>n("edit"),onSaved:async()=>{await x(),n("view")},initialFormSetter:void 0}),r==="edit"&&e.jsx(le,{initial:d??null,onCancel:()=>n(d?"view":"empty"),onSaved:async()=>{await x(),n("view")}}),r==="view"&&d&&e.jsx(He,{profile:d,onEdit:()=>n("edit"),onReupload:()=>n("edit"),onDeleted:async()=>{await x(),n("empty")}})]})}function Ge({onStarted:s,onSaved:o}){const d=P(W),u=m.useRef(null),[p,r]=m.useState(!1),[n,x]=m.useState(null),h=async v=>{r(!0);try{const{text:f}=await X(v),y=await d({data:{resumeText:f}});x({...y,raw_resume_text:f}),N.success("Resume parsed. Review and save.")}catch(f){N.error(f instanceof Error?f.message:"Failed to parse resume")}finally{r(!1)}};return n?e.jsx(le,{initial:n,onCancel:()=>x(null),onSaved:o}):e.jsxs(V,{className:"p-8 text-center space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Ae,{className:"size-10 mx-auto text-primary"}),e.jsx("h2",{className:"text-2xl font-bold",children:"Build your profile once. Power every tool."}),e.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Job searching is exhausting enough. Fill this out once and every tool on the platform already knows your background - no more re-uploading your resume every time."})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center pt-2",children:[e.jsx("input",{ref:u,type:"file",accept:".pdf,.docx,.txt,application/pdf,application/vnd.openxmlformats-officedocument.wordprocessingml.document",className:"hidden",onChange:v=>{const f=v.target.files?.[0];f&&h(f)}}),e.jsxs(C,{onClick:()=>u.current?.click(),disabled:p,size:"lg",children:[p?e.jsx(Y,{className:"size-4 animate-spin"}):e.jsx(De,{className:"size-4"}),p?"Parsing resume…":"Upload Resume"]}),e.jsxs(C,{variant:"outline",size:"lg",onClick:s,disabled:p,children:[e.jsx(G,{className:"size-4"})," Fill Manually"]})]})]})}function He({profile:s,onEdit:o,onReupload:d,onDeleted:u}){const p=P(me),[r,n]=m.useState(!1),[x,h]=m.useState(!1),v=async()=>{h(!0);try{await p(),N.success("Resume Profile deleted."),n(!1),await u()}catch(j){N.error(j instanceof Error?j.message:"Failed to delete profile")}finally{h(!1)}},f=ve(s),y=M(s.skills).slice(0,5);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs(V,{className:"p-6 space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold",children:s.full_name||"Unnamed profile"}),s.location&&e.jsx("p",{className:"text-muted-foreground text-sm",children:s.location})]}),e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsxs(C,{onClick:o,children:[e.jsx(G,{className:"size-4"})," Edit Profile"]}),e.jsxs(C,{variant:"outline",onClick:d,children:[e.jsx(H,{className:"size-4"})," Re-upload Resume"]}),e.jsxs(C,{variant:"ghost",onClick:()=>n(!0),className:"text-destructive hover:bg-destructive/10 hover:text-destructive",children:[e.jsx(T,{className:"size-4"})," Delete Profile"]})]})]}),y.length>0&&e.jsxs("div",{children:[e.jsx(q,{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Top Skills"}),e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:y.map(j=>e.jsx("span",{className:"px-2.5 py-1 rounded-full bg-secondary text-secondary-foreground text-xs",children:j},j))})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between text-sm mb-1.5",children:[e.jsx("span",{className:"text-muted-foreground",children:"Profile completeness"}),e.jsxs("span",{className:"font-medium",children:[f,"%"]})]}),e.jsx(se,{value:f})]})]}),e.jsx(Ne,{open:r,onOpenChange:n,children:e.jsxs(we,{className:"bg-white text-slate-900",children:[e.jsxs(ke,{children:[e.jsx(Se,{children:"Are you sure?"}),e.jsx(Pe,{children:"This will permanently delete your Resume Profile and cannot be undone."})]}),e.jsxs(Ye,{children:[e.jsx(Re,{disabled:x,className:"bg-slate-100 text-slate-700 border-slate-200 hover:bg-slate-200 hover:text-slate-900",children:"Cancel"}),e.jsxs(Me,{onClick:j=>{j.preventDefault(),v()},disabled:x,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[x?e.jsx(Y,{className:"size-4 animate-spin"}):e.jsx(T,{className:"size-4"}),"Delete"]})]})]})})]})}function le({initial:s,onCancel:o,onSaved:d}){const u=P(ge),p=P(W),[r,n]=m.useState(()=>U(s)),[x,h]=m.useState(s?.skills??null),[v,f]=m.useState(!1),y=m.useRef(null),[j,k]=m.useState(!1),g=(a,t)=>n(l=>({...l,[a]:t})),z=async a=>{k(!0);try{const{text:t}=await X(a),l=await p({data:{resumeText:t}});n(U({...l,raw_resume_text:t})),h(l.skills??null),N.success("Resume re-parsed. Review and save.")}
6catch(t){N.error(t instanceof Error?t.message:"Failed to parse resume")}finally{k(!1)}},L=async()=>{f(!0);try{await u({data:{...r,skills:fe(x,M(r.skills))}}),N.success("Profile saved - your tools are now powered by your profile."),d()}catch(a){N.error(a instanceof Error?a.message:"Failed to save profile")}finally{f(!1)}};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"All form changes are local until you press Save."}),e.jsxs("div",{children:[e.jsx("input",{ref:y,type:"file",accept:".pdf,.docx,.txt",className:"hidden",onChange:a=>{const t=a.target.files?.[0];t&&z(t)}}),e.jsxs(C,{variant:"outline",size:"sm",onClick:()=>y.current?.click(),disabled:j,children:[j?e.jsx(Y,{className:"size-4 animate-spin"}):e.jsx(H,{className:"size-4"}),"Re-upload resume"]})]})]}),e.jsxs(ce,{type:"multiple",defaultValue:["personal"],className:"space-y-2",children:[e.jsx(_,{value:"personal",title:"Personal Info",complete:b(r,"personal"),children:e.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[e.jsx(i,{label:"Full name",children:e.jsx(c,{value:r.full_name??"",onChange:a=>g("full_name",a.target.value)})}),e.jsx(i,{label:"Email",children:e.jsx(c,{type:"email",value:r.email??"",maxLength:320,onChange:a=>g("email",a.target.value)})}),e.jsx(i,{label:"Phone",children:e.jsx(c,{value:r.phone??"",maxLength:50,onChange:a=>g("phone",a.target.value)})}),e.jsx(i,{label:"Location (City, State)",children:e.jsx(c,{value:r.location??"",maxLength:300,onChange:a=>g("location",a.target.value),placeholder:"e.g. Austin, TX"})}),e.jsx(i,{label:"Country",children:e.jsx(c,{value:r.country??"",onChange:a=>g("country",a.target.value),placeholder:"e.g. United States"})}),e.jsx(i,{label:"Target role",children:e.jsx(c,{value:r.target_role??"",onChange:a=>g("target_role",a.target.value),placeholder:"e.g. Senior Product Manager"})}),e.jsx(i,{label:"LinkedIn URL",children:e.jsx(c,{value:r.linkedin_url??"",maxLength:500,onChange:a=>g("linkedin_url",a.target.value)})}),e.jsx(i,{label:"Portfolio or GitHub URL",children:e.jsx(c,{value:r.portfolio_url??"",maxLength:500,onChange:a=>g("portfolio_url",a.target.value)})})]})}),e.jsx(_,{value:"summary",title:"Professional Summary",complete:b(r,"summary"),children:e.jsx(R,{rows:5,value:r.professional_summary??"",maxLength:2e3,onChange:a=>g("professional_summary",a.target.value),placeholder:"A short summary of your experience and focus areas."})}),e.jsx(_,{value:"work",title:"Work Experience",complete:b(r,"work"),children:e.jsx(w,{items:r.work_experience??[],onChange:a=>g("work_experience",a),empty:()=>({title:"",company:"",location:"",start_date:"",end_date:null,current:!1,bullets:[]}),render:(a,t)=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"grid sm:grid-cols-2 gap-2",children:[e.jsx(i,{label:"Title",children:e.jsx(c,{value:a.title,onChange:l=>t({...a,title:l.target.value})})}),e.jsx(i,{label:"Company",children:e.jsx(c,{value:a.company,onChange:l=>t({...a,company:l.target.value})})}),e.jsx(i,{label:"Location",children:e.jsx(c,{placeholder:"e.g. Dallas, TX or Remote",value:a.location??"",onChange:l=>t({...a,location:l.target.value})})}),e.jsx(i,{label:"Start date",children:e.jsx(c,{placeholder:"YYYY-MM",value:a.start_date,onChange:l=>t({...a,start_date:l.target.value})})}),e.jsx(i,{label:"End date",children:e.jsx(c,{placeholder:"YYYY-MM",disabled:a.current,value:a.end_date??"",onChange:l=>t({...a,end_date:l.target.value||null})})})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:a.current,onChange:l=>t({...a,current:l.target.checked,end_date:l.target.checked?null:a.end_date})}),"Currently working here"]}),e.jsx(i,{label:"Bullets",children:e.jsx(R,{rows:6,maxLength:4e3,value:D(F(a)),onChange:l=>t({...a,bullets:E(a,l.target.value),description:void 0}),placeholder:`• Achievement or responsibility
7• Another bullet`,className:"whitespace-pre-wrap font-sans"})})]}),addLabel:"Add experience"})}),e.jsx(_,{value:"education",title:"Education",complete:b(r,"education"),children:e.jsx(w,{items:r.education??[],onChange:a=>g("education",a),empty:()=>({degree:"",field:"",institution:"",start_date:"",end_date:null}),render:(a,t)=>e.jsxs("div",{className:"grid sm:grid-cols-2 gap-2",children:[e.jsx(i,{label:"Degree",children:e.jsx(c,{value:a.degree,onChange:l=>t({...a,degree:l.target.value})})}),e.jsx(i,{label:"Field",children:e.jsx(c,{value:a.field,onChange:l=>t({...a,field:l.target.value})})}),e.jsx(i,{label:"Institution",children:e.jsx(c,{value:a.institution,onChange:l=>t({...a,institution:l.target.value})})}),e.jsx("div",{}),e.jsx(i,{label:"Start date",children:e.jsx(c,{placeholder:"YYYY-MM",value:a.start_date,onChange:l=>t({...a,start_date:l.target.value})})}),e.jsx(i,{label:"End date",children:e.jsx(c,{placeholder:"YYYY-MM",value:a.end_date??"",onChange:l=>t({...a,end_date:l.target.value||null})})})]}),addLabel:"Add education"})}),e.jsxs(_,{value:"projects",title:"Projects",complete:b(r,"projects"),children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Work that is not a job title - side projects, open source, a product you shipped, a build you led. The Tailor can cite these like any role."}),e.jsx(w,{items:r.projects??[],onChange:a=>g("projects",a),empty:()=>({title:"",organization:"",location:"",start_date:"",end_date:null,current:!1,bullets:[]}),render:(a,t)=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"grid sm:grid-cols-2 gap-2",children:[e.jsx(i,{label:"Title",children:e.jsx(c,{value:a.title,onChange:l=>t({...a,title:l.target.value})})}),e.jsx(i,{label:"Organization or context",children:e.jsx(c,{value:a.organization,onChange:l=>t({...a,organization:l.target.value})})}),e.jsx(i,{label:"Location",children:e.jsx(c,{placeholder:"Optional",value:a.location??"",onChange:l=>t({...a,location:l.target.value})})}),e.jsx(i,{label:"Start date",children:e.jsx(c,{placeholder:"YYYY-MM",value:a.start_date,onChange:l=>t({...a,start_date:l.target.value})})}),e.jsx(i,{label:"End date",children:e.jsx(c,{placeholder:"YYYY-MM",disabled:a.current,value:a.end_date??"",onChange:l=>t({...a,end_date:l.target.value||null})})})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:a.current,onChange:l=>t({...a,current:l.target.checked,end_date:l.target.checked?null:a.end_date})}),"Ongoing"]}),e.jsx(i,{label:"Bullets",children:e.jsx(R,{rows:4,maxLength:4e3,value:D(F(a)),onChange:l=>t({...a,bullets:E(a,l.target.value),description:void 0}),placeholder:`• What you built or did, and the result
8• Another bullet`,className:"whitespace-pre-wrap font-sans"})})]}),addLabel:"Add project"})]}),e.jsxs(_,{value:"volunteer",title:"Volunteer work",complete:b(r,"volunteer"),children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Unpaid roles and community work. Same treatment as a job: title, organisation, dates, and what you did."}),e.jsx(w,{items:r.volunteer??[],onChange:a=>g("volunteer",a),empty:()=>({title:"",organization:"",location:"",start_date:"",end_date:null,current:!1,bullets:[]}),render:(a,t)=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"grid sm:grid-cols-2 gap-2",children:[e.jsx(i,{label:"Title",children:e.jsx(c,{value:a.title,onChange:l=>t({...a,title:l.target.value})})}),e.jsx(i,{label:"Organization",children:e.jsx(c,{value:a.organization,onChange:l=>t({...a,organization:l.target.value})})}),e.jsx(i,{label:"Location",children:e.jsx(c,{placeholder:"Optional",value:a.location??"",onChange:l=>t({...a,location:l.target.value})})}),e.jsx(i,{label:"Start date",children:e.jsx(c,{placeholder:"YYYY-MM",value:a.start_date,onChange:l=>t({...a,start_date:l.target.value})})}),e.jsx(i,{label:"End date",children:e.jsx(c,{placeholder:"YYYY-MM",disabled:a.current,value:a.end_date??"",onChange:l=>t({...a,end_date:l.target.value||null})})})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:a.current,onChange:l=>t({...a,current:l.target.checked,end_date:l.target.checked?null:a.end_date})}),"Currently volunteering"]}),e.jsx(i,{label:"Bullets",children:e.jsx(R,{rows:4,maxLength:4e3,value:D(F(a)),onChange:l=>t({...a,bullets:E(a,l.target.value),description:void 0}),placeholder:`• What you built or did, and the result
9• Another bullet`,className:"whitespace-pre-wrap font-sans"})})]}),addLabel:"Add volunteer role"})]}),e.jsxs(_,{value:"awards",title:"Awards and honours",complete:b(r,"awards"),children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Awards, prizes, scholarships, recognitions. One line each on the resume."}),e.jsx(w,{items:r.awards??[],onChange:a=>g("awards",a),empty:()=>({title:"",issuer:"",date:"",description:""}),render:(a,t)=>e.jsxs("div",{className:"grid sm:grid-cols-2 gap-2",children:[e.jsx(i,{label:"Award",children:e.jsx(c,{value:a.title,onChange:l=>t({...a,title:l.target.value})})}),e.jsx(i,{label:"Given by",children:e.jsx(c,{placeholder:"Optional",value:a.issuer,onChange:l=>t({...a,issuer:l.target.value})})}),e.jsx(i,{label:"Date",children:e.jsx(c,{placeholder:"YYYY or YYYY-MM",value:a.date,onChange:l=>t({...a,date:l.target.value})})}),e.jsx(i,{label:"What it was for",children:e.jsx(c,{placeholder:"Optional",value:a.description,onChange:l=>t({...a,description:l.target.value})})})]}),addLabel:"Add award"})]}),e.jsx(_,{value:"skills",title:"Skills",complete:b(r,"skills"),children:e.jsx(Qe,{tags:M(r.skills),onChange:a=>g("skills",a),placeholder:"Type a skill and press Enter"})}),e.jsx(_,{value:"certifications",title:"Certifications",complete:b(r,"certifications"),children:e.jsx(w,{items:r.certifications??[],onChange:a=>g("certifications",a),empty:()=>({name:"",issuer:"",credential_id:null,date:null,expiry:null}),render:(a,t)=>e.jsxs("div",{className:"grid sm:grid-cols-2 gap-2",children:[e.jsx(i,{label:"Name",children:e.jsx(c,{value:a.name,onChange:l=>t({...a,name:l.target.value})})}),e.jsx(i,{label:"Issuer",children:e.jsx(c,{value:a.issuer,onChange:l=>t({...a,issuer:l.target.value})})}),e.jsx(i,{label:"Credential ID",children:e.jsx(c,{placeholder:"Optional",value:a.credential_id??"",onChange:l=>t({...a,credential_id:l.target.value||null})})}),e.jsx(i,{label:"Date",children:e.jsx(c,{placeholder:"YYYY-MM",value:a.date??"",onChange:l=>t({...a,date:l.target.value||null})})}),e.jsx(i,{label:"Expiry",children:e.jsx(c,{placeholder:"YYYY-MM",value:a.expiry??"",onChange:l=>t({...a,expiry:l.target.value||null})})})]}),addLabel:"Add certification"})}),e.jsx(_,{value:"languages",title:"Languages",complete:b(r,"languages"),children:e.jsx(w,{items:r.languages??[],onChange:a=>g("languages",a),empty:()=>({language:"",proficiency:"Conversational"}),render:(a,t)=>e.jsxs("div",{className:"grid sm:grid-cols-2 gap-2",children:[e.jsx(i,{label:"Language",children:e.jsx(c,{value:a.language,onChange:l=>t({...a,language:l.target.value})})}),e.jsx(i,{label:"Proficiency",children:e.jsxs(je,{value:a.proficiency||"Conversational",onValueChange:l=>t({...a,proficiency:l}),children:[e.jsx(ye,{children:e.jsx(be,{})}),e.jsx(_e,{children:["Basic","Conversational","Fluent","Native"].map(l=>e.jsx(Ce,{value:l,children:l},l))})]})})]}),addLabel:"Add language"})})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-4 border-t border-border",children:[e.jsx(C,{variant:"outline",onClick:o,disabled:v,children:"Cancel"}),e.jsxs(C,{onClick:L,disabled:v,children:[v?e.jsx(Y,{className:"size-4 animate-spin"}):null,"Save Profile"]})]})]})}function Ke(s){if(!s)return"";const d=s.replace(/\s*[•·●◦▪]\s+/g,`
10`).split(/\r?\n+/).map(u=>
10u.replace(/^\s*(?:[-*]|\d+[.)])\s+/,"").trim()).filter(Boolean);return d.length<=1?d[0]??"":d.map(u=>`• ${u}`).join(`
11`)}function U(s){return s?{full_name:s.full_name??"",email:s.email??"",phone:s.phone??"",location:s.location??"",country:s.country??"",target_role:s.target_role??"",headline_title:s.headline_title??null,years_of_experience:s.years_of_experience??null,linkedin_url:s.linkedin_url??"",portfolio_url:s.portfolio_url??"",professional_summary:s.professional_summary??"",work_experience:(s.work_experience??[]).map(o=>({...o,location:o?.location??"",description:Ke(o?.description??"")})),education:s.education??[],projects:s.projects??[],volunteer:s.volunteer??[],awards:s.awards??[],skills:M(s.skills),certifications:s.certifications??[],languages:s.languages??[],work_authorization:s.work_authorization??"",job_preferences:s.job_preferences??{desired_titles:[],desired_locations:[],remote_preference:"",employment_type:""},expected_salary:s.expected_salary??{min:null,max:null,currency:"USD",visible:!1},eeo_data:s.eeo_data??{},raw_resume_text:s.raw_resume_text??null}:{...qe}}function _({value:s,title:o,complete:d,children:u}){return e.jsxs(de,{value:s,className:"border border-border rounded-lg px-4 bg-card",children:[e.jsx(ue,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-2",children:[d?e.jsx(ze,{className:"size-4 text-green-500"}):e.jsx("span",{className:"size-4 rounded-full border border-muted-foreground/40 inline-block"}),e.jsx("span",{className:"font-medium",children:o})]})}),e.jsx(pe,{className:"pt-2 pb-4",children:u})]})}function i({label:s,children:o}){return e.jsxs("div",{className:"space-y-1",children:[e.jsx(q,{className:"text-xs text-muted-foreground",children:s}),o]})}function w({items:s,onChange:o,empty:d,render:u,addLabel:p}){return e.jsxs("div",{className:"space-y-3",children:[s.map((r,n)=>e.jsxs("div",{className:"border border-border rounded-md p-3 bg-background/50 relative",children:[e.jsx("button",{type:"button",onClick:()=>o(s.filter((x,h)=>h!==n)),className:"absolute top-2 right-2 text-muted-foreground hover:text-destructive","aria-label":"Remove",children:e.jsx(T,{className:"size-4"})}),u(r,x=>o(s.map((h,v)=>v===n?x:h)))]},n)),s.length>=S.listEntries?e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Up to ",S.listEntries," entries here. Remove one to add another."]}):e.jsxs(C,{type:"button",variant:"outline",size:"sm",onClick:()=>o([...s,d()]),children:[e.jsx(Le,{className:"size-4"})," ",p]})]})}function Qe({tags:s,onChange:o,placeholder:d}){const[u,p]=m.useState(""),r=()=>{const n=u.trim();if(n){if(s.includes(n)){p("");return}if(s.length>=S.skills){p("");return}o([...s,n.slice(0,120)]),p("")}};return e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex flex-wrap gap-2",children:s.map(n=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 rounded-full bg-secondary text-secondary-foreground text-xs",children:[n,e.jsx("button",{type:"button",onClick:()=>o(s.filter(x=>x!==n)),"aria-label":`Remove ${n}`,children:e.jsx(xe,{className:"size-3"})})]},n))}),s.length>=S.skills?e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Up to ",S.skills," skills here. Remove one to add another."]}):e.jsxs("div",{className:"flex gap-2",children:[e.jsx(c,{value:u,onChange:n=>p(n.target.value),onKeyDown:n=>{(n.key==="Enter"||n.key===",")&&(n.preventDefault(),r())},placeholder:d}),e.jsx(C,{type:"button",variant:"outline",onClick:r,children:"Add"})]})]})}export{ba as component};

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.