Willkommen bei XPRT
Dein strategischer AI-Mentor auf Consulting-Level.
In den nächsten Schritten lernen wir dich und dein Business kennen — für ein maßgeschneidertes Mentoring.
Dein Name
Deine Rolle
🏢
Dein Unternehmen
Je mehr wir wissen, desto besser werden die Empfehlungen.
Unternehmen
Branche
Phase
Teamgröße
Monatsumsatz
🧠
Strategisches Assessment
Bewerte deine aktuelle Situation ehrlich — das ist die Basis für dein individuelles Mentoring.
Strategische Klarheit — Wie klar ist deine 12-Monats-Strategie?
😵 Unklar
🤔 Vage
📋 Grundstruktur
📌 Klar
🎯 Glasklar
Product-Market Fit — Wie validiert ist dein Produkt?
💭 Idee
🧪 Testing
📊 Erste Signale
✅ Validiert
🚀 Stark
Marketing-Effektivität — Wie gut funktioniert deine Kundenakquise?
🚫 Kein Marketing
🌱 Anfänge
📈 Wächst
💪 Gut
🔥 Exzellent
Finanzielle Kontrolle — Wie gut kennst du deine Zahlen?
😰 Blind
📝 Basics
📊 Solide
📈 Stark
🎯 CFO-Level
Legal & Compliance — Wie aufgestellt bist du rechtlich?
❌ Keine Ahnung
📄 Basics
⚖️ Solide
🛡 Gut
✅ Bulletproof
🎯
Ziele & Herausforderungen
Was treibt dich an und wo brauchst du Unterstützung?
Prioritäten (Mehrfachauswahl)
🧭 Strategie
📣 Marketing & Growth
⚖️ Legal & Compliance
📊 Finance & KPIs
🛠 Produkt
✨ Personal Brand
💰 Funding
👥 Team & HR
🤖 AI-Transformation
⚙️ Operations
🤝 Sales
🔍 Markt-Intel
Deine größte aktuelle Herausforderung
12-Monats-Ziel — Was willst du in einem Jahr erreicht haben?
🏁
Wettbewerb & Markt
Aktiviert den Market Crawler und die Wettbewerbsanalyse.
Wettbewerber (einer pro Zeile)
Zielmarkt
🇩🇪 DACH
🇪🇺 EU
🇺🇸 USA
🌍 Global
Dein Unique Selling Point (USP)
Personal Brand Assessment
Deine persönliche Marke ist dein stärkstes Asset — egal ob als Founder, CEO oder Solopreneur.
LinkedIn-Profil Stärke
🚫 Kaum aktiv
📝 Basis
📢 Regelmäßig
🔥 Stark
⭐ Thought Leader
Content-Output — Wie oft teilst du Wissen?
Nie
Selten
Monatlich
Wöchentlich
Täglich
Speaking & Events — Vorträge, Podcasts, Panels?
Noch nie
1-2x
Gelegentlich
Regelmäßig
Top Speaker
Deine Brand-Vision — Wofür willst du stehen?
🔑
API-Verbindung
XPRT nutzt Claude AI für intelligente Analysen und Empfehlungen.
✅ Kostenlos starten: Du bekommst 50 AI-Anfragen pro Tag — genug für mehrere Sparring-Sessions und Analysen. Optional: Eigenen API-Key für unbegrenzten Zugang.
AI API Key (optional — ohne Key: 50 Anfragen/Tag kostenlos)
Modell
API Endpoint (nur ändern wenn eigener Proxy)
`); win.document.close(); setTimeout(()=>win.print(),500); } // ═══ PDF REPORT BUILDER ═══ function renderReports(){ const v=document.getElementById('v-reports'); updateReportView(v); } function updateReportView(v){ if(!v)v=document.getElementById('v-reports'); const q=S.reportQueue||[]; v.innerHTML=`

PDF Report Builder

Stelle Analysen und Dokumente zusammen und exportiere sie als professionellen PDF-Report.

📑 Report-Queue (${q.length})
${q.length?`
${q.map((r,i)=>`
${r.icon||'📊'}
${esc(r.name)}
${new Date(r.date).toLocaleDateString('de-DE')} · ${r.type}
`).join('')}
`:`
📑
Noch keine Analysen im Report
Nutze Analyse-Tools oder Dokumente und füge sie per "Zum Report" hinzu.
`}
⚡ Schnell-Aktionen
💡Tipp
Du kannst auch aus jedem Tool-Ergebnis oder generierten Dokument direkt "Zum Report" klicken.
${q.length?`
🎨 Report-Einstellungen
`:''}`; } function addToReport(id,name,content){ if(!S.reportQueue)S.reportQueue=[]; const existing=document.getElementById('docContent')||document.getElementById('toolResult'); S.reportQueue.push({id,name,icon:DOCS.find(d=>d.id===id)?.ic||TOOLS.find(t=>t.id===id)?.ic||'📊',type:DOCS.find(d=>d.id===id)?'Dokument':'Analyse',date:new Date().toISOString(),content:content||(existing?existing.innerHTML:'')}); save();updateReportView(); const btn=event?.target;if(btn){btn.textContent='✅ Hinzugefügt';setTimeout(()=>{btn.textContent='📑 Zum Report'},1500);} } function removeFromReport(idx){S.reportQueue.splice(idx,1);save();updateReportView();} function clearReport(){if(confirm('Report-Queue leeren?')){S.reportQueue=[];save();updateReportView();}} async function addToolToReport(toolId){ const t=TOOLS.find(x=>x.id===toolId);if(!t)return; const btn=event?.target;if(btn){btn.textContent='⏳ Generiere...';btn.disabled=true;} const p=S.pro,a=S.assess; const prompts={ swot:`Erstelle eine kompakte SWOT-Analyse für ${p.company||'Startup'} (${il(p.industry)}, ${sl(p.stage)}). USP: ${p.usp}. Je 4 Punkte pro Quadrant + 3 Empfehlungen.`, pestel:`Erstelle eine PESTEL-Analyse für ${il(p.industry)} im ${p.markets.join('/')||'DACH'}-Markt. Pro Faktor 3 Trends mit Impact-Rating.`, canvas:`Erstelle ein Business Model Canvas für ${p.company||'das Startup'} (${il(p.industry)}). 9 Felder, je 3-4 Punkte.`, uniteco:`Berechne Unit Economics für ein ${il(p.industry)}-Unternehmen. ARPU ~€${p.revenue==='<5k'?'49':p.revenue==='5-20k'?'99':'199'}/Monat. CAC, LTV, Payback, Bewertung.`, funding:`Funding Readiness Assessment für ${p.company} (${sl(p.stage)}). Bewerte 7 Dimensionen mit Ampel-System.`, bizplan:`Executive Summary Business Plan für ${p.company} (${il(p.industry)}, ${sl(p.stage)}). Team: ${p.team}, USP: ${p.usp}. Kompakt auf 1 Seite.` }; try{ const res=await callSimple(prompts[toolId]||`Analyse "${t.n}" für ${p.company} (${il(p.industry)})`); addToReport(toolId,t.n,renderMD(res)); if(btn){btn.textContent='✅ Hinzugefügt';btn.disabled=false;setTimeout(()=>{btn.textContent=t.ic+' '+t.n+' hinzufügen'},1500);} }catch(e){if(btn){btn.textContent='❌ Fehler';btn.disabled=false;}} } function exportReport(){ const q=S.reportQueue||[];if(!q.length)return; const title=document.getElementById('rptTitle')?.value||S.pro.company+' Report'; const forName=document.getElementById('rptFor')?.value||S.pro.name; const win=window.open('','_blank','width=900,height=700'); win.document.write(`XPRT — AI Executive Mentor | ZehnX Academy
XPRT by ZehnX

${esc(title)}

Erstellt für ${esc(forName)} · ${new Date().toLocaleDateString('de-DE',{day:'numeric',month:'long',year:'numeric'})}
${q.length} Analysen & Dokumente
Inhaltsverzeichnis
${q.map((r,i)=>`
${i+1}. ${r.name} · ${r.type}
`).join('')}
${q.map((r,i)=>`
${r.icon} ${i+1}. ${r.name}
${r.content}
`).join('')} `); win.document.close(); setTimeout(()=>win.print(),600); } // ═══ TOOL RESULT → REPORT BRIDGE ═══ // ═══ WELLBEING HUB ═══ function renderWellbeing(){ const v=document.getElementById('v-wellbeing'); const w=S.wellbeing||{mood:[],energy:[],stress:[],streak:0,lastCheck:null}; const today=new Date().toISOString().split('T')[0]; const checkedToday=w.lastCheck===today; const avgMood=w.mood.length?Math.round(w.mood.slice(-7).reduce((a,b)=>a+b.v,0)/Math.min(7,w.mood.length)*10)/10:0; const avgEnergy=w.energy.length?Math.round(w.energy.slice(-7).reduce((a,b)=>a+b.v,0)/Math.min(7,w.energy.length)*10)/10:0; const avgStress=w.stress.length?Math.round(w.stress.slice(-7).reduce((a,b)=>a+b.v,0)/Math.min(7,w.stress.length)*10)/10:0; v.innerHTML=`

Wellbeing Hub

High Performance braucht High Recovery. Mental Health, Energie und Longevity — für nachhaltige Spitzenleistung.

${!checkedToday?`
🌅 Dein Daily Check-in

Wie geht es dir heute? Dein Mentor trackt dein Wohlbefinden und gibt dir personalisierte Tipps.

😊 Stimmung
${[{v:1,e:'😰',l:'Schlecht'},{v:2,e:'😕',l:'Mäßig'},{v:3,e:'😐',l:'Okay'},{v:4,e:'🙂',l:'Gut'},{v:5,e:'😄',l:'Super'}].map(o=>``).join('')}
⚡ Energie-Level
${[{v:1,e:'🪫',l:'Leer'},{v:2,e:'🔋',l:'Niedrig'},{v:3,e:'⚡',l:'Mittel'},{v:4,e:'💪',l:'Hoch'},{v:5,e:'🔥',l:'Peak'}].map(o=>``).join('')}
🧘 Stress-Level
${[{v:1,e:'😌',l:'Entspannt'},{v:2,e:'🙂',l:'Leicht'},{v:3,e:'😤',l:'Mittel'},{v:4,e:'😰',l:'Hoch'},{v:5,e:'🤯',l:'Overload'}].map(o=>``).join('')}
`:`
Check-in für heute erledigt${w.streak>1?' · '+w.streak+' Tage Streak 🔥':''}
Gut gemacht! Regelmäßige Self-Awareness ist die Basis für nachhaltige Performance.
`}
📊 7-Tage-Trend
${w.mood.length?['Stimmung','Energie','Stress'].map((l,i)=>{ const data=[w.mood,w.energy,w.stress][i]; const vals=data.slice(-7); const avg=vals.length?Math.round(vals.reduce((a,b)=>a+b.v,0)/vals.length*10)/10:0; const col=i===2?(avg>3?'var(--err)':'var(--ok)'):(avg>=4?'var(--ok)':avg>=3?'var(--warn)':'var(--err)'); return `
${l}
${avg}/5
`; }).join(''):'
Noch keine Daten — starte dein erstes Check-in!
'}
🧘 Quick Resets
${[{ic:'🫁',n:'Box Breathing',d:'4-4-4-4 Atemübung · 2 Min',a:'boxBreathing()'},{ic:'🧠',n:'Gedanken-Dump',d:'Alles rausschreiben was im Kopf ist · 5 Min',a:'go(\"journal\")'},{ic:'💪',n:'Power Posing',d:'2 Min aufrechte Haltung · Cortisol senken',a:'powerPosing()'},{ic:'🎯',n:'3-3-3 Grounding',d:'3 Dinge sehen, 3 hören, 3 fühlen · Sofort',a:'grounding333()'}].map(r=>`
${r.ic}
${r.n}
${r.d}
`).join('')}
🔬 Longevity & Peak Performance
${[{ic:'😴',t:'Schlaf',tip:'7-9h, feste Zeiten, 18°C Raum, kein Screen 1h vorher'},{ic:'🏃',t:'Bewegung',tip:'150 Min/Woche moderat ODER 75 Min intensiv + 2× Kraft'},{ic:'🥗',t:'Ernährung',tip:'Mediterranean Diet, 16:8 Intermittent Fasting, 2L Wasser'},{ic:'🧘',t:'Mindfulness',tip:'10 Min täglich Meditation (Headspace/Calm/Timer)'},{ic:'🤝',t:'Social',tip:'Min. 3× pro Woche Quality Time mit Menschen die dir wichtig sind'},{ic:'📵',t:'Digital Detox',tip:'Keine Screens nach 21h, 1 screenfreier Tag/Monat'}].map(p=>`
${p.ic}
${p.t}
${p.tip}
`).join('')}
💬 Wellbeing-Sparring
Dein XPRT-Mentor ist auch Coach für dein persönliches Wohlbefinden. Vertraulich und empathisch.
${['Ich fühle mich überfordert — was kann ich tun?','Wie baue ich bessere Routinen auf?','Work-Life-Balance als Gründer','Umgang mit Entscheidungsmüdigkeit','Wie sage ich Nein zu Ablenkungen?'].map(q=>``).join('')}
`; } let wbTemp={mood:0,energy:0,stress:0}; function setWB(type,val,el){ wbTemp[type]=val; el.parentElement.querySelectorAll('.onb-chip').forEach(c=>c.classList.remove('sel')); el.classList.add('sel'); const btn=document.getElementById('wbSubmit'); if(btn)btn.disabled=!(wbTemp.mood&&wbTemp.energy&&wbTemp.stress); } function submitWBCheck(){ const today=new Date().toISOString().split('T')[0]; if(!S.wellbeing)S.wellbeing={mood:[],energy:[],stress:[],streak:0,lastCheck:null}; S.wellbeing.mood.push({v:wbTemp.mood,d:today}); S.wellbeing.energy.push({v:wbTemp.energy,d:today}); S.wellbeing.stress.push({v:wbTemp.stress,d:today}); // Keep last 90 days if(S.wellbeing.mood.length>90)S.wellbeing.mood=S.wellbeing.mood.slice(-90); if(S.wellbeing.energy.length>90)S.wellbeing.energy=S.wellbeing.energy.slice(-90); if(S.wellbeing.stress.length>90)S.wellbeing.stress=S.wellbeing.stress.slice(-90); if(S.wellbeing.lastCheck){const diff=Math.floor((new Date(today)-new Date(S.wellbeing.lastCheck))/(1e3*60*60*24));S.wellbeing.streak=diff===1?S.wellbeing.streak+1:1;}else{S.wellbeing.streak=1;} S.wellbeing.lastCheck=today; wbTemp={mood:0,energy:0,stress:0}; save();renderWellbeing(); // Generate feel-good feedback genWBFeedback(S.wellbeing.mood.slice(-1)[0].v,S.wellbeing.energy.slice(-1)[0].v,S.wellbeing.stress.slice(-1)[0].v); } async function genWBFeedback(mood,energy,stress){ try{ const r=await callSimple(`Du bist ein empathischer Wellbeing-Coach. Gib ein kurzes, warmherziges Feedback (3-4 Sätze) basierend auf: Stimmung: ${mood}/5, Energie: ${energy}/5, Stress: ${stress}/5 Name: ${S.pro.name.split(' ')[0]} ${stress>3?'Stress ist hoch — gib einen konkreten Sofort-Tipp.':''} ${energy<3?'Energie ist niedrig — gib einen Energie-Boost-Tipp.':''} ${mood>=4&&stress<=2?'Alles gut — celebrate das! Ermutige weiterzumachen.':''} Sei warm, direkt und ermutigend. Deutsch. Maximal 4 Sätze. Kein "Als KI" — du bist der Coach.`,256); // Show as inline toast instead of alert const toast=document.createElement('div'); toast.style.cssText='position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--bgc);border:1px solid var(--ac);border-radius:var(--r2);padding:16px 20px;max-width:500px;z-index:9999;font-size:14px;color:var(--t1);line-height:1.6;box-shadow:0 8px 32px rgba(0,0,0,.4)'; toast.innerHTML='
💬 Dein Coach sagt:
'+r+'
'; document.body.appendChild(toast); updateUsageBadge(); }catch(e){} } function boxBreathing(){ const overlay=document.createElement('div'); overlay.style.cssText='position:fixed;inset:0;background:rgba(10,10,11,.95);z-index:9999;display:flex;align-items:center;justify-content:center;flex-direction:column;cursor:pointer'; overlay.onclick=()=>overlay.remove(); overlay.innerHTML=`
🫁
Einatmen...
4
Klicke zum Schließen
`; document.body.appendChild(overlay); const phases=['Einatmen...','Halten...','Ausatmen...','Halten...']; const icons=['🫁','⏸','💨','⏸']; let phase=0,count=4; const interval=setInterval(()=>{ count--; if(count<=0){phase=(phase+1)%4;count=4;if(phase===0){clearInterval(interval);overlay.innerHTML='
Gut gemacht!
Dein Cortisol-Level ist jetzt messbar niedriger.
';setTimeout(()=>overlay.remove(),3000);return;}} document.getElementById('bbText').textContent=phases[phase]; document.getElementById('bbIcon').textContent=icons[phase]; document.getElementById('bbCount').textContent=count; },1000); } function powerPosing(){ const ov=document.createElement('div'); ov.style.cssText='position:fixed;inset:0;background:rgba(10,10,11,.95);z-index:9999;display:flex;align-items:center;justify-content:center;flex-direction:column;cursor:pointer'; ov.onclick=()=>{clearInterval(ov._timer);ov.remove();}; let secs=120; ov.innerHTML=`
💪
Power Posing
Steh auf. Arme hoch oder Hände in die Hüften. Brust raus. Halte diese Pose.
2:00
Amy Cuddy: -25% Cortisol, +20% Testosteron
Klicke zum Schließen
`; document.body.appendChild(ov); ov._timer=setInterval(()=>{ secs--;if(secs<=0){clearInterval(ov._timer);ov.innerHTML='
🔥
Stark!
Dein Hormonhaushalt hat sich messbar verändert.
';setTimeout(()=>ov.remove(),3000);return;} const m=Math.floor(secs/60),s=secs%60; document.getElementById('ppCount').textContent=m+':'+(s<10?'0':'')+s; },1000); } function grounding333(){ const ov=document.createElement('div'); ov.style.cssText='position:fixed;inset:0;background:rgba(10,10,11,.95);z-index:9999;display:flex;align-items:center;justify-content:center;flex-direction:column'; const steps=[ {icon:'👀',title:'3 Dinge die du SIEHST',sub:'Schau dich um. Benenne 3 Dinge die du gerade sehen kannst.',pause:8}, {icon:'👂',title:'3 Dinge die du HÖRST',sub:'Schließe die Augen. Welche 3 Geräusche nimmst du wahr?',pause:8}, {icon:'✋',title:'3 Dinge die du FÜHLST',sub:'Berühre 3 Oberflächen. Wie fühlen sie sich an?',pause:8}, {icon:'✅',title:'Du bist hier.',sub:'Vollständig präsent. Der Stress gehört einem anderen Moment.',pause:4} ]; let step=0; function show(){ if(step>=steps.length){ov.remove();return;} const s=steps[step]; ov.innerHTML=`
${s.icon}
${s.title}
${s.sub}
${s.pause}
Schritt ${step+1}/${steps.length}
`; let t=s.pause; const iv=setInterval(()=>{t--;document.getElementById('gCount').textContent=t;if(t<=0){clearInterval(iv);step++;show();}},1000); } show(); } async function genLongevityPlan(){ const div=document.getElementById('longevityPlan'); div.innerHTML='
'; try{ const w=S.wellbeing||{}; const r=await callSimple(`Du bist ein Longevity- und Performance-Coach (Huberman-Lab-Niveau). Erstelle einen personalisierten Wellbeing-Plan: Name: ${S.pro.name}, Rolle: ${rl(S.pro.role)} bei ${S.pro.company} ${w.mood?.length?'Ø Stimmung letzte 7 Tage: '+(w.mood.slice(-7).reduce((a,b)=>a+b.v,0)/Math.min(7,w.mood.length)).toFixed(1)+'/5':''} ${w.stress?.length?'Ø Stress letzte 7 Tage: '+(w.stress.slice(-7).reduce((a,b)=>a+b.v,0)/Math.min(7,w.stress.length)).toFixed(1)+'/5':''} ${w.energy?.length?'Ø Energie letzte 7 Tage: '+(w.energy.slice(-7).reduce((a,b)=>a+b.v,0)/Math.min(7,w.energy.length)).toFixed(1)+'/5':''} Erstelle einen konkreten 7-Tage Peak Performance Plan mit: 1. Morgenroutine (basierend auf Huberman/Attia-Protokollen) 2. Bewegungsplan (realistisch für einen busy CEO) 3. Ernährungs-Hacks (schnell umsetzbar) 4. Schlaf-Optimierung 5. Stress-Management-Techniken 6. 1 Longevity-Hack pro Tag Konkret, evidenzbasiert, sofort umsetzbar. Deutsch.`,2048); div.innerHTML=renderMD(r); }catch(e){div.innerHTML=`Fehler: ${e.message}`;} } function wbSparring(q){ go('sparring');setMod('strategy'); document.getElementById('chatIn').value=q+' Bitte beziehe dich auf meinen Wellbeing-Status und sei empathisch aber direkt.'; document.getElementById('chatSend').disabled=false; send(); } // ═══ CEO JOURNAL ═══ function renderJournal(){ const v=document.getElementById('v-journal'); const entries=S.journal||[]; const today=new Date().toISOString().split('T')[0]; const todayEntry=entries.find(e=>e.date===today); v.innerHTML=`

CEO Journal

Reflektiere, plane, wachse. Dein privater Raum für Gedanken, Wins und Learnings.

📝 Heutiger Eintrag — ${new Date().toLocaleDateString('de-DE',{weekday:'long',day:'numeric',month:'long'})}
🏆 Mein größter Win heute
📚 Mein wichtigstes Learning
🎯 Mein Fokus für morgen
💭 Freie Gedanken
${entries.length>0?`
📅 Vergangene Einträge (${entries.length})
${entries.filter(e=>e.date!==today).slice(-10).reverse().map(e=>`
${new Date(e.date).toLocaleDateString('de-DE',{weekday:'short',day:'numeric',month:'short'})}
${e.win?'🏆 Win':''}${e.learn?'📚 Learning':''}
${e.win?'
Win: '+esc(e.win.substring(0,120))+(e.win.length>120?'...':'')+'
':''} ${e.learn?'
Learning: '+esc(e.learn.substring(0,120))+(e.learn.length>120?'...':'')+'
':''} ${e.focus?'
Fokus: '+esc(e.focus.substring(0,120))+(e.focus.length>120?'...':'')+'
':''}
`).join('')}
`:''}
💡Warum Journaling?
Harvard-Studien zeigen: CEOs die regelmäßig reflektieren, treffen 23% bessere Entscheidungen. 5 Minuten pro Tag reichen. Dein XPRT-Mentor nutzt deine Journal-Einträge (mit deiner Erlaubnis) um dich noch besser zu beraten.
`; } function saveJournal(){ const today=new Date().toISOString().split('T')[0]; const entry={ date:today, win:document.getElementById('jWin')?.value||'', learn:document.getElementById('jLearn')?.value||'', focus:document.getElementById('jFocus')?.value||'', free:document.getElementById('jFree')?.value||'' }; if(!S.journal)S.journal=[]; const idx=S.journal.findIndex(e=>e.date===today); if(idx>=0)S.journal[idx]=entry;else S.journal.push(entry); if(S.journal.length>365)S.journal=S.journal.slice(-365); // A6: Auto-extract to memory if(entry.win){S.memory.milestones.push({text:'Win: '+entry.win.substring(0,100),date:new Date().toISOString(),module:'journal'});if(S.memory.milestones.length>30)S.memory.milestones=S.memory.milestones.slice(-30);} if(entry.learn){S.memory.insights.push({text:'Learning: '+entry.learn.substring(0,100),date:new Date().toISOString(),module:'journal'});if(S.memory.insights.length>100)S.memory.insights=S.memory.insights.slice(-100);} save(); // A5: Inline toast instead of alert const toast=document.createElement('div'); toast.style.cssText='position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--ok);color:#000;padding:12px 24px;border-radius:var(--rf);font-size:14px;font-weight:600;z-index:9999'; toast.textContent='✅ Journal gespeichert!'; document.body.appendChild(toast); setTimeout(()=>toast.remove(),2000); } async function getJournalFeedback(){ const win=document.getElementById('jWin')?.value; const learn=document.getElementById('jLearn')?.value; const focus=document.getElementById('jFocus')?.value; const free=document.getElementById('jFree')?.value; if(!win&&!learn&&!focus&&!free){alert('Schreib zuerst etwas ins Journal!');return;} go('sparring');setMod('strategy'); document.getElementById('chatIn').value=`Ich habe gerade meinen Journal-Eintrag gemacht. Gib mir warmherziges, konstruktives Feedback als mein Coach: ${win?'Mein Win heute: "'+win+'"':''} ${learn?'Mein Learning: "'+learn+'"':''} ${focus?'Mein Fokus für morgen: "'+focus+'"':''} ${free?'Meine Gedanken: "'+free+'"':''} Celebrate meinen Win, gib Feedback zum Learning, und challenge meinen Fokus für morgen — ist es wirklich die wichtigste Sache? Sei wie ein Coach der mich seit Jahren kennt.`; document.getElementById('chatSend').disabled=false; send(); } function exportToolPDF(title){ const body=document.querySelector('.tool-res-body');if(!body)return; const win=window.open('','_blank','width=800,height=600'); win.document.write(`XPRT — AI Executive Mentor | ZehnX Academy

${title}

${body.innerHTML} `); win.document.close();setTimeout(()=>win.print(),500); } // ═══ NEWSROOM ═══ const NEWS_CATEGORIES=[ {id:'ai',n:'AI & Tech',ic:'🤖',col:'var(--ac)'}, {id:'startup',n:'Startups & VC',ic:'🚀',col:'var(--gold)'}, {id:'legal',n:'Recht & Compliance',ic:'⚖️',col:'var(--err)'}, {id:'marketing',n:'Marketing & Growth',ic:'📣',col:'var(--pink)'}, {id:'finance',n:'Finance & Economy',ic:'📊',col:'var(--info)'}, {id:'dach',n:'DACH Business',ic:'🇩🇪',col:'var(--ok)'}, {id:'leadership',n:'Leadership & HR',ic:'👥',col:'var(--warn)'}, {id:'product',n:'Product & UX',ic:'🛠',col:'var(--ac2)'}, ]; function initNewsPrefs(){ if(!S.newsPrefs){S.newsPrefs=[];save();} } function renderNewsroom(){ initNewsPrefs(); const v=document.getElementById('v-news'); const hasPrefs=S.newsPrefs&&S.newsPrefs.length>0; v.innerHTML=`

Dein Newsroom

Personalisierte News und Insights — kuratiert für dein Business. Max. 5 Schwerpunkte.

⚙️ Deine Schwerpunkte (${(S.newsPrefs||[]).length}/5)
${NEWS_CATEGORIES.map(c=>``).join('')}
Wähle bis zu 5 Schwerpunkte für personalisierte News.
${hasPrefs?`
📡
News werden geladen...
`:`
📰
Wähle deine Schwerpunkte
Sobald du Schwerpunkte auswählst, werden personalisierte News generiert.
`}`; if(hasPrefs)loadNews(); } function toggleNewsPref(id,el){ if(!S.newsPrefs)S.newsPrefs=[]; const idx=S.newsPrefs.indexOf(id); if(idx>=0){S.newsPrefs.splice(idx,1);el.classList.remove('sel');} else if(S.newsPrefs.length<5){S.newsPrefs.push(id);el.classList.add('sel');} else{alert('Maximal 5 Schwerpunkte');return;} save(); } async function loadNews(){ const feed=document.getElementById('newsFeed'); const loading=document.getElementById('newsLoading'); if(loading)loading.style.display='block'; if(feed)feed.style.display='none'; const prefs=(S.newsPrefs||[]).map(id=>NEWS_CATEGORIES.find(c=>c.id===id)?.n).filter(Boolean); if(!prefs.length)return; try{ // Fetch REAL news from Supabase XPLR Newsroom const realNews=await fetchRealNews(prefs,20); let news=[]; if(realNews&&realNews.length){ // Map real Supabase articles to display format news=realNews.map(a=>{ const imp=a.impact==='high'||a.relevance_score>8?'high':a.impact==='low'||a.relevance_score<4?'low':'medium'; return{headline:a.title,source:a.source_name||'ZehnX',category:a.category||'AI & Tech',impact:imp,summary:a.summary_a1||'',meaning:'',action:''}; }); } else { // Fallback: AI-generated if Supabase fails const res=await callSimple(`Erstelle 8 aktuelle Business-News f\u00fcr: ${prefs.join(', ')}. JSON-Array mit headline,source,category,impact(high/medium/low),summary,meaning,action. NUR JSON.`,2048); try{const j=res.replace(/```json?\n?/g,'').replace(/```\n?/g,'').trim();news=JSON.parse(j)}catch(e){const m=res.match(/\[[\s\S]*\]/);if(m)news=JSON.parse(m[0])} } if(loading)loading.style.display='none'; if(feed){ feed.style.display='block'; feed.innerHTML=(news.length?'':'
Keine News gefunden.
')+news.map(n=>{ const cat=NEWS_CATEGORIES.find(c=>c.n===n.category)||NEWS_CATEGORIES[0]; const impactCol=n.impact==='high'?'var(--err)':n.impact==='medium'?'var(--warn)':'var(--ok)'; const impactIc=n.impact==='high'?'\uD83D\uDD34':n.impact==='medium'?'\uD83D\uDFE1':'\uD83D\uDFE2'; const impactLabel=n.impact==='high'?'HOHER IMPACT':n.impact==='medium'?'MITTLERER IMPACT':'NIEDRIGER IMPACT'; return `
${cat?.ic||'\uD83D\uDCF0'} ${n.category} ${impactIc} ${impactLabel}
${n.source}
${esc(n.headline)}
${n.summary?`
${esc(n.summary)}
`:''} ${n.meaning?`
\uD83D\uDCA1 Was das f\u00fcr dich bedeutet
${esc(n.meaning)}
`:''} ${n.action&&n.impact!=='low'?`
\uD83C\uDFAF Handlungsempfehlung
${esc(n.action)}
`:''}
`; }).join(''); } }catch(e){ if(loading)loading.style.display='none'; if(feed){feed.style.display='block';feed.innerHTML=`
\u26A0\uFE0F News konnten nicht geladen werden: ${e.message}
`;} } } function getDashNews(){ if(!S.newsPrefs||!S.newsPrefs.length)return ''; return `
📰 Dein Newsroom
Lade News...
`; } // ═══ UTILITIES ═══ function fmtC(n){return n>=1e6?'€'+(n/1e6).toFixed(1)+'M':n>=1e3?'€'+(n/1e3).toFixed(0)+'K':'€'+n.toLocaleString('de-DE')} function fmtT(d){return d.toLocaleTimeString('de-DE',{hour:'2-digit',minute:'2-digit'})} function esc(t){const d=document.createElement('div');d.textContent=t;return d.innerHTML} function renderMD(t){if(!t)return'';return t.replace(/```(\w*)\n([\s\S]*?)```/g,'
$2
').replace(/`([^`]+)`/g,'$1').replace(/\*\*(.+?)\*\*/g,'$1').replace(/\*(.+?)\*/g,'$1').replace(/^### (.+)$/gm,'

$1

').replace(/^## (.+)$/gm,'

$1

').replace(/^# (.+)$/gm,'

$1

').replace(/^- (.+)$/gm,'
  • $1
  • ').replace(/^(\d+)\. (.+)$/gm,'
  • $2
  • ').replace(/\n\n/g,'

    ').replace(/\n/g,'
    ').replace(/^/,'

    ').replace(/$/,'

    ').replace(/

    <\/p>/g,'');} function rl(r){const m={ceo:'CEO/GF',founder:'Gründer',solo:'Solopreneur',cto:'CTO',cfo:'CFO',cmo:'CMO',coo:'COO',vp:'VP/Director',board:'Vorstand'};return m[r]||r||'Gründer'} function il(i){const m={saas:'SaaS',ecom:'E-Commerce',fintech:'FinTech',health:'HealthTech',edtech:'EdTech',agency:'Agentur',industry:'Industrie',retail:'Einzelhandel',media:'Medien',realestate:'Immobilien',food:'Food&Bev'};return m[i]||i||'Tech'} function sl(s){const m={idea:'Idee/Pre-Seed',seed:'Seed',early:'Early Stage',growth:'Growth',scale:'Scale-Up',mid:'Mittelstand',enterprise:'Enterprise'};return m[s]||s||'Early Stage'} // ═══ INIT ═══ load(); if(S.done){document.getElementById('onb').classList.add('hide');document.getElementById('app').style.display='flex';boot();} else{initOnb();} document.getElementById('chatIn')?.addEventListener('input',function(){document.getElementById('chatSend').disabled=!this.value.trim();}); // State Sync — save to Supabase on changes (debounced) const _origSave = save; save = function(){_origSave();if(typeof stateSync!=='undefined')stateSync.save('xprt',S)}; // Load from Supabase on init (merge with localStorage) if(typeof stateSync!=='undefined'){stateSync.load('xprt').then(d=>{if(d&&d.pro){Object.keys(d).forEach(k=>{if(!S[k]||JSON.stringify(S[k])===JSON.stringify({}))S[k]=d[k]});save();console.log('XPRT: State synced from Supabase')}}).catch(()=>{})}