1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CGKNpi9E.js","assets/animation-CddyXVCz.js","assets/react-vendor-CbN3pvl2.js","assets/supabase-iKSPld20.js","assets/docgen-Bp8WKBAE.js","assets/query-DPqpbKNH.js","assets/index-D2PKCkk9.css"])))=>i.map(i=>d[i]); 2import{u as g,D as b,_ as y,s as m}from"./index-CGKNpi9E.js";import{r as l,j as e}from"./animation-CddyXVCz.js";import{W as d,a as j,d as f}from"./DashboardDemo-q_u31AWG.js";import"./react-vendor-CbN3pvl2.js";import"./supabase-iKSPld20.js";import"./docgen-Bp8WKBAE.js";import"./query-DPqpbKNH.js";const A=()=>{var c;const{state:o}=g(),s=(c=o.session)==null?void 0:c.user,i=b(),[r,p]=l.useState(0),[x,n]=l.useState(!0);l.useEffect(()=>{h()},[s==null?void 0:s.id]),l.useEffect(()=>{r>=80&&r<100&&(sessionStorage.getItem("has_celebrated_profile_80")||(sessionStorage.setItem("has_celebrated_profile_80","true"),y(()=>import("./index-CGKNpi9E.js").then(t=>t.cy),__vite__mapDeps([0,1,2,3,4,5,6])).then(()=>{window.dispatchEvent(new CustomEvent("celebrate",{detail:{type:"confetti",message:"Almost there! Profile 80% complete! ð"}}))})))},[r]);const h=async()=>{if(!(s!=null&&s.id)||!m){n(!1);return}try{const{data:a}=await m.from("user_profiles").select("profile_completeness").eq("user_id",s.id).single();p((a==null?void 0:a.profile_completeness)||0)}catch(a){console.error("Error loading completeness:",a)}finally{n(!1)}};if(x)return e.jsx(d,{children:e.jsx(j,{})});const u=()=>r>=80?"text-green-600 dark:text-green-400":r>=50?"text-yellow-600 dark:text-yellow-400":"text-red-600 dark:text-red-400";return e.jsxs(d,{onClick:()=>i("/app/profile"),children:[e.jsx(f,{title:"Profile Completeness",icon:"ð"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:`text-4xl font-bold ${u()}`,children:[r,"%"]}),e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"complete"})]}),e.jsx("div",{className:"w-full bg-slate-100 dark:bg-slate-700/50 rounded-full h-4 overflow-hidden shadow-inner",children:e.jsx("div",{className:"bg-gradient-to-r from-blue-500 via-indigo-500 to-violet-500 h-4 rounded-full transition-all duration-1000 ease-out relative",style:{width:`${r}%`},children:e.jsx("div",{className:"absolute inset-0 bg-white/20 animate-[shimmer_2s_infinite] skew-x-12"})})}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r>=80?"ð Great job! Your profile is looking good":r>=50?"ð You're halfway there! Keep going":"ð Let's complete your profile"})]})]})},S=()=>{var a;const{state:o}=g(),s=(a=o.session)==null?void 0:a.user,i=b(),[r,p]=l.useState([]),[x,n]=l.useState(!0);l.useEffect(()=>{h()},[s==null?void 0:s.id]);const h=async()=>{if(!(s!=null&&s.id)||!m){n(!1);return}try{const{data:t}=await m.from("user_profiles").select("*").eq("user_id",s.id).single(),k=[{id:"resume",label:"Upload Resume",completed:!!(t!=null&&t.resume_file_id),path:"/app/profile",estimate:"2 min"},{id:"contact",label:"Add Contact Info",completed:!!(t!=null&&t.email)&&!!(t!=null&&t.phone),path:"/app/profile",estimate:"1 min"},{id:"experience",label:"Add Work Experience",completed:!1,path:"/app/profile",estimate:"5 min"},{id:"skills",label:"List Your Skills",completed:!!(t!=null&&t.skills)&&Array.isArray(t.skills)&&t.skills.length>0,path:"/app/profile",estimate:"3 min"}];p(k)}catch(t){console.error("Error loading checklist:",t)}finally{n(!1)}};if(x)return e.jsx(d,{children:e.jsx(j,{})});const u=r.filter(t=>t.completed).length,c=r.length;return e.jsxs(d,{children:[e.jsx(f,{title:"Next Steps",subtitle:`${u}/${c} completed`,icon:"â "}),e.jsx("div",{className:"space-y-2",children:r.map(t=>e.jsxs("div",{onClick:()=>!t.completed&&i(t.path),className:` 3 group flex items-center gap-3 p-3 rounded-xl border transition-all duration-200 4 ${t.completed?"bg-emerald-50/50 dark:bg-emerald-900/10 border-emerald-100 dark:border-emerald-900/30 cursor-default":"bg-white dark:bg-slate-800 border-[var(--border-default)] hover:border-blue-400 dark:hover:border-blue-500/50 hover:shadow-sm cursor-pointer"} 5 `,children:[e.jsx("div",{className:` 6 flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border transition-colors 7 ${t.completed?"bg-emerald-500 border-emerald-500 text-white":"bg-transparent border-slate-300 dark:border-slate-600 group-hover:border-blue-400"} 8 `,children:t.completed&&e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("p",{className:`text-sm font-medium truncate ${t.completed?"text-emerald-700 dark:text-emerald-400 line-through opacity-70":"text-slate-900 dark:text-slate-200"}`,children:t.label})}),!t.completed&&e.jsx("span",{className:"text-xs font-medium text-slate-400 dark:text-slate-500 bg-slate-100 dar
8k:bg-slate-800/50 px-2 py-1 rounded-md",children:t.estimate})]},t.id))})]})},W=()=>{const o=[{icon:"ð¯",title:"Better Job Matches",desc:"AI finds jobs that fit your skills"},{icon:"â¡",title:"Faster Applications",desc:"Auto-fill with your profile data"},{icon:"ð",title:"Track Progress",desc:"See your career growth over time"}];return e.jsxs(d,{children:[e.jsx(f,{title:"Why Complete Your Profile?",icon:"ð¡"}),e.jsx("div",{className:"space-y-3",children:o.map((s,i)=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"text-2xl flex-shrink-0",children:s.icon}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:s.title}),e.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mt-1",children:s.desc})]})]},i))})]})};export{S as NextStepsWidget,W as ProfileBenefitsWidget,A as ProfileCompletenessWidget};
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.