1const l=(a,o)=>{var r,c,i;const s=[],n=a.toLowerCase();if(o.fullName&&o.fullName.length>2&&(o.fullName.toLowerCase().split(/\s+/).some(t=>t.length>2&&n.includes(t))||s.push({field:"fullName",issue:`Name "${o.fullName}" not found in source resume (possible extraction error)`,severity:"error"})),(r=o.contactDetails)!=null&&r.email){const e=o.contactDetails.email.toLowerCase();n.includes(e)||s.push({field:"email",issue:`Email "${o.contactDetails.email}" not found in source`,severity:"error"})}if((c=o.experience)==null||c.forEach((e,u)=>{if(e.company&&e.company.length>3){const t=e.company.toLowerCase();n.includes(t)||s.push({field:`experience[${u}].company`,issue:`Company "${e.company}" not found in source resume (possible hallucination)`,severity:"error"})}}),(i=o.education)==null||i.forEach((e,u)=>{if(e.university&&e.university.length>5){const t=e.university.toLowerCase();n.includes(t)||s.push({field:`education[${u}].university`,issue:`University "${e.university}" not found in source`,severity:"warning"})}}),o.fullName){const e=["resume","curriculum vitae","cv","experience","education"],u=o.fullName.toLowerCase();e.some(t=>u.includes(t))&&s.push({field:"fullName",issue:"Name field contains resume-related keywords (likely incorrect extraction)",severity:"error"})}return{isValid:s.filter(e=>e.severity==="error").length===0,errors:s}},m=async(a,o)=>{var c;const s=[];if(a.summary){const i=a.summary.split(/\s+/).filter(Boolean).length;i>100?s.push({section:"Summary",issue:`Summary is too long (${i} words, recommended: 20-75 words)`,fix:"Consider condensing to focus on key achievements"}):i<15&&s.push({section:"Summary",issue:`Summary is too short (${i} words, recommended: 20-75 words)`,fix:"Consider expanding with more detail about your background"})}(c=a.experience)==null||c.forEach(i=>{(!i.accomplishments||i.accomplishments.length===0)&&s.push({section:`${i.company} - ${i.jobTitle}`,issue:"No accomplishments found for this role",fix:"Add specific achievements and results for this position"})});const n=s.length;let r;return n===0?r="excellent":n<=2?r="good":n<=5?r="needs_review":r="poor",{overall:r,issues:s}};export{l as validateExtractedProfile,m as validateProfileQuality};
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.