1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GrapesEditor-Cbb3x-1C.js","assets/index-C4qM8Ic4.js","assets/index-DrlCrizt.css","assets/blockTypes-Cr-TpVIU.js","assets/backgroundStore-wJZEN2oy.js","assets/AiProgressCard-DQWtKhWI.js","assets/sanitize-DnsZfWr-.js","assets/SendLogForm-C0tmuaE5.js","assets/channels-baHlVy1u.js","assets/SendLogForm-CAEYBers.css","assets/GrapesEditor-BCowQM7_.css","assets/qrStamper-WB47Yykd.js","assets/_commonjsHelpers-Cpj98o6Y.js"])))=>i.map(i=>d[i]); 2import{_ as et,i as dt,Q as We,$ as ut,o as u,c as p,a as e,n as H,t as d,l as W,g as ae,w as Ee,F as ce,f as pe,j as m,b as Y,y as ke,T as Ye,k as ze,z as Je,d as ee,r as k,I as Ne,h as Z,E as Ce,H as Be,K as yt,P as Oe,x as Ze,m as wt,ab as Ct,D as St,X as Mt,C as Bt,a0 as $t,ac as Pt,J as _t,ad as Tt,a3 as Lt,e as It,af as Vt,a1 as nt,a2 as zt}from"./index-C4qM8Ic4.js";import{u as Et}from"./backgroundStore-wJZEN2oy.js";import{_ as ct}from"./AiProgressCard-DQWtKhWI.js";import{a as jt}from"./sanitize-DnsZfWr-.js";import{S as Rt}from"./SendLogForm-C0tmuaE5.js";const Dt={class:"flex items-center gap-3"},Ut={class:"flex -space-x-1"},Ht={class:"text-sm font-medium text-slate-900 dark:text-white"},At={class:"ml-2 text-xs text-slate-400 dark:text-slate-500"},Ft={key:0,class:"absolute left-0 right-0 z-40 mt-1 max-h-80 overflow-y-auto rounded-xl border border-slate-200 bg-white py-1 shadow-xl dark:border-slate-700 dark:bg-slate-900"},Nt=["onClick"],Ot={class:"flex -space-x-1 shrink-0"},Yt={class:"min-w-0 flex-1"},Wt={class:"text-sm font-medium text-slate-900 dark:text-white"},Xt={class:"ml-2 text-xs text-slate-400 dark:text-slate-500"},qt={key:0,class:"shrink-0 rounded-full bg-amber-500 px-1.5 py-0.5 text-[9px] font-bold uppercase text-white"},Kt={key:1,class:"h-4 w-4 shrink-0 text-primary",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round"},Gt=["onClick"],Qt={class:"relative w-full max-w-2xl max-h-[85vh] overflow-hidden rounded-2xl shadow-2xl border border-slate-200 dark:border-slate-700"},Jt={class:"absolute left-3 top-3 z-10 rounded-full bg-black/50 px-3 py-1"},Zt={class:"text-xs font-semibold text-white"},ea={class:"ml-1 text-[10px] text-white/70"},ta={class:"space-y-2"},aa={class:"space-y-3 mb-6"},la={class:"mt-2 space-y-1.5"},oa={class:"flex flex-wrap gap-2"},sa=["disabled"],ra={__name:"TemplateSelector",props:{modelValue:{type:String,default:"classic"}},emits:["update:modelValue"],setup(R,{emit:te}){const g=R,z=te,v=dt().hasFeature("proTemplates"),M=k(!1),b=k(null),w=k(null),A=["Lead Engineer â Cloud Platform","Senior Developer â Payments Team","Software Architect â Data Services"],X=["AWS","Kubernetes","TypeScript","React","System Design","Team Leadership"];function F(P){w.value&&!w.value.contains(P.target)&&(M.value=!1)}We(()=>document.addEventListener("mousedown",F)),ut(()=>document.removeEventListener("mousedown",F));const N={classic:{heroBg:"#ffffff",heroText:"#0f172a",heroSubtext:"#64748b",bodyBg:"#ffffff",cardBg:"#f8fafc",cardBorder:"#e2e8f0",headingColor:"#0f172a",textColor:"#334155",mutedText:"#94a3b8",accent:"#0f172a",lineBg:"#e2e8f0",headingFont:"system-ui, sans-serif"},modern:{heroBg:"linear-gradient(135deg, #2563eb 0%, #4f46e5 100%)",heroText:"#ffffff",heroSubtext:"rgba(255,255,255,0.8)",bodyBg:"#f8fafc",cardBg:"#ffffff",cardBorder:"#e2e8f0",headingColor:"#0f172a",textColor:"#334155",mutedText:"#94a3b8",accent:"#3b82f6",lineBg:"#e2e8f0",headingFont:"system-ui, sans-serif"},minimal:{heroBg:"#ffffff",heroText:"#0f172a",heroSubtext:"#94a3b8",bodyBg:"#ffffff",cardBg:"#ffffff",cardBorder:"#f1f5f9",headingColor:"#0f172a",textColor:"#64748b",mutedText:"#cbd5e1",accent:"#64748b",lineBg:"#f1f5f9",headingFont:"system-ui, sans-serif"},executive:{heroBg:"#020617",heroText:"#ffffff",heroSubtext:"#94a3b8",bodyBg:"#020617",cardBg:"#0f172a",cardBorder:"#1e293b",headingColor:"#f59e0b",textColor:"#94a3b8",mutedText:"#475569",accent:"#f59e0b",lineBg:"#1e293b",headingFont:"system-ui, sans-serif"},creative:{heroBg:"linear-gradient(135deg, #7c3aed 0%, #ec4899 100%)",heroText:"#ffffff",heroSubtext:"rgba(255,255,255,0.8)",bodyBg:"#faf5ff",cardBg:"#ffffff",cardBorder:"#e9d5ff",headingColor:"#6d28d9",textColor:"#4c1d95",mutedText:"#a
278bfa",accent:"#8b5cf6",lineBg:"#ede9fe",headingFont:"Georgia, serif"},corporate:{heroBg:"linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%)",heroText:"#ffffff",heroSubtext:"rgba(255,255,255,0.7)",bodyBg:"#f8fafc",cardBg:"#ffffff",cardBorder:"#e2e8f0",headingColor:"#0f172a",textColor:"#334155",mutedText:"#94a3b8",accent:"#ca8a04",lineBg:"#e2e8f0",headingFont:"Georgia, serif"},startup:{heroBg:"linear-gradient(135deg, #06b6d4 0%, #10b981 100%)",heroText:"#ffffff",heroSubtext:"rgba(255,255,255,0.85)",bodyBg:"#f0fdfa",cardBg:"#ffffff",cardBorder:"#ccfbf1",headingColor:"#0f766e",textColor:"#134e4a",mutedText:"#5eead4",accent:"#0d9488",lineBg:"#ccfbf1",headingFont:"system-ui, sans-serif"},academic:{heroBg:"#44403c",heroText:"#fafaf9",heroSubtext:"#d6d3d1",bodyBg:"#fafaf9",cardBg:"#ffffff",cardBorder:"#d6d3d1",headingColor:"#292524",textColor:"#44403c",mutedText:"#a8a29e",accent:"#78716c",lineBg:"#e7e5e4",headingFont:'Georgia, "Times New Roman", serif'},bold:{heroBg:"#000000",heroText:"#ffffff",heroSubtext:"rgba(255,255,255,0.6)",bodyBg:"#09090b",cardBg:"#18181b",cardBorder:"#27272a",headingColor:"#ffffff",textColor:"#a1a1aa",mutedText:"#52525b",accent:"#ffffff",lineBg:"#27272a",headingFont:"system-ui, sans-serif"},warm:{heroBg:"linear-gradient(135deg, #c2410c 0%, #d97706 100%)",heroText:"#ffffff",heroSubtext:"rgba(255,255,255,0.85)",bodyBg:"#fffbeb",cardBg:"#ffffff",cardBorder:"#fde68a",headingColor:"#92400e",textColor:"#78350f",mutedText:"#d97706",accent:"#ea580c",lineBg:"#fef3c7",headingFont:"Georgia, serif"}};function O(P){return N[P]||N.classic}function y(P){const n=O(P);return n.heroBg.includes("gradient")?n.accent:n.heroBg}const T=ee(()=>q.find(P=>P.id===g.modelValue)||q[0]),j=ee(()=>O(g.modelValue)),C=ee(()=>b.value&&N[b.value.id]||N.classic),G=ee(()=>({background:C.value.bodyBg}));function K(P){P.pro&&!v||(z("update:modelValue",P.id),M.value=!1)}function se(){b.value&&(b.value.pro&&!v||(z("update:modelValue",b.value.id),b.value=null,M.value=!1))}const q=[{id:"classic",label:"Classic",description:"Professional & clean",pro:!1},{id:"modern",label:"Modern",description:"Bold & tech-forward",pro:!1},{id:"minimal",label:"Minimal",description:"Whitespace-focused",pro:!1},{id:"executive",label:"Executive",description:"Formal & authoritative",pro:!0},{id:"creative",label:"Creative",description:"Colorful & expressive",pro:!0},{id:"corporate",label:"Corporate",description:"Navy & gold, traditional",pro:!0},{id:"startup",label:"Startup",description:"Vibrant & energetic",pro:!0},{id:"academic",label:"Academic",description:"Scholarly & structured",pro:!0},{id:"bold",label:"Bold",description:"High-contrast & striking",pro:!0},{id:"warm",label:"Warm",description:"Earthy & approachable",pro:!0}];return(P,n)=>(u(),p("div",{class:"relative",ref_key:"dropdownRef",ref:w},[n[7]||(n[7]=e("label",{class:"mb-2 block text-sm font-medium text-slate-700 dark:text-slate-300"},"Layout Template",-1)),e("button",{type:"button",class:"flex w-full items-center justify-between rounded-lg border border-slate-200 bg-white px-3 py-2.5 text-left transition hover:border-slate-300 focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary dark:border-slate-700 dark:bg-slate-800 dark:hover:border-slate-600",onClick:n[0]||(n[0]=S=>M.value=!M.value)},[e("div",Dt,[e("div",Ut,[e("div",{class:"h-4 w-4 rounded-full border border-white shadow-sm dark:border-slate-700",style:H({background:j.value.accent})},null,4),e("div",{class:"h-4 w-4 rounded-full border border-white shadow-sm dark:border-slate-700",style:H({background:j.value.heroBg.includes("gradient")?j.value.accent:j.value.heroBg})},null,4),e("div",{class:"h-4 w-4 rounded-full border border-white shadow-sm dark:border-slate-700",style:H({background:j.value.bodyBg})},null,4)]),e("div",null,[e("span",Ht,d(T.value.label),1),e("span",At,d(T.value.description),1)])]),(u(),p("svg",{class:W(["h-4 w-4 shrink-0 text-slate-400 transition",M.value?"rotate-180":""]),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[...n[3]||(n[3]=[e("polyline",{points:"6 9 12 15 18 9"},null,-1)])],2))]),ae(Ye,{name:"dropdown"},{default:Ee(()=>[M.value?(u(),p("div",Ft,[(u(),p(ce,null,pe(q,S=>e("div",{key:S.id,class:W(["group flex items-center gap-3 px-3 py-2.5 transition cursor-pointer",[R.modelValue===S.id?"bg-primary/5 dark:bg-primary/10":"hover:bg-slate-50 dark:hover:bg-slate-800/60",S.pro&&!m(v)?"opacity-50":""]]),onClick:Q=>K(S)}
2,[e("div",Ot,[e("div",{class:"h-4 w-4 rounded-full border border-white shadow-sm dark:border-slate-700",style:H({background:O(S.id).accent})},null,4),e("div",{class:"h-4 w-4 rounded-full border border-white shadow-sm dark:border-slate-700",style:H({background:y(S.id)})},null,4),e("div",{class:"h-4 w-4 rounded-full border border-white shadow-sm dark:border-slate-700",style:H({background:O(S.id).bodyBg})},null,4)]),e("div",Yt,[e("span",Wt,d(S.label),1),e("span",Xt,d(S.description),1)]),S.pro&&!m(v)?(u(),p("span",qt,"Pro")):Y("",!0),R.modelValue===S.id?(u(),p("svg",Kt,[...n[4]||(n[4]=[e("path",{d:"M20 6L9 17l-5-5"},null,-1)])])):Y("",!0),e("button",{type:"button",title:"Quick View",class:"shrink-0 flex h-6 w-6 items-center justify-center rounded-full text-slate-300 opacity-0 transition hover:bg-slate-100 hover:text-slate-600 group-hover:opacity-100 dark:text-slate-600 dark:hover:bg-slate-800 dark:hover:text-slate-300",onClick:ke(Q=>b.value=S,["stop"])},[...n[5]||(n[5]=[e("svg",{class:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[e("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),e("circle",{cx:"12",cy:"12",r:"3"})],-1)])],8,Gt)],10,Nt)),64))])):Y("",!0)]),_:1}),(u(),ze(Je,{to:"body"},[ae(Ye,{name:"fade"},{default:Ee(()=>[b.value?(u(),p("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm px-4",onClick:n[2]||(n[2]=ke(S=>b.value=null,["self"]))},[e("div",Qt,[e("button",{type:"button",class:"absolute right-3 top-3 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-black/50 text-white transition hover:bg-black/70",onClick:n[1]||(n[1]=S=>b.value=null)},[...n[6]||(n[6]=[e("svg",{class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[e("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])]),e("div",Jt,[e("span",Zt,d(b.value.label),1),e("span",ea,d(b.value.description),1)]),e("div",{class:"overflow-y-auto max-h-[85vh]",style:H(G.value)},[e("div",{class:"px-6 py-12 text-center sm:px-10",style:H({background:C.value.heroBg})},[e("h1",{class:"text-2xl font-bold sm:text-3xl",style:H({color:C.value.heroText,fontFamily:C.value.headingFont})},"Alex Johnson",4),e("p",{class:"mt-2 text-lg",style:H({color:C.value.accent})},"Senior Software Engineer | Cloud Architecture",4),e("p",{class:"mx-auto mt-3 max-w-lg text-sm leading-relaxed",style:H({color:C.value.heroSubtext})}," Experienced engineer with 10+ years building scalable distributed systems. Passionate about clean architecture and team mentorship. ",4)],4),e("div",{class:"px-6 py-8 sm:px-10",style:H({background:C.value.bodyBg})},[e("div",{class:"mb-6 rounded-xl p-5",style:H({background:C.value.cardBg,border:`1px solid ${C.value.cardBorder}`})},[e("h2",{class:"mb-3 text-base font-bold",style:H({color:C.value.headingColor,fontFamily:C.value.headingFont})},"Cover Letter",4),e("div",ta,[e("div",{class:"h-2 w-full rounded-full",style:H({background:C.value.lineBg})},null,4),e("div",{class:"h-2 w-11/12 rounded-full",style:H({background:C.value.lineBg})},null,4),e("div",{class:"h-2 w-4/5 rounded-full",style:H({background:C.value.lineBg})},null,4),e("div",{class:"h-2 w-full rounded-full",style:H({background:C.value.lineBg})},null,4),e("div",{class:"h-2 w-3/4 rounded-full",style:H({background:C.value.lineBg})},null,4)])],4),e("h2",{class:"mb-4 text-base font-bold",style:H({color:C.value.headingColor,fontFamily:C.value.headingFont})},"Experience",4),e("div",aa,[(u(),p(ce,null,pe(A,S=>e("div",{key:S,class:"rounded-xl p-4",style:H({background:C.value.cardBg,border:`1px solid ${C.value.cardBorder}`})},[e("div",{class:"mb-2 h-1 w-10 rounded-full",style:H({background:C.value.accent})},null,4),e("p",{class:"text-sm font-semibold",style:H({color:C.value.accent})},d(S),5),e("div",la,[e("div",{class:"h-1.5 w-full rounded-full",style:H({background:C.value.lineBg})},null,4),e("div",{class:"h-1.5 w-5/6 rounded-full",style:H({background:C.value.lineBg})},null,4)])],4)),64))]),e("h2",{class:"mb-3 text-base font-bold",style:H({color:C.value.headingColor,fontFamily:C.value.headingFont})},"Skills",4),e("div",oa,[(u(),p(ce,null,pe(X,S=>e("span",{key:S,class:"rounded-full px-3 py-1 text-xs font-medium",style:H({background:C.value.accent+"20",color:C.value.accent})},d(S),5)),64))])],4)],4),e("div",{class:"absolute bottom-0 left-0 right-0 flex items-center justify-between border-t px-4 py-3 backdrop-blur-md",style:H({background:C.value.bodyBg+"e6",borderColor:C.value.cardBorder})},[e("span",{class:"text-xs",style:H({color:C.value.mutedText})},d(b.value.pro&&!m(v)?"Pro template â upgrade to use":"Click to select this template"),5),e("button",{type:"button",class:"rounded-lg px-4 py-2 text-sm font-medium text-white shadow-sm transition hover:opacity-90",style:H({background:b.value.pro&&!m(v)?"#94a3b8":C.value.accent}),disabled:b.value.pro&&!m(v),onClick:se},d(b.value.pro&&!m(v)?"Pro Only":"Use This Template"),13,sa)],4)])])):Y("",!0)]),_:1})]))],512))}},na=et(ra,[["__scopeId","data-v-7f494a16"]]),ia={class:"space-y-1.5"},da={class:"flex items-center gap-2"},ua={class:"text-sm font-medium text-slate-700 dark:text-slate-300"},ca=["aria-checked","onClick"],pa={__name:"SectionToggle",props:{modelValue:{type:Object,default:()=>({hero:!0,coverLetter:!0,experience:!0,skills:!0,pdf:!0,contact:!1})}},emits:["update:modelValue"],setup(R,{emit:te}){const g=R,z=te,B=[{id:"hero",label:"Hero (Name, Role, Pitch)"},{id:"coverLetter",label:"Cover Letter"},{id:"experience",label:"Experience Highlights"},{id:"skills",label:"Skills Match"},{id:"pdf",label:"PDF Download"},{id:"contact",label:"Contact Info"},{id:"feedback",label:"Viewer Feedback Prompt"}];function v(M){z("update:modelValue",{...g.modelValue,[M]:!g.modelValue[M]})}return(M,b)=>(u(),p("div",ia,[b[1]||(b[1]=e("label",{class:"mb-2 block text-sm font-medium text-slate-700 dark:text-slate-300"},"Sections",-1)),(u(),p(ce,null,pe(B,w=>e("div",{key:w.id,class:"flex items-center justify-between rounded-lg border border-slate-200 px-3 py-2 dark:border-slate-700"},[e("div",da,[b[0]||(b[0]=e("svg",{class:"h-4 w-4 text-slate-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[e("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),e("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),e("line",{x1:"3",y1:"18",x2:"21",y2:"18"})],-1)),e("span",ua,d(w.label),1)]),e("button",{type:"button",class:W(["relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full transition-colors duration-200",R.modelValue[w.id]?"bg-primary":"bg-slate-300 dark:bg-slate-600"]),role:"switch","aria-checked":R.modelValue[w.id],onClick:A=>v(w.id)},[e("span",{class:W(["pointer-events-none inline-block h-5 w-5 translate-y-0.5 rounded-full bg-white shadow ring-0 transition-transform duration-200",R.modelValue[w.id]?"translate-x-[22px]":"translate-x-0.5"])},null,2)],10,ca)])),64))]))}},ga={class:"rounded-xl border border-slate-200/70 bg-white p-4 dark:border-slate-800 dark:bg-slate-900/60"},va={class:"mb-3 flex flex-wrap gap-1.5"},fa=["onClick"],ba={class:"flex gap-2"},ma=["disabled"],ha={key:0,class:"h-3.5 w-3.5 animate-spin",viewBox:"0 0 24 24",fill:"none"},xa={key:1,class:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},ka={class:"mt-2 flex flex-wrap gap-1"},ya=["onClick"],wa={key:0,class:"mt-3 border-t border-slate-100 pt-3 dark:border-slate-800"},Ca={class:"space-y-1 max-h-32 overflow-y-auto"},Sa={class:"shrink-0 rounded bg-slate-100 px-1.5 py-0.5 text-[10px] font-medium dark:bg-slate-800"},Ma={class:"truncate"},Ba={__name:"RefinementPanel",props:{refining:{type:Boolean,default:!1},history:{type:Array,default:()=>[]}},emits:["refine"],setup(R,{emit:te}){const g=R,z=k("");Ne(()=>g.refining,O=>{O?z.value="analyzing":z.value=""}),Ne(()=>g.refining,O=>{if(!O)return;z.value="analyzing";const y=setTimeout(()=>{g.refining&&(z.value="rewriting")},3e3),T=setTimeout(()=>{g.refining&&(z.value="polishing")},7e3);Ne(()=>g.refining,j=>{j||(clearTimeout(y),clearTimeout(T))},{once:!0})});const B=["analyzing","rewriting","polishing"],v=ee(()=>{const O=B.indexOf(z.value);return[{key:"analyzing",label:"Analyzing your feedback"},{key:"rewriting",label:`Rewriting ${A.value||"content"}`},{key:"polishing",label:"Polishing language"}].map(y=>({...y,done:O>B.indexOf(y.key),active:z.value===y.key}))}),M=ee(()=>{const O=v.value.find(y=>y.active);return O?O.label+"...":"Processing..."}),b=te,w=k(""),A=k("all"),X=[{id:"all",label:"All"},{id:"headline",label:"Headline"},{id:"pitch",label:"Pitch"},{id:"coverLetter",label:"Cover Letter"},{id:"blocks",label:"Experience"},{id:"skills",label:"Skills"}],F=["Make it more formal","Emphasize leadership","Shorten the pitch","More technical focus","Add quantifiable achievements","Warmer tone"];function N(){!w.value.trim()||g.refining||(b("refine",{prompt:w.value.trim(),section:A.value==="all"?null:A.value}),w.value="")}return(O,y)=>(u(),p("div",ga,[y[4]||(y[4]=e("h4",{class:"mb-3 flex items-center gap-2 text-sm font-semibold text-slate-700 dark:text-slate-300"},[e("svg",{class:"h-4 w-4 text-primary",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[e("path",{d:"M12 20h9"}),e("path",{d:"M16.5 3.5a2.12 2.12 0 013 3L7 19l-4 1 1-4L16.5 3.5z"})]),Z(" Refine with AI ")],-1)),e("div",va,[(u(),p(ce,null,pe(X,T=>e("button",{key:T.id,type:"button",class:W(["rounded-full px-2.5 py-1 text-[11px] font-medium transition",A.value===T.id?"bg-primary text-white":"bg-slate-100 text-slate-600 hover:bg-slate-200 dark:bg-slate-800 dark:text-slate-400 dark:hover:bg-slate-700"]),onClick:j=>A.value=T.id},d(T.label),11,fa)),64))]),e("div",ba,[Ce(e("input",{"onUpdate:modelValue":y[0]||(y[0]=T=>w.value=T),type:"text",class:"flex-1 rounded-lg border border-slate-200 bg-slate-50 px-3 py-2 text-sm text-slate-700 placeholder-slate-400 transition focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200 dark:placeholder-slate-500",placeholder:"e.g., make the cover letter more formal, emphasize leadership...",onKeydown:yt(N,["enter"])},null,544),[[Be,w.value]]),e("button",{type:"button",class:"inline-flex items-center gap-1.5 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-white shadow-sm transition hover:bg-primary/90 disabled:opacity-50",disabled:!w.value.trim()||R.refining,onClick:N},[R.refining?(u(),p("svg",ha,[...y[1]||(y[1]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.4 0 0 5.4 0 12h4z"},null,-1)])])):(u(),p("svg",xa,[...y[2]||(y[2]=[e("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"},null,-1),e("polyline",{points:"17 8 12 3 7 8"},null,-1),e("line",{x1:"12",y1:"3",x2:"12",y2:"15"},null,-1)])])),Z(" "+d(R.refining?"Refining...":"Refine"),1)],8,ma)]),e("div",ka,[(u(),p(ce,null,pe(F,T=>e("button",{key:T,type:"button",class:"rounded-full border border-slate-200 px-2 py-0.5 text-[10px] text-slate-500 transition hover:border-primary/40 hover:text-primary dark:border-slate-700 dark:text-slate-400",onClick:j=>w.value=T},d(T),9,ya)),64))]),ae(ct,{active:R.refining,title:"AI is refining your content",subtitle:M.value,steps:v.value},null,8,["active","subtitle","steps"]),R.history.length>0&&!R.refining?(u(),p("div",wa,[y[3]||(y[3]=e("p",{class:"mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-slate-400"},"History",-1)),e("div",Ca,[(u(!0),p(ce,null,pe(R.history,(T,j)=>(u(),p("div",{key:j,class:"flex items-center gap-2 text-xs text-slate-500 dark:text-slate-400"},[e("span",Sa,d(T.section||"all"),1),e("span",Ma,d(T.prompt),1)]))),128))])])):Y("",!0)]))}},$a={class:"space-y-1.5"},Pa={key:0,class:"h-3 w-3",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round"},_a={key:1,class:"h-3 w-3",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round"},Ta={key:2,class:"h-3 w-3",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round"},La=["title"],Ia={key:0,class:"mt-3 flex gap-3 text-xs text-slate-500 dark:text-slate-400"},Va={class:"flex items-center gap-1"},za={class:"flex items-center gap-1"},Ea={class:"flex items-center gap-1"},ja={__name:"SkillMatchList",props:{skills:{type:Array,default:()=>[]}},setup(R){const te=R,g=ee(()=>te.skills.filter(M=>M.status==="matched").length),z=ee(()=>te.skills.filter(M=>M.status==="partial").length),B=ee(()=>te.skills.filter(M=>M.status==="missing").length),v={matched:{border:"border-emerald-200 bg-emerald-50/50 dark:border-emerald-800/50 dark:bg-emerald-900/20",icon:"bg-emerald-100 text-emerald-600 dark:bg-emerald-900/40 dark:text-emerald-400",text:"text-emerald-700 dark:text-emerald-300"},partial:{border:"border-amber-200 bg-amber-50/50 dark:border-amber-800/50 dark:bg-amber-900/20",icon:"bg-amber-100 text-amber-600 dar
2k:bg-amber-900/40 dark:text-amber-400",text:"text-amber-700 dark:text-amber-300"},missing:{border:"border-red-200 bg-red-50/50 dark:border-red-800/50 dark:bg-red-900/20",icon:"bg-red-100 text-red-600 dark:bg-red-900/40 dark:text-red-400",text:"text-red-700 dark:text-red-300"}};return(M,b)=>(u(),p("div",null,[e("div",$a,[(u(!0),p(ce,null,pe(R.skills,w=>{var A,X,F;return u(),p("div",{key:w.skill,class:W(["flex items-center gap-2 rounded-lg border px-3 py-2 text-sm",((A=v[w.status])==null?void 0:A.border)||"border-slate-200 dark:border-slate-700"])},[e("span",{class:W(["flex h-5 w-5 shrink-0 items-center justify-center rounded-full",(X=v[w.status])==null?void 0:X.icon])},[w.status==="matched"?(u(),p("svg",Pa,[...b[0]||(b[0]=[e("path",{d:"M20 6L9 17l-5-5"},null,-1)])])):w.status==="partial"?(u(),p("svg",_a,[...b[1]||(b[1]=[e("path",{d:"M5 12h14"},null,-1)])])):(u(),p("svg",Ta,[...b[2]||(b[2]=[e("path",{d:"M18 6L6 18"},null,-1),e("path",{d:"M6 6l12 12"},null,-1)])]))],2),e("span",{class:W(["font-medium",((F=v[w.status])==null?void 0:F.text)||"text-slate-700 dark:text-slate-300"])},d(w.skill),3),e("span",{class:"ml-auto truncate text-xs text-slate-400 dark:text-slate-500",title:w.evidence},d(w.evidence),9,La)],2)}),128))]),R.skills.length>0?(u(),p("div",Ia,[e("span",Va,[b[3]||(b[3]=e("span",{class:"h-2 w-2 rounded-full bg-emerald-500"},null,-1)),Z(" "+d(g.value)+" matched ",1)]),e("span",za,[b[4]||(b[4]=e("span",{class:"h-2 w-2 rounded-full bg-amber-500"},null,-1)),Z(" "+d(z.value)+" partial ",1)]),e("span",Ea,[b[5]||(b[5]=e("span",{class:"h-2 w-2 rounded-full bg-red-500"},null,-1)),Z(" "+d(B.value)+" missing ",1)])])):Y("",!0)]))}},Ra={class:"space-y-3"},Da={class:"flex flex-wrap items-center gap-3"},Ua={class:"flex rounded-lg border border-slate-200 p-0.5 dark:border-slate-600"},Ha=["onClick"],Aa={class:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor","stroke-width":"1.5"},Fa={key:0,x:"2",y:"5",width:"16",height:"10"},Na={key:1,x:"2",y:"5",width:"16",height:"10",rx:"3"},Oa={key:2,cx:"10",cy:"10",rx:"7",ry:"7"},Ya={class:"flex items-center gap-1"},Wa={class:"w-10 text-center text-xs tabular-nums text-slate-500 dark:text-slate-400"},Xa={class:"overflow-hidden rounded-lg border border-slate-200 bg-slate-900 dark:border-slate-700"},qa={class:"flex items-center justify-between"},Ka={class:"flex gap-2"},xe=560,we=380,Ge=8,He=40,Ga={__name:"MastheadEditor",props:{src:{type:String,required:!0},initialState:{type:Object,default:null}},emits:["save","cancel"],setup(R,{emit:te}){const g=R,z=te,B=k(null),v=k("rounded"),M=k(1),b=k(0),w=k(0),A=k(0),X=k(0),F=k(0),N=k(0);let O=!1,y="pan",T=0,j=0,C=0,G=0,K=0,se=0,q=0,P=0,n=1,S=null;const Q=[{id:"square",label:"Square"},{id:"rounded",label:"Rounded"},{id:"circle",label:"Circle"}],fe=k(""),ge=ee(()=>{if(O&&y!=="pan")return"cursor-crosshair";switch(fe.value){case"resize-tl":case"resize-br":return"cursor-nwse-resize";case"resize-tr":case"resize-bl":return"cursor-nesw-resize";case"resize-t":case"resize-b":return"cursor-ns-resize";case"resize-l":case"resize-r":return"cursor-ew-resize";default:return"cursor-grab active:cursor-grabbing"}});function $e(){if(v.value==="circle"){const l=Math.min(xe,we)-60;A.value=(xe-l)/2,X.value=(we-l)/2,F.value=l,N.value=l}else{const l=xe-40,a=Math.round(we*.55);A.value=(xe-l)/2,X.value=(we-a)/2,F.value=l,N.value=a}}function h(l){return l?(v.value=l.shape||"rounded",M.value=l.zoom||1,b.value=l.panX||0,w.value=l.panY||0,A.value=l.cropX??0,X.value=l.cropY??0,F.value=l.cropW??0,N.value=l.cropH??0,!0):!1}function o(){return{x:A.value,y:X.value,w:F.value,h:N.value}}function I(){const l=B.value;if(!l||!S)return;const a=l.getContext("2d");a.clearRect(0,0,xe,we);const i=S.width*M.value,f=S.height*M.value,$=(xe-i)/2+b.value,E=(we-f)/2+w.value;a.globalAlpha=.2,a.drawImage(S,$,E,i,f),a.globalAlpha=1;const x=o();if(a.save(),a.beginPath(),ve(a,x),a.clip(),a.drawImage(S,$,E,i,f),a.restore(),a.beginPath(),ve(a,x),a.strokeStyle="rgba(255,255,255,0.6)",a.lineWidth=2,a.setLineDash([6,4]),a.stroke(),a.setLineDash([]),v.value!=="circle"){const V=Ge;a.fillStyle="rgba(255,255,255,0.9)",a.strokeStyle="rgba(59,130,246,0.8)",a.lineWidth=1.5;for(const[de,oe]of[[x.x,x.y],[x.x+x.w,x.y],[x.x,x.y+x.h],[x.x+x.w,x.y+x.h]])a.fillRect(de-V/2,oe-V/2,V,V),a.strokeRect(de-V/2,oe-V/2,V,V);for(const[de,oe]of[[x.x+x.w/2,x.y],[x.x+x.w/2,x.y+x.h],[x.x,x.y+x.h/2],[x.x+x.w,x.y+x.h/2]])a.fillRect(de-V/2,oe-V/2,V,V),a.strokeRect(de-V/2,oe-V/2,V,V)}else{const V=Ge,de=x.x+x.w/2,oe=x.y+x.h/2,Me=x.w/2;a.fillStyle="rgba(255,255,255,0.9)",a.strokeStyle="rgba(59,130,246,0.8)",a.lineWidth=1.5;for(const[De,Ue]of[[de,oe-Me],[de,oe+Me],[de-Me,oe],[de+Me,oe]])a.fillRect(De-V/2,Ue-V/2,V,V),a.strokeRect(De-V/2,Ue-V/2,V,V)}}function ve(l,a){v.value==="circle"?l.ellipse(a.x+a.w/2,a.y+a.h/2,a.w/2,a.h/2,0,0,Math.PI*2):v.value==="rounded"?Pe(l,a.x,a.y,a.w,a.h,16):l.rect(a.x,a.y,a.w,a.h)}function Pe(l,a,i,f,$,E){l.moveTo(a+E,i),l.lineTo(a+f-E,i),l.quadraticCurveTo(a+f,i,a+f,i+E),l.lineTo(a+f,i+$-E),l.quadraticCurveTo(a+f,i+$,a+f-E,i+$),l.lineTo(a+E,i+$),l.quadraticCurveTo(a,i+$,a,i+$-E),l.lineTo(a,i+E),l.quadraticCurveTo(a,i,a+E,i),l.closePath()}function _e(l,a){const i=o(),f=Ge+4;if(v.value==="circle"){const $=i.x+i.w/2,E=i.y+i.h/2,x=i.w/2;return Math.abs(l-$)<f&&Math.abs(a-(E-x))<f?"resize-t":Math.abs(l-$)<f&&Math.abs(a-(E+x))<f?"resize-b":Math.abs(l-($-x))<f&&Math.abs(a-E)<f?"resize-l":Math.abs(l-($+x))<f&&Math.abs(a-E)<f?"resize-r":""}return Math.abs(l-i.x)<f&&Math.abs(a-i.y)<f?"resize-tl":Math.abs(l-(i.x+i.w))<f&&Math.abs(a-i.y)<f?"resize-tr":Math.abs(l-i.x)<f&&Math.abs(a-(i.y+i.h))<f?"resize-bl":Math.abs(l-(i.x+i.w))<f&&Math.abs(a-(i.y+i.h))<f?"resize-br":Math.abs(l-(i.x+i.w/2))<f&&Math.abs(a-i.y)<f?"resize-t":Math.abs(l-(i.x+i.w/2))<f&&Math.abs(a-(i.y+i.h))<f?"resize-b":Math.abs(l-i.x)<f&&Math.abs(a-(i.y+i.h/2))<f?"resize-l":Math.abs(l-(i.x+i.w))<f&&Math.abs(a-(i.y+i.h/2))<f?"resize-r":""}function Le(l){v.value=l,$e(),me(),I()}function je(){M.value=Math.min(M.value*1.15,5),I()}function Xe(){M.value=Math.max(M.value/1.15,.1),I()}function Re(l){const a=l.deltaY>0?.9433962264150942:1.06;M.value=Math.max(.1,Math.min(5,M.value*a)),I()}function Ie(){b.value=0,w.value=0,$e(),me(),I()}function me(){if(!S)return;const l=o(),a=l.w/S.width,i=l.h/S.height;M.value=Math.max(a,i)}function re(){if(!B.value)return;const l=B.value.getBoundingClientRect();n=l.width>0?xe/l.width:1}function Ae(l){re();const a=B.value.getBoundingClientRect();return{x:(l.clientX-a.left)*n,y:(l.clientY-a.top)*n}}function qe(l){re();const{x:a,y:i}=Ae(l),f=_e(a,i);if(f){O=!0,y=f,T=l.clientX,j=l.clientY,K=A.value,se=X.value,q=F.value,P=N.value;return}O=!0,y="pan",T=l.clientX,j=l.clientY,C=b.value,G=w.value}function ye(l){re();const{x:a,y:i}=Ae(l);
2if(!O){fe.value=_e(a,i);return}const f=(l.clientX-T)*n,$=(l.clientY-j)*n;y==="pan"?(b.value=C+f,w.value=G+$):le(f,$),I()}function le(l,a){const i=v.value==="circle";let f=K,$=se,E=q,x=P;switch(y){case"resize-tl":f=K+l,$=se+a,E=q-l,x=P-a;break;case"resize-tr":$=se+a,E=q+l,x=P-a;break;case"resize-bl":f=K+l,E=q-l,x=P+a;break;case"resize-br":E=q+l,x=P+a;break;case"resize-t":$=se+a,x=P-a;break;case"resize-b":x=P+a;break;case"resize-l":f=K+l,E=q-l;break;case"resize-r":E=q+l;break}if(E<He&&(E=He,y.includes("l")&&(f=K+q-He)),x<He&&(x=He,y.includes("t")&&($=se+P-He)),f<0&&(E+=f,f=0),$<0&&(x+=$,$=0),f+E>xe&&(E=xe-f),$+x>we&&(x=we-$),i){const V=Math.min(E,x);y.includes("l")&&(f=K+q-V),y.includes("t")&&($=se+P-V),E=V,x=V}A.value=f,X.value=$,F.value=E,N.value=x}function ie(){O=!1,y="pan"}function Se(l){if(l.touches.length===1){re();const a=B.value.getBoundingClientRect(),i=(l.touches[0].clientX-a.left)*n,f=(l.touches[0].clientY-a.top)*n,$=_e(i,f);O=!0,T=l.touches[0].clientX,j=l.touches[0].clientY,$?(y=$,K=A.value,se=X.value,q=F.value,P=N.value):(y="pan",C=b.value,G=w.value)}}function Ve(l){if(!O||l.touches.length!==1)return;const a=(l.touches[0].clientX-T)*n,i=(l.touches[0].clientY-j)*n;y==="pan"?(b.value=C+a,w.value=G+i):le(a,i),I()}function be(){if(!S)return;const l=o();if(l.w<1||l.h<1)return;const a=2,i=Math.round(l.w*a),f=Math.round(l.h*a),$=document.createElement("canvas");$.width=i,$.height=f;const E=$.getContext("2d"),x=S.width*M.value,V=S.height*M.value,de=(xe-x)/2+b.value,oe=(we-V)/2+w.value,Me=(de-l.x)*a,De=(oe-l.y)*a;E.drawImage(S,Me,De,x*a,V*a);const Ue=$.toDataURL("image/jpeg",.8);z("save",{imageData:Ue,shape:v.value,editorState:{shape:v.value,zoom:M.value,panX:b.value,panY:w.value,cropX:A.value,cropY:X.value,cropW:F.value,cropH:N.value}})}return We(async()=>{await Oe();const l=h(g.initialState);l||$e(),S=new Image,S.onload=()=>{l||me(),I()},S.src=g.src}),(l,a)=>(u(),p("div",Ra,[e("div",Da,[e("div",Ua,[(u(),p(ce,null,pe(Q,i=>e("button",{key:i.id,type:"button",class:W(["flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition",v.value===i.id?"bg-primary text-white shadow-sm":"text-slate-500 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-700"]),onClick:f=>Le(i.id)},[(u(),p("svg",Aa,[i.id==="square"?(u(),p("rect",Fa)):i.id==="rounded"?(u(),p("rect",Na)):(u(),p("ellipse",Oa))])),Z(" "+d(i.label),1)],10,Ha)),64))]),a[3]||(a[3]=e("div",{class:"h-4 w-px bg-slate-200 dark:bg-slate-600"},null,-1)),e("div",Ya,[e("button",{type:"button",class:"rounded-md border border-slate-200 p-1.5 text-slate-500 transition hover:bg-slate-100 dark:border-slate-600 dark:text-slate-400 dark:hover:bg-slate-700",onClick:Xe},[...a[1]||(a[1]=[e("svg",{class:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[e("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)])]),e("span",Wa,d(Math.round(M.value*100))+"%",1),e("button",{type:"button",class:"rounded-md border border-slate-200 p-1.5 text-slate-500 transition hover:bg-slate-100 dark:border-slate-600 dark:text-slate-400 dark:hover:bg-slate-700",onClick:je},[...a[2]||(a[2]=[e("svg",{class:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[e("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)])])]),a[4]||(a[4]=Ze('<div class="h-4 w-px bg-slate-200 dark:bg-slate-600"></div><span class="flex items-center gap-1 text-[11px] text-slate-400"><svg class="h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M18 11V6a2 2 0 00-4 0v5"></path><path d="M14 10V4a2 2 0 00-4 0v6"></path><path d="M10 10.5V5a2 2 0 00-4 0v9"></path><path d="M18 11a2 2 0 014 0v3a8 8 0 01-8 8h-2c-2.5 0-3.5-.5-5-2l-3.5-3.5a2 2 0 013-3L6 14"></path></svg> Drag to reposition · Drag handles to resize </span>',2))]),e("div",Xa,[e("canvas",{ref_key:"canvasEl",ref:B,width:xe,height:we,class:W(["block w-full select-none",ge.value]),style:{"max-width":"560px"},onMousedown:qe,onMousemove:ye,onMouseup:ie,onMouseleave:ie,onWheel:ke(Re,["prevent"]),onTouchstart:ke(Se,["prevent"]),onTouchmove:ke(Ve,["prevent"]),onTouchend:ie},null,34)]),e("div",qa,[e("button",{type:"button",class:"text-xs text-slate-400 transition hover:text-slate-600 dar
2k:hover:text-slate-300",onClick:Ie}," Reset position "),e("div",Ka,[e("button",{type:"button",class:"rounded-lg border border-slate-200 px-3 py-1.5 text-xs font-medium text-slate-600 transition hover:bg-slate-100 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-700",onClick:a[0]||(a[0]=i=>l.$emit("cancel"))}," Cancel "),e("button",{type:"button",class:"rounded-lg bg-primary px-4 py-1.5 text-xs font-medium text-white shadow-sm transition hover:bg-primary/90",onClick:be}," Save Crop ")])])]))}},Qa={class:"flex flex-wrap items-center gap-0.5 rounded-t-lg border border-b-0 border-slate-300 bg-slate-50 px-2 py-1.5 dark:border-slate-600 dark:bg-slate-800/80"},Ja={class:"toolbar-btn relative",title:"Text color"},Za={class:"toolbar-btn relative",title:"Highlight color"},el=50,tl={__name:"RichTextEditor",props:{modelValue:{type:String,default:""},minHeight:{type:String,default:"80px"},maxHeight:{type:String,default:"300px"}},emits:["update:modelValue"],setup(R,{emit:te}){const g=R,z=te,B=k(null),v=k("#000000"),M=k("#ffff00"),b=k([]),w=k([]);let A=null,X="",F=!1;const N=ee(()=>b.value.length>0),O=ee(()=>w.value.length>0);function y(){if(!B.value)return;const h=B.value.innerHTML;h!==X&&(b.value.push(X),b.value.length>el&&b.value.shift(),w.value=[],X=h)}function T(){clearTimeout(A),A=setTimeout(y,400)}function j(){if(b.value.length===0||!B.value)return;w.value.push(B.value.innerHTML);const h=b.value.pop();X=h,B.value.innerHTML=h,G(),K()}function C(){if(w.value.length===0||!B.value)return;b.value.push(B.value.innerHTML);const h=w.value.pop();X=h,B.value.innerHTML=h,G(),K()}function G(){if(!B.value)return;B.value.focus();const h=window.getSelection();h.selectAllChildren(B.value),h.collapseToEnd()}function K(){B.value&&(F=!0,z("update:modelValue",B.value.innerHTML),Oe(()=>{F=!1}))}function se(){K(),T()}function q(h){h.preventDefault();const o=h.clipboardData.getData("text/html"),I=h.clipboardData.getData("text/plain");if(o){const ve=jt(o);document.execCommand("insertHTML",!1,ve)}else document.execCommand("insertText",!1,I)}function P(h,o=null){B.value&&B.value.focus(),y(),document.execCommand(h,!1,o),se()}function n(h){h&&P("fontName",h)}function S(h){h&&P("fontSize",h)}function Q(h){!B.value||!B.value.contains(document.activeElement)&&document.activeElement!==B.value||((h.ctrlKey||h.metaKey)&&!h.shiftKey&&h.key==="z"?(h.preventDefault(),j()):(h.ctrlKey||h.metaKey)&&(h.key==="y"||h.shiftKey&&h.key==="z"||h.shiftKey&&h.key==="Z")&&(h.preventDefault(),C()))}function fe(h){if(/<[a-z][\s\S]*>/i.test(h))return ge(h);const o=document.createElement("div"),I=h.split(` 3`).map(ve=>ve.trim()?(o.textContent=ve,`<p>${o.innerHTML}</p>`):"<p><br></p>").join("");return ge(I)}function ge(h){return h.replace(/\[([^\]]{1,60})\]/g,'<span class="placeholder-token" contenteditable="true" title="Click to edit">[$1]</span>')}function $e(h){if(!B.value)return;const o=fe(h||"");B.value.innerHTML=o,X=o,b.value=[],w.value=[]}return Ne(()=>g.modelValue,h=>{F||B.value&&B.value.innerHTML!==fe(h||"")&&$e(h)}),We(async()=>{if(document.addEventListener("keydown",Q),await Oe(),$e(g.modelValue),B.value){const h=B.value.innerHTML;h&&h!==g.modelValue&&(F=!0,z("update:modelValue",h),Oe(()=>{F=!1}))}}),ut(()=>{document.removeEventListener("keydown",Q),clearTimeout(A)}),(h,o)=>(u(),p("div",null,[e("div",Qa,[e("select",{class:"h-7 rounded border border-slate-200 bg-white px-1.5 text-[11px] text-slate-700 focus:border-primary focus:outline-none dark:border-slate-600 dark:bg-slate-700 dark:text-slate-200",onChange:o[0]||(o[0]=I=>{n(I.target.value),I.target.value=""})},[...o[19]||(o[19]=[Ze('<option value="" disabled selected data-v-b5162038>Font</option><option value="Arial, sans-serif" data-v-b5162038>Sans-serif</option><option value="Georgia, serif" data-v-b5162038>Serif</option><option value="Courier New, monospace" data-v-b5162038>Monospace</option><option value="Verdana, sans-serif" data-v-b5162038>Verdana</option><option value="Trebuchet MS, sans-serif" data-v-b5162038>Trebuchet</option>',6)])],32),e("select",{class:"h-7 rounded border border-slate-200 bg-white px-1.5 text-[11px] text-slate-700 focus:border-primary focus:outline-none dark:border-slate-600 dar
3k:bg-slate-700 dark:text-slate-200",onChange:o[1]||(o[1]=I=>{S(I.target.value),I.target.value=""})},[...o[20]||(o[20]=[Ze('<option value="" disabled selected data-v-b5162038>Size</option><option value="1" data-v-b5162038>Small</option><option value="3" data-v-b5162038>Normal</option><option value="4" data-v-b5162038>Medium</option><option value="5" data-v-b5162038>Large</option><option value="6" data-v-b5162038>X-Large</option>',6)])],32),o[37]||(o[37]=e("span",{class:"mx-1 h-5 w-px bg-slate-300 dark:bg-slate-600"},null,-1)),e("button",{type:"button",class:"toolbar-btn",title:"Bold",onClick:o[2]||(o[2]=I=>P("bold"))},[...o[21]||(o[21]=[e("span",{class:"font-bold text-xs"},"B",-1)])]),e("button",{type:"button",class:"toolbar-btn",title:"Italic",onClick:o[3]||(o[3]=I=>P("italic"))},[...o[22]||(o[22]=[e("span",{class:"italic text-xs"},"I",-1)])]),e("button",{type:"button",class:"toolbar-btn",title:"Underline",onClick:o[4]||(o[4]=I=>P("underline"))},[...o[23]||(o[23]=[e("span",{class:"underline text-xs"},"U",-1)])]),e("button",{type:"button",class:"toolbar-btn",title:"Strikethrough",onClick:o[5]||(o[5]=I=>P("strikeThrough"))},[...o[24]||(o[24]=[e("span",{class:"line-through text-xs"},"S",-1)])]),o[38]||(o[38]=e("span",{class:"mx-1 h-5 w-px bg-slate-300 dark:bg-slate-600"},null,-1)),e("button",{type:"button",class:"toolbar-btn",title:"Heading 1",onClick:o[6]||(o[6]=I=>P("formatBlock","<h2>"))},[...o[25]||(o[25]=[e("span",{class:"text-[10px] font-bold"},"H1",-1)])]),e("button",{type:"button",class:"toolbar-btn",title:"Heading 2",onClick:o[7]||(o[7]=I=>P("formatBlock","<h3>"))},[...o[26]||(o[26]=[e("span",{class:"text-[10px] font-bold"},"H2",-1)])]),e("button",{type:"button",class:"toolbar-btn",title:"Normal text",onClick:o[8]||(o[8]=I=>P("formatBlock","<p>"))},[...o[27]||(o[27]=[e("span",{class:"text-[10px]"},"P",-1)])]),o[39]||(o[39]=e("span",{class:"mx-1 h-5 w-px bg-slate-300 dark:bg-slate-600"},null,-1)),e("button",{type:"button",class:"toolbar-btn",title:"Bullet list",onClick:o[9]||(o[9]=I=>P("insertUnorderedList"))},[...o[28]||(o[28]=[e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round",d:"M4 6h.01M4 12h.01M4 18h.01M8 6h12M8 12h12M8 18h12"})],-1)])]),e("button",{type:"button",class:"toolbar-btn",title:"Numbered list",onClick:o[10]||(o[10]=I=>P("insertOrderedList"))},[...o[29]||(o[29]=[e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round",d:"M4 6h.01M4 12h.01M4 18h.01M8 6h12M8 12h12M8 18h12"}),e("text",{x:"2",y:"7","font-size":"5",fill:"currentColor",stroke:"none"},"1")],-1)])]),o[40]||(o[40]=e("span",{class:"mx-1 h-5 w-px bg-slate-300 dark:bg-slate-600"},null,-1)),e("button",{type:"button",class:"toolbar-btn",title:"Align left",onClick:o[11]||(o[11]=I=>P("justifyLeft"))},[...o[30]||(o[30]=[e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round",d:"M3 6h18M3 12h12M3 18h18"})],-1)])]),e("button",{type:"button",class:"toolbar-btn",title:"Align center",onClick:o[12]||(o[12]=I=>P("justifyCenter"))},[...o[31]||(o[31]=[e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round",d:"M3 6h18M6 12h12M3 18h18"})],-1)])]),e("button",{type:"button",class:"toolbar-btn",title:"Align right",onClick:o[13]||(o[13]=I=>P("justifyRight"))},[...o[32]||(o[32]=[e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round",d:"M3 6h18M9 12h12M3 18h18"})],-1)])]),o[41]||(o[41]=e("span",{class:"mx-1 h-5 w-px bg-slate-300 dark:bg-slate-600"},null,-1)),e("label",Ja,[e("span",{class:"text-xs font-bold",style:H({color:v.value})},"A",4),Ce(e("input",{type:"color","onUpdate:modelValue":o[14]||(o[14]=I=>v.value=I),class:"absolute inset-0 h-full w-full cursor-pointer opacity-0",onInput:o[15]||(o[15]=I=>P("foreColor",v.value))},null,544),[[Be,v.value]])]),e("label",Za,[o[33]||(o[33]=e("svg",{class:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})],-1)),Ce(e("input",{type:"color","onUpdate:modelValue":o[16]||(o[16]=I=>M.value=I),class:"absolute inset-0 h-full w-full cursor-pointer opacity-0",onInput:o[17]||(o[17]=I=>P("hiliteColor",M.value))},null,544),[[Be,M.value]])]),o[42]||(o[42]=e("span",{class:"mx-1 h-5 w-px bg-slate-300 dark:bg-slate-600"},null,-1)),e("button",{type:"button",class:"toolbar-btn",title:"Clear formatting",onClick:o[18]||(o[18]=I=>P("removeFormat"))},[...o[34]||(o[34]=[e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])]),e("button",{type:"button",class:W(["toolbar-btn",{"opacity-30 pointer-events-none":!N.value}]),title:"Undo",onClick:j},[...o[35]||(o[35]=[e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 10h10a5 5 0 015 5v2M3 10l4-4M3 10l4 4"})],-1)])],2),e("button",{type:"button",class:W(["toolbar-btn",{"opacity-30 pointer-events-none":!O.value}]),title:"Redo",onClick:C},[...o[36]||(o[36]=[e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 10H11a5 5 0 00-5 5v2M21 10l-4-4M21 10l-4 4"})],-1)])],2)]),e("div",{ref_key:"editorEl",ref:B,contenteditable:"true",class:"overflow-y-auto rounded-b-lg border border-slate-300 bg-white px-3 py-2 text-sm text-slate-800 transition focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary dark:border-slate-600 dar
3k:bg-slate-800 dark:text-slate-100",style:H({minHeight:R.minHeight,maxHeight:R.maxHeight}),onInput:se,onPaste:q},null,36)]))}},Qe=et(tl,[["__scopeId","data-v-b5162038"]]),al={key:0,class:"rounded-xl border border-slate-200/70 bg-white p-5 dark:border-slate-800 dark:bg-slate-900/60"},ll={class:"flex items-center justify-between mb-4"},ol={class:"rounded-full bg-slate-100 px-2 py-0.5 text-[10px] font-bold text-slate-500 dark:bg-slate-800 dark:text-slate-400"},sl={class:"space-y-3"},rl={class:"flex items-start gap-3"},nl={class:"min-w-0 flex-1"},il={class:"flex items-center gap-2"},dl={class:"mt-1 text-[11px] leading-relaxed text-slate-600 dark:text-slate-400"},ul=["onClick"],it={__name:"RecommendationsCard",props:{items:{type:Array,default:()=>[]}},emits:["action"],setup(R){const te={critical:{bg:"bg-red-50 border-red-200 dark:bg-red-950/20 dark:border-red-800/50",dot:"bg-red-500",label:"text-red-700 dark:text-red-400",badge:"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300",badgeText:"Critical"},important:{bg:"bg-amber-50 border-amber-200 dark:bg-amber-950/20 dark:border-amber-800/50",dot:"bg-amber-500",label:"text-amber-700 dark:text-amber-400",badge:"bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-300",badgeText:"Important"},suggestion:{bg:"bg-blue-50 border-blue-200 dark:bg-blue-950/20 dark:border-blue-800/50",dot:"bg-blue-500",label:"text-blue-700 dark:text-blue-400",badge:"bg-blue-100 text-blue-700 dark:bg-blue-900/40 dark:text-blue-300",badgeText:"Tip"}};function g(z){return te[z]||te.suggestion}return(z,B)=>R.items.length>0?(u(),p("div",al,[e("div",ll,[B[0]||(B[0]=e("h3",{class:"flex items-center gap-2 text-sm font-semibold text-slate-900 dark:text-white"},[e("svg",{class:"h-4 w-4 text-primary",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[e("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})]),Z(" Recommendations ")],-1)),e("span",ol,d(R.items.length)+" "+d(R.items.length===1?"item":"items"),1)]),e("div",sl,[(u(!0),p(ce,null,pe(R.items,v=>(u(),p("div",{key:v.id,class:W(["rounded-lg border p-3",g(v.priority).bg])},[e("div",rl,[e("div",{class:W(["mt-1 h-2 w-2 shrink-0 rounded-full",g(v.priority).dot])},null,2),e("div",nl,[e("div",il,[e("span",{class:W(["text-xs font-semibold",g(v.priority).label])},d(v.title),3),e("span",{class:W(["rounded-full px-1.5 py-0.5 text-[9px] font-bold uppercase",g(v.priority).badge])},d(g(v.priority).badgeText),3)]),e("p",dl,d(v.description),1),v.actionLabel?(u(),p("button",{key:0,type:"button",class:"mt-2 inline-flex items-center gap-1 rounded-md bg-white/80 px-2 py-1 text-[10px] font-semibold text-primary shadow-sm transition hover:bg-white dark:bg-slate-800 dark:hover:bg-slate-700",onClick:M=>z.$emit("action",v)},[B[1]||(B[1]=e("svg",{class:"h-3 w-3",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[e("path",{d:"M5 12h14"}),e("path",{d:"M12 5l7 7-7 7"})],-1)),Z(" "+d(v.actionLabel),1)],8,ul)):Y("",!0)])])],2))),128))])])):Y("",!0)}},cl={class:"container-app py-8"},pl={class:"mb-6"},gl={class:"text-2xl font-bold text-slate-900 dark:text-white"},vl={key:0,class:"space-y-6"},fl={class:"mb-2 block text-sm font-medium text-slate-700 dark:text-slate-300"},bl={value:""},ml=["value"],hl={class:"grid gap-4 sm:grid-cols-2"},xl={class:"mb-1 block text-sm font-medium text-slate-700 dark:text-slate-300"},kl={class:"mb-1 block text-sm font-medium text-slate-700 dark:text-slate-300"},yl={class:"mb-1 block text-sm font-medium text-slate-700 dark:text-slate-300"},wl=["placeholder"],Cl={class:"mt-1 text-xs text-slate-400"},Sl={key:0,class:"flex items-center gap-3 rounded-lg border border-blue-200 bg-blue-50 p-4 text-sm text-blue-700 dark:border-blue-800 dark:bg-blue-900/20 dark:text-blue-300"},Ml={class:"flex flex-wrap items-center justify-between gap-3"},Bl={key:0,class:"text-xs text-slate-400 dark:text-slate-500"},$l={key:1},Pl={class:"flex gap-3"},_l=["disabled"],Tl=["disabled"],Ll={key:0,class:"h-4 w-4 animate-spin",viewBox:"0 0 24 24",fill:"none"},Il={key:1,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},Vl={key:1,class:"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-800 dark:bg-red-900/20 dark:text-red-300"},zl={key:2,class:"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-800 dark:bg-red-900/20 dark:text-red-300"},El={key:1,class:"space-y-6"},jl={key:0,class:"overflow-hidden rounded-xl border border-slate-200 dark:border-slate-700 h-[calc(100vh-180px)]"},Rl={key:1,class:"space-y-6"},Dl={class:"grid gap-6 lg:grid-cols-3"},Ul={class:"space-y-6 lg:col-span-2"},Hl={class:"mb-1 block text-sm font-medium text-slate-700 dark:text-slate-300"},Al={id:"masthead-section"},Fl={class:"mb-1 block text-sm font-medium text-slate-700 dark:text-slate-300"},Nl={key:1,class:"relative mb-2 group"},Ol=["src"],Yl={class:"absolute bottom-2 left-2 rounded bg-black/50 px-2 py-0.5 text-[10px] text-white"},Wl={class:"text-xs text-slate-400"},Xl={class:"mb-1 block text-sm font-medium text-slate-700 dark:text-slate-300"},ql={class:"mb-1 block text-sm font-medium text-slate-700 dark:text-slate-300"},Kl={key:0},Gl={class:"mb-2 block text-sm font-medium text-slate-700 dark:text-slate-300"},Ql={class:"space-y-3"},Jl={class:"mb-1 text-xs font-semibold text-primary"},Zl={class:"mt-1 text-[10px] text-slate-400"},eo={key:1},to={class:"mb-2 block text-sm font-medium text-slate-700 dark:text-slate-300"},ao={class:"space-y-4"},lo={id:"sections-panel"},oo={key:0,id:"notifications-panel",class:"rounded-xl border border-slate-200/70 bg-white p-4 dark:border-slate-800 dark:bg-slate-900/60"},so={class:"flex items-center justify-between"},ro={class:"mt-1.5 text-[11px] text-slate-400 dark:text-slate-500"},no={key:0,class:"mt-3"},io={key:1,class:"rounded-xl border border-slate-200/70 bg-white p-4 dark:border-slate-800 dark:bg-slate-900/60"},uo={class:"mb-2 block text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400"},co={class:"flex flex-wrap gap-1.5"},po=["onClick"],go={key:0,class:"h-2 w-2 text-white",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3"},vo={key:0,class:"mt-1.5 text-[10px] text-primary"},fo={key:3,class:"rounded-xl border border-slate-200/70 bg-white p-4 text-center dark:border-slate-800 dark:bg-slate-900/60"},bo={class:"text-xs text-slate-500 dark:text-slate-400"},mo={class:"border-t border-slate-200 pt-6 dark:border-slate-800"},ho={class:"flex flex-wrap items-end gap-4"},xo={class:"flex-1"},ko={class:"mb-1 block text-sm font-medium text-slate-700 dark:text-slate-300"},yo={class:"flex items-center gap-1 text-sm text-slate-400"},wo={class:"mt-1 text-[10px] text-slate-400"},Co={class:"flex gap-2"},So=["disabled"],Mo=["disabled"],Bo={key:0,class:"h-4 w-4 animate-spin",viewBox:"0 0 24 24",fill:"none"},$o={key:3,class:"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-800 dark:bg-red-900/20 dark:text-red-300"},Po={class:"w-full max-w-md rounded-2xl border border-slate-200 bg-white p-6 shadow-2xl dark:border-slate-700 dark:bg-slate-900"},_o={class:"flex items-start gap-4"},To={class:"text-base font-semibold text-slate-900 dark:text-white"},Lo={class:"mt-1 text-sm text-slate-500 dark:text-slate-400"},Io={class:"mt-6 flex justify-end gap-3"},Vo={class:"w-full max-w-lg rounded-2xl border border-slate-200 bg-white shadow-2xl dark:border-slate-700 dark:bg-slate-900"},zo={class:"border-b border-slate-200 px-6 py-4 dark:border-slate-700"},Eo={class:"mt-1 text-sm text-slate-500 dark:text-slate-400"},jo={class:"max-h-60 overflow-y-auto px-6 py-4 space-y-2"},Ro={class:"mt-0.5 text-[11px] text-slate-500 dark:text-slate-400"},Do={class:"flex items-center justify-end gap-3 border-t border-slate-200 px-6 py-4 dark:border-slate-700"},Uo={__name:"LandingPageBuilderView",setup(R){var st;const te=Vt(()=>nt(()=>import("./GrapesEditor-Cbb3x-1C.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),{t:g}
3=wt(),z=Lt(),B=zt(),v=Ct(),M=St(),b=Mt(),w=Bt(),A=dt();Et();const X=$t(),F=Pt(),N=ee(()=>!!z.params.id),O=ee(()=>window.location.origin),y=k(""),T=k(""),j=k(""),C=k(""),G=k("classic"),K=k(!0),se=k(!1),q=k(null),P=k(null),n=k(null),S=k({hero:!0,coverLetter:!0,experience:!0,skills:!0,pdf:!0,contact:!1,feedback:!1}),Q=k(""),fe=k(!1),ge=k(null),$e=k(!1),h=k([]),o=k(!1);function I(){o.value=!0}const ve=k(!1),Pe=k(null),_e=k(!1),Le=k(!1),je=ee(()=>oe.value.filter(r=>r.priority==="critical"||r.priority==="important"));function Xe(){je.value.length>0?Le.value=!0:Ke(!0)}const Re=k(!1),Ie=k(null),me=k("en"),re=k(new Set(["en"]));function Ae(r){const t=new Set(re.value);r!=="en"&&(t.has(r)?t.delete(r):t.add(r),re.value=t,me.value=[...t][0]||"en")}const qe=[{code:"en",flag:"ðºð¸",label:"English"},{code:"es",flag:"ðªð¸",label:"Español"},{code:"fr",flag:"ð«ð·",label:"Français"},{code:"it",flag:"ð®ð¹",label:"Italiano"},{code:"hi",flag:"ð®ð³",label:"हिनà¥à¤¦à¥"},{code:"ar",flag:"ð¸ð¦",label:"Ø§ÙØ¹Ø±Ø¨ÙØ©"},{code:"ja",flag:"ð¯ðµ",label:"æ¥æ¬èª"},{code:"ko",flag:"ð°ð·",label:"íêµì´"},{code:"zh",flag:"ð¨ð³",label:"䏿"}],ye=k("#14b8a6"),le=k(A.hasFeature("emailNotifications")),ie=k(((st=w.profile)==null?void 0:st.notifyEmail)||""),Se=k(z.query.appId||null),Ve=k(!1),be=k(null),l=k(null),a=k(!1),i=k("rounded"),f=k(""),$=k(null),E=ee(()=>y.value&&C.value.trim().length>=20),x=ee(()=>{var t;const r=((t=n.value)==null?void 0:t.matchScore)||0;return r>=80?"text-emerald-600 dark:text-emerald-400":r>=60?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400"}),V=["submitting","queued","analyzing","matching","writing","generating","complete"],de=ee(()=>{const r=v.generationStep||"",t=V.indexOf(r);return[{key:"analyzing",label:g("landingPages.stepAnalyzing"),done:t>V.indexOf("analyzing"),active:r==="analyzing"},{key:"matching",label:g("landingPages.stepMatching"),done:t>V.indexOf("matching"),active:r==="matching"},{key:"writing",label:g("landingPages.stepWriting"),done:t>V.indexOf("writing"),active:r==="writing"},{key:"generating",label:g("landingPages.stepAssembling"),done:t>V.indexOf("generating"),active:r==="generating"}]}),oe=ee(()=>{var D,U,_;const r=n.value;if(!r)return[];const t=[],c=(r.skillMatches||[]).filter(s=>s.status==="missing");for(const s of c)t.push({id:`missing-skill-${s.skill}`,priority:"critical",title:`Missing skill: ${s.skill}`,description:`${s.evidence||"This skill is required by the job posting but not found in your CV."} Consider adding relevant experience or certifications to your CV blocks.`});if(r.matchScore!=null&&r.matchScore<50&&t.push({id:"low-match",priority:"important",title:`Low match score (${r.matchScore}%)`,description:"Your CV has limited overlap with this role's requirements. Consider adding more relevant experience blocks or tailoring your existing blocks before publishing."}),be.value||t.push({id:"no-masthead",priority:"important",title:"Add a masthead image",description:"Pages with a professional photo or banner image get significantly more engagement from recruiters. Upload one in the Masthead Image section above.",actionLabel:"Scroll to upload",actionType:"scroll-masthead"}),(!r.coverLetter||r.coverLetter.trim().length<50)&&t.push({id:"no-cover-letter",priority:"important",title:"Add a cover letter",description:"A tailored cover letter strengthens your application. Use the AI refinement panel to generate or improve one."}),r.coverLetter){const ne=(r.coverLetter.match(/\[[^\]]{1,60}\]/g)||[]).filter(J=>/\[(Your|Company|City|State|Zip|Email|Phone|Address|Date)\b/i.test(J));ne.length>0&&t.push({id:"cover-letter-placeholders",priority:"important",title:`${ne.length} placeholder${ne.length>1?"s":""} to fill in`,description:`Your cover letter contains ${ne.map(J=>J).join(", ")} â fill these in with your actual details before publishing.`})}(!r.pitch||r.pitch.trim().length<100)&&t.push({id:"short-pitch",priority:"important",title:"Expand your pitch",description:"Your pitch is brief. Aim for 2-3 sentences that connect your experience directly to this role's key requirements."});const L=(r.skillMatches||[]).filter(s=>s.status==="partial");if(L.length>0){const s=L.map(ne=>ne.skill).join(", ");t.push({id:"partial-skills",priority:"suggestion",title:`Strengthen partial matches: ${s}`,description:`You have related experience for ${L.length===1?"this skill":"these skills"} but it's not a direct match. Consider rewording your CV blocks to explicitly mention ${s}.`})}return(D=S.value)!=null&&D.contact||t.push({id:"no-contact",priority:"suggestion",title:"Enable Contact Info section",description:"Let recruiters reach you directly from the landing page. Toggle it on in the Sections panel.",actionLabel:"Toggle sections",actionType:"scroll-sections"}
3),le.value&&!((U=ie.value)!=null&&U.trim())&&t.push({id:"no-notify-email",priority:"important",title:"Set notification email",description:"View notifications are enabled but no email is configured. Add your email so you get notified when someone views this page.",actionLabel:"Set email",actionType:"scroll-notifications"}),(_=S.value)!=null&&_.pdf||t.push({id:"no-pdf",priority:"suggestion",title:"Enable PDF Download",description:"Allow visitors to download your full CV. Toggle it on in the Sections panel.",actionLabel:"Toggle sections",actionType:"scroll-sections"}),t});function Me(r){var t,c,L;r.actionType==="scroll-masthead"?(t=document.getElementById("masthead-section"))==null||t.scrollIntoView({behavior:"smooth",block:"center"}):r.actionType==="scroll-sections"?(c=document.getElementById("sections-panel"))==null||c.scrollIntoView({behavior:"smooth",block:"center"}):r.actionType==="scroll-notifications"&&((L=document.getElementById("notifications-panel"))==null||L.scrollIntoView({behavior:"smooth",block:"center"}))}We(async()=>{var r;if(N.value)try{const t=await v.getPage(z.params.id);y.value=t.cvId,T.value=t.targetRole||"",j.value=t.targetCompany||"",C.value=t.jobDescription||"",G.value=t.layoutTemplate||"classic",Q.value=t.slug||"",S.value=t.sections||S.value,n.value={headline:t.headline,pitch:t.pitch,coverLetter:t.coverLetter,rewrittenBlocks:t.rewrittenBlocks,skillMatches:t.skillMatches,matchScore:t.matchScore};const c=localStorage.getItem(`tcv:lp-masthead:${z.params.id}`);c?(be.value=c,f.value=`${Math.round(c.length*.75/1024)} KB`):t.mastheadImage&&(be.value=t.mastheadImage,f.value=`${Math.round(t.mastheadImage.length*.75/1024)} KB`);const L=localStorage.getItem(`tcv:lp-masthead-raw:${z.params.id}`);L&&(l.value=L);try{const D=localStorage.getItem(`tcv:lp-masthead-state:${z.params.id}`);D&&($.value=JSON.parse(D))}catch{}t.mastheadShape&&(i.value=t.mastheadShape),t.accentColor&&(ye.value=t.accentColor),le.value=t.notifyEnabled||!1,ie.value=t.notifyEmail||((r=w.profile)==null?void 0:r.notifyEmail)||"",t.pageLanguage&&(me.value=t.pageLanguage,re.value=new Set([t.pageLanguage])),t.gjsProjectData?(P.value=t.gjsProjectData,K.value=!0):t.gjsHtml?K.value=!0:K.value=!1}catch(t){const c=v.pages.find(L=>L.pageId===z.params.id);c?(y.value=c.cvId||"",T.value=c.targetRole||"",j.value=c.targetCompany||"",G.value=c.layoutTemplate||"classic",Q.value=c.slug||"",c.headline&&(n.value={headline:c.headline,pitch:c.pitch||"",coverLetter:c.coverLetter||"",rewrittenBlocks:c.rewrittenBlocks||[],skillMatches:c.skillMatches||[],matchScore:c.matchScore||0}),c.pageLanguage&&(me.value=c.pageLanguage),c.accentColor&&(ye.value=c.accentColor),ge.value='This page needs to be re-saved. Click "Save Draft" or "Publish" to sync with the server.'):ge.value=t.message}else if(Se.value){const t=F.applications.find(c=>c.id===Se.value);t&&(T.value=t.jobTitle||"",j.value=t.company||"",C.value=t.jobDescription||"",M.activeCvs.length===1&&(y.value=M.activeCvs[0].id))}});function De(r){var L;const t=(L=r.target.files)==null?void 0:L[0];if(!t)return;if(t.size>5*1024*1024){ge.value="Image must be under 5MB.";return}const c=new FileReader;c.onload=()=>{l.value=c.result,a.value=!0},c.readAsDataURL(t),r.target.value=""}function Ue(r){var L,D;Ve.value=!1;const t=(D=(L=r.dataTransfer)==null?void 0:L.files)==null?void 0:D[0];if(!t||!t.type.startsWith("image/"))return;if(t.size>5*1024*1024){ge.value="Image must be under 5MB.";return}const c=new FileReader;c.onload=()=>{l.value=c.result,a.value=!0},c.readAsDataURL(t)}function pt({imageData:r,shape:t,editorState:c}){be.value=r,i.value=t,f.value=`${Math.round(r.length*.75/1024)} KB`,$.value=c||null,a.value=!1;const L=N.value?z.params.id:null;if(L){if(l.value)try{localStorage.setItem(`tcv:lp-masthead-raw:${L}`,l.value)}catch{}if(c)try{localStorage.setItem(`tcv:lp-masthead-state:${L}`,JSON.stringify(c))}catch{}}}function gt(){l.value||(l.value=be.value),a.value=!0}function vt(){be.value=null,l.value=null,a.value=!1,i.value="rounded",f.value="",$.value=null,N.value&&z.params.id&&(localStorage.removeItem(`tcv:lp-masthead:${z.params.id}`),localStorage.removeItem(`tcv:lp-masthead-raw:${z.params.id}`),localStorage.removeItem(`tcv:lp-masthead-state:${z.params.id}`))}async function tt(r){var L,D;const t=b.blocks.filter(U=>U.sourceCvId===r.id);if(t.length>0)return t;const c=M.getPdf(((D=(L=r.versions)==null?void 0:L[0])==null?void 0:D.id)||r.id);if(!c)return[];ve.value=!0,Pe.value=null;try{let U;try{U=await b.extractFromPdfViaApi(c)}catch{U=await b.extractFromPdf(c)}if((U==null?void 0:U.length)>0){const _=U.map(s=>({...s,sourceCvId:r.id,sourceCvName:r.name}));b.addBlocks(_)}return b.blocks.filter(_=>_.sourceCvId===r.id)}catch(U){return Pe.value=U.message||"Block extraction failed",[]}finally{ve.value=!1}}function at(r){if(Q.value)return;
3const t=[r,T.value,j.value].filter(Boolean).join(" ").toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60);Q.value=t||`page-${Date.now().toString(36)}`}async function ft(){var D,U;const r=M.activeCvs.find(_=>_.id===y.value);if(!r)return;const t=await tt(r);if(Pe.value)return;const c=t.length>0?t.map(_=>({id:_.id,type:_.type,title:_.title,content:_.content})):[{id:"cv-summary",type:"SUMMARY",title:r.name,content:`${r.role||""} - ${((D=r.skills)==null?void 0:D.join(", "))||""}`}],L=((U=w.profile)==null?void 0:U.name)||r.name||"";try{const _=await v.generate({jobDescription:C.value,blocks:c,candidateName:L,targetRole:T.value,targetCompany:j.value,layoutTemplate:G.value,pageLanguage:me.value});n.value=_,at(L)}catch{}}async function bt(){var L;const r=M.activeCvs.find(D=>D.id===y.value);if(!r)return;const t=await tt(r);if(Pe.value)return;const c=((L=w.profile)==null?void 0:L.name)||r.name||"";n.value={headline:T.value?`${c} â ${T.value}`:c||"Your Name â Target Role",pitch:"",coverLetter:"",rewrittenBlocks:t.map(D=>({blockId:D.id,originalTitle:D.title,rewrittenContent:D.content,relevanceNote:""})),skillMatches:[],matchScore:null},se.value=!0,at(c)}async function mt({prompt:r,section:t}){if(n.value)try{const c=await v.refine({currentContent:n.value,refinementPrompt:r,section:t,jobDescription:C.value});c.coverLetter!==void 0&&(n.value.coverLetter=c.coverLetter),c.headline!==void 0&&(n.value.headline=c.headline),c.pitch!==void 0&&(n.value.pitch=c.pitch),c.rewrittenBlocks!==void 0&&(n.value.rewrittenBlocks=c.rewrittenBlocks),c.skillMatches!==void 0&&(n.value.skillMatches=c.skillMatches),h.value.push({prompt:r,section:t})}catch{}}async function lt(r,t,c){if(!c)return r;const L=M.cvs.find(D=>D.id===t);if(!(L!=null&&L.qrPlacement))return r;try{const{stampQrOnPdf:D}=await nt(async()=>{const{stampQrOnPdf:_}=await import("./qrStamper-WB47Yykd.js");return{stampQrOnPdf:_}},__vite__mapDeps([11,12])),U=`${window.location.origin}/p/${c}?ref=qr`;return await D(r,L.qrPlacement,U)}catch(D){return console.error("QR stamping failed, using original PDF:",D),r}}async function Ke(r){var t,c,L,D;fe.value=!0,ge.value=null;try{const U=be.value||null;let _=null,s=Q.value;const ne=K.value&&q.value?{gjsHtml:q.value.getHtml(),gjsCss:q.value.getCss(),gjsProjectData:q.value.getProjectData()}:{};if(N.value){if(_=z.params.id,U){if(localStorage.setItem(`tcv:lp-masthead:${_}`,U),l.value)try{localStorage.setItem(`tcv:lp-masthead-raw:${_}`,l.value)}catch{}if($.value)try{localStorage.setItem(`tcv:lp-masthead-state:${_}`,JSON.stringify($.value))}catch{}}else localStorage.removeItem(`tcv:lp-masthead:${_}`),localStorage.removeItem(`tcv:lp-masthead-raw:${_}`),localStorage.removeItem(`tcv:lp-masthead-state:${_}`);try{await v.updatePage(_,{headline:n.value.headline,pitch:n.value.pitch,coverLetter:n.value.coverLetter,rewrittenBlocks:n.value.rewrittenBlocks,skillMatches:n.value.skillMatches,sections:S.value,layoutTemplate:G.value,published:r,targetRole:T.value,targetCompany:j.value,matchScore:n.value.matchScore,mastheadImage:U,mastheadShape:i.value,accentColor:ye.value,pageLanguage:me.value,notifyEmail:ie.value,notifyEnabled:le.value,...ne})}catch(ue){if((t=ue.message)!=null&&t.includes("not found")){const he=await v.savePage({slug:s,cvId:y.value,layoutTemplate:G.value,headline:n.value.headline,pitch:n.value.pitch,coverLetter:n.value.coverLetter,rewrittenBlocks:n.value.rewrittenBlocks,skillMatches:n.value.skillMatches,sections:S.value,jobDescription:C.value,candidateName:((c=w.profile)==null?void 0:c.name)||"",targetRole:T.value,targetCompany:j.value,matchScore:n.value.matchScore||0,published:r,mastheadImage:U,mastheadShape:i.value,accentColor:ye.value,pageLanguage:me.value,notifyEmail:ie.value,notifyEnabled:le.value,...ne});v.removeLocal(_),_=he==null?void 0:he.pageId,s=(he==null?void 0:he.slug)||s}else throw ue}const J=M.getPdf(y.value);if(J){const ue=await lt(J,y.value,s);v.uploadPdf(_,ue)}}else{const J=await v.savePage({slug:s,cvId:y.value,layoutTemplate:G.value,headline:n.value.headline,pitch:n.value.pitch,coverLetter:n.value.coverLetter,rewrittenBlocks:n.value.rewrittenBlocks,skillMatches:n.value.skillMatches,sections:S.value,
3jobDescription:C.value,candidateName:((L=w.profile)==null?void 0:L.name)||"",targetRole:T.value,targetCompany:j.value,matchScore:n.value.matchScore||0,published:r,mastheadImage:U,mastheadShape:i.value,accentColor:ye.value,pageLanguage:me.value,notifyEmail:ie.value,notifyEnabled:le.value,...ne});if(_=J==null?void 0:J.pageId,s=(J==null?void 0:J.slug)||s,U&&_){if(localStorage.setItem(`tcv:lp-masthead:${_}`,U),l.value)try{localStorage.setItem(`tcv:lp-masthead-raw:${_}`,l.value)}catch{}if($.value)try{localStorage.setItem(`tcv:lp-masthead-state:${_}`,JSON.stringify($.value))}catch{}}if(_){const ue=M.getPdf(y.value);if(ue){const he=await lt(ue,y.value,s);v.uploadPdf(_,he)}}}if(_&&Se.value&&F.updateApplication(Se.value,{landingPageId:_}),r&&!N.value&&re.value.size>1){const J=[...re.value].filter(ue=>ue!=="en");for(const ue of J){const he=`-${ue}`,Te=Q.value+he;try{await v.savePage({slug:Te,cvId:y.value,layoutTemplate:G.value,headline:n.value.headline,pitch:n.value.pitch,coverLetter:n.value.coverLetter,rewrittenBlocks:n.value.rewrittenBlocks,skillMatches:n.value.skillMatches,sections:S.value,jobDescription:C.value,candidateName:((D=w.profile)==null?void 0:D.name)||"",targetRole:T.value,targetCompany:j.value,matchScore:n.value.matchScore||0,published:!1,mastheadImage:U,mastheadShape:i.value,accentColor:ye.value,pageLanguage:ue,notifyEmail:ie.value,notifyEnabled:le.value})}catch{}}}if(r&&_&&j.value.trim()){const J=T.value.trim().toLowerCase(),ue=j.value.trim().toLowerCase();if(!X.sends.some(Te=>{var Fe,rt;return((Fe=Te.company)==null?void 0:Fe.toLowerCase())===ue&&(!J||((rt=Te.role)==null?void 0:rt.toLowerCase())===J)})){const Te=Se.value?F.applications.find(Fe=>Fe.id===Se.value):null;Ie.value={pageId:_,slug:s,cvId:y.value,targetRole:T.value,targetCompany:j.value,landingPageUrl:`${window.location.origin}/p/${s}`,applicationId:Se.value||null,jobUrl:(Te==null?void 0:Te.jobUrl)||""},_e.value=!0;return}}B.push("/landing-pages")}catch(U){ge.value=U.message}finally{fe.value=!1}}const ht=ee(()=>{if(!Ie.value)return null;const r=Ie.value;return{cvId:r.cvId,company:r.targetCompany,role:r.targetRole,jobUrl:r.jobUrl||"",applicationId:r.applicationId||null,landingPageId:r.pageId,landingPageUrl:r.landingPageUrl,date:new Date().toISOString().slice(0,10),channel:"landing-page",status:"sent",notes:`Landing page: ${r.landingPageUrl}`,noteLog:[]}});function ot(){_e.value=!1,B.push("/landing-pages")}function xt(){_e.value=!1,Re.value=!0}function kt(r){const t=X.addSend(r);t.ok&&r.applicationId&&F.updateApplication(r.applicationId,{sendId:t.data.id,status:"sent"}),Re.value=!1,B.push("/landing-pages")}return(r,t)=>{var L,D,U,_;const c=It("router-link");return u(),p("div",cl,[e("div",pl,[ae(c,{to:"/landing-pages",class:"mb-2 inline-flex items-center gap-1 text-sm text-slate-500 hover:text-primary dark:text-slate-400"},{default:Ee(()=>[t[28]||(t[28]=e("svg",{class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[e("path",{d:"M19 12H5"}),e("polyline",{points:"12 19 5 12 12 5"})],-1)),Z(" "+d(m(g)("landingPages.backToPages")),1)]),_:1}),e("h1",gl,d(N.value?m(g)("landingPages.editPage"):m(g)("landingPages.newPage")),1)]),n.value?(u(),p("div",El,[K.value?(u(),p("div",jl,[ae(m(te),{ref_key:"gjsEditorRef",ref:q,"page-data":{...n.value,candidateName:((L=m(w).profile)==null?void 0:L.name)||""},tier:m(A).tier,"accent-color":ye.value,template:G.value,"initial-project":P.value,wireframe:se.value,headline:n.value.headline||"",slug:Q.value,sections:S.value,"notify-enabled":le.value,"notify-email":ie.value,"onUpdate:dirty":t[4]||(t[4]=s=>$e.value=s),"onUpdate:headline":t[5]||(t[5]=s=>n.value.headline=s),"onUpdate:slug":t[6]||(t[6]=s=>Q.value=s),"onUpdate:accentColor":t[7]||(t[7]=s=>ye.value=s),"onUpdate:sections":t[8]||(t[8]=s=>S.value=s),"onUpdate:notifyEnabled":t[9]||(t[9]=s=>le.value=s),"onUpdate:notifyEmail":t[10]||(t[10]=s=>ie.value=s),onShowUpgrade:I},null,8,["page-data","tier","accent-color","template","initial-project","wireframe","headline","slug","sections","notify-enabled","notify-email"])])):(u(),p("div",Rl,[e("div",Dl,[e("div",Ul,[e("div",null,[e("label",Hl,d(m(g)("landingPages.headline")),1),Ce(e("input",{"onUpdate:modelValue":t[11]||(t[11]=s=>n.value.headline=s),type:"text",class:"w-full rounded-lg border border-slate-200 bg-white px-3 py-2.5 text-sm font-semibold text-slate-900 focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary dark:border-slate-700 dark:bg-slate-800 dark:text-white"},null,512),[[Be,n.value.headline]])]),e("div",Al,[e("label",Fl,d(m(g)("landingPages.mastheadImage")),1),a.value&&l.value?(u(),ze(Ga,{key:0,src:l.value,"initial-state":$.value,onSave:pt,onCancel:t[12]||(t[12]=s=>a.value=!1)},null,8,["src","initial-state"])):be.value?(u(),p("div",Nl,[(u(),p("img",{key:(D=be.value)==null?void 0:D.length,src:be.value,alt:"Masthead preview",class:W(["max-h-48 w-full cursor-pointer border border-slate-200 transition hover:opacity-80 dark:border-slate-700",i.value==="circle"?"mx-auto !h-32 !w-32 rounded-full object-cover":i.value==="rounded"?"rounded-2xl object-contain":"rounded-lg object-contain"]),onClick:gt},null,10,Ol)),t[35]||(t[35]=e("div",{class:"pointer-events-none absolute inset-0 flex items-center justify-center opacity-0 transition group-hover:opacity-100"},[e("span",{class:"rounded-full bg-black/60 px-3 py-1.5 text-xs font-medium text-white"},"Click to edit")],-1)),e("button",{type:"button",class:"absolute right-2 top-2 rounded-full bg-red-500/80 p-1.5 text-white shadow transition hover:bg-red-600",title:"Remove image",onClick:ke(vt,["stop"])},[...t[34]||(t[34]=[e("svg",{class:"h-3 w-3",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[e("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])]),e("span",Yl,d(f.value)+" · "+d(i.value),1)])):(u(),p("label",{key:2,class:W(["flex cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed px-4 py-8 text-sm transition",Ve.value?"border-primary bg-primary/5 text-primary dark:bg-primary/10":"border-slate-200 text-slate-400 hover:border-primary/40 hover:text-primary dark:border-slate-700 dark:hover:border-primary/40"]),onDragover:t[13]||(t[13]=ke(s=>Ve.value=!0,["prevent"])),onDragleave:t[14]||(t[14]=ke(s=>Ve.value=!1,["prevent"])),onDrop:ke(Ue,["prevent"])},[t[36]||(t[36]=e("svg",{class:"h-8 w-8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},[e("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),e("polyline",{points:"21 15 16 10 5 21"})],-1)),e("span",null,d(Ve.value?m(g)("landingPages.dropImageHere"):m(g)("landingPages.uploadMasthead")),1),e("span",Wl,d(m(g)("landingPages.clickOrDrag")),1),e("input",{type:"file",accept:"image/*",class:"hidden",onChange:De},null,32)],34))]),e("div",null,[e("label",Xl,d(m(g)("landingPages.pitch")),1),ae(Qe,{modelValue:n.value.pitch,"onUpdate:modelValue":t[15]||(t[15]=s=>n.value.pitch=s),"min-height":"60px","max-height":"200px"},null,8,["modelValue"])]),e("div",null,[e("label",ql,d(m(g)("landingPages.coverLetter")),1),ae(Qe,{modelValue:n.value.coverLetter,"onUpdate:modelValue":t[16]||(t[16]=s=>n.value.coverLetter=s),"min-height":"200px","max-height":"400px"},null,8,["modelValue"])]),((U=n.value.rewrittenBlocks)==null?void 0:U.length)>0?(u(),p("div",Kl,[e("label",Gl,d(m(g)("landingPages.experienceHighlights")),1),e("div",Ql,[(u(!0),p(ce,null,pe(n.value.rewrittenBlocks,(s,ne)=>(u(),p("div",{key:s.blockId||ne,class:"rounded-lg border border-slate-200 p-3 dark:border-slate-700"},[e("p",Jl,d(s.originalTitle),1),ae(Qe,{modelValue:s.rewrittenContent,"onUpdate:modelValue":J=>s.rewrittenContent=J,"min-height":"60px","max-height":"250px"},null,8,["modelValue","onUpdate:modelValue"]),e("p",Zl,d(s.relevanceNote),1)]))),128))])])):Y("",!0),((_=n.value.skillMatches)==null?void 0:_.length)>0?(u(),p("div",eo,[e("label",to,d(m(g)("landingPages.skillsMatch")),1),ae(ja,{skills:n.value.skillMatches},null,8,["skills"])])):Y("",!0),ae(it,{items:oe.value,onAction:Me},null,8,["items"])]),e("div",ao,[ae(na,{modelValue:G.value,"onUpdate:modelValue":t[17]||(t[17]=s=>G.value=s)},null,8,["modelValue"]),e("div",lo,[ae(pa,{modelValue:S.value,"onUpdate:modelValue":t[18]||(t[18]=s=>S.value=s)},null,8,["modelValue"])]),m(A).hasFeature("emailNotifications")?(u(),p("div",oo,[e("div",so,[t[37]||(t[37]=e("label",{class:"text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400"},"View Notifications",-1)),e("button",{type:"button",class:W(["relative h-5 w-9 rounded-full transition-colors",le.value?"bg-primary":"bg-slate-300 dark:bg-slate-600"]),onClick:t[19]||(t[19]=s=>le.value=!le.value)}
3,[e("span",{class:W(["absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-white shadow transition-transform",le.value?"translate-x-4":""])},null,2)],2)]),e("p",ro,d(le.value?"You'll receive an email when someone views this page (max 1/hour).":"Enable to get notified when someone views this page."),1),le.value?(u(),p("div",no,[Ce(e("input",{"onUpdate:modelValue":t[20]||(t[20]=s=>ie.value=s),type:"email",placeholder:"[email protected]",class:"w-full rounded-lg border border-slate-200 bg-slate-50 px-3 py-1.5 text-xs text-slate-700 placeholder-slate-400 transition focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200 dark:placeholder-slate-500"},null,512),[[Be,ie.value]])])):Y("",!0)])):Y("",!0),m(A).hasFeature("localizedPages")?(u(),p("div",io,[e("label",uo,d(m(g)("landingPages.pageLanguage")),1),e("div",co,[(u(),p(ce,null,pe(qe,s=>e("button",{key:s.code,type:"button",class:W(["inline-flex items-center gap-1 rounded-md border px-2 py-1 text-[11px] font-medium transition",re.value.has(s.code)?"border-primary bg-primary/10 text-primary":"border-slate-200 text-slate-500 hover:border-slate-300 dark:border-slate-700 dark:text-slate-400"]),onClick:ne=>Ae(s.code)},[e("div",{class:W(["h-3 w-3 rounded border flex items-center justify-center",re.value.has(s.code)?"border-primary bg-primary":"border-slate-300 dark:border-slate-600"])},[re.value.has(s.code)?(u(),p("svg",go,[...t[38]||(t[38]=[e("path",{d:"M20 6L9 17l-5-5"},null,-1)])])):Y("",!0)],2),Z(" "+d(s.flag)+" "+d(s.label),1)],10,po)),64))]),re.value.size>1?(u(),p("p",vo,d(re.value.size)+" languages â "+d(re.value.size-1)+" additional page(s) will be created on publish ",1)):Y("",!0)])):Y("",!0),m(A).isPro?(u(),ze(Ba,{key:2,refining:m(v).refining,history:h.value,onRefine:mt},null,8,["refining","history"])):Y("",!0),n.value.matchScore?(u(),p("div",fo,[e("p",bo,d(m(g)("landingPages.matchScore")),1),e("p",{class:W(["text-3xl font-bold",x.value])},d(n.value.matchScore)+"%",3)])):Y("",!0)])])])),K.value&&oe.value.length>0?(u(),ze(it,{key:2,items:oe.value,onAction:Me},null,8,["items"])):Y("",!0),e("div",mo,[e("div",ho,[e("div",xo,[e("label",ko,d(m(g)("landingPages.urlSlug")),1),e("div",yo,[e("span",null,d(O.value)+"/p/",1),Ce(e("input",{"onUpdate:modelValue":t[21]||(t[21]=s=>Q.value=s),type:"text",class:"w-64 rounded-lg border border-slate-200 bg-white px-3 py-2 text-sm text-slate-700 focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200",placeholder:"john-senior-devops-acme"},null,512),[[Be,Q.value]])]),e("p",wo,d(m(g)("landingPages.slugHint")),1)]),Q.value.trim()?(u(),ze(c,{key:0,to:`/p/${Q.value}?preview=true`,target:"_blank",class:"inline-flex items-center gap-1.5 rounded-lg border border-slate-200 px-3 py-2.5 text-sm font-medium text-slate-600 transition hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"},{default:Ee(()=>[t[39]||(t[39]=e("svg",{class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[e("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),e("polyline",{points:"15 3 21 3 21 9"}),e("line",{x1:"10",y1:"14",x2:"21",y2:"3"})],-1)),Z(" "+d(m(g)("landingPages.view")),1)]),_:1},8,["to"])):Y("",!0),e("div",Co,[e("button",{type:"button",class:"inline-flex items-center gap-2 rounded-lg border border-slate-200 px-4 py-2.5 text-sm font-medium text-slate-600 transition hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",disabled:fe.value,onClick:t[22]||(t[22]=s=>Ke(!1))},d(m(g)("landingPages.saveDraft")),9,So),e("button",{type:"button",class:"inline-flex items-center gap-2 rounded-lg bg-primary px-6 py-2.5 text-sm font-medium text-white shadow-sm transition hover:bg-primary/90 disabled:opacity-50",disabled:!Q.value.trim()||fe.value,onClick:Xe},[fe.value?(u(),p("svg",Bo,[...t[40]||(t[40]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.4 0 0 5.4 0 12h4z"},null,-1)])])):Y("",!0),Z(" "+d(fe.value?m(g)("landingPages.publishing"):m(g)("landingPages.publish")),1)],8,Mo)])])]),ge.value?(u(),p("div",$o,d(ge.value),1)):Y("",!0)])):(u(),p("div",vl,[e("div",null,[e("label",fl,d(m(g)("landingPages.selectCv")),1),Ce(e("select",{"onUpdate:modelValue":t[0]||(t[0]=s=>y.value=s),class:"w-full rounded-lg border border-slate-200 bg-white px-3 py-2.5 text-sm text-slate-700 focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200"},[e("option",bl,d(m(g)("landingPages.chooseCv")),1),(u(!0),p(ce,null,pe(m(M).activeCvs,s=>(u(),p("option",{key:s.id,value:s.id},d(s.name)+" â "+d(s.role||"No role set"),9,ml))),128))],512),[[_t,y.value]])]),e("div",hl,[e("div",null,[e("label",xl,d(m(g)("landingPages.targetRole")),1),Ce(e("input",{"onUpdate:modelValue":t[1]||(t[1]=s=>T.value=s),type:"text",class:"w-full rounded-lg border border-slate-200 bg-white px-3 py-2.5 text-sm text-slate-700 placeholder-slate-400 focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200",placeholder:"e.g., Senior DevOps Engineer"},null,512),[[Be,T.value]])]),e("div",null,[e("label",kl,d(m(g)("landingPages.targetCompany")),1
3),Ce(e("input",{"onUpdate:modelValue":t[2]||(t[2]=s=>j.value=s),type:"text",class:"w-full rounded-lg border border-slate-200 bg-white px-3 py-2.5 text-sm text-slate-700 placeholder-slate-400 focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200",placeholder:"e.g., Acme Corp"},null,512),[[Be,j.value]])])]),e("div",null,[e("label",yl,d(m(g)("landingPages.jobDescription")),1),Ce(e("textarea",{"onUpdate:modelValue":t[3]||(t[3]=s=>C.value=s),rows:"10",class:"w-full rounded-lg border border-slate-200 bg-white px-3 py-2.5 text-sm text-slate-700 placeholder-slate-400 focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200",placeholder:m(g)("landingPages.jobDescPlaceholder")},null,8,wl),[[Be,C.value]]),e("p",Cl,d(C.value.length)+" / 8000 "+d(m(g)("landingPages.characters")),1)]),ve.value?(u(),p("div",Sl,[t[29]||(t[29]=e("svg",{class:"h-5 w-5 animate-spin",viewBox:"0 0 24 24",fill:"none"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.4 0 0 5.4 0 12h4z"})],-1)),Z(" "+d(m(g)("landingPages.extractingBlocks")),1)])):Y("",!0),e("div",Ml,[m(A).isPro?(u(),p("span",$l)):(u(),p("p",Bl,[ae(c,{to:"/upgrade",class:"font-medium text-primary hover:underline"},{default:Ee(()=>[Z(d(m(g)("dashboard.upgradeToPro")),1)]),_:1}),t[30]||(t[30]=Z(" for unlimited landing pages, AI refinement, and analytics. ",-1))])),e("div",Pl,[e("button",{type:"button",class:"inline-flex items-center gap-2 rounded-lg border border-slate-200 px-5 py-3 text-sm font-medium text-slate-600 transition hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800 disabled:opacity-50",disabled:!y.value||ve.value,onClick:bt},[t[31]||(t[31]=e("svg",{class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[e("path",{d:"M12 20h9"}),e("path",{d:"M16.5 3.5a2.121 2.121 0 013 3L7 19l-4 1 1-4L16.5 3.5z"})],-1)),Z(" "+d(m(g)("landingPages.createManually")),1)],8,_l),e("button",{type:"button",class:"inline-flex items-center gap-2 rounded-lg bg-primary px-6 py-3 text-sm font-medium text-white shadow-sm transition hover:bg-primary/90 disabled:opacity-50",disabled:!E.value||m(v).generating||ve.value,onClick:ft},[m(v).generating?(u(),p("svg",Ll,[...t[32]||(t[32]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.4 0 0 5.4 0 12h4z"},null,-1)])])):(u(),p("svg",Il,[...t[33]||(t[33]=[e("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"},null,-1)])])),Z(" "+d(m(v).generating?m(g)("landingPages.generating"):m(g)("landingPages.generateWithAI")),1)],8,Tl)])]),ae(ct,{active:m(v).generating,title:m(g)("landingPages.aiWorking"),subtitle:m(v).generationStepMessage||m(g)("landingPages.generationQueued"),steps:de.value},null,8,["active","title","subtitle","steps"]),Pe.value?(u(),p("div",Vl,d(Pe.value),1)):Y("",!0),m(v).error&&!m(v).generating?(u(),p("div",zl,d(m(v).error),1)):Y("",!0)])),(u(),ze(Je,{to:"body"},[ae(Ye,{name:"fade"},{default:Ee(()=>{var s,ne;return[_e.value?(u(),p("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm px-4",onClick:ke(ot,["self"])},[e("div",Po,[e("div",_o,[t[44]||(t[44]=e("div",{class:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/10"},[e("svg",{class:"h-5 w-5 text-primary",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},[e("path",{d:"M22 2L11 13"}),e("path",{d:"M22 2l-7 20-4-9-9-4 20-7z"})])],-1)),e("div",null,[e("h3",To,d(m(g)("landingPages.logSubmissionPrompt")),1),e("p",Lo,[t[41]||(t[41]=Z(" Your landing page for ",-1)),e("strong",null,d((s=Ie.value)==null?void 0:s.targetRole),1),t[42]||(t[42]=Z(" at ",-1)),e("strong",null,d((ne=Ie.value)==null?void 0:ne.targetCompany),1),t[43]||(t[43]=Z(" is now live. Would you like to log a submission to track it? ",-1))])])]),e("div",Io,[e("button",{type:"button",class:"rounded-lg px-4 py-2 text-sm font-medium text-slate-600 transition hover:bg-slate-100 dar
3k:text-slate-300 dark:hover:bg-slate-800",onClick:ot},d(m(g)("landingPages.noThanks")),1),e("button",{type:"button",class:"rounded-lg bg-primary px-5 py-2 text-sm font-semibold text-white shadow-sm transition hover:bg-primary/90",onClick:xt},d(m(g)("landingPages.logSubmission")),1)])])])):Y("",!0)]}),_:1})])),(u(),ze(Je,{to:"body"},[ae(Ye,{name:"fade"},{default:Ee(()=>[Le.value?(u(),p("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm px-4",onClick:t[25]||(t[25]=ke(s=>Le.value=!1,["self"]))},[e("div",Vo,[e("div",zo,[t[45]||(t[45]=e("h3",{class:"text-base font-semibold text-slate-900 dark:text-white"},"Publish with unresolved items?",-1)),e("p",Eo," Your landing page has "+d(je.value.length)+" unresolved recommendation"+d(je.value.length>1?"s":"")+" that may affect its effectiveness. ",1)]),e("div",jo,[(u(!0),p(ce,null,pe(je.value,s=>(u(),p("div",{key:s.id,class:W(["flex items-start gap-2 rounded-lg px-3 py-2",s.priority==="critical"?"bg-red-50 dark:bg-red-950/20":"bg-amber-50 dark:bg-amber-950/20"])},[e("div",{class:W(["mt-1.5 h-2 w-2 shrink-0 rounded-full",s.priority==="critical"?"bg-red-500":"bg-amber-500"])},null,2),e("div",null,[e("p",{class:W(["text-xs font-semibold",s.priority==="critical"?"text-red-700 dark:text-red-400":"text-amber-700 dark:text-amber-400"])},d(s.title),3),e("p",Ro,d(s.description),1)])],2))),128))]),e("div",Do,[e("button",{type:"button",class:"rounded-lg px-4 py-2 text-sm font-medium text-slate-600 transition hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800",onClick:t[23]||(t[23]=s=>Le.value=!1)}," Go Back & Fix "),e("button",{type:"button",class:"rounded-lg bg-primary px-5 py-2 text-sm font-semibold text-white shadow-sm transition hover:bg-primary/90",onClick:t[24]||(t[24]=s=>{Le.value=!1,Ke(!0)})}," Publish Anyway ")])])])):Y("",!0)]),_:1})])),ae(Rt,{modelValue:Re.value,"onUpdate:modelValue":t[26]||(t[26]=s=>Re.value=s),"edit-send":ht.value,onSaved:kt},null,8,["modelValue","edit-send"]),ae(Tt,{modelValue:o.value,"onUpdate:modelValue":t[27]||(t[27]=s=>o.value=s)},null,8,["modelValue"])])}}},Ho=et(Uo,[["__scopeId","data-v-635339d8"]]),Wo=Object.freeze(Object.defineProperty({__proto__:null,default:Ho},Symbol.toStringTag,{value:"Module"}));export{Wo as L,Ga as _};
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.