GEMI Controlled Application Engine™ v4
Generated by GEMI Controlled Application Engine™ v4 · gemitravelandtour.com · info@gemitravelandtour.com
Generated by GEMI Controlled Application Engine™ v4 · gemitravelandtour.com
Original: 0 words
Enhanced: 0 words
Authenticity: —
Embassy Score: —
You may edit the enhanced version directly before applying.
Complete your profile to receive audit
Gap Detection & Recommendations
${fullName}
${val('inp-title') || ''}
${[val('inp-email'), val('inp-phone'), val('inp-city'), val('inp-linkedin')].filter(Boolean).join(' | ')}
${val('inp-summary') ? `
Professional Summary
${val('inp-summary')}
` : ''}
${STATE.experience.length ? `
Work Experience
${expSection}` : ''}
${STATE.education.length ? `
Education
${eduSection}` : ''}
${STATE.skills.length ? `
Skills
${skillsText}
` : ''}
${STATE.certifications.length ? `
Certifications
${certSection}` : ''}
${STATE.projects.length ? `
Projects
${projSection}` : ''}
`;
const blob = new Blob([html], { type: 'application/msword' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = (fullName.replace(/\s+/g, '_') || 'CV') + '_GEMI_CV.doc';
a.click();
URL.revokeObjectURL(url);
notify('Word document downloaded', 'success');
}
/* ════════════════════════════════════════
20. PDF PRINT
════════════════════════════════════════ */
function printPDF() {
const currentMode = STATE.previewMode;
if (currentMode !== 'cv') setPreviewMode('cv');
setTimeout(() => window.print(), 300);
}
/* ════════════════════════════════════════
21. LIVE INPUT LISTENERS
════════════════════════════════════════ */
function initLiveInputs() {
const liveFields = ['inp-firstname','inp-lastname','inp-title','inp-email','inp-phone','inp-city','inp-linkedin','inp-summary','inp-target-role','inp-target-company','cl-manager','cl-company','cl-position','cl-opening','cl-body','cl-closing'];
liveFields.forEach(id => {
const el = document.getElementById(id);
if (el) el.addEventListener('input', () => { updatePreview(); });
});
document.getElementById('inp-industry').addEventListener('change', () => {
STATE.industry = val('inp-industry');
loadSummaryPills();
loadCLPills();
updatePreview();
});
document.getElementById('inp-level').addEventListener('change', () => {
STATE.level = val('inp-level');
loadSummaryPills();
});
}
/* ════════════════════════════════════════
22. BUTTON WIRING
════════════════════════════════════════ */
function initButtons() {
// Audit
document.getElementById('btn-audit').addEventListener('click', openAuditModal);
document.getElementById('audit-trigger').addEventListener('click', openAuditModal);
document.getElementById('audit-autofix').addEventListener('click', () => { autoFixAll(); closeModal('modal-audit'); });
// Export
document.getElementById('btn-export-word').addEventListener('click', exportWord);
document.getElementById('btn-export-pdf').addEventListener('click', printPDF);
document.getElementById('btn-autofix').addEventListener('click', autoFixAll);
// Add entries
document.getElementById('add-exp-btn').addEventListener('click', () => addExpEntry());
document.getElementById('add-exp-alt').addEventListener('click', () => addExpEntry());
document.getElementById('add-edu-btn').addEventListener('click', () => addEduEntry());
document.getElementById('add-edu-alt').addEventListener('click', () => addEduEntry());
document.getElementById('add-cert-btn').addEventListener('click', () => addCertEntry());
document.getElementById('add-cert-alt').addEventListener('click', () => addCertEntry());
document.getElementById('add-proj-btn').addEventListener('click', () => addProjEntry());
document.getElementById('add-proj-alt').addEventListener('click', () => addProjEntry());
// Humanizer mode buttons
document.querySelectorAll('.mode-btn').forEach(btn => {
btn.addEventListener('click', () => {
document.querySelectorAll('.mode-btn').forEach(b => b.classList.remove('active'));
btn.classList.add('active');
STATE.currentHumanizerMode = btn.dataset.mode;
const orig = document.getElementById('human-original').value;
if (orig) runHumanize(orig, STATE.currentHumanizerMode);
});
});
document.getElementById('humanize-regen').addEventListener('click', () => {
const orig = document.getElementById('human-original').value;
runHumanize(orig, STATE.currentHumanizerMode);
});
document.getElementById('humanize-apply').addEventListener('click', () => {
const enhanced = document.getElementById('human-enhanced').value;
if (STATE.currentHumanizerField) {
const el = document.getElementById(STATE.currentHumanizerField);
if (el) { el.value = enhanced; el.dispatchEvent(new Event('input')); }
}
closeModal('modal-humanizer');
notify('Humanized text applied', 'success');
});
// Humanize buttons (delegated)
document.addEventListener('click', e => {
const hb = e.target.closest('.humanize-btn');
if (hb && hb.dataset.field) openHumanizer(hb.dataset.field);
const pb = e.target.closest('[data-pick]');
if (pb) {
const type = pb.dataset.pick;
const targetId = type === 'summary' ? 'inp-summary' : type;
openPromptPicker(type, document.getElementById(targetId));
}
const tb = e.target.closest('#pick-title');
if (tb) {
openPromptPicker('titles-picker', null);
const list = document.getElementById('prompt-picker-list');
list.innerHTML = '';
TSTORE.titles.forEach(title => {
const btn = document.createElement('div');
btn.className = 'prompt-option';
btn.innerHTML = `
Professional Title${title}`;
btn.addEventListener('click', () => {
setVal('inp-title', title);
document.getElementById('inp-title').dispatchEvent(new Event('input'));
closeModal('modal-prompts');
});
list.appendChild(btn);
});
document.getElementById('modal-prompts').querySelector('.modal-title').textContent = '💡 Professional Title Examples';
openModal('modal-prompts');
}
});
// CL closing template pill
document.querySelectorAll('[data-pick="cl-closing"]').forEach(btn => {
btn.addEventListener('click', () => openPromptPicker('cl-closing', document.getElementById('cl-closing')));
});
}
/* ════════════════════════════════════════
23. INITIALISE APP
════════════════════════════════════════ */
function init() {
initNav();
initCountryEngine();
initSkills();
initLiveInputs();
initModals();
initButtons();
loadSummaryPills();
loadCLPills();
// Cover letter closing pick button
const clClosingField = document.getElementById('cl-closing');
if (clClosingField) {
const closingActions = clClosingField.nextElementSibling;
if (closingActions) {
const pickBtn = document.createElement('button');
pickBtn.className = 'field-btn';
pickBtn.setAttribute('data-pick', 'cl-closing');
pickBtn.textContent = '💡 Templates';
closingActions.appendChild(pickBtn);
}
}
updatePreview();
updateReadiness();
// Welcome toast
setTimeout(() => notify('GEMI CAE v4 loaded — Select your destination country to begin', ''), 800);
}
document.addEventListener('DOMContentLoaded', init);