1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PortfolioQRCode-B2YaK6H2.js","assets/animation-CddyXVCz.js","assets/react-vendor-CbN3pvl2.js","assets/index-CGKNpi9E.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 ue,S as R,B as f,X as Te,C as L,a3 as X,L as Q,aw as V,ax as de,a4 as Oe,v as me,a1 as Ue,H as Me,ay as Fe,_ as Ke}from"./index-CGKNpi9E.js";import{r as o,j as e,R as De}from"./animation-CddyXVCz.js";import{portfolioService as j}from"./portfolioService-BRz6BRcD.js";import{u as qe}from"./wittyMessages-DNDNm0CC.js";import{c as $e}from"./clipboard-C0L7pyCw.js";import{P as Je}from"./ProGate-BWEPDFOZ.js";import{P as Qe,d as Xe}from"./PersonalizedEmptyState-DHLu2vFE.js";import"./react-vendor-CbN3pvl2.js";import"./supabase-iKSPld20.js";import"./docgen-Bp8WKBAE.js";import"./query-DPqpbKNH.js";import"./handoffSuggestions-raELPsOv.js";const D={modern:{id:"modern",name:"Modern",description:"Clean, minimalist design with lots of whitespace.",styles:{"--bg-primary":"#ffffff","--bg-secondary":"#f8fafc","--text-primary":"#0f172a","--text-secondary":"#475569","--color-accent":"#6366f1","--color-accent-subtle":"#e0e7ff","--border-default":"#e2e8f0","--bg-tertiary":"#ffffff","--font-heading":'"Inter", sans-serif',"--font-body":'"Inter", sans-serif',"--radius-default":"1rem","--shadow-4":"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)","--gradient-hero":"linear-gradient(to bottom right, #f8fafc, #e2e8f0)","--gradient-footer":"linear-gradient(to bottom right, #f1f5f9, #e2e8f0)"}},bold:{id:"bold",name:"Bold",description:"High contrast, vibrant colors, and strong typography.",styles:{"--bg-primary":"#000000","--bg-secondary":"#111111","--text-primary":"#ffffff","--text-secondary":"#d4d4d4","--color-accent":"#facc15","--color-accent-subtle":"#422006","--border-default":"#333333","--bg-tertiary":"#1a1a1a","--font-heading":'"Oswald", sans-serif',"--font-body":'"Roboto", sans-serif',"--radius-default":"0px","--shadow-4":"4px 4px 0px 0px #333","--gradient-hero":"linear-gradient(to bottom right, #000000, #1a1a1a)","--gradient-footer":"linear-gradient(to bottom right, #111111, #000000)"}},professional:{id:"professional",name:"Professional",description:"Traditional, elegant design suitable for corporate roles.",styles:{"--bg-primary":"#fdfbf7","--bg-secondary":"#ffffff","--text-primary":"#1e293b","--text-secondary":"#334155","--color-accent":"#0f172a","--color-accent-subtle":"#e2e8f0","--border-default":"#cbd5e1","--bg-tertiary":"#ffffff","--font-heading":'"Playfair Display", serif',"--font-body":'"Lato", sans-serif',"--radius-default":"4px","--shadow-4":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--gradient-hero":"linear-gradient(to bottom right, #fdfbf7, #f1f5f9)","--gradient-footer":"linear-gradient(to bottom right, #f8fafc, #f1f5f9)"}},creative:{id:"creative",name:"Creative",description:"Playful layout with unique shapes and colors.",styles:{"--bg-primary":"#fff1f2","--bg-secondary":"#ffffff","--text-primary":"#be123c","--text-secondary":"#4c0519","--color-accent":"#f43f5e","--color-accent-subtle":"#ffe4e6","--border-default":"#fda4af","--bg-tertiary":"#ffffff","--font-heading":'"Outfit", sans-serif',"--font-body":'"Quicksand", sans-serif',"--radius-default":"1.5rem","--shadow-4":"0 10px 15px -3px rgb(244 63 94 / 0.2)","--gradient-hero":"linear-gradient(to bottom right, #fff1f2, #ffe4e6, #fecdd3)","--gradient-footer":"linear-gradient(to bottom right, #fff1f2, #ffe4e6)"}}};function Ze(a){return D[a].styles}const et=({portfolio:a,onContentGenerated:d})=>{const{toast:t}=ue(),[n,i]=o.useState(!1),[u,E]=o.useState(null),[v,c]=o.useState({tone:"professional",length:"medium",targetAudience:"recruiters"}),k=qe("ai"),x=async()=>{var p;if(!(a!=null&&a.id)){t.error("Error","Portfolio must be created first");return}try{i(!0);const b=await j.generateAIContent(a.id,{type:"summary",summaryOptions:v}),N=((p=b==null?void 0:b.summary)==null?void 0:p.summary)||"";E(N),t.success("Generated!","AI summary has been generated"),d==null||d(N)}catch(b){console.error("Error generating content:",b),t.error("Generation Failed",b.message||"Failed to generate content")}finally{i(!1)}};return e.jsxs("div",{className:"iconic-surface-glass rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-100 dar
2k:bg-blue-900/30 flex items-center justify-center",children:e.jsx(R,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900 dark:text-white",children:"AI Summary Generator"}),e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:"Generate a compelling portfolio summary"})]})]}),e.jsxs("div",{className:"space-y-4 mb-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"Tone"}),e.jsxs("select",{value:v.tone,onChange:p=>c({...v,tone:p.target.value}),className:"w-full px-3 py-2 rounded-lg border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900 text-slate-900 dark:text-white",children:[e.jsx("option",{value:"professional",children:"Professional"}),e.jsx("option",{value:"personal",children:"Personal"}),e.jsx("option",{value:"creative",children:"Creative"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"Length"}),e.jsxs("select",{value:v.length,onChange:p=>c({...v,length:p.target.value}),className:"w-full px-3 py-2 rounded-lg border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900 text-slate-900 dark:text-white",children:[e.jsx("option",{value:"short",children:"Short (30-50 words)"}),e.jsx("option",{value:"medium",children:"Medium (50-100 words)"}),e.jsx("option",{value:"long",children:"Long (100-150 words)"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"Target Audience"}),e.jsxs("select",{value:v.targetAudience,onChange:p=>c({...v,targetAudience:p.target.value}),className:"w-full px-3 py-2 rounded-lg border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900 text-slate-900 dark:text-white",children:[e.jsx("option",{value:"recruiters",children:"Recruiters"}),e.jsx("option",{value:"peers",children:"Peers"}),e.jsx("option",{value:"clients",children:"Clients"}),e.jsx("option",{value:"general",children:"General"})]})]})]}),e.jsx(f,{onClick:x,disabled:n||!(a!=null&&a.id),loading:n,variant:"primary",size:"lg",className:"w-full font-semibold transition-all h-auto",leftIcon:n?void 0:e.jsx(R,{className:"w-5 h-5"}),children:e.jsx("span",{children:n?k:"Generate Summary"})}),u&&e.jsxs("div",{className:"mt-6 p-4 rounded-xl bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800",children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsx("h4",{className:"font-semibold text-green-700 dark:text-green-300",children:"Generated Summary"}),e.jsx(f,{onClick:()=>E(null),variant:"ghost",size:"sm",className:"text-green-600 dark:text-green-400 hover:text-green-700 dark:hover:text-green-300 h-auto p-1 border-none","aria-label":"Close",children:e.jsx(Te,{className:"w-4 h-4"})})]}),e.jsx("p",{className:"text-sm text-green-600 dark:text-green-400 leading-relaxed",children:u}),e.jsx(f,{onClick:async()=>{if(!(!u||!a))try{const p={...a.profile_snapshot,summary:u};await j.updatePortfolio({profile_snapshot:p}),t.success("Applied!","Summary has been applied to your portfolio"),d==null||d(u)}catch(p){t.error("Update Failed",p.message||"Failed to update portfolio")}},variant:"primary",size:"sm",className:"mt-3 bg-green-600 hover:bg-green-700 text-white transition-all h-auto px-4 py-2 border-none",children:"Apply to Portfolio"})]})]})},tt=({portfolio:a,onSEOUpdated:d})=>{const{toast:t}=ue(),[n,i]=o.useState(!1),[u,E]=o.useState(null),[v,c]=o.useState(""),[k,x]=o.useState(!1),p=async()=>{if(!(a!=null&&a.id)){t.error("Error","Portfolio must be created first");return}try{i(!0);const h=v.split(",").map(y=>y.trim()).filter(Boolean),S=await j.generateAIContent(a.id,{type:"seo",targetKeywords:h.length>0?h:void 0});E(S),t.success("Optimized!","SEO metadata has been optimized"),d==null||d(S)}catch(h){console.error("Error optimizing SEO:",h),t.error("Optimization Failed",h.message||"Failed to optimize SEO")}finally{i(!1)}},b=async()=>
2{if(!(!u||!a))try{await j.updatePortfolio({theme_config:{...a.theme_config,seo_title:u.title,seo_desc:u.description}}),t.success("Applied!","SEO metadata has been updated")}catch(h){t.error("Update Failed",h.message||"Failed to update SEO")}},N=async h=>{try{await $e(h),x(!0),t.success("Copied!","Copied to clipboard"),setTimeout(()=>x(!1),2e3)}catch{t.error("Copy failed","Could not copy to clipboard")}};return e.jsxs("div",{className:"iconic-surface-glass rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",children:e.jsx(R,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900 dark:text-white",children:"SEO Optimizer"}),e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:"Optimize your portfolio for search engines"})]})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"Target Keywords (optional, comma-separated)"}),e.jsx("input",{type:"text",value:v,onChange:h=>c(h.target.value),placeholder:"e.g., software engineer, full stack developer",className:"w-full px-3 py-2 rounded-lg border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900 text-slate-900 dark:text-white"})]}),e.jsx(f,{onClick:p,disabled:n||!(a!=null&&a.id),loading:n,variant:"primary",size:"lg",className:"w-full font-semibold transition-all mb-6 h-auto",leftIcon:n?void 0:e.jsx(R,{className:"w-5 h-5"}),children:e.jsx("span",{children:"Optimize SEO"})}),u&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 rounded-xl bg-slate-50 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("label",{className:"text-sm font-semibold text-slate-700 dark:text-slate-300",children:["Title (",u.title.length,"/60)"]}),e.jsx(f,{onClick:()=>N(u.title),variant:"ghost",size:"sm",className:"text-slate-500 hover:text-slate-700 dark:hover:text-slate-300 h-auto p-1 border-none","aria-label":"Copy title",children:k?e.jsx(L,{className:"w-4 h-4"}):e.jsx(X,{className:"w-4 h-4"})})]}),e.jsx("p",{className:"text-sm text-slate-900 dark:text-white",children:u.title})]}),e.jsxs("div",{className:"p-4 rounded-xl bg-slate-50 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("label",{className:"text-sm font-semibold text-slate-700 dark:text-slate-300",children:["Description (",u.description.length,"/160)"]}),e.jsx(f,{onClick:()=>N(u.description),variant:"ghost",size:"sm",className:"text-slate-500 hover:text-slate-700 dark:hover:text-slate-300 h-auto p-1 border-none","aria-label":"Copy description",children:k?e.jsx(L,{className:"w-4 h-4"}):e.jsx(X,{className:"w-4 h-4"})})]}),e.jsx("p",{className:"text-sm text-slate-900 dark:text-white",children:u.description})]}),u.keywords.length>0&&e.jsxs("div",{className:"p-4 rounded-xl bg-slate-50 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700",children:[e.jsx("label",{className:"text-sm font-semibold text-slate-700 dark:text-slate-300 mb-2 block",children:"Suggested Keywords"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:u.keywords.map((h,S)=>e.jsx("span",{className:"px-2 py-1 text-xs bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded-lg",children:h},S))})]}),u.suggestions.length>0&&e.jsxs("div",{className:"p-4 rounded-xl bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800",children:[e.jsx("label",{className:"text-sm font-semibold text-blue-700 dark:text-blue-300 mb-2 block",children:"Additional Suggestions"}),e.jsx("ul",{className:"space-y-1",children:u.suggestions.map((h,S)=>e.jsxs("li",{className:"text-xs text-blue-600 dark:text-blue-400",children:["⢠",h]},S))})]}),e.jsx(f,{onClick:b,variant:"primary",size:"lg",className:"w-full font-semibold transition-all h-auto",leftIcon:e.jsx(L,{className:"w-5 h-5"}),children:e.jsx("span",{children:"Apply SEO Metadata"})})]})]})},st=({className:a})=>e.jsx("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),at=({portfolio:a})=>{const[d,t]=o.useState(!1),[n,i]=o.useState([]),[u,E]=o.useState(!1),v=async()=>
2{if(!(a!=null&&a.id)){i([]);return}try{t(!0),E(!1);const x=await j.getContentSuggestions(a.id);Array.isArray(x)?i(x):x&&Array.isArray(x.suggestions)?i(x.suggestions):x&&Array.isArray(x.data)?i(x.data):(console.warn("Unexpected suggestions format:",x),i([]))}catch(x){console.warn("Could not load portfolio suggestions:",(x==null?void 0:x.message)||x),i([]),E(!0)}finally{t(!1)}};o.useEffect(()=>{v()},[a==null?void 0:a.id]);const c=x=>{switch(x){case"high":return"text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800";case"medium":return"text-yellow-600 dark:text-yellow-400 bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800";case"low":return"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800";default:return"text-slate-600 dark:text-slate-400 bg-slate-50 dark:bg-slate-800/50 border-slate-200 dark:border-slate-700"}},k=x=>{switch(x){case"missing":return e.jsx(st,{className:"w-4 h-4"});case"improvement":return e.jsx(R,{className:"w-4 h-4"});case"enhancement":return e.jsx(L,{className:"w-4 h-4"});default:return e.jsx(R,{className:"w-4 h-4"})}};return a!=null&&a.id?d?e.jsx("div",{className:"iconic-surface-glass rounded-2xl p-6",children:e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(Q,{className:"w-8 h-8 text-blue-600 dark:text-blue-400"})})}):!Array.isArray(n)||n.length===0?e.jsxs("div",{className:"iconic-surface-glass rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center ${u?"bg-slate-100 dark:bg-slate-800":"bg-green-100 dark:bg-green-900/30"}`,children:e.jsx(L,{className:`w-5 h-5 ${u?"text-slate-400":"text-green-600 dark:text-green-400"}`})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900 dark:text-white",children:"Content Suggestions"}),e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:u?"Suggestions unavailable":"Your portfolio looks great!"})]})]}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 text-center py-4",children:u?"No suggestions available right now. Try refreshing.":"No suggestions at this time. Your portfolio is well-optimized!"})]}):e.jsxs("div",{className:"iconic-surface-glass rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",children:e.jsx(R,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900 dark:text-white",children:"Content Suggestions"}),e.jsxs("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:[Array.isArray(n)?n.length:0," improvement",Array.isArray(n)&&n.length!==1?"s":""," found"]})]})]}),e.jsx(f,{onClick:v,variant:"ghost",size:"sm",className:"text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 transition-all h-auto px-3 py-2 border-none",children:"Refresh"})]}),e.jsx("div",{className:"space-y-3",children:Array.isArray(n)&&n.length>0?n.map((x,p)=>e.jsx("div",{className:`p-4 rounded-xl border ${c(x.priority)}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0 mt-1",children:k(x.type)}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsxs("span",{className:"text-xs font-semibold uppercase tracking-wider",children:[x.priority," Priority"]}),e.jsxs("span",{className:"text-xs text-slate-500 dark:text-slate-400",children:["⢠",x.section]})]}),e.jsx("p",{className:"text-sm font-medium text-slate-900 dark:text-white mb-1",children:x.suggestion}),e.jsx("p",{className:"text-xs text-slate-600 dark:text-slate-400",children:x.reason})]})]})},p)):e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 text-center py-4",children:"No suggestions available"})})]}):e.jsxs("div",{className:"iconic-surface-glass rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-slate-100 dar
2k:bg-slate-800 flex items-center justify-center",children:e.jsx(R,{className:"w-5 h-5 text-slate-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900 dark:text-white",children:"Content Suggestions"}),e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:"Create your portfolio first"})]})]}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 text-center py-4",children:"Save your portfolio URL to get AI-powered suggestions"})]})},lt=o.lazy(()=>Ke(()=>import("./PortfolioQRCode-B2YaK6H2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),ce=({className:a})=>e.jsx("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7l5 5m0 0l-5 5m5-5H6"})}),xe=({className:a})=>e.jsx("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 17l-5-5m0 0l5-5m-5 5h12"})}),rt=({className:a})=>e.jsx("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})}),it=({className:a})=>e.jsxs("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 14l9-5-9-5-9 5 9 5z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 14l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14z"})]}),nt=({className:a})=>e.jsx("svg",{className:a,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})}),ot=["app","api","guide","privacy","terms","auth","login","signup","portfolio","admin","support","help","about","contact","blog","docs","status","settings","account","profile","dashboard","home","index","null","undefined"],dt=[{id:"summary",label:"Summary"},{id:"experience",label:"Experience timeline"},{id:"skills",label:"Skills"},{id:"education",label:"Education"},{id:"contact",label:"Contact"}],_e=(a,d)=>d.length?{...a,experience:(a.experience||[]).map(t=>({...t,accomplishments:(t.accomplishments||[]).filter(n=>d.includes(n.id))}))}:a,ct=({profile:a,theme:d})=>{var p,b,N,h,S,y,I,z,_,Y,M,F,$,W;const t=((p=D[d])==null?void 0:p.styles)||D.modern.styles,n=a.fullName||`${a.firstName||""} ${a.lastName||""}`.trim()||"Your Name",i=a.headline||((N=(b=a.experience)==null?void 0:b[0])==null?void 0:N.jobTitle)||"Professional",u=(S=(h=a.experience)==null?void 0:h[0])==null?void 0:S.company,E=((y=a.contactDetails)==null?void 0:y.location)||((z=(I=a._internal)==null?void 0:I.primaryLocation)==null?void 0:z.fullLocation)||[a.city,a.state].filter(Boolean).join(", "),v=a.summary||"Your professional summary will appear here. Upload a resume or add your information to see it displayed.",c=((_=a.skills)==null?void 0:_.slice(0,12))||[],k=((Y=a.experience)==null?void 0:Y.slice(0,3))||[],x=((M=a.education)==null?void 0:M.slice(0,2))||[];return e.jsxs("div",{className:"h-full w-full overflow-auto",style:{background:t["--bg-primary"],color:t["--text-secondary"],fontFamily:t["--font-body"]},children:[e.jsxs("div",{className:"px-8 py-16 text-center",style:{background:t["--gradient-hero"]},children:[a.photoUrl?e.jsx("img",{src:a.photoUrl,alt:n,className:"w-32 h-32 mx-auto mb-6 object-cover",style:{borderRadius:t["--radius-default"],boxShadow:t["--shadow-4"]}}):e.jsx("div",{className:"w-32 h-32 mx-auto mb-6 flex items-center justify-center",style:{background:t["--color-accent"],borderRadius:t["--radius-default"],boxShadow:t["--shadow-4"]},children:e.jsx("span",{className:"text-5xl font-bold",style:{color:t["--bg-primary"],fontFamily:t["--font-heading"]},children:n.charAt(0).toUpperCase()})}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4",style:{color:t["--text-primary"],fontFamily:t["--font-heading"]},children:n}),e.jsxs("p",{className:"text-xl mb-4",style:{color:t["--color-accent"]},children:[i,u&&` at ${u}`]}),E&&e.jsxs("p",{className:"text-sm mb-6 flex items-center justify-center gap-2",style:{color:t["--text-secondary"]},children:[e.jsx(Fe,{className:"w-4 h-4"}),E]}),e.jsxs("div",{className:"flex items-center justify-center gap-4 flex-wrap",children:[((F=a.contactDetails)==null?void 0:F.email)&&e.jsxs("a",{href:`mailto:${a.contactDetails.email}`,className:"flex items-center gap-2 px-4 py-2 transition-all",style:{background:t["--color-accent-subtle"],color:t["--color-accent"],borderRadius:t["--radius-default"]},children:[e.jsx(Me,{className:"w-4 h-4"}),"Email"]}),(($=a.contactDetails)==null?void 0:$.linkedIn)&&e.jsxs("a",{href:a.contactDetails.linkedIn,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-4 py-2 transition-all",style:{background:t["--color-accent-subtle"],color:t["--color-accent"],borderRadius:t["--radius-default"]},children:[e.jsx(Ue,{className:"w-4 h-4"}),"LinkedIn"]})]})]}),e.jsxs("div",{className:"max-w-4xl mx-auto px-8 py-12",children:[e.jsx("h2",{className:"text-2xl font-bold mb-6",style:{color:t["--text-primary"],fontFamily:t["--font-heading"]},children:"About"}),e.jsx("p",{className:"leading-relaxed",style:{background:t["--bg-tertiary"],padding:"1.5rem",borderRadius:t["--radius-default"],boxShadow:t["--shadow-4"],border:`1px solid ${t["--border-default"]}`},children:v})]}),c.length>0&&e.jsxs("div",{className:"max-w-4xl mx-auto px-8 py-12",style:{background:t["--bg-secondary"]},children:[e.jsx("h2",{className:"text-2xl font-bold mb-6",style:{color:t["--text-primary"],fontFamily:t["--font-heading"]},children:"Skills"}),e.jsx("div",{className:"flex flex-wrap gap-3",children:c.map((g,O)=>{const A=typeof g=="string"?g:g.name||g.skill;return e.jsx("span",{className:"px-4 py-2 text-sm font-medium",style:{background:t["--color-accent-subtle"],color:t["--color-accent"],borderRadius:t["--radius-default"]},children:A},O)})})]}),k.length>0&&e.jsxs("div",{className:"max-w-4xl mx-auto px-8 py-12",children:[e.jsx("h2",{className:"text-2xl font-bold mb-6",style:{color:t["--text-primary"],fontFamily:t["--font-heading"]},children:"Experience"}),e.jsx("div",{className:"space-y-6",children:k.map((g,O)=>e.jsxs("div",{className:"p-6",style:{background:t["--bg-tertiary"],borderRadius:t["--radius-default"],boxShadow:t["--shadow-4"],border:`1px solid ${t["--border-default"]}`},children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold",style:{color:t["--text-primary"]},children:g.jobTitle||"Position"}),e.jsx("p",{style:{color:t["--color-accent"]},children:g.company||"Company"})]}),e.jsxs("span",{className:"text-sm",style:{color:t["--text-secondary"]},children:[g.startDate||"Start"," - ",g.endDate||"Present"]})]}),g.highlights&&g.highlights.length>0&&e.jsx("ul",{className:"mt-4 space-y-2",children:g.highlights.slice(0,3).map((A,U)=>e.jsxs("li",{className:"text-sm flex items-start gap-2",style:{color:t["--text-secondary"]},children:[e.jsx("span",{style:{color:t["--color-accent"]},children:"â¢"}),A]},U))})]},O))})]}),x.length>0&&e.jsxs("div",{className:"max-w-4xl mx-auto px-8 py-12",style:{background:t["--bg-secondary"]},children:[e.jsx("h2",{className:"text-2xl font-bold mb-6",style:{color:t["--text-primary"],fontFamily:t["--font-heading"]},children:"Education"}),e.jsx("div",{className:"space-y-4",children:x.map((g,O)=>e.jsxs("div",{className:"p-6",style:{background:t["--bg-tertiary"],borderRadius:t["--radius-default"],boxShadow:t["--shadow-4"],border:`1px solid ${t["--border-default"]}`},children:[e.jsx("h3",{className:"text-lg font-semibold",style:{color:t["--text-primary"]},children:g.degree||"Degree"}),e.jsx("p",{style:{color:t["--color-accent"]},children:g.school||g.institution||"Institution"}),e.jsx("p",{className:"text-sm mt-1",style:{color:t["--text-secondary"]},children:g.graduationDate||g.endDate||"Year"})]},O))})]}),e.jsxs("div",{className:"px-8 py-8 text-center",style:{background:t["--gradient-footer"]},children:[e.jsxs("p",{className:"text-sm",style:{color:t["--text-secondary"]},children:["Portfolio powered by ",e.jsx("span",{style:{color:t["--color-accent"],fontWeight:"bold"},children:"CareerDiary"})]}),e.jsxs("p",{className:"text-xs mt-2 px-3 py-1 inline-block",style:{background:t["--color-accent-subtle"],color:t["--color-accent"],borderRadius:t["--radius-default"]},children:[((W=D[d])==null?void 0:W.name)||"Modern"," Theme Preview"]})]})]})},xt=({profile:a})=>{var v,c,k,x,p,b,N,h,S,y,I;const d=a.fullName||`${a.firstName||""} ${a.lastName||""}`.trim(),t=(c=(v=a.experience)==null?void 0:v[0])==null?void 0:c.jobTitle,n=(x=(k=a.experience)==null?void 0:k[0])==null?void 0:x.company,i=((p=a.c
2ontactDetails)==null?void 0:p.location)||((N=(b=a._internal)==null?void 0:b.primaryLocation)==null?void 0:N.fullLocation)||[a.city,a.state].filter(Boolean).join(", "),u=((h=a.skills)==null?void 0:h.length)||0,E=((S=a.experience)==null?void 0:S.length)||0;return e.jsxs("div",{className:"h-full overflow-auto bg-slate-50 dark:bg-slate-900 rounded-xl",children:[e.jsxs("div",{className:"p-6 bg-white dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[a.photoUrl?e.jsx("img",{src:a.photoUrl,alt:d,className:"w-16 h-16 rounded-xl object-cover"}):e.jsx("div",{className:"w-16 h-16 rounded-xl bg-gradient-to-br from-blue-500 to-blue-600 flex items-center justify-center",children:e.jsx("span",{className:"text-2xl font-bold text-white",children:d.charAt(0).toUpperCase()})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-slate-900 dark:text-white",children:d}),t&&e.jsxs("p",{className:"text-sm text-blue-600 dark:text-blue-400",children:[t,n&&` at ${n}`]}),i&&e.jsxs("p",{className:"text-xs text-slate-500 dark:text-slate-400 flex items-center gap-1 mt-1",children:[e.jsx(Fe,{className:"w-3 h-3"}),i]})]})]}),a.summary&&e.jsx("p",{className:"mt-4 text-sm text-slate-600 dark:text-slate-300 line-clamp-2",children:((y=a.summaryVariants)==null?void 0:y.personal)||a.summary})]}),e.jsxs("div",{className:"p-4 grid grid-cols-3 gap-4 border-b border-slate-200 dark:border-slate-700",children:[e.jsxs("div",{className:"text-center",children:[e.jsx(rt,{className:"w-5 h-5 mx-auto text-blue-500 mb-1"}),e.jsx("p",{className:"text-lg font-bold text-slate-900 dark:text-white",children:E}),e.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"Positions"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx(nt,{className:"w-5 h-5 mx-auto text-blue-500 mb-1"}),e.jsx("p",{className:"text-lg font-bold text-slate-900 dark:text-white",children:u}),e.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"Skills"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx(it,{className:"w-5 h-5 mx-auto text-blue-500 mb-1"}),e.jsx("p",{className:"text-lg font-bold text-slate-900 dark:text-white",children:((I=a.education)==null?void 0:I.length)||0}),e.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"Education"})]})]}),a.skills&&a.skills.length>0&&e.jsxs("div",{className:"p-4",children:[e.jsx("p",{className:"text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase mb-2",children:"Skills"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.skills.slice(0,6).map((z,_)=>e.jsx("span",{className:"px-2 py-1 text-xs bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded-lg",children:z},_)),a.skills.length>6&&e.jsxs("span",{className:"px-2 py-1 text-xs text-slate-500 dark:text-slate-400",children:["+",a.skills.length-6," more"]})]})]})]})},mt=({currentStep:a,onStepClick:d,completedSteps:t})=>{const n=[{number:1,label:"Preview",icon:V},{number:2,label:"Choose Style",icon:R},{number:3,label:"Customize URL",icon:Oe},{number:4,label:"Publish",icon:me}];return e.jsx("div",{className:"flex items-center justify-between mb-8",children:n.map((i,u)=>e.jsxs(De.Fragment,{children:[e.jsxs(f,{onClick:()=>d(i.number),variant:"ghost",size:"md",className:`flex items-center gap-3 px-4 py-2 rounded-xl transition-all h-auto border-none 3 ${a===i.number?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":t.has(i.number)?"text-green-600 dark:text-green-400 hover:bg-slate-100 dark:hover:bg-slate-800":"text-slate-400 dark:text-slate-500 hover:bg-slate-100 dark:hover:bg-slate-800"}`,children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center ${a===i.number?"bg-blue-600 text-white":t.has(i.number)?"bg-green-500 text-white":"bg-slate-200 dark:bg-slate-700 text-slate-500 dark:text-slate-400"}`,children:t.has(i.number)&&a!==i.number?e.jsx(L,{className:"w-5 h-5"}):e.jsx(i.icon,{className:"w-4 h-4"})}),e.jsx("span",{className:"font-medium hidden sm:block",children:i.label})]}),u<n.length-1&&e.jsx("div",{className:`flex-1 h-0.5 mx-2 ${t.has(n[u+1].number)||a>i.number?"bg-green-500":"bg-slate-200 dark:bg-slate-700"}`})]},i.number))})},ut=()=>{var Ne,we,Se,Ce,Pe,Ie,Le,Ee,Re,Ae,ze;const{state:a,toast:d}=ue(),{profile:t,session:n}=a,[i,u]=o.useState(1),[E,v]=o.useState(new Set),[c,k]=o.useState(null),[x,p]=o.use
3State(!0),[b,N]=o.useState(!1),[h,S]=o.useState(!1),[y,I]=o.useState(""),[z,_]=o.useState(null),[Y,M]=o.useState(!1),F=o.useRef(0),[$,W]=o.useState(!1),[g,O]=o.useState("modern"),[A,U]=o.useState(null),[K,he]=o.useState(!1),[be,Be]=o.useState("modern"),[Z,ge]=o.useState(["summary","experience","skills","education","contact"]),[G,ee]=o.useState("#2563eb"),[te,fe]=o.useState(""),[se,pe]=o.useState(!1),[H,je]=o.useState([]),[q,Ve]=o.useState(null),ae=De.useRef(null),ye=(Ne=D[be])!=null&&Ne.id?be:"modern",J=((we=t==null?void 0:t.experience)==null?void 0:we.flatMap(s=>(s.accomplishments||[]).map(l=>({id:l.id,description:l.description,label:[s.jobTitle,s.company].filter(Boolean).join(" at ")||"Untitled role"}))))||[],Ye=t?_e(t,H):null,T=`${window.location.origin}/${y}`;o.useEffect(()=>{async function s(){var l,m;if(!((l=n==null?void 0:n.user)!=null&&l.id)){p(!1);return}try{p(!0);const r=await j.getMyPortfolio();if(r){k(r),S(r.is_public),I(r.slug),pe(!!r.has_password),r.accent_color&&ee(r.accent_color),Array.isArray(r.visible_sections)&&r.visible_sections.length&&ge(r.visible_sections),(m=r.theme_config)!=null&&m.theme&&O(r.theme_config.theme),v(new Set([1,2,3])),r.is_public&&v(new Set([1,2,3,4]));const w=await j.getPortfolioAnalytics().catch(()=>null);Ve(w)}else if(t){const w=j.generateSlugFromName(t.fullName);I(w)}}catch(r){r instanceof Error&&!r.message.includes("not authenticated")&&!r.message.includes("does not exist")&&!r.message.includes("406")&&!r.message.includes("Not Acceptable")&&!r.message.includes("not found")&&console.error("Error loading portfolio:",r)}finally{p(!1)}}s()},[t,n]),o.useEffect(()=>{!H.length&&J.length&&je(J.map(s=>s.id))},[J,H.length]),o.useEffect(()=>{if(i===2&&!y&&t){const s=j.generateSlugFromName(t.fullName);s&&(console.log("Auto-generating slug:",s),I(s))}},[i,y,t]),o.useEffect(()=>{async function s(){var l,m,r,w;if((l=n==null?void 0:n.user)!=null&&l.id&&i===2&&!c&&t&&y&&!b)try{const C={...t,metrics:de(t)},P=await j.createPortfolio({slug:y,profile_snapshot:C,is_public:!1,theme_config:{theme:g}});k(P),console.log("Auto-created draft portfolio for preview")}catch(C){if((m=C==null?void 0:C.message)!=null&&m.includes("already")||(r=C==null?void 0:C.message)!=null&&r.includes("not authenticated"))try{const P=await j.getMyPortfolio();P&&(k(P),O(((w=P.theme_config)==null?void 0:w.theme)||"modern"),!y&&P.slug&&I(P.slug))}catch(P){console.log("Could not fetch existing portfolio:",P)}else console.error("Error creating portfolio:",C)}}s()},[i,c,t,y,g,b,n]);const le=o.useCallback(s=>{const l=j.sanitizeSlug(s);return l?l.length<3?"URL must be at least 3 characters":l.length>50?"URL must be less than 50 characters":ot.includes(l.toLowerCase())?"This URL is reserved. Please choose another.":null:"URL is required"},[]),re=o.useCallback(async s=>{const l=j.sanitizeSlug(s);I(l);const m=le(l);if(m)return _(m),!1;if(l!==(c==null?void 0:c.slug)){F.current+=1;const r=F.current;M(!0);try{const w=await j.checkSlugAvailability(l);if(F.current!==r)return!1;if(!w)return _("This URL is already taken"),M(!1),!1}catch{return F.current!==r||(_("Unable to verify availability"),M(!1)),!1}M(!1)}return _(null),!0},[c==null?void 0:c.slug,le]),We=s=>{const l=j.sanitizeSlug(s);F.current+=1,I(l),M(!1),_(le(l))},Ge=async()=>{if(!t){d.error("Error","No profile found. Please create your Career Diary first.");return}if(await re(y))try{N(!0);const l=_e(t,H),m={...l,metrics:de(l)},r={slug:y,profile_snapshot:m,theme_config:{theme:g,accentColor:G},theme:String(g),accent_color:G,visible_sections:Z,password:te.trim()||void 0};if(c)await j.updatePortfolio({...r,is_public:h}),d.success("Updated!","Your portfolio has been updated.");else{const C=await j.createPortfolio({...r,is_public:!1});k(C),d.success("Created!","Your portfolio has been created.")}pe(!!te.trim()||se),fe("");const w=await j.getMyPortfolio();w&&(k(w),S(w.is_public),v(C=>new Set([...C,3])))}catch(l){console.error("Error saving portfolio:",l),d.error("Save Failed",l.message||"Failed to save portfolio")}finally{N(!1)}},ve=async()=>{const s=!h;if(!c){d.info("Save First","Please save your URL first before publishing.");return}try{N(!0),await j.updatePortfolio({is_public:s,theme:String(g),accent_color:G,visible_sections:Z}),S(s),s?(v(l=>new Set([...l,4])),d.success("Published!","Your portfolio is now live at "+T)):d.success("Hidden","Your portfolio is now private.")}catch(l){console.error("Error toggling portfolio:",l),d.error("Error","Failed to update visibility.")}finally{N(!1)}},ke=async()=>{try{await $e(T),W(!0),d.success("Copied!","URL copied to clipboard"),setTimeout(()=>W(!1),2e3)}catch{d.error("Copy failed","Could not copy to clipboard")}},He=s=>{u(s)},ie=()=>{i<4&&(v(s=>new Set([...s,i])),u(i+1))},ne=()=>{i>1&&u(i-1)};return o.useEffect(()=>{},[A]),o.useEffect(()=>{if(!A){document.body.style.overflow="";return}document.body.style.overflow="hidden";const s=l=>
3{if(l.key==="Escape"&&A&&!K){const m=document.getElementById("portfolio-preview-modal");if(m){const r=window.getComputedStyle(m);r.display!=="none"&&r.visibility!=="hidden"&&r.opacity!=="0"&&(console.log("Escape key pressed, closing modal"),U(null),l.preventDefault(),l.stopPropagation())}}else l.key==="Escape"&&K&&(console.log("Escape pressed but modal just opened - ignoring"),l.preventDefault(),l.stopPropagation())};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s),document.body.style.overflow=""}},[A,K]),x?e.jsx("div",{className:"max-w-6xl mx-auto px-4 py-8 flex items-center justify-center min-h-[400px]",children:e.jsx(Q,{})}):t?e.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-slate-900 dark:text-white mb-2",children:"Personal Website"}),e.jsx("p",{className:"text-slate-600 dark:text-slate-400",children:"Create a beautiful portfolio website to share on LinkedIn, resumes, and emails."})]}),e.jsx(mt,{currentStep:i,onStepClick:He,completedSteps:E}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[e.jsxs("div",{className:"order-2 lg:order-1",children:[e.jsxs("div",{className:"iconic-surface-glass rounded-2xl overflow-hidden h-[500px] flex flex-col",children:[e.jsx("div",{className:"p-4 border-b border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/50",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full bg-red-400"}),e.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-400"}),e.jsx("div",{className:"w-3 h-3 rounded-full bg-green-400"})]}),e.jsx("div",{className:"flex-1 ml-4",children:e.jsx("div",{className:"bg-white dark:bg-slate-900 rounded-lg px-3 py-2 text-xs text-slate-500 dark:text-slate-400 font-mono truncate",children:T})})]})}),e.jsx("div",{className:"flex-1 overflow-hidden portfolio-preview portfolio-mini-preview",children:t?e.jsx(xt,{profile:Ye||t}):e.jsx("div",{className:"h-full flex items-center justify-center bg-slate-50 dark:bg-slate-900",children:e.jsx(Q,{})})})]}),c&&e.jsxs("div",{className:"mt-4 flex gap-3",children:[e.jsx(f,{onClick:()=>{const s=T;console.log("Opening preview from View Full Site:",s),U(s)},variant:"primary",size:"lg",leftIcon:e.jsx(V,{className:"w-4 h-4"}),className:"flex-1",children:"View Full Site"}),e.jsx(f,{onClick:ke,variant:"secondary",size:"lg",leftIcon:$?e.jsx(L,{className:"w-4 h-4 text-green-500"}):e.jsx(X,{className:"w-4 h-4"}),children:$?"Copied!":"Copy URL"})]}),c&&q&&e.jsxs("div",{className:"mt-4 rounded-2xl border border-slate-200 bg-white p-4 dark:border-slate-700 dark:bg-slate-900",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-slate-900 dark:text-white",children:"Portfolio analytics"}),e.jsx("p",{className:"mt-1 text-xs text-slate-500 dark:text-slate-400",children:"Views, trend, and top referrers."})]}),e.jsxs("span",{className:"rounded-full bg-blue-600/10 px-3 py-1 text-sm font-semibold text-blue-600 dark:text-blue-300",children:[q.totalViews," views"]})]}),e.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-2",children:[e.jsx("div",{className:"space-y-2",children:q.viewsOverTime.slice(-5).map(s=>e.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-600 dark:text-slate-300",children:[e.jsx("span",{children:s.date}),e.jsx("span",{className:"font-semibold",children:s.count})]},s.date))}),e.jsx("div",{className:"space-y-2",children:q.topSources.slice(0,5).map(s=>e.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-600 dark:text-slate-300",children:[e.jsx("span",{className:"capitalize",children:s.source}),e.jsx("span",{className:"font-semibold",children:s.count})]},s.source))})]})]}),e.jsxs("div",{className:"mt-4 rounded-2xl border border-slate-200 bg-white p-4 dark:border-slate-700 dark:bg-slate-900",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-slate-900 dark:text-white",children:"Portfolio controls"}),e.jsx("p",{className:"mt-1 text-xs text-slate-500 dark:text-slate-400",children:"Choose what appears publicly and protect the page if needed."})]}),e.jsxs("div",{className:"mt-4",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-slate-500",children:"Visible sections"}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:dt.map(s=>
3{const l=Z.includes(s.id);return e.jsx(f,{type:"button",variant:"ghost",size:"sm",className:l?"!bg-blue-600 !text-white":"bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-300",onClick:()=>ge(m=>m.includes(s.id)?m.filter(r=>r!==s.id):[...m,s.id]),children:s.label},s.id)})})]}),e.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-slate-500",children:"Accent color"}),e.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[e.jsx("input",{type:"color",value:G,onChange:s=>ee(s.target.value),className:"h-11 w-14 rounded-lg border border-slate-200 bg-white p-1 dark:border-slate-700 dark:bg-slate-950"}),e.jsx("input",{value:G,onChange:s=>ee(s.target.value),className:"flex-1 rounded-xl border border-slate-200 bg-white px-3 py-3 text-sm dark:border-slate-700 dark:bg-slate-950 dark:text-white"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-slate-500",children:"Portfolio password"}),e.jsx("input",{type:"password",autoComplete:"new-password",value:te,onChange:s=>fe(s.target.value),placeholder:se?"Set a new password to replace the current one":"Optional password",className:"mt-2 w-full rounded-xl border border-slate-200 bg-white px-3 py-3 text-sm dark:border-slate-700 dark:bg-slate-950 dark:text-white"}),se&&e.jsx("p",{className:"mt-2 text-xs text-slate-500 dark:text-slate-400",children:"This portfolio is currently password protected."})]})]}),e.jsxs("div",{className:"mt-4",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-slate-500",children:"Accomplishment picker"}),e.jsx("div",{className:"mt-3 max-h-64 space-y-2 overflow-y-auto rounded-2xl border border-slate-200 p-3 dark:border-slate-700",children:J.map(s=>e.jsxs("label",{className:"flex items-start gap-3 rounded-xl bg-slate-50 px-3 py-2 text-sm dark:bg-slate-800/60",children:[e.jsx("input",{type:"checkbox",checked:H.includes(s.id),onChange:l=>je(m=>l.target.checked?[...m,s.id]:m.filter(r=>r!==s.id))}),e.jsxs("span",{children:[e.jsx("span",{className:"block font-semibold text-slate-900 dark:text-white",children:s.label}),e.jsx("span",{className:"block text-slate-600 dark:text-slate-300",children:s.description})]})]},s.id))})]})]})]}),e.jsxs("div",{className:"order-1 lg:order-2",children:[i===1&&e.jsxs("div",{className:"iconic-surface-glass rounded-2xl p-6 animate-in fade-in slide-in-from-right-4 duration-base",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",children:e.jsx(V,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-slate-900 dark:text-white",children:"Preview Your Portfolio"}),e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:"See how your Career Diary looks as a website"})]})]}),e.jsxs("div",{className:"space-y-4 mb-8",children:[e.jsxs("div",{className:"p-4 rounded-xl bg-slate-50 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700",children:[e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400 mb-3",children:"Your portfolio will include:"}),e.jsxs("ul",{className:"space-y-2",children:[e.jsxs("li",{className:"flex items-center gap-2 text-sm text-slate-700 dark:text-slate-300",children:[e.jsx(L,{className:"w-4 h-4 text-green-500"}),"Professional summary and photo"]}),e.jsxs("li",{className:"flex items-center gap-2 text-sm text-slate-700 dark:text-slate-300",children:[e.jsx(L,{className:"w-4 h-4 text-green-500"}),((Ie=t==null?void 0:t.experience)==null?void 0:Ie.length)||0," work experience",(((Le=t==null?void 0:t.experience)==null?void 0:Le.length)||0)!==1?"s":""]}),e.jsxs("li",{className:"flex items-center gap-2 text-sm text-slate-700 dark:text-slate-300",children:[e.jsx(L,{className:"w-4 h-4 text-green-500"}),((Ee=t==null?void 0:t.skills)==null?void 0:Ee.length)||0," skills"]}),e.jsxs("li",{className:"flex items-center gap-2 text-sm text-slate-700 dark:text-slate-300",children:[e.jsx(L,{className:"w-4 h-4 text-green-500"}),((Re=t==null?void 0:t.education)==null?void 0:Re.length)||0," education credential",(((Ae=t==null?void 0:t.education)==null?void 0:Ae.length)||0)!==1?"s":""]}),e.jsxs("li",{className:"flex items-center gap-2 text-sm text-slate-700 dark:text-slate-300",children:[e.jsx(L,{className:"w-4 h-4 text-green-500"}),"Contact information"]})]})]}),e.jsx("div",{className:"p-4 rounded-xl bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800",children:e.jsxs("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:[e.jsx("strong",{children:"Tip:"})," Make sure your Career Diary is complete for the best results.",e.jsx("a",{href:"/app/diary",className:"underline ml-1",children:"Edit your profile"})]})})]}),y?e.jsxs("div",{className:"mb-6",children:[c?e.jsx(f,{onClick:()=>{const s=T;console.log("Opening preview from Preview Full Website:",s),U(s)},variant:"primary",size:"lg",leftIcon:e.jsx(V,{className:"w-5 h-5"}),className:"w-full mb-3",children:"Preview Full Website"}):e.jsx("div",{className:"mb-3 p-4 rounded-xl bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800",children:e.jsx("p",{className:"text-sm text-blue-700 dark:text-blue-300 text-center",children:"Save your URL in Step 3 to preview your full website"})}),c&&e.jsx("p",{className:"text-xs text-center text-slate-500 dark:text-slate-400",children:"Opens your portfolio in a preview window"})]}):e.jsx("div",{className:"mb-6 p-4 rounded-xl bg-slate-50 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700",children:e.jsx("p",{className:"text-sm text-slate-600 dar
3k:text-slate-400 text-center",children:"Complete the setup steps to preview your full website"})}),c&&e.jsx("div",{className:"mt-6",children:e.jsx(et,{portfolio:c,onContentGenerated:s=>{console.log("Generated content:",s)}})}),e.jsx(f,{onClick:ie,variant:"primary",size:"lg",rightIcon:e.jsx(ce,{className:"w-5 h-5"}),className:"w-full mt-6",children:"Continue to Style Selection"})]}),i===2&&e.jsxs("div",{className:"iconic-surface-glass rounded-2xl p-6 animate-in fade-in slide-in-from-right-4 duration-base",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",children:e.jsx(R,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-slate-900 dark:text-white",children:"Choose Your Style"}),e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:"Select a design theme for your portfolio"})]})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-8",children:Object.values(D).map(s=>e.jsxs("div",{className:`p-4 rounded-xl border text-left transition-all ${g===s.id?"border-blue-500 bg-blue-50 dark:bg-blue-900/20 ring-2 ring-blue-500/20":"border-slate-200 dark:border-slate-700 hover:border-blue-300 dark:hover:border-blue-600"}`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"font-semibold text-slate-900 dark:text-white",children:s.name}),g===s.id&&e.jsx("div",{className:"w-5 h-5 rounded-full bg-blue-500 flex items-center justify-center",children:e.jsx(L,{className:"w-3 h-3 text-white"})})]}),e.jsx("p",{className:"text-xs text-slate-600 dark:text-slate-400 mb-3",children:s.description}),e.jsx("div",{className:"mt-3 h-20 rounded-lg overflow-hidden mb-3",style:Ze(s.id),children:e.jsx("div",{className:"h-full flex items-center justify-center",children:e.jsx("div",{className:"w-8 h-8 rounded-full",style:{background:s.styles["--color-accent"]}})})}),e.jsx(f,{onClick:async l=>{l.preventDefault(),l.stopPropagation(),console.log("Preview button clicked for theme:",s.id),console.log("Current state - slug:",y,"profile:",!!t,"portfolio:",!!c);let m=y;if(!m&&t&&(m=j.generateSlugFromName(t.fullName),m&&(I(m),console.log("Generated slug for preview:",m))),!m){d.error("Error","Unable to generate URL. Please set a URL in Step 3 first.");return}O(s.id),Be(s.id);const r=`${window.location.origin}/${m}`;console.log("ð Opening preview modal with URL:",r),console.log("ð Opening preview for theme:",s.id),U(r),he(!0),setTimeout(()=>{he(!1)},500),(async()=>{var w,C;try{if(N(!0),console.log("Starting portfolio update/create..."),c){console.log("Updating existing portfolio..."),await j.updatePortfolio({theme_config:{theme:s.id}});const P=await j.getMyPortfolio();P&&(k(P),console.log("Portfolio updated successfully"))}else{if(!t){console.error("No profile data available");return}if(!((w=n==null?void 0:n.user)!=null&&w.id)){console.error("User not authenticated");return}console.log("Creating new portfolio...");const P={...t,metrics:de(t)};try{const B=await j.createPortfolio({slug:m,profile_snapshot:P,is_public:!1,theme_config:{theme:s.id}});k(B),I(m),console.log("Portfolio created successfully")}catch(B){if((C=B==null?void 0:B.message)!=null&&C.includes("already")){const oe=await j.getMyPortfolio();oe&&(k(oe),I(oe.slug||m),await j.updatePortfolio({theme_config:{theme:s.id}}))}else console.warn("Could not create portfolio (may need backend):",B.message)}}}catch(P){console.warn("Portfolio update/create failed (preview still available):",P.message)}finally{N(!1)}})()},disabled:b||!t,loading:b,variant:"secondary",size:"sm",className:"w-full mt-2",leftIcon:b?void 0:e.jsx(V,{className:"w-3 h-3"}),children:"Preview with this style"})]},s.id))}),c&&e.jsx("div",{className:"mb-6",children:e.jsx(at,{portfolio:c})}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(f,{onClick:ne,variant:"secondary",size:"lg",leftIcon:e.jsx(xe,{className:"w-5 h-5"})}),e.jsx(f,{onClick:async()=>
3{if(c)try{N(!0),await j.updatePortfolio({theme_config:{theme:g}}),d.success("Style Updated!","Your portfolio style has been saved.")}catch{d.error("Error","Failed to save style")}finally{N(!1)}ie()},disabled:b,loading:b,variant:"primary",size:"lg",rightIcon:b?void 0:e.jsx(ce,{className:"w-5 h-5"}),className:"flex-1",children:"Continue to URL Setup"})]})]}),i===3&&e.jsxs("div",{className:"iconic-surface-glass rounded-2xl p-6 animate-in fade-in slide-in-from-right-4 duration-base",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",children:e.jsx(Oe,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-slate-900 dark:text-white",children:"Choose Your URL"}),e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:"Pick a memorable link for your portfolio"})]})]}),e.jsxs("div",{className:"space-y-6 mb-8",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"Your Portfolio URL"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-shrink-0 px-3 py-3 bg-slate-100 dark:bg-slate-800 rounded-l-xl text-sm text-slate-500 dark:text-slate-400 border border-r-0 border-slate-200 dark:border-slate-700",children:"careerdiary.io/"}),e.jsx("input",{type:"text",value:y,onChange:s=>We(s.target.value),onBlur:()=>re(y),placeholder:"your-name",className:`flex-1 px-3 py-3 rounded-r-xl text-slate-90:0 dark:text-white bg-white dark:bg-slate-900 border transition-all ${z?"border-red-500 focus:ring-red-500":"border-slate-200 dark:border-slate-700 focus:ring-blue-500 focus:border-blue-500"}`})]}),z&&e.jsx("p",{className:"mt-2 text-sm text-red-500",children:z}),Y&&e.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Checking availability..."}),!z&&!Y&&y&&e.jsxs("p",{className:"mt-2 text-sm text-green-500 flex items-center gap-1",children:[e.jsx(L,{className:"w-4 h-4"}),"URL is available"]})]}),e.jsxs("div",{className:"p-4 rounded-xl bg-slate-50 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700",children:[e.jsx("p",{className:"text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"URL Requirements:"}),e.jsxs("ul",{className:"space-y-1 text-sm text-slate-500 dark:text-slate-400",children:[e.jsx("li",{children:"⢠3-50 characters"}),e.jsx("li",{children:"⢠Lowercase letters, numbers, and hyphens only"}),e.jsx("li",{children:"⢠Cannot start or end with a hyphen"})]})]})]}),c&&e.jsx("div",{className:"mb-6",children:e.jsx(tt,{portfolio:c,onSEOUpdated:s=>{console.log("SEO updated:",s)}})}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(f,{onClick:ne,variant:"secondary",size:"lg",leftIcon:e.jsx(xe,{className:"w-5 h-5"})}),e.jsx(f,{onClick:async()=>{await re(y)&&(await Ge(),ie())},disabled:b||!!z,loading:b,variant:"primary",size:"lg",rightIcon:b?void 0:e.jsx(ce,{className:"w-5 h-5"}),className:"flex-1",children:c?"Save & Continue":"Create Portfolio"})]})]}),i===4&&e.jsxs("div",{className:"iconic-surface-glass rounded-2xl p-6 animate-in fade-in slide-in-from-right-4 duration-base",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",children:e.jsx(me,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-slate-900 dark:text-white",children:"Publish Your Portfolio"}),e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:"Make it live for the world to see"})]})]}),e.jsxs("div",{className:"space-y-6 mb-8",children:[e.jsx("div",{className:"p-6 rounded-xl border border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/50",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 dark:text-white",children:h?"ð Portfolio is Live!":"ð Portfolio is Private"}
3),e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400 mt-1",children:h?"Anyone with the link can view your portfolio":"Only you can see your portfolio"})]}),e.jsx("button",{onClick:ve,disabled:b,className:`relative w-14 h-8 rounded-full transition-all ${h?"bg-green-500":"bg-slate-300 dark:bg-slate-600"}`,children:e.jsx("div",{className:`absolute top-1 w-6 h-6 rounded-full bg-white shadow-md transition-all ${h?"left-7":"left-1"}`})})]})}),h&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-4 rounded-xl bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800",children:[e.jsx("p",{className:"text-sm text-green-700 dark:text-green-300 mb-3",children:e.jsx("strong",{children:"Your portfolio is live at:"})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 px-3 py-2 bg-white dark:bg-slate-900 rounded-lg text-sm font-mono text-slate-700 dark:text-slate-300 truncate",children:T}),e.jsx(f,{onClick:ke,variant:"primary",size:"md",className:"bg-green-600 hover:bg-green-700",children:$?e.jsx(L,{className:"w-5 h-5"}):e.jsx(X,{className:"w-5 h-5"})})]})]}),e.jsx(o.Suspense,{fallback:null,children:e.jsx(lt,{portfolioUrl:T,slug:y})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-700 dark:text-slate-300 mb-3",children:"Share on:"}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(f,{as:"a",href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(T)}`,target:"_blank",rel:"noopener noreferrer",variant:"primary",size:"md",leftIcon:e.jsx(Ue,{className:"w-5 h-5"}),className:"bg-[var(--brand-linkedin)] hover:bg-[var(--brand-linkedin-hover)]",children:"LinkedIn"}),e.jsx(f,{as:"a",href:`https://twitter.com/intent/tweet?text=${encodeURIComponent(`Check out my portfolio: ${T}`)}`,target:"_blank",rel:"noopener noreferrer",variant:"secondary",size:"md",leftIcon:e.jsx("span",{className:"text-lg",children:"ð"}),className:"bg-slate-900 dark:bg-slate-700 hover:bg-slate-800 dark:hover:bg-slate-600 text-white",children:"Twitter"}),e.jsx(f,{as:"a",href:`mailto:?subject=Check out my portfolio&body=${encodeURIComponent(T)}`,variant:"secondary",size:"md",leftIcon:e.jsx(Me,{className:"w-5 h-5"}),children:"Email"})]})]}),e.jsxs("div",{className:"p-4 rounded-xl bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800",children:[e.jsx("p",{className:"text-sm font-medium text-blue-700 dark:text-blue-300 mb-2",children:"Pro Tips:"}),e.jsxs("ul",{className:"space-y-1 text-sm text-blue-600 dark:text-blue-400",children:[e.jsx("li",{children:"⢠Add your URL to your LinkedIn profile's contact info"}),e.jsx("li",{children:"⢠Include it in your email signature"}),e.jsx("li",{children:"⢠Add it to the header of your resume"})]})]})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(f,{onClick:ne,variant:"secondary",size:"lg",leftIcon:e.jsx(xe,{className:"w-5 h-5"}),children:"Back"}),!h&&e.jsx(f,{onClick:ve,disabled:b,loading:b,variant:"primary",size:"lg",leftIcon:e.jsx(me,{className:"w-5 h-5"}),className:"flex-1",children:"Publish Portfolio"})]})]})]})]}),A&&e.jsx("div",{id:"portfolio-preview-modal",role:"dialog","aria-modal":"true","aria-labelledby":"preview-modal-title",className:"fixed inset-0 flex items-center justify-center p-4",style:{zIndex:999999,position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",pointerEvents:"auto",backgroundColor:"rgba(0, 0, 0, 0.8)",backdropFilter:"blur(4px)"},onClick:s=>{if(K){console.log("Modal just opened - preventing closure"),s.preventDefault(),s.stopPropagation();return}const l=s.target,m=s.currentTarget,r=l===m,w=ae.current&&ae.current.contains(l);r&&!w?(console.log("Closing modal from backdrop click",{targetId:l.id,currentTargetId:m.id,isClickOnBackdrop:r,isClickInsideModalContent:w}),U(null)):(console.log("Click detected but not on backdrop - preventing close",{targetId:l.id,targetTag:l.tagName,targetClass:l.className,currentTargetId:m.id,isClickOnBackdrop:r,isClickInsideModalContent:w}),s.stopPropagation(),s.preventDefault())},children:e.jsxs("div",{ref:ae,className:"relative w-full h-full max-w-7xl max-h-[90vh] bg-white dark:bg-slate-900 rounded-2xl shadow-2xl flex flex-col overflow-hidden",onClick:s=>{var l,m;s.stopPropagation(),s.preventDefault(),console.log("Modal content clicked - preventing close",{target:s.target,currentTarget:s.currentTarget,targetId:(l=s.target)==null?void 0:l.id,targetTag:(m=s.target)==null?void 0:m.tagName})},onMouseDown:s=>{s.stopPropagation()},style:{pointerEvents:"auto"},children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800 flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(V,{className:"w-5 h-5 text-slate-600 dar
3k:text-slate-400"}),e.jsxs("div",{children:[e.jsxs("h3",{id:"preview-modal-title",className:"text-lg font-semibold text-slate-900 dark:text-white",children:["Portfolio Preview",e.jsxs("span",{className:"ml-2 text-sm font-normal text-blue-600 dark:text-blue-400",children:["(",((ze=D[ye])==null?void 0:ze.name)||"Modern"," Theme)"]})]}),e.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"Preview using your profile data"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[A&&e.jsx("a",{href:A,target:"_blank",rel:"noopener noreferrer",className:"px-3 py-2 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-all",children:"Open in New Tab"}),e.jsx(f,{onClick:s=>{s.stopPropagation(),s.preventDefault(),console.log("Close button clicked - closing modal"),U(null)},variant:"ghost",size:"sm",className:"p-2 text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-lg transition-all h-auto","aria-label":"Close preview",children:e.jsx(Te,{className:"w-5 h-5"})})]})]}),e.jsx("div",{className:"flex-1 relative overflow-hidden bg-slate-100 dark:bg-slate-800 portfolio-preview portfolio-full-preview",children:t?e.jsx(ct,{profile:t,theme:ye,onClose:()=>U(null)}):e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx(Q,{className:"w-8 h-8 text-blue-600 dark:text-blue-400"})})})]})})]}):e.jsx("div",{className:"max-w-6xl mx-auto px-4 py-8",children:e.jsx("div",{className:"iconic-surface-glass rounded-2xl p-8",children:e.jsx(Qe,{surface:"portfolio",tease:Xe({lastTailoredRole:(Se=a.lastTailoredInfo)==null?void 0:Se.jobTitle,trackedRole:(Pe=(Ce=a.appliedJobs)==null?void 0:Ce[0])==null?void 0:Pe.job_title,profile:null}),icon:e.jsx(R,{className:"w-8 h-8"}),action:e.jsx(f,{as:"a",href:"/app/diary",variant:"primary",size:"lg",className:"inline-flex items-center gap-2 px-6 py-3 font-semibold transition-all",leftIcon:e.jsx(R,{className:"h-5 w-5"}),children:"Build my Diary first"})})})})},Ct=()=>e.jsx(Je,{featureName:"Portfolio",featureKey:"portfolio",description:"Publish a personal website built from your Career Diary â your own URL, custom theme, and SEO-ready pages to share on LinkedIn, resumes, and emails.",children:e.jsx(ut,{})});export{Ct as PortfolioSettingsPage};
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.