☀️
Loading BIMUsers AI CV Studio...
`; const blob = new Blob(['\ufeff', htmlContent], { type: 'application/msword' }); const url = URL.createObjectURL(blob); const link = document.createElement('a'); link.href = url; link.download = `${resumeData.fullName || 'Resume'}.doc`; document.body.appendChild(link); link.click(); document.body.removeChild(link); showNotification('success', 'Word exported!'); addToLog('Exported to Word'); } catch(e) { showNotification('error', 'Export failed.'); } };const handleSaveProject = () => { const dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(resumeData)); const node = document.createElement('a'); node.setAttribute("href", dataStr); node.setAttribute("download", "cv_data.json"); document.body.appendChild(node); node.click(); node.remove(); showNotification('success', 'Project saved!'); }; const handleLoadProject = (e) => { const file = e.target.files[0]; if (!file) return; const reader = new FileReader(); reader.onload = (event) => { try { setResumeData(JSON.parse(event.target.result)); setActiveTab('editor'); showNotification('success', 'Project loaded!'); } catch (err) { showNotification('error', 'Invalid project file.'); } }; reader.readAsText(file); };const handleExportPDF = () => { if(isLocked) { setShowModal(true); return; } const element = document.getElementById('cv-preview-content'); if (!element) return; if (typeof window.html2pdf === 'undefined') { showNotification('error', "PDF Engine still loading... please wait 3 seconds."); return; } setIsExportingPDF(true); const opt = { margin: 0, filename: `${resumeData.fullName.replace(/\s+/g, '_')}_CV.pdf`, image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2, useCORS: true }, jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' } }; window.html2pdf().set(opt).from(element).save().then(() => { setIsExportingPDF(false); showNotification('success', 'PDF Downloaded!'); addToLog('Exported to PDF'); }).catch(err => { console.error(err); setIsExportingPDF(false); showNotification('error', 'PDF Generation failed. Printing instead.'); window.print(); }); };const activeTheme = THEMES[theme.color]; const fontClass = theme.font === 'serif' ? 'font-serif' : theme.font === 'mono' ? 'font-mono' : 'font-sans'; const getSizeClass = (base) => { const sizes = { sm: { text: 'text-xs', h1: 'text-3xl', h2: 'text-lg', h3: 'text-xs' }, md: { text: 'text-sm', h1: 'text-4xl', h2: 'text-xl', h3: 'text-sm' }, lg: { text: 'text-base', h1: 'text-5xl', h2: 'text-2xl', h3: 'text-base' } }; return sizes[theme.size || 'md'][base]; }; const getSpacingClass = () => { const spacing = { compact: 'space-y-2 leading-tight', normal: 'space-y-6 leading-relaxed', loose: 'space-y-8 leading-loose' }; return spacing[theme.spacing || 'normal']; };useEffect(() => { let newScore = 0; if (resumeData.fullName) newScore += 10; if (resumeData.email) newScore += 10; const textContent = JSON.stringify(resumeData).toLowerCase(); let foundKeywords = BIM_KEYWORDS.filter(kw => textContent.includes(kw.toLowerCase())); newScore += Math.min(foundKeywords.length * 4, 40); if (resumeData.experience.length > 0 && resumeData.experience[0].details.length > 20) newScore += 20; if (resumeData.summary.length > 30) newScore += 20; setScore(Math.min(newScore, 100)); }, [resumeData]);const EditorContent = () => (
{isUploading ? : }

Auto-Import from Resume

Upload existing PDF/Image to auto-fill details.

{uploadError &&

{uploadError}

}
{expandedSection === 'personal' && (
handleInputChange('fullName', e.target.value)} /> handleInputChange('title', e.target.value)} /> handleInputChange('email', e.target.value)} /> handleInputChange('phone', e.target.value)} />