1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a10856-008c-7350-96fd-a7f8fc15d8da")}catch(e){}}();import{j as s}from"./flow-vendor-CumVsJQ6.js";import{u as O,r as i}from"./react-vendor-CfRIAywc.js";import{K as U,p as F,s as A,z as D}from"./index-CCucE9GQ.js";import{O as z}from"./OnboardingShell-B21IDOf-.js";import{S as W}from"./StepBasicInfo-BTJ0RGce.js";import{R as H}from"./ResumeUploadedBanner-DVlnByfo.js";import{b as k}from"./schemas-B-abl7qF.js";import{g as Y,R as f,a as V,b as q}from"./parseResume-D1iu3mM_.js";import{storeResume as K}from"./resumeStorage-DdQBTJam.js";import{i as $}from"./licenseNumber-gUOQBDvv.js";import{u as G}from"./i18n-j5-ApgEN.js";import{v as T}from"./validation-1IMa4Nqb.js";import{R as J}from"./resumeTelemetry-BkTPBSxD.js";import"./analytics-D7QLstay.js";import"./supabase-BxX1FzgX.js";import"./VerifiedBadge-Bf2oALsg.js";import"./styles-DubWT2-l.js";import"./compat-JqdN5lyr.js";import"./certifications-DsNSUphB.js";function Q(n){return $(n.licenseState)&&!!(n.licenseState||"").trim()&&/^\d{1,8}$/.test(n.licenseNumber||"")&&!!(n.firstName||"").trim()&&!!(n.lastName||"").trim()&&!!(n.licenseType||"").trim()}function be(){const n=O(),{t:o}=G("onboarding"),{profile:r,updateProfile:c}=U(),p=i.useRef(null),[E,h]=i.useState({}),[_,b]=i.useState(null),[u,x]=i.useState(!1),[g,y]=i.useState(null),[m,d]=i.useState(0),R={firstName:o("basic_info.first_name"),lastName:o("basic_info.last_name"),email:o("basic_info.email"),phone:o("basic_info.phone"),licenseType:o("basic_info.license_type"),licenseState:o("basic_info.license_state"),yearsExperience:o("basic_info.years_of_experience")};i.useEffect(()=>{Y().then(d)},[]);async function w(t){b(t),y(null),x(!0);try{const[e,a]=await Promise.allSettled([K(t),V(t)]),l=e.status==="fulfilled"?e.value:null;if(a.status==="rejected")throw l&&c({resumePath:l}),a.reason;const{profile:I,uploadsThisMonth:N}=a.value,B=q(r,I);c({...B,...l?{resumePath:l}:{}}),typeof N=="number"&&d(N)}catch(e){console.error("[onboarding] parseResume failed:",e),e.code==="MONTHLY_LIMIT"&&typeof e.uploadsThisMonth=="number"&&d(e.uploadsThisMonth),y(e.message||o("resume_or_manual.parse_error_generic")),b(null),e?.code!=="UNSUPPORTED_FILE_TYPE"&&D(e,{source:"StepBasicInfoScreen.handleResumeUpload",error_code:e.code||null,file_size:t?.size??null})}finally{x(!1)}}function C(t){const e=t.target.files?.[0];e&&(w(e),t.target.value="")}const S=i.useMemo(()=>{if(!r)return[];try{const t=T(k,r);return t?Object.keys(t).map(e=>R[e]||e):[]}catch{return[]}},[r]),L=S.length>0?o("location.please_fill_in",{fields:S.join(", ")}):null;function M(){const t=T(k,r);if(t){console.warn("[onboarding] basic-info validation failed",t),h(t);try{F("onboarding_step_validation_failed",{step_name:"basic_info",missing_fields:Object.keys(t)})}catch(e){console.warn("[StepBasicInfoScreen] phCapture failed:",e)}try{const e=Object.keys(t)[0],a=e?document.getElementById(e):null;a&&typeof a.focus=="function"?(a.scrollIntoView({behavior:"smooth",block:"center"}),a.focus({preventScroll:!0})):window.scrollTo({top:0,behavior:"smooth"})}catch{window.scrollTo({top:0,behavior:"smooth"})}return}h({}),Q(r)&&A.functions.invoke("verify-license",{body:{licenseNumber:r.licenseNumber,firstName:r.firstName,lastName:r.lastName,licenseType:r.licenseType,licenseState:r.licenseState}}).catch(e=>console.warn("[onboarding] background license verify failed:",e)),n("/onboarding/location")}const j=m>=f,v=u||j,P=s.jsxs(s.Fragment,{children:[s.jsx("input",{ref:p,type:"file",accept:J,className:"hidden",onChange:C,disabled:v}),s.jsxs("button",{type:"button",onClick:()=>p.current?.click(),disabled:v,className:"flex items-center gap-1.5 text-xs font-medium text-accent hover:text-accent/80 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:j?o("basic_info.resume_cap_reached_title"):o("basic_info.resume_uses_remaining",{used:m,cap:f}),children:[u?s.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("circle",{cx:"12",cy:"12",r:"8",strokeWidth:2,strokeDasharray:"40",strokeDashoffset:"30"})}):s.jsxs("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.9 5 5 0 019.9-1.32A4.5 4.5 0 0116 17H7z"}),s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 12v6m0-6l-2 2m2-2l2 2"})]}),o(u?"resume_or_manual.parsing":"basic_info.upload_resume_button"),s.jsxs("span",{className:"text-muted font-normal",children:["(",m,"/",f,")"]})]})]});return r?s.jsxs(z,{currentStep:0,onNext:M,headerAction:P,requiredNote:!0,nextDisabledReason:L,children:[_&&s.jsx(H,{fileName:_.n
1ame}),g&&s.jsxs("div",{className:"mb-4 flex items-start gap-2 text-xs bg-red-50 border border-red-200 text-red-700 rounded-lg px-3 py-2",children:[s.jsx("svg",{className:"w-4 h-4 shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01M5.07 19h13.86c1.54 0 2.5-1.67 1.73-3L13.73 4a2 2 0 00-3.46 0L3.34 16c-.77 1.33.19 3 1.73 3z"})}),s.jsx("span",{children:o("resume_or_manual.parse_error_detailed",{parseError:g})})]}),s.jsx(W,{data:r,onChange:c,errors:E})]}):null}export{be as default}; 2 3//# chunkId=01a10856-008c-7350-96fd-a7f8fc15d8da
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.