💑

AI Relationship Advisor

Communication scripts, conflict resolution frameworks, and relationship health assessments. Based on Gottman Method and attachment theory.

AI Specialist Lifestyle

💑 Get Expert Results

Specialist AI tool. 50¢ per use. No subscription.

Expert Analysis

'); w.document.close(); setTimeout(function(){w.print();},500); return; } if (fmt === 'docx') { var docHtml = ''+html+''; var blob = new Blob(['\ufeff'+docHtml], {type:'application/msword'}); var a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = TOOL_SLUG + '.doc'; a.click(); return; } if (fmt === 'slides') { exportSlides(); return; } } async function exportSlides() { var content = document.getElementById('resultContent'); if (!content) return; var text = content.innerText || ''; alert('Generating presentation slides... This may take a moment.'); try { var email = getEmail(); var res = await fetch(API_BASE + '/ai-generate', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + ANON_KEY }, body: JSON.stringify({ action: 'wallet_generate', email: email, toolSlug: 'presentation-builder', userInput: 'Create a detailed 10-slide presentation from this content. Each slide should have a clear title and 4-6 bullet points covering different aspects:\n\n' + text.substring(0, 3000), model: 'sonnet', includeImage: false }) }); var d = await res.json(); if (d.downloadUrl) { window.open(d.downloadUrl, '_blank'); } else if (d.error) { alert('Slides error: ' + d.error); } else { alert('Presentation generated but no download URL returned.'); } } catch(e) { alert('Error generating slides: ' + e.message); } } async function rateResult(rating) { var email = getEmail(); if (!email || !TOOL_SLUG) return; try { await fetch(API_BASE + '/ai-generate', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + ANON_KEY }, body: JSON.stringify({ action: 'rate_result', email: email, toolSlug: TOOL_SLUG, rating: rating, resultId: lastResultId }) }); // Highlight the button document.querySelectorAll('.rating-btns button').forEach(function(b){ b.classList.remove('rated'); }); event.target.classList.add('rated'); } catch(e) { console.error('Rate failed:', e); } }