PageSourceSearch

https://pronoto.ai/assets/LearningPulseView-DxUhpkUY.js

js pronoto.ai collected 2026-09-24 14:07:59 UTC 78,861 bytes, 1 lines download raw bytes

1import{j as e}from"./ui-CTv85Rv1.js";import{r as a}from"./vendor-DKbj5SlQ.js";import{u as dt,j as Pt,a as we,n as At,aT as zt,by as _t,a7 as Ft,a3 as Et,aP as ve,d as W}from"./index-1VVpJ_5b.js";import{T as B,z as U}from"./firebase-lYA1aiCM.js";import{T as It,a as Lt,b as Ot}from"./tooltip-DOPeYVj_.js";import{I as Rt}from"./info-Bn1G6Bsl.js";import{T as Tt}from"./trending-up-Coil2FMT.js";const qt={"#06b6d4":"#0e7490","#1D9E75":"#0f6b4f","#22c55e":"#15803d","#3b82f6":"#1d4ed8","#60a5fa":"#1d4ed8","#8b5cf6":"#6d28d9","#EF9A28":"#b45309","#a78bfa":"#7c3aed","#c4b5fd":"#6d28d9","#ef4444":"#b91c1c","#f59e0b":"#b45309","#f97316":"#c2410c","#fb923c":"#c2410c","#fcd34d":"#b45309"};function _e(f,v){return v?qt[f]??f:f}const Wt=new Date().toISOString().split("T")[0];function Be(f){return`pronoto_pulse_${f}_${Wt}`}function Bt(f){const v=Math.floor((Date.now()-f)/6e4);if(v<1)return"just now";if(v<60)return`${v}m ago`;const m=Math.floor(v/60);return m<24?`${m}h ago`:`${Math.floor(m/24)}d ago`}function Ut(f){try{const v=localStorage.getItem(Be(f));return v?JSON.parse(v):null}catch{return null}}function Yt(f,v){try{localStorage.setItem(Be(f),JSON.stringify({timestamp:Date.now(),...v}))}catch{}}const Te=new Set(["a","an","the","and","or","but","in","on","at","to","for","of","with","by","is","it","its","this","that","what","how","why","when","where","who","which","as","from","into","than","i","me","my","we","our","you","your","they","their","us","he","she","him","her","its","can","could","would","should","will","do","does","did","have","has","had","be","been","being","are","was","were","am","not","no","so","if","then","get","make","want","need","use","using","used","take","give","go","come","say","said","know","think","let","put","seem","keep","hold","turn","show","tell","ask","work","try","call","play","move","live","help","please","explain","describe","write","create","find","list","summarize","summary","definition","define","meaning","example","examples","basically","actually","just","really","also","about","some","any","all","more","up","out","like","okay","sure","thanks","hello","hey","hi","sure","yes","yeah","no","nope","okay","ok","cool","great","good","bad","nice","learn","learning","study","studying","understand","understanding","concept","concepts","topic","topics","subject","subjects","question","questions","answer","answers","test","quiz","quizzes","card","cards","deck","decks","flash","flashcard","note","notes","noto","pronoto","plan","plans","planning","practice","practicing","review","reviewing","make","course","courses","lesson","lessons","lecture","lectures","chapter","chapters","section","point","points","important","main","key","basic","simple","easy","hard","difficult","general","specific","different","same","new","old","first","last","next","back","time","today","tomorrow","yesterday","week","month","year","day","now","then","soon","one","two","three","four","five","six","seven","eight","nine","ten","multiple","several","various","certain","every","each","many","much","few","little","another","other","others","such","same","most","least","less","more","very","quite","rather","almost","nearly","exactly","simply","only","even","just","still","already","often","never","always","sometimes","usually","maybe","perhaps","probably","might","wait","waiting","label","labeled","called","named","based","related","given","known","done","made","seen","used","found","needed","wanted","trying","doing","going","looking","working","saying","talking","thinking","asking","telling","getting","making","taking","thing","things","stuff","item","items","part","parts","type","types","kind","kinds","way","ways","method","methods","approach","option","options","choice","choices","result","results","information","detail","details","info","data","fact","facts","reason","reasons","problem","problems","issue","issues","idea","ideas","aspect","aspects","feature","features","benefit","benefits","effect","effects","impact","value","values","step","steps","process","difference","differences","relationship","relationships"]);function Ht(f,v=8){const m={};for(const b of f)for(const S of b.messages??[]){if(S.role!=="user"||!S.content)continue;const o=S.content.toLowerCase().replace(/[^a-z0-9\s]/g," ").split(/\s+/).filter(N=>N.length>3);for(let N=0;N<o.length-1;N++){const Y=o[N],D=o[N+1];if(!Te.has(Y)&&!Te.has(D)&&Y.length>4&&D.length>4){const K=`${Y} ${D}`;m[K]=(m[K]??0)+1}}for(const N of o)N.length>4&&!Te.has(N)&&(m[N]=(m[N]??0)+1)}const u=Object.entries(m).map(([b,S])=>({topic:b,count:S}
1)).sort((b,S)=>S.count-b.count),h=new Set;for(const{topic:b}of u)if(b.includes(" "))for(const S of b.split(" "))h.add(S);return u.filter(({topic:b})=>!h.has(b)).slice(0,v)}const ct=10080*60*1e3,Qt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Kt=3,Vt=["you know","sort of","kind of","i mean","you see","basically","actually","literally","honestly","clearly","obviously","um","uh","like","right","well"];function je(f){return new Date(f).toISOString().split("T")[0]}function ze(f){const v=new Date;return v.setDate(v.getDate()-f),je(v.getTime())}function qe({value:f,label:v,sub:m,color:u,glow:h}){const{theme:b}=we(),S=b!=="dark",o=_e(u,S);return e.jsxs("div",{className:"rounded-2xl p-4 flex flex-col gap-1.5 relative overflow-hidden border",style:{background:`${u}18`,borderColor:`${u}50`},children:[h&&e.jsx("div",{className:"absolute top-0 right-0 w-24 h-24 rounded-full pointer-events-none",style:{background:`radial-gradient(circle, ${u}35 0%, transparent 70%)`,transform:"translate(30%, -30%)"}}),e.jsx("span",{className:"text-4xl font-black leading-none",style:{color:o,textShadow:S?void 0:`0 0 24px ${u}80`},children:f}),e.jsx("span",{className:"text-sm font-semibold leading-tight",style:{color:"rgb(var(--foreground) / 0.85)"},children:v}),m&&e.jsx("span",{className:"text-xs leading-tight",style:{color:"rgb(var(--muted-foreground) / 0.85)"},children:m})]})}function se({emoji:f,title:v,value:m,sub:u,color:h}){const{theme:b}=we(),S=b!=="dark",o=_e(h,S);return e.jsxs("div",{className:"rounded-2xl p-4 border flex items-center gap-3",style:{background:`${h}14`,borderColor:`${h}40`},children:[e.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center text-2xl shrink-0",style:{background:`${h}25`},children:f}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest leading-none mb-1.5",style:{color:S?o:`${h}cc`},children:v}),e.jsx("p",{className:"text-[15px] font-bold leading-snug text-foreground",children:m}),u&&e.jsx("p",{className:"text-xs mt-1 leading-tight",style:{color:"rgb(var(--muted-foreground))"},children:u})]})]})}function Gt({icon:f,message:v,progress:m,goal:u,color:h}){const b=Math.min(100,Math.round(m/u*100));return e.jsxs("div",{className:"rounded-2xl p-4 border",style:{background:"rgb(var(--muted) / 0.3)",borderColor:"rgb(var(--border))"},children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center text-xl shrink-0",style:{background:"rgb(var(--muted) / 0.5)"},children:f}),e.jsx("p",{className:"text-[13px] font-semibold leading-snug",style:{color:"rgb(var(--muted-foreground))"},children:v})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-1.5 rounded-full",style:{background:"rgb(var(--border))"},children:e.jsx("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${b}%`,background:h}})}),e.jsxs("span",{className:"text-[11px] font-bold shrink-0",style:{color:"rgb(var(--muted-foreground) / 0.6)"},children:[m,"/",u]})]})]})}function Jt({segments:f}){const v=f.reduce((m,u)=>m+u.count,0);return v===0?null:e.jsxs("div",{className:"space-y-2 mt-3",children:[e.jsx("div",{className:"flex h-2.5 rounded-full overflow-hidden gap-px",children:f.map(m=>m.count>0&&e.jsx("div",{className:"transition-all duration-700",style:{width:`${m.count/v*100}%`,background:m.color}},m.label))}),e.jsx("div",{className:"flex gap-4 flex-wrap",children:f.map(m=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:m.color}}),e.jsxs("span",{className:"text-[11px] font-semibold",style:{color:"rgb(var(--muted-foreground))"},children:[m.label," ",e.jsx("span",{style:{color:"rgb(var(--muted-foreground) / 0.6)"},children:"·"})," ",m.count]})]},m.label))})]})}const We=[{key:"notes",label:"Notes",color:"#3b82f6"},{key:"mindmap",label:"Mindmaps",color:"#8b5cf6"},{key:"ai",label:"AI queries",color:"#06b6d4"},{key:"prompter",label:"Teleprompter",color:"#fb923c"},{key:"quiz",label:"Quizzes",color:"#f59e0b"}];function Xt({days:f}){const[v,m]=a.useState(null),u=44,h=Math.max(...f.map(b=>b.total),1);return e.jsxs("div",{children:[e.jsx("div",{className:"flex items-end gap-2",style:{height:u+24},children:f.map(({d:b,dayLabel:S,isToday:o,counts:N,total:Y},D)=>{const K=Y>0?Math.max(5,Math.round(Y/h*u)):0,M=Y>0?We.filter(_=>N[_.key]>0).map(_=>`${N[_.key]} ${_.label}`).join(" · "):"No activity";return e.jsxs("div",{className:"flex-1 flex flex-col items-center gap-1 relative cursor-default",style:{height:u+24},onMouseEnter:()=>m(D),onMouseLeave:()=>m(null),children:[v===D&&e.jsxs("div",{className:"absolute bottom-full mb-2 left-1/2 z-10 whitespace-nowrap px-2.5 py-1.5 rounded-lg text-[11px] font-semibold pointer-events-none bg-popover border border-border shadow-md",style:{color:"rgb(var(--foreground))",transform:"translateX(-50%)"},children:[e.jsxs("span",{style:{color:"rgb(var(--foreground) / 0.6)"},children:[o?"Today":S,": "]}),e.jsx("span",{children:M})]}),e.jsx("div",{className:"flex-1 flex items-end w-full",children:Y>0?e.jsx("div",{className:"w-full rounded-md overflow-hidden flex flex-col-reverse",style:{height:K},children:We.map(({key:_,color:A})=>N[_]>0?e.jsx("div",{style:{background:A,flex:N[_],minHeight:2}},_):null)}):e.jsx("div",{className:"w-full rounded-sm",style:{height:3,background:"rgb(var(--muted) / 0.5)"}})}),e.jsx("span",{className:"text-[9px] font-semibold",style:{color:o?"rgb(var(--foreground) / 0.7)":"rgb(var(--muted-foreground) / 0.45)"},children:o?"Today":S})]},b)})}),e.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 mt-2.5",children:We.map(({key:b,label:S,color:o})=>e.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold",style:{color:"rgb(var(--muted-foreground) / 0.6)"},children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full inline-block shrink-0",style:{background:o}}),S]},b))})]})}function it({weeks:f,maxCount:v}){const[m,u]=a.useState(null),{theme:h}=we(),b=h!=="dark";return e.jsx("div",{className:"flex items-end gap-1 h-16 relative",children:f.map(({weekStart:S,label:o,count:N,isCurrent:Y},D)=>e.jsxs("div",{className:"flex-1 flex flex-col items-center gap-1 relative",onMouseEnter:()=>u(D),onMouseLeave:()=>u(null),children:[m===D&&e.jsxs("div",{className:"absolute bottom-full mb-2 left-1/2 z-10 whitespace-nowrap px-2.5 py-1.5 rounded-lg text-[11px] font-semibold pointer-events-none bg-popover dark:bg-[rgba(20,20,35,0.95)] border border-orange-500/40 shadow-md",style:{color:"rgb(var(--foreground))",transform:"translateX(-50%)"},children:[e.jsxs("span",{style:{color:b?"#c2410c":"#fb923c"},children:[N," session",N!==1?"s":""]}),e.jsxs("span",{style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:[" · ",o]})]}),e.jsx("div",{className:"w-full flex flex-col justify-end",style:{height:44},children:N===0?e.jsx("div",{className:"w-full rounded-sm",style:{height:2,background:m===D?"rgb(var(--accent-foreground) / 0.15)":"rgb(var(--border))",transition:"background 0.15s"}}):e.jsx("div",{className:"w-full rounded-t-sm transition-all duration-700",style:{height:`${Math.max(12,N/v*100)}%`,background:Y?"linear-gradient(180deg, #fb923c, #f97316)":m===D?"rgba(249,115,22,0.85)":N===v?"rgba(249,115,22,0.75)":"rgba(249,115,22,0.45)",boxShadow:Y||m===D?"0 0 14px rgba(249,115,22,0.6)":void 0,transition:"background 0.15s, box-shadow 0.15s"}})}),N>0&&e.jsx("span",{className:"text-[9px] font-bold leading-none",style:{color:m===D?"#fb923c":"rgba(249,115,22,0.7)"},children:N})]},S))})}function ns({notes:f,scripts:v,folders:m}){const{user:u}=dt(),{theme:h}
1=we(),b=h!=="dark",[S,o]=a.useState([]),[N,Y]=a.useState(0);a.useEffect(()=>{if(!(u!=null&&u.uid))return;const k=u.uid;async function O(){const[J,de]=await Promise.all([B(U(W,`users/${k}/quiz_results`)),B(U(W,`users/${k}/flashcard_usage/total`))]),ke=J.exists()?Object.entries(J.val()).map(([ee,H])=>({id:ee,...H})).filter(ee=>Number.isFinite(ee.total)&&ee.total>0&&Number.isFinite(ee.score)).sort((ee,H)=>H.playedAt-ee.playedAt):[];o(ke),Y(de.exists()?de.val():0)}O().catch(()=>{})},[u==null?void 0:u.uid]);const D=a.useMemo(()=>f.filter(k=>String(k.type)==="2"&&!k.trash&&!k.demo),[f]),K=a.useMemo(()=>v.filter(k=>!k.trash&&!k.demo),[v]),M=a.useMemo(()=>m.filter(k=>String(k.type)==="2"&&!k.trash),[m]),_=a.useMemo(()=>{const k=new Set(D.map(de=>je(de.updated_at??0)));let O=0,J=0;for(;k.has(ze(J));)O++,J++;return O},[D]),A=a.useMemo(()=>S.filter(k=>{var O;return!((O=k.deckId)!=null&&O.startsWith("__"))}).slice(0,3),[S]),re=A.length>0?Math.round(A.reduce((k,O)=>k+O.score/O.total*100,0)/A.length):null,G=re==null?"#8b5cf6":re>=80?"#22c55e":re>=60?"#f59e0b":"#ef4444",le=K.length>0&&K.length>=D.length?"Presenter":D.length>=5?"Note Taker":"Getting Started",Ne=le==="Presenter"?"🎙️":le==="Note Taker"?"📝":"🌱",ne=le==="Presenter"?"#8b5cf6":le==="Note Taker"?"#3b82f6":"#a78bfa";return e.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto bg-background",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-5 space-y-4",children:[e.jsxs("div",{className:"rounded-2xl p-4 relative overflow-hidden border",style:{background:`linear-gradient(135deg, ${ne}14 0%, ${ne}06 100%)`,borderColor:`${ne}30`},children:[e.jsx("div",{className:"absolute top-0 right-0 w-40 h-40 pointer-events-none",style:{background:`radial-gradient(circle, ${ne}20 0%, transparent 70%)`,transform:"translate(20%, -20%)"}}),e.jsxs("div",{className:"relative",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest mb-2",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:"Your learning style"}),e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx("span",{className:"text-2xl",children:Ne}),e.jsx("span",{className:"text-xl font-black",style:{color:ne},children:le})]}),e.jsx("p",{className:"text-[13px] leading-snug",style:{color:"rgb(var(--muted-foreground))"},children:D.length>0?`${D.length} note${D.length!==1?"s":""} captured${_>0?` · ${_}-day streak`:""}`:"Keep going — insights unlock as you use Pronoto more"})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-2.5",children:[e.jsx(qe,{value:D.length,label:"Notes",sub:M.length>0?`across ${M.length} space${M.length!==1?"s":""}`:"in your library",color:"#3b82f6",glow:!0}),e.jsx(qe,{value:N>0?N:K.length,label:N>0?"Cards reviewed":"Scripts",sub:N>0?"flashcards practised":K.length>0?"ready to practise":"create your first",color:"#8b5cf6",glow:!0}),e.jsx(qe,{value:_,label:"Day streak",sub:_>0?"keep it going 🔥":"start your streak",color:"#f59e0b",glow:!0})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-2.5",children:[e.jsx("div",{className:"rounded-2xl p-4 border",style:{background:"#f59e0b14",borderColor:"#f59e0b40"},children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center text-2xl shrink-0",style:{background:"#f59e0b25"},children:"🔥"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest mb-1.5",style:{color:b?"#b45309cc":"#f59e0bcc"},children:"Learning streak"}),_>0?e.jsxs("p",{className:"text-[15px] font-bold text-foreground",children:[_," day",_!==1?"s":""," in a row — keep it up"]}):e.jsx("p",{className:"text-[15px] font-bold text-foreground",children:"Add a note today to start your streak"}),e.jsx("p",{className:"text-xs mt-1",style:{color:"rgb(var(--muted-foreground))"},children:_>=7?"Incredible consistency this week":_>=3?"You're building a great habit":"Consistency is how things stick"})]})]})}),e.jsx("div",{className:"rounded-2xl p-4 border",style:{background:`${G}14`,borderColor:`${G}40`},children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center text-2xl shrink-0",style:{background:`${G}25`},children:"🎯"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest mb-1.5",style:{color:`${G}cc`}
1,children:"Quiz scores"}),re!=null?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-[15px] font-bold text-foreground",children:["Avg ",re,"% across ",A.length," quiz",A.length!==1?"zes":""]}),e.jsx("div",{className:"mt-2 h-1.5 rounded-full",style:{background:"rgb(var(--border))"},children:e.jsx("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${re}%`,background:G}})})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-[15px] font-bold text-foreground",children:"No quizzes taken yet"}),e.jsx("p",{className:"text-xs mt-1",style:{color:"rgb(var(--muted-foreground))"},children:"Take a quiz to see your scores here"})]})]})]})}),A.length>0&&e.jsxs("div",{className:"rounded-2xl p-4 border lg:col-span-2",style:{background:"#3b82f614",borderColor:"#3b82f640"},children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest mb-3",style:{color:b?"#1d4ed8cc":"#3b82f6cc"},children:"Recent quiz history"}),e.jsx("div",{className:"flex flex-col gap-2",children:A.map(k=>{const O=Math.round(k.score/k.total*100),J=O>=80?"#22c55e":O>=60?"#f59e0b":"#ef4444";return e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[13px] font-semibold text-foreground truncate",children:k.spaceName||"Quiz"}),e.jsxs("p",{className:"text-[11px]",style:{color:"rgb(var(--muted-foreground))"},children:[k.score,"/",k.total," correct · ",k.difficulty]})]}),e.jsxs("span",{className:"text-[13px] font-black shrink-0",style:{color:J},children:[O,"%"]})]},k.id)})})]})]}),e.jsxs("div",{className:"relative min-h-[200px]",children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-2.5 select-none pointer-events-none",style:{filter:"blur(4px)",opacity:.4},children:[e.jsx("div",{className:"rounded-2xl p-4 border",style:{background:"#EF9A2814",borderColor:"#EF9A2840"},children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center text-2xl shrink-0",style:{background:"#EF9A2825"},children:"🎯"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest mb-1.5",style:{color:b?"#b45309cc":"#EF9A28cc"},children:"Weakest topic"}),e.jsx("p",{className:"text-[15px] font-bold text-foreground",children:'You struggle with "Interview Prep"'}),e.jsx("p",{className:"text-xs mt-1",style:{color:"rgb(var(--muted-foreground))"},children:"5 quiz attempts · avg 42% accuracy"})]})]})}),e.jsx("div",{className:"rounded-2xl p-4 border",style:{background:"#8b5cf614",borderColor:"#8b5cf640"},children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center text-2xl shrink-0",style:{background:"#8b5cf625"},children:"🗣️"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest mb-1.5",style:{color:b?"#6d28d9cc":"#8b5cf6cc"},children:"Speaking practice"}),e.jsx("p",{className:"text-[15px] font-bold text-foreground",children:"12 teleprompter sessions this week"}),e.jsx("p",{className:"text-xs mt-1",style:{color:"rgb(var(--muted-foreground))"},children:"Avg 4.2 min per session"})]})]})})]}),e.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center z-10",children:e.jsxs("div",{className:"rounded-2xl px-6 py-5 text-center max-w-[300px] bg-popover dark:bg-[rgba(10,10,16,0.92)] border border-purple-500/40 shadow-xl dark:shadow-[0_8px_40px_rgba(0,0,0,0.7)]",children:[e.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center mx-auto mb-3",style:{background:"rgba(139,92,246,0.15)",border:"1px solid rgba(139,92,246,0.3)"},children:e.jsx(ve,{className:"h-5 w-5",style:{color:b?"#7c3aed":"#a78bfa"}})}),e.jsx("p",{className:"font-bold text-[15px] text-foreground mb-1.5",children:"Unlock advanced insights"}),e.jsx("p",{className:"text-[12px] leading-relaxed mb-4",style:{color:"rgb(var(--muted-foreground) / 0.85)"},children:"Weakest topic analysis, speaking analytics, topics explored, and personalised practice coaching."}),e.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("pronoto:open-upgrade")),className:"w-full py-2.5 rounded-xl text-sm font-semibold text-white",style:{background:"linear-gradient(135deg, #8b5cf6, #6d28d9)"},children:"Upgrade to Plus →"})]})})]})]})})}function cs({notes:f,scripts:v,folders:m,onTabSwitch:u}){var ot;const{user:h}=dt(),{isPaid:b}=Pt(),{theme:S}=we(),o=S!=="dark",[N,Y]=a.useState(()=>{try{return localStorage.getItem("pronoto_pulse_intro_seen")==="1"}catch{return!1}}),[D,K]=a.useState([]),[M,_]=a.useState([]),[A,re]=a.useState({}),[G,le]=a.useState(0),[Ne,ne]=a.useState({}),[k,O]=a.useState({}),[J,de]=a.useState({}),[ke,ee]=a.useState([]),[H,ut]=a.useState([]),[X,pt]=a.useState([]),[V,mt]=a.useState(0),[Ue,gt]=a.useState(0),[$e,Se]=a.useState(null),[Me,Ce]=a.useState(0),[Ye,ht]=a.useState(0),[Fe,xt]=a.useState(0),[ge,Ee]=a.useState(!1),[he,Ie]=a.useState(!1),[He,ft]=a.useState(0),[Qe,Ke]=a.useState(null);a.useEffect(()=>{At.capture("pulse_viewed")},[]),a.useEffect(()=>{if(!(h!=null&&h.uid))return;const t=h.uid;function s(l){_(l.chatSessions),re(l.prompterPlaysByDate),le(l.totalCardsReviewed),ne(l.cardReviewsByMonth),O(l.aiQueriesByDate),de(l.voiceNotesByDate),ee(l.personalisationRole),ut(l.quizResults),pt(l.mindmaps),K(l.decks),ht(l.completedPlansCount),xt(l.completedRecallCount),mt(()=>{if(l.prompterSpeed&&l.prompterSpeed>0)return l.prompterSpeed;const n=parseInt(localStorage.getItem("pronoto-tp-speed")||"")||
10;return n>0?Math.max(80,Math.min(250,Math.round(n*.38))):0}),gt(()=>parseInt(localStorage.getItem("pronoto-tp-speed")||"")||0),Ee(!0),Ie(!1)}const r=He===0?Ut(t):null;if(r){s(r),Ke(r.timestamp);return}async function c(){const[l,n,i,g,d,p,C,w,q,me,Re,at,lt]=await Promise.all([B(U(W,`users/${t}/ai_chats`)),B(U(W,`users/${t}/usage/prompter_plays`)),B(U(W,`users/${t}/flashcard_usage/total`)),B(U(W,`users/${t}/flashcard_usage/months`)),B(U(W,`users/${t}/usage/ai_queries`)),B(U(W,`users/${t}/usage/voice_notes`)),B(U(W,`users/${t}/personalisation/who_are_you`)),B(U(W,`users/${t}/plans`)),B(U(W,`users/${t}/recall_items`)),B(U(W,`users/${t}/mindmaps`)),B(U(W,`users/${t}/decks`)),B(U(W,`users/${t}/quiz_results`)),B(U(W,`users/${t}/settings/speed`))]),kt=l.exists()?Object.values(l.val()):[],$t=q.exists()?Object.entries(q.val()).map(([I,ae])=>({id:I,...ae,cards:ae.cards||[]})).sort((I,ae)=>ae.regeneratedAt-I.regeneratedAt):[],St=me.exists()?Object.entries(me.val()).map(([I,ae])=>({id:I,...ae})).filter(I=>Number.isFinite(I.total)&&I.total>0&&Number.isFinite(I.score)).sort((I,ae)=>ae.playedAt-I.playedAt):[],Mt=w.exists()?Object.values(w.val()):[],Ct=at.exists()?Object.values(at.val()).filter(I=>I.status==="completed").length:0,Dt=lt.exists()?Object.values(lt.val()).filter(I=>!!I.completedAt).length:0,nt={chatSessions:kt,prompterPlaysByDate:n.exists()?n.val():{},totalCardsReviewed:i.exists()?i.val():0,cardReviewsByMonth:g.exists()?g.val():{},aiQueriesByDate:d.exists()?d.val():{},voiceNotesByDate:p.exists()?p.val():{},personalisationRole:C.exists()?C.val():[],quizResults:St,mindmaps:Mt,decks:$t,completedPlansCount:Ct,completedRecallCount:Dt,prompterSpeed:(()=>{if(Re.exists()&&Number(Re.val())>0)return Number(Re.val());const I=parseInt(localStorage.getItem("pronoto-tp-speed")||"")||0;return I>0?Math.max(80,Math.min(250,Math.round(I*.38))):0})()};Yt(t,nt),s(nt),Ke(Date.now())}c().catch(()=>{Ee(!0),Ie(!1)})},[h==null?void 0:h.uid,He]);const bt=a.useCallback(()=>{if(!(!(h!=null&&h.uid)||he)){try{localStorage.removeItem(Be(h.uid))}catch{}Ee(!1),Ie(!0),ft(t=>t+1)}},[h==null?void 0:h.uid,he]),j=a.useMemo(()=>f.filter(t=>String(t.type)==="2"&&!t.trash&&!t.demo),[f]),x=a.useMemo(()=>v.filter(t=>!t.trash&&!t.demo),[v]),Q=a.useMemo(()=>m.filter(t=>String(t.type)==="2"&&!t.trash),[m]),Z=a.useMemo(()=>D.filter(t=>t.id!=="__demo__"&&t.cardCount>0),[D]);a.useEffect(()=>{if(!(h!=null&&h.uid)||x.length===0){Se(null),Ce(0);return}const t=h.uid;Promise.all(x.map(s=>zt(t,String(s.id)))).then(s=>{const r=s.flat();if(r.length===0){Se(null),Ce(0);return}const c=Math.round(r.reduce((l,n)=>l+n.wpm,0)/r.length);Se(c),Ce(r.length)}).catch(()=>{Se(null),Ce(0)})},[h==null?void 0:h.uid,x]);const{masteredCards:F,totalCards:P,inProgressCards:yt,notStartedCards:vt}=a.useMemo(()=>{let t=0,s=0,r=0,c=0;for(const l of Z){const n=Object.keys(l.masteredCards??{}).length;t+=l.cardCount,s+=n,l.lastStudied?r+=l.cardCount-n:c+=l.cardCount}return{totalCards:t,masteredCards:s,inProgressCards:r,notStartedCards:c}},[Z]),$=a.useMemo(()=>Object.values(A).reduce((t,s)=>t+s,0),[A]),R=a.useMemo(()=>{const t=Date.now()-ct;return Object.entries(A).filter(([s])=>new Date(s).getTime()>=t).reduce((s,[,r])=>s+r,0)},[A]),{streak:T,longestStreak:ce,consistency30:Ve}=a.useMemo(()=>{const t=new Set(j.map(d=>je(d.updated_at??0)));let s=0,r=0;for(;t.has(ze(r));)s++,r++;const c=Array.from(t).sort();let l=0,n=0,i=null;for(const d of c)n=i&&(new Date(d).getTime()-new Date(i).getTime())/864e5===1?n+1:1,l=Math.max(l,n),i=d;let g=0;for(let d=0;d<30;d++)t.has(ze(d))&&g++;return{streak:s,longestStreak:Math.max(l,s),consistency30:Math.round(g/30*100)}},[j]),ue=a.useMemo(()=>{const t=[0,0,0,0,0,0,0];for(const r of j)t[new Date(r.updated_at).getDay()]++;for(const[r,c]of Object.entries(A))t[new Date(r).getDay()]+=c;for(const r of M)t[new Date(r.updated_at).getDay()]++;const s=Math.max(...t);return s===0?null:{day:Qt[t.indexOf(s)],count:s}},[j,A,M]),xe=a.useMemo(()=>{const t=Object.entries(A);if(t.length===0)return 0;let s=0;for(const[r]of t){const c=new Date(r).getTime()+864e5,l=c-ct,n=t.filter(([i])=>{const g=new Date(i).getTime();return g>=l&&g<c}).reduce((i,[,g])=>i+g,0);s=Math.max(s,n)}return s},[A]),Ge=a.useMemo(()=>{const t=[...j.map(s=>s.updated_at),...x.map(s=>s.updated_at),...M.map(s=>s.updated_at)];return t.length===0?0:Math.floor((Date.now()-Math.min(...t))/864e5)},[j,x,M]),Je=a.useMemo(()=>{const t=Date.now()-6048e5;return j.filter(s=>(s.updated_at??0)>=t).length},[j]),Xe=a.useMemo(()=>{const t=Date.now()-6048e5;return X.filter(s=>(s.savedAt??0)>=t).length},[X]),Ze=a.useMemo(()=>{const t=Date.now()-6048e5;return H.filter(s=>s.playedAt>=t).length},[H]),De=a.useMemo(()=>H.filter(t=>{var s;return!((s=t.deckId)!=null&&s.startsWith("__"))}),[H]),Le=a.useMemo(()=>j.reduce((t,s)=>{if(!s.description)return t;const r=s.description.replace(/<[^>]*>/g," ").trim();
1return t+r.split(/\s+/).filter(Boolean).length},0),[j]),et=a.useMemo(()=>[{id:"first-note",emoji:"🏅",label:"First Note",done:j.length>=1,color:o?"#1d4ed8":"#3b82f6"},{id:"first-presentation",emoji:"🎤",label:"First Presentation",done:$>=1,color:o?"#c2410c":"#f97316"},{id:"words-1000",emoji:"📚",label:"1,000 Words Written",done:Le>=1e3,color:o?"#1d4ed8":"#3b82f6",progress:Le,total:1e3},{id:"streak-7",emoji:"🔥",label:"7-Day Streak",done:ce>=7,color:o?"#b45309":"#f59e0b",progress:ce,total:7},{id:"presentations-5",emoji:"⭐",label:"5 Presentations",done:$>=5,color:o?"#c2410c":"#fb923c",progress:$,total:5},{id:"cards-100",emoji:"🧠",label:"100 Cards Mastered",done:F>=100,color:o?"#15803d":"#22c55e",progress:F,total:100},{id:"quiz-10",emoji:"🎯",label:"10 Quizzes Completed",done:De.length>=10,color:o?"#b91c1c":"#ef4444",progress:De.length,total:10},{id:"streak-30",emoji:"💎",label:"30-Day Streak",done:ce>=30,color:o?"#6d28d9":"#8b5cf6",progress:ce,total:30},{id:"first-plan",emoji:"✨",label:"First Plan Completed",done:Ye>=1,color:o?"#6d28d9":"#8b5cf6"},{id:"recall-10",emoji:"🔔",label:"10 Recall Reviews",done:Fe>=10,color:o?"#7c3aed":"#a78bfa",progress:Fe,total:10},{id:"first-mindmap",emoji:"🗺️",label:"First Mind Map",done:X.length>=1,color:o?"#047857":"#10b981"},{id:"ask-noto-5",emoji:"💬",label:"5 Ask Noto Chats",done:M.length>=5,color:o?"#0e7490":"#06b6d4",progress:M.length,total:5}],[j.length,$,Le,F,ce,De.length,Ye,Fe,X.length,M.length]),fe=a.useMemo(()=>Object.values(k).reduce((t,s)=>t+s,0)+M.length,[k,M.length]),ie=a.useMemo(()=>Object.values(J).reduce((t,s)=>t+s,0),[J]),E=a.useMemo(()=>{const t=x.filter(r=>r.description&&r.description.trim().length>0);if(t.length===0)return 0;const s=t.reduce((r,c)=>{const l=c.description.replace(/<[^>]*>/g," ").trim();return r+l.split(/\s+/).filter(Boolean).length},0);return Math.round(s/t.length)},[x]),L=a.useMemo(()=>{if(Object.keys(A).length===0)return x;const s=Date.now()-336*60*60*1e3;return x.filter(r=>r.updated_at<s)},[x,A]),z=a.useMemo(()=>{if(x.length===0)return null;const t={},s=[];for(const n of x){if(!n.description)continue;const i=n.description.replace(/<[^>]*>/g," ").toLowerCase();let g=0;for(const d of Vt){const p=new RegExp(`\\b${d.replace(/ /g,"\\s+")}\\b`,"g"),C=(i.match(p)??[]).length;C>0&&(t[d]=(t[d]??0)+C,g+=C)}g>0&&s.push({title:n.title,count:g})}const r=Object.values(t).reduce((n,i)=>n+i,0);if(r===0)return null;const c=Object.entries(t).map(([n,i])=>({word:n,count:i})).sort((n,i)=>i.count-n.count).slice(0,4),l=s.sort((n,i)=>i.count-n.count)[0]??null;return{totalFillers:r,topFillers:c,worstScript:l}},[x]),te=a.useMemo(()=>x.map(t=>{const s=t.description?t.description.replace(/<[^>]*>/g," ").trim().split(/\s+/).filter(Boolean).length:0;return{...t,wordCount:s}}).filter(t=>t.wordCount>300).sort((t,s)=>s.wordCount-t.wordCount),[x]),jt=new Date().toISOString().slice(0,7),wt=(()=>{const t=new Date;return t.setMonth(t.getMonth()-1),t.toISOString().slice(0,7)})(),Pe=Ne[jt]??0,tt=Ne[wt]??0,be=a.useMemo(()=>Ht(M,8),[M]);(ot=a.useMemo(()=>be.filter(t=>t.count>=Kt),[be])[0])==null||ot.topic;const y=a.useMemo(()=>{if(H.length===0)return null;const t={};for(const r of H)t[r.spaceName]||(t[r.spaceName]={attempts:0,totalScore:0,totalPossible:0}),t[r.spaceName].attempts++,t[r.spaceName].totalScore+=r.score,t[r.spaceName].totalPossible+=r.total;const s=Object.entries(t).filter(([,r])=>r.attempts>=2).map(([r,c])=>{var l;return{spaceName:r,accuracy:c.totalScore/c.totalPossible,attempts:c.attempts,searchCount:((l=be.find(n=>r.toLowerCase().includes(n.topic)||n.topic.includes(r.toLowerCase())))==null?void 0:l.count)??0}});return s.length===0?null:s.sort((r,c)=>r.accuracy-c.accuracy)[0]},[H,be]),Ae=a.useMemo(()=>Array.from({length:12},(t,s)=>{const r=11-s,c=new Date;c.setDate(c.getDate()-c.getDay()-r*7),c.setHours(0,0,0,0);const l=new Date(c);l.setDate(l.getDate()+7);let n=0;for(const[d,p]of Object.entries(A)){const C=new Date(d).getTime();C>=c.getTime()&&C<l.getTime()&&(n+=p)}const i=c.toLocaleDateString("en-US",{month:"short",day:"numeric"}),g=r===0;return{weekStart:c.getTime(),label:i,count:n,isCurrent:g}}),[A]),pe=a.useMemo(()=>{const t=[];return j.length>0&&t.push("Notes"),(x.length>0||$>0)&&t.push("Teleprompter"),P>0&&t.push("Flashcards"),M.length>0&&t.push("Launchpad"),Q.length>0&&t.push("Spaces"),ie>0&&t.push("Voice Notes"),X.length>0&&t.push("Mindmaps"),t},[j.length,x.length,$,P,M.length,Q.length,ie,X.length]),oe=a.useMemo(()=>{var g;const t=((g=ke[0])==null?void 0:g.toLowerCase())??"",s={prompter:$*3,cards:F,ai:M.length*2,notes:j.length},r=Object.values(s).reduce((d,p)=>d+p,0),c=x.sort((d,p)=>p.updated_at-d.updated_at)[0],l=[...Z].sort((d,p)=>Object.keys(p.masteredCards??{}).length-Object.keys(d.masteredCards??{}).length)[0],n=j.sort((d,p)=>p.updated_at-d.updated_at)[0];if(r<5)return{label:"Getting Started",emoji:"🌱",color:o?"#7c3aed":"#a
178bfa",reason:"Keep going — insights unlock as you use Pronoto more",highlight:null};const i=Math.max(...Object.values(s));return(t.includes("student")||t.includes("teacher"))&&s.cards===i?{label:"Study Machine",emoji:"🧠",color:o?"#15803d":"#22c55e",reason:`Flashcards are your main tool — ${F} cards mastered`,highlight:l?`Top deck: "${l.spaceName}" · ${Object.keys(l.masteredCards??{}).length} mastered`:null}:s.prompter===i&&$>=3?{label:"Presentation Pro",emoji:"🎙️",color:o?"#6d28d9":"#8b5cf6",reason:`You practice presentations more than any other feature — ${$} sessions`,highlight:c?`Last practiced: "${c.title}"`:null}:s.cards===i&&F>=10?{label:"Study Machine",emoji:"🧠",color:o?"#15803d":"#22c55e",reason:`Flashcards are your main tool — ${F} cards mastered`,highlight:l?`Top deck: "${l.spaceName}" · ${Object.keys(l.masteredCards??{}).length} mastered`:null}:s.ai===i&&M.length>=5?{label:"AI Explorer",emoji:"💬",color:o?"#0e7490":"#06b6d4",reason:`Home is your most-used feature — ${M.length} chat sessions`,highlight:null}:s.notes===i&&j.length>=10?{label:"Note Taker",emoji:"📝",color:o?"#1d4ed8":"#3b82f6",reason:`Notes are your foundation — ${j.length} notes across ${Q.length} spaces`,highlight:n?`Recently updated: "${n.title}"`:null}:{label:"All-rounder",emoji:"⚡",color:o?"#b45309":"#f59e0b",reason:"You use every feature — notes, practice, flashcards, and AI",highlight:null}},[$,F,M.length,j,x,Z,ke,Q.length,be]),st=$>0;a.useMemo(()=>st?R===0?{emoji:"⚡",text:"You haven't practiced this week — even one session rebuilds momentum",action:"prompter"}:L.length>0?{emoji:"🎙️",text:`"${L[0].title}" hasn't been practiced in a while — give it a run`,action:"prompter"}:T>=7?{emoji:"🔥",text:`${T} days straight — you're in the top 5% of consistent users`,action:null}:{emoji:"🚀",text:`${$} presentations and counting — keep the momentum`,action:null}:y&&y.accuracy<.6?{emoji:"🎯",text:`Your quiz scores for "${y.spaceName}" average ${Math.round(y.accuracy*100)}% — a focused review session would help`,action:"quiz"}:P>0&&F<P?{emoji:"🧠",text:`${P-F} cards unmastered — a 5-minute session could lock them all in`,action:"flashcards"}:P===0&&j.length>0?{emoji:"🃏",text:"Your notes are goldmines — generate flashcards to turn them into lasting memory",action:"flashcards"}:M.length===0?{emoji:"💬",text:"Home can find gaps in your knowledge you don't know exist — try asking it something",action:"noto-ai"}:T>=7?{emoji:"🔥",text:`${T} days straight — you're in the top 5% of consistent learners`,action:null}:{emoji:"🚀",text:"You're building something real here — keep the momentum going",action:null},[st,R,L,T,$,y,P,F,j.length,M.length]);const Nt={"weakest-topic":"your weak spots","memory-retention":"your memory retention","quiz-performance":"your quiz performance",streak:"your streak insights","peak-day":"your peak activity day","best-week":"your best week","flashcard-reviews":"your flashcard reviews","ai-actions":"your AI usage patterns","voice-notes":"your voice note stats",spaces:"your notebook breakdown","this-week":"this week's activity","forgetting-empty":"memory decay tracking","feature-adoption":"your power-user stats","teleprompter-practice":"your delivery coaching"},ye=a.useMemo(()=>{const s=[{id:"weakest-topic",urgency:y?(1-y.accuracy)*80:0},{id:"memory-retention",urgency:P>0?(P-F)/Math.max(P,1)*50:0},{id:"quiz-performance",urgency:H.filter(g=>{var d;return!((d=g.deckId)!=null&&d.startsWith("__"))}).length>0&&!y?45:0},{id:"streak",urgency:T>0?25:0},{id:"peak-day",urgency:ue?18:0},{id:"best-week",urgency:xe>1?15:0},{id:"this-week",urgency:R>0?22:0},{id:"flashcard-reviews",urgency:G>0?20:0},{id:"ai-actions",urgency:fe>0?14:0},{id:"voice-notes",urgency:ie>0?10:0},{id:"spaces",urgency:Q.length>0?16:0},{id:"forgetting-empty",urgency:-10},{id:"feature-adoption",urgency:pe.length>=3?8:0},{id:"teleprompter-practice",urgency:$>0?30:0}].sort((g,d)=>d.urgency-g.urgency).map(g=>g.id),r=s.slice(0,2),c=s.slice(2),n=Math.floor(Date.now()/864e5)%Math.max(c.length,1),i=[...c.slice(n),...c.slice(0,n)];return[...r,...i].slice(0,4)},[y,P,F,T,ue,xe,R,G,fe,ie,Q.length,pe.length]),rt=a.useMemo(()=>{var d;const t=Date.now(),s=1440*60*1e3,r=[],c=je(t),l=j.some(p=>je(p.updated_at??0)===c);T>0&&!l&&r.push({id:"streak-risk",emoji:"🔥",color:o?"#b45309":"#f59e0b",label:"Streak at risk",message:`You're on a ${T}-day streak — add a note today to keep it going.`,actionLabel:"Open notes",tab:"notebook"});const n=[...Z].filter(p=>{if(!p.lastStudied)return!1;const C=Math.floor((t-p.lastStudied)/s),w=(p.cards??[]).filter(q=>!(p.masteredCards??{})[q.id]).length;return C>=7&&w>0}
1).sort((p,C)=>(p.lastStudied??0)-(C.lastStudied??0))[0];if(n){const p=Math.floor((t-(n.lastStudied??0))/s),C=(n.cards??[]).filter(w=>!(n.masteredCards??{})[w.id]).length;r.push({id:`deck-due-${n.id}`,emoji:"🃏",color:o?"#6d28d9":"#8b5cf6",label:"Due for review",message:`${n.spaceName} — ${C} card${C!==1?"s":""} unmastered, last studied ${p} day${p!==1?"s":""} ago.`,actionLabel:"Study now",tab:"flashcards"})}if(y&&y.accuracy<.6){const p=Math.round(y.accuracy*100);r.push({id:`weak-${y.spaceName}`,emoji:"🎯",color:o?"#b91c1c":"#ef4444",label:"Needs work",message:`Averaging ${p}% on ${y.spaceName} — worth revisiting before it gets harder.`,actionLabel:"Retake quiz",tab:"quiz"})}const i={},g=new Map(m.map(p=>[String(p.id),p]));for(const p of j){const C=g.get(String(p.folderID));if(!C)continue;const w=String(C.id);i[w]||(i[w]={spaceName:C.name,count:0,lastTouched:0}),i[w].count++,i[w].lastTouched=Math.max(i[w].lastTouched,p.updated_at??0)}if(r.length<3){const p=new Set(Z.map(w=>{var q;return(q=w.spaceName)==null?void 0:q.toLowerCase()})),C=Object.entries(i).filter(([,{spaceName:w,count:q,lastTouched:me}])=>q>=2&&!p.has(w.toLowerCase())&&t-me>3*s).sort((w,q)=>q[1].count-w[1].count)[0];if(C){const[,w]=C;r.push({id:`no-deck-${w.spaceName}`,emoji:"📚",color:o?"#1d4ed8":"#3b82f6",label:"Ready to test",message:`${w.spaceName} has ${w.count} notes but no flashcard deck — generate one to test yourself.`,actionLabel:"Make a deck",tab:"flashcards"})}}if(r.length<3){const p=new Set(X.map(w=>w.spaceId)),C=Object.entries(i).filter(([w,{count:q,lastTouched:me}])=>q>=3&&!p.has(Number(w))&&t-me<30*s).sort((w,q)=>q[1].count-w[1].count)[0];if(C){const[,w]=C;r.push({id:`no-map-${w.spaceName}`,emoji:"🗺️",color:o?"#15803d":"#22c55e",label:"Visualise it",message:`${w.spaceName} has ${w.count} notes — see how the ideas connect as a mindmap.`,actionLabel:"Generate mindmap",tab:"mindmaps"})}}if(r.length<3&&$>0&&L.length>0){const p=Math.floor((t-(L[0].updated_at??t))/s);r.push({id:`idle-script-${L[0].id}`,emoji:"🎙️",color:o?"#c2410c":"#fb923c",label:"Time to rehearse",message:`"${L[0].title}" hasn't been practiced in ${p} day${p!==1?"s":""} — muscle memory fades fast.`,actionLabel:"Practice now",tab:"prompter"})}return r.length<3&&V>160&&r.push({id:"speed-tip",emoji:"⏱️",color:o?"#c2410c":"#fb923c",label:"Delivery tip",message:`Your saved pace is ${V} WPM — slowing to 130–150 WPM helps audiences follow along better.`,actionLabel:"Open Prompter",tab:"prompter"}),r.length<3&&z&&z.totalFillers>0&&r.push({id:"filler-words",emoji:"🗣️",color:o?"#c2410c":"#f97316",label:"Watch your words",message:`Found ${z.totalFillers} filler word${z.totalFillers!==1?"s":""} across your scripts — "${(d=z.topFillers[0])==null?void 0:d.word}" appears most often.`,actionLabel:"Review scripts",tab:"prompter"}),r.length<3&&$>0&&E>300&&r.push({id:"long-script",emoji:"✂️",color:o?"#b45309":"#f59e0b",label:"Trim your scripts",message:`Your scripts average ${E} words (~${Math.round(E/130)} min) — shorter scripts are easier to memorise and deliver confidently.`,actionLabel:"View scripts",tab:"prompter"}),r.length===0&&(j.length>=3&&r.push({id:"explore-mindmap",emoji:"🗺️",color:o?"#6d28d9":"#8b5cf6",label:"Visualise your notes",message:`You have ${j.length} notes — see how the ideas connect as a mindmap.`,actionLabel:"Generate mindmap",tab:"mindmaps"}),r.push({id:"keep-exploring",emoji:"🚀",color:o?"#0e7490":"#06b6d4",label:"Keep exploring",message:"Use Home to summarise your notes, generate flashcards, or quiz yourself — the more you use Pronoto, the sharper your insights get.",actionLabel:"Open Home",tab:"noto-ai"})),r.slice(0,3)},[j,Z,X,m,T,y,$,L,V,z,E]);function Oe(t){switch(t){case"weakest-topic":return y?b?e.jsxs("div",{className:"rounded-2xl p-4 border",style:{background:"#EF9A2814",borderColor:"#EF9A2840"},children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center text-2xl shrink-0",style:{background:"#EF9A2825"},children:"🎯"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest leading-none mb-1.5",style:{color:o?"#b45309cc":"#EF9A28cc"},children:"Weakest topic"}),e.jsxs("p",{className:"text-[15px] font-bold leading-snug text-foreground",children:['You struggle with "',y.spaceName,'"']}),e.jsxs("p",{className:"text-xs mt-1 leading-tight",style:{color:"rgb(var(--muted-foreground))"},children:[y.attempts," quiz attempt",y.attempts!==1?"s":""," · avg ",Math.round(y.accuracy*100),"% accuracy",y.searchCount>0?` · searched ${y.searchCount}x`:""]})]})]}),e.jsxs("div",{className:"mt-1",children:[e.jsxs("div",{className:"flex justify-between text-[11px] font-semibold mb-1.5",style:{color:"rgb(var(--muted-foreground) / 0.7)"},children:[e.jsx("span",{children:"Mastery"}),e.jsxs("span",{style:{color:y.accuracy>=.6?"#1D9E75":y.accuracy>=.3?"#EF9A28":"#D55530"},children:[Math.round(y.accuracy*100),"%"]})]}),e.jsx("div",{className:"h-2 rounded-full",style:{background:"rgb(var(--border))"},children:e.jsx("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${y.accuracy*100}%`,background:y.accuracy>=.6?"#1D9E75":y.accuracy>=.3?"#EF9A28":"#D55530"}})})]}),e.jsx("button",{onClick:()=>u==null?void 0:u("quiz"),className:"mt-3 w-full text-[11px] font-bold py-1.5 rounded-lg transition-opacity hover:opacity-80",style:{background:"rgba(239,154,40,0.2)",color:o?"#b45309":"#EF9A28",border:"1px solid rgba(239,154,40,0.3)"},children:"Practice this topic in Quiz →"})]},"weakest-topic"):e.jsxs("div",{className:"rounded-2xl p-4 border",style:{background:"#EF9A2814",borderColor:"#EF9A2840"},children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center text-2xl shrink-0",style:{background:"#EF9A2825"},children:"🎯"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest leading-none mb-1.5",style:{color:o?"#b45309cc":"#EF9A28cc"},children:"Weakest topic"}),e.jsxs("p",{className:"text-[15px] font-bold leading-snug text-foreground",children:['You struggle with "',y.spaceName,'"']}),e.jsxs("p",{className:"text-xs mt-1 leading-tight",style:{color:"rgb(var(--muted-foreground))"},children:[y.attempts," quiz attempt",y.attempts!==1?"s":""," · avg ",Math.round(y.accuracy*100),"% accuracy"]})]})]}),e.jsxs("div",{className:"mt-1 mb-3",children:[e.jsxs("div",{className:"flex justify-between text-[11px] font-semibold mb-1.5",style:{color:"rgb(var(--muted-foreground) / 0.7)"},children:[e.jsx("span",{children:"Mastery"}),e.jsxs("span",{style:{color:y.accuracy>=.6?"#1D9E75":y.accuracy>=.3?"#EF9A28":"#D55530"},children:[Math.round(y.accuracy*100),"%"]})]}),e.jsx("div",{className:"h-2 rounded-full",style:{background:"rgb(var(--border))"},children:e.jsx("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${y.accuracy*100}%`,background:y.accuracy>=.6?"#1D9E75":y.accuracy>=.3?"#EF9A28":"#D55530"}})})]}),e.jsxs("div",{className:"flex items-center gap-2 rounded-lg px-3 py-2 border",style:{background:"rgba(139,92,246,0.08)",borderColor:"rgba(139,92,246,0.25)"},children:[e.jsx(ve,{className:"h-3 w-3 shrink-0",style:{color:o?"#7c3aed":"#a
178bfa"}}),e.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("pronoto:open-upgrade")),className:"text-[11px] font-bold transition-opacity hover:opacity-80",style:{color:o?"#6d28d9":"#c4b5fd",textDecoration:"underline",textUnderlineOffset:"3px"},children:"Unlock with Plus to get your practice plan →"})]})]},"weakest-topic"):null;case"quiz-performance":{const s=H.filter(d=>{var p;return!((p=d.deckId)!=null&&p.startsWith("__"))&&Number.isFinite(d.total)&&d.total>0&&Number.isFinite(d.score)});if(s.length===0)return null;const r=Math.round(s.reduce((d,p)=>d+p.score/p.total*100,0)/s.length),c=Math.round(Math.max(...s.map(d=>d.score/d.total*100))),l=s[0],n=l?Math.round(l.score/l.total*100):null,i=s.length>=2?n>Math.round(s[1].score/s[1].total*100)?"↑ improving":n<Math.round(s[1].score/s[1].total*100)?"↓ dropped":"→ steady":null,g=r>=80?"#22c55e":r>=60?"#f59e0b":"#ef4444";return e.jsxs("div",{className:"rounded-2xl p-4 border",style:{background:"rgba(59,130,246,0.08)",borderColor:"rgba(59,130,246,0.3)"},children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center text-2xl shrink-0",style:{background:"rgba(59,130,246,0.18)"},children:"🎯"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest leading-none mb-1.5",style:{color:"rgba(59,130,246,0.9)"},children:"Quiz performance"}),e.jsx("p",{className:"text-[15px] font-bold leading-snug text-foreground",children:r>=80?`You're scoring strong — ${r}% average`:r>=60?`Solid progress — ${r}% avg across ${s.length} quiz${s.length!==1?"zes":""}`:`Room to grow — avg ${r}% across ${s.length} quiz${s.length!==1?"zes":""}`}),n!==null&&e.jsxs("p",{className:"text-xs mt-1 leading-tight",style:{color:"rgb(var(--muted-foreground))"},children:["Last score: ",e.jsxs("span",{style:{color:n>=70?"#22c55e":"#f59e0b",fontWeight:600},children:[n,"%"]}),i&&e.jsx("span",{className:"ml-2",style:{color:"rgb(var(--muted-foreground) / 0.7)"},children:i})," · ","Best: ",e.jsxs("span",{style:{color:g,fontWeight:600},children:[c,"%"]})]})]})]}),e.jsxs("div",{className:"mt-1",children:[e.jsxs("div",{className:"flex justify-between text-[11px] font-semibold mb-1.5",style:{color:"rgb(var(--muted-foreground) / 0.7)"},children:[e.jsx("span",{children:"Avg accuracy"}),e.jsxs("span",{style:{color:g},children:[r,"%"]})]}),e.jsx("div",{className:"h-2 rounded-full",style:{background:"rgb(var(--border))"},children:e.jsx("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${r}%`,background:g}})})]}),r<70&&e.jsx("button",{onClick:()=>u==null?void 0:u("quiz"),className:"mt-3 w-full text-[11px] font-bold py-1.5 rounded-lg transition-opacity hover:opacity-80",style:{background:"rgba(59,130,246,0.2)",color:o?"#1d4ed8":"#60a5fa",border:"1px solid rgba(59,130,246,0.3)"},children:"Practice more quizzes to boost your score →"})]},"quiz-performance")}case"memory-retention":return P===0?null:e.jsxs("div",{className:"rounded-2xl p-4 border",style:{background:"rgba(16,185,129,0.10)",borderColor:"rgba(16,185,129,0.35)"},children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center text-2xl shrink-0",style:{background:"rgba(16,185,129,0.2)"},children:"🃏"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest leading-none mb-1.5",style:{color:"rgba(16,185,129,0.9)"},children:"Flashcard progress"}),e.jsx("p",{className:"text-[15px] font-bold leading-snug text-foreground",children:F===P?`All ${P} cards mastered — great work!`:F===0?`${P} cards to study across ${Z.length} deck${Z.length!==1?"s":""}`:`${F} of ${P} cards mastered`})]})]}),e.jsx(Jt,{segments:[{label:"Mastered",count:F,color:o?"#0f6b4f":"#1D9E75"},{label:"In progress",count:yt,color:o?"#b45309":"#EF9A28"},{label:"Not started",count:vt,color:"rgb(var(--muted-foreground) / 0.3)"}]})]},"memory-retention");case"teleprompter-practice":return $===0?null:e.jsx("div",{className:"rounded-2xl p-4 border",style:{background:"rgba(249,115,22,0.08)",borderColor:"rgba(249,115,22,0.3)"},children:e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center text-2xl shrink-0",style:{background:"rgba(249,115,22,0.18)"},children:"🎙️"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest leading-none mb-1.5",style:{color:"rgba(249,115,22,0.9)"},children:"Teleprompter"}),e.jsx("p",{className:"text-[15px] font-bold leading-snug text-foreground",children:$>=10?`${$} sessions across ${x.length} script${x.length!==1?"s":""}`:`${$} session${$!==1?"s":""} — keep rehearsing to build confidence`}),V>0&&e.jsxs("p",{className:"text-xs mt-1",style:{color:"rgb(var(--muted-foreground))"},children:["Your pace: ",e.jsxs("span",{style:{color:o?"#c2410c":"#fb923c",fontWeight:600},children:[V," WPM"]}),V<130?" · try increasing speed slightly":V<=165?" · ideal range ✓":" · consider slowing down for clarity"]}),E>0&&e.jsxs("p",{className:"text-xs mt-0.5",style:{color:"rgb(var(--muted-foreground))"},children:["Avg script: ",e.jsxs("span",{style:{fontWeight:600},children:[E," words"]}),E>0&&V>0&&(()=>{const s=Math.floor(E/V),r=Math.round((E/V-s)*60);return e.jsxs("span",{style:{color:"rgb(var(--muted-foreground) / 0.7)"},children:[" · ~",s>0?`${s}m `:"",r,"s delivery"]})})()]})]})]})},"teleprompter-practice");case"streak":return T<3?null:e.jsx(se,{emoji:"🔥",title:"Current streak",value:`${T} days in a row${ce>T?` · best: ${ce}`:" · personal best!"}`,sub:Ve>=10?`Active ${Ve}% of the last 30 days`:void 0,color:"#f97316"},"streak");case"peak-day":return ue?e.jsx(se,{emoji:"📅",title:"Your peak day",value:`${ue.day} is when you do your best work`,sub:"Based on notes, AI, and practice sessions",color:"#f59e0b"},"peak-day"):null;case"best-week":return xe<=1||xe===R?null:e.jsx(se,{emoji:"🏆",title:"Your best week",value:`${xe} presentations in a single week`,sub:"That's your personal record — can you beat it?",color:"#a78bfa"},"best-week");case"this-week":return R===0?null:e.jsx(se,{emoji:"📈",title:"This week",value:`${R} practice session${R!==1?"s":""} so far`,sub:R>=3?"Strong week — you're building real confidence":"Add 2 more sessions to hit your stride",color:"#8b5cf6"},"this-week");case"flashcard-reviews":return G===0?null:e.jsx(se,{emoji:"🔁",title:"Flashcard reviews",value:`${G.toLocaleStr
1ing()} cards reviewed in total`,sub:Pe>0?Pe>tt?`${Pe} this month — up from ${tt} last month ↑`:`${Pe} this month · ${F} mastered`:`${F} mastered · ${P-F} to go`,color:"#22c55e"},"flashcard-reviews");case"ai-actions":return fe<5?null:e.jsx(se,{emoji:"⚡",title:"Total AI actions",value:`${fe} AI-powered actions across all features`,sub:"Notes, flashcards, scripts, and chat — AI is doing the heavy lifting",color:"#a78bfa"},"ai-actions");case"voice-notes":return ie===0?null:e.jsx(se,{emoji:"🎤",title:"Voice notes",value:`${ie} voice note${ie!==1?"s":""} recorded`,sub:"Captured thoughts you'd have forgotten otherwise",color:"#f472b6"},"voice-notes");case"spaces":return Q.length===0?null:e.jsx(se,{emoji:"📂",title:"Knowledge systems built",value:`${Q.length} space${Q.length!==1?"s":""} · ${j.length} note${j.length!==1?"s":""} · ${x.length} script${x.length!==1?"s":""}`,sub:"Most people never organise — you have",color:"#3b82f6"},"spaces");case"forgetting-empty":return P>=10||$>0?null:e.jsx(Gt,{icon:"🃏",message:`Add ${10-P} more flashcard${10-P!==1?"s":""} to unlock memory decay tracking`,progress:P,goal:10,color:"#7B61FF"},"forgetting-empty");case"feature-adoption":return pe.length<5?null:e.jsx(se,{emoji:"🏅",title:"Power user",value:`Using ${pe.length} of 7 features — ${pe.length>=6?"you're getting everything out of Pronoto":"almost at full power"}`,sub:pe.join(" · "),color:"#f59e0b"},"feature-adoption");default:return null}}return e.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto bg-background",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-5 space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Pulse"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your activity, streaks, and coaching tips — based on how you actually use Pronoto."})]}),e.jsxs("button",{onClick:bt,disabled:he,title:"Updates automatically once a day - click to refresh now",className:"flex items-center gap-1 text-[11px] font-medium text-muted-foreground transition-opacity hover:opacity-80 disabled:opacity-40 shrink-0 mt-1",children:[e.jsx(_t,{className:`h-3 w-3 ${he?"animate-spin":""}`}),he?"Updating…":Qe?`Updated ${Bt(Qe)}`:"Refresh"]})]}),e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-foreground/60 px-0.5",children:"Your Activity"}),ge?e.jsxs("div",{className:"rounded-2xl p-5 relative overflow-hidden border",style:{background:`linear-gradient(135deg, ${oe.color}14 0%, ${oe.color}06 100%)`,borderColor:`${oe.color}30`},children:[e.jsx("div",{className:"absolute top-0 right-0 w-40 h-40 pointer-events-none",style:{background:`radial-gradient(circle, ${oe.color}20 0%, transparent 70%)`,transform:"translate(20%, -20%)"}}),e.jsxs("div",{className:"relative",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-foreground/60 mb-2",children:"Learning Journey"}),e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx("span",{className:"text-2xl",children:oe.emoji}),e.jsx("span",{className:"text-xl font-black",style:{color:oe.color},children:oe.label})]}),e.jsx("p",{className:"text-[13px] leading-snug mb-3",style:{color:"rgb(var(--muted-foreground))"},children:oe.reason}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[T>0&&e.jsx("div",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full",style:{background:"rgba(245,158,11,0.15)",border:"1px solid rgba(245,158,11,0.3)"},children:e.jsxs("span",{className:"text-[11px] font-semibold",style:{color:o?"#b45309":"#fcd34d"},children:["🔥 ",T,"-day streak"]})}),Ge>0&&e.jsx("div",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full",style:{background:"rgb(var(--muted) / 0.5)",border:"1px solid rgb(var(--border))"},children:e.jsxs("span",{className:"text-[11px] font-semibold",style:{color:"rgb(var(--muted-foreground))"},children:[Ge," days on Pronoto"]})}),ue&&e.jsx("div",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full",style:{background:"rgb(var(--muted) / 0.5)",border:"1px solid rgb(var(--border))"},children:e.jsxs("span",{className:"text-[11px] font-semibold",style:{color:"rgb(var(--muted-foreground))"},children:["Most active: ",ue.day,"s"]})})]})]})]}):e.jsx("div",{className:"rounded-2xl p-4 border animate-pulse",style:{background:"rgb(var(--muted) / 0.4)",borderColor:"rgb(var(--border))",minHeight:100}}),ge&&P===0&&$===0&&M.length===0&&e.jsxs("div",{className:"rounded-2xl p-4 border space-y-2.5",style:{background:"rgb(var(--muted) / 0.3)",borderColor:"rgb(var(--border))"},children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest",style:{color:"rgb(var(--muted-foreground) / 0.7)"},children:"Unlock more insights"}),j.length>0&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-lg",children:"🃏"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[13px] font-semibold text-foreground
1/80",children:"Turn your notes into flashcards"}),e.jsx("p",{className:"text-[12px]",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:"Pulse will track what you've mastered and what needs work"})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-lg",children:"🎙️"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[13px] font-semibold text-foreground/80",children:"Practice a script with the teleprompter"}),e.jsx("p",{className:"text-[12px]",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:"Pulse will show your streak, peak days, and coaching tips"})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-lg",children:"💬"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[13px] font-semibold text-foreground/80",children:"Use Home to chat with your notes"}),e.jsx("p",{className:"text-[12px]",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:"Pulse will surface your most explored topics and AI usage patterns"})]})]})]}),$===0&&ge&&j.length>0&&e.jsxs("div",{className:"rounded-2xl p-4 border flex items-start gap-3",style:{background:"rgba(249,115,22,0.07)",borderColor:"rgba(249,115,22,0.22)"},children:[e.jsx("span",{className:"text-2xl shrink-0",children:"🎙️"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest mb-1",style:{color:"rgba(249,115,22,0.85)"},children:"Try the Teleprompter"}),e.jsx("p",{className:"text-[13px] leading-snug mb-2.5",style:{color:"rgb(var(--foreground) / 0.75)"},children:"Practice scripts at your own pace. Pulse will track sessions, spot filler words, and coach you on delivery speed."}),e.jsx("button",{onClick:()=>u==null?void 0:u("prompter"),className:"text-[11px] font-bold px-3 py-1.5 rounded-lg transition-opacity hover:opacity-80",style:{background:"rgba(249,115,22,0.15)",color:o?"#c2410c":"#fb923c",border:"1px solid rgba(249,115,22,0.3)"},children:"Open Teleprompter →"})]})]}),ge&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-foreground/60 mb-2.5 px-0.5",children:"Last 7 days"}),e.jsx("div",{className:"rounded-2xl p-4 border",style:{background:"rgb(var(--muted) / 0.25)",borderColor:"rgb(var(--border))"},children:e.jsx(Xt,{days:Array.from({length:7},(t,s)=>{const r=ze(6-s),c=new Date;c.setDate(c.getDate()-(6-s));const l=c.toLocaleDateString("en-US",{weekday:"short"}).slice(0,2),n=s===6,i={notes:j.filter(d=>new Date(d.updated_at??0).toISOString().split("T")[0]===r).length,mindmap:X.filter(d=>new Date(d.savedAt??0).toISOString().split("T")[0]===r).length,ai:k[r]??0,prompter:A[r]??0,quiz:H.filter(d=>new Date(d.playedAt??0).toISOString().split("T")[0]===r).length},g=i.notes+i.mindmap+i.ai+i.prompter+i.quiz;return{d:r,dayLabel:l,isToday:n,counts:i,total:g}})})})]}),(()=>{const t=$>0?Math.min(x.length,$):0,s=[{label:"Notes",value:j.length,emoji:"📝",color:o?"#1d4ed8":"#3b82f6",sub:Je>0?`+${Je} this week`:Q.length>0?`${Q.length} space${Q.length!==1?"s":""}`:void 0},{label:"AI queries",value:fe,emoji:"💬",color:o?"#0e7490":"#06b6d4",sub:"cumulative"},{label:"Mindmaps",value:X.length,emoji:"🗺️",color:o?"#6d28d9":"#8b5cf6",sub:Xe>0?`+${Xe} this week`:void 0},{label:"Decks",value:Z.length,emoji:"🃏",color:o?"#15803d":"#22c55e",sub:P>0?`${P} card${P!==1?"s":""}`:void 0},{label:"Quizzes",value:De.length,emoji:"🎯",color:o?"#b45309":"#f59e0b",sub:Ze>0?`+${Ze} this week`:void 0},{label:"Scripts",value:x.length,emoji:"🎙️",color:o?"#c2410c":"#fb923c",sub:R>0?`${R} session${R!==1?"s":""} this week`:t>0?`${t} practiced`:void 0}];return e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-foreground/60 mb-2.5 px-0.5",children:"What you've built"}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:s.map(({label:r,value:c,emoji:l,color:n,sub:i})=>{const g=c===0;return e.jsxs("div",{className:"rounded-xl p-3 border text-center",style:{background:g?void 0:`${n}18`,borderColor:g?"rgb(var(--border))":`${n}45`,opacity:g?.7:1},children:[e.jsx("div",{className:"text-2xl mb-1.5",style:{filter:g?"grayscale(1)":"none"},children:l}),g?e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wide mb-1",style:{color:"rgb(var(--muted-foreground) / 0.85)"},children:"Try it"}):e.jsx("div",{className:"text-3xl font-black leading-none mb-1",style:{color:_e(n,o),textShadow:o?void 0:`0 0 18px ${n}70`},children:c}),e.jsx("div",{className:"text-[11px] font-semibold leading-tight",style:{color:g?"rgb(var(--muted-foreground) / 0.6)":"rgb(var(--muted-foreground))"},children:r}),!g&&i&&e.jsx("div",{className:"text-[10px] mt-0.5",style:{color:"rgb(var(--muted-foreground))"},children:i})]},r)})})]})})(),ge&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-foreground
1/60 mb-2.5 px-0.5",children:"Milestones"}),et.every(t=>t.done)&&e.jsxs("div",{className:"rounded-2xl p-4 border flex items-center gap-3 mb-2.5",style:{background:"linear-gradient(135deg, rgba(245,158,11,0.14), rgba(245,158,11,0.04))",borderColor:"rgba(245,158,11,0.35)"},children:[e.jsx("span",{className:"text-3xl shrink-0",children:"🏆"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[13px] font-bold",style:{color:o?"#b45309":"#fcd34d"},children:"All milestones complete!"}),e.jsx("p",{className:"text-[12px] text-muted-foreground",children:"You've hit every milestone Pulse tracks — genuinely impressive."})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:et.map(t=>e.jsxs("div",{className:"rounded-xl p-3 border flex items-center gap-3",style:{background:t.done?`${t.color}12`:"rgb(var(--muted) / 0.4)",borderColor:t.done?`${t.color}35`:"rgb(var(--border))"},children:[e.jsx("span",{className:"text-xl shrink-0",style:{opacity:t.done?1:.6},children:t.emoji}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[12px] font-semibold leading-tight",style:{color:t.done?"rgb(var(--foreground))":"rgb(var(--muted-foreground))"},children:t.label}),t.done?e.jsx("p",{className:"text-[10px] font-bold mt-0.5",style:{color:_e(t.color,o)},children:"Achieved ✓"}):"progress"in t?e.jsx("div",{className:"mt-1 h-1 rounded-full overflow-hidden",style:{background:"rgb(var(--border))"},children:e.jsx("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${Math.min(t.progress/t.total*100,100)}%`,background:t.color}})}):e.jsx("p",{className:"text-[10px] mt-0.5",style:{color:"rgb(var(--muted-foreground) / 0.6)"},children:"Not yet"})]})]},t.id))})]}),e.jsxs("div",{className:"flex items-center gap-1.5 px-0.5",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-foreground/60",children:"Coaching & Insights"}),!b&&e.jsx("span",{className:"text-[9px] font-bold px-1.5 py-0.5 rounded",style:{background:"rgba(139,92,246,0.18)",color:o?"#6d28d9":"#a78bfa"},children:"PLUS"})]}),rt.length>0&&e.jsxs("div",{children:[e.jsxs("p",{className:"text-xs font-bold uppercase tracking-widest text-foreground/60 mb-2.5 px-0.5 flex items-center gap-1.5",children:[e.jsx(Ft,{className:"h-3 w-3",style:{color:o?"#b45309":"#f59e0b"}})," Take action"]}),e.jsx("div",{className:"flex flex-col gap-2",children:rt.map(t=>e.jsxs("div",{className:"rounded-2xl p-4 border flex items-center gap-3",style:{background:`${t.color}0d`,borderColor:`${t.color}28`},children:[e.jsx("div",{className:"w-9 h-9 rounded-xl flex items-center justify-center text-lg shrink-0",style:{background:`${t.color}1a`},children:t.emoji}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest mb-0.5",style:{color:`${t.color}bb`},children:t.label}),e.jsx("p",{className:"text-[13px] text-foreground leading-snug",children:t.message})]}),e.jsx("button",{onClick:()=>u==null?void 0:u(t.tab),className:"shrink-0 text-[12px] font-semibold px-3 py-1.5 rounded-lg whitespace-nowrap transition-opacity hover:opacity-75",style:{background:`${t.color}1a`,color:t.color},children:t.actionLabel})]},t.id))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center mb-2.5 px-0.5",children:e.jsxs("p",{className:"text-xs font-bold uppercase tracking-widest text-foreground/60 flex items-center gap-1.5",children:[e.jsx(Et,{className:"h-3 w-3"})," Your patterns"]})}),b?e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-2.5",children:ye.map(t=>Oe(t))}):e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-2.5",children:[Oe(ye[0]),ye.length>1&&e.jsxs("div",{className:"relative rounded-2xl overflow-hidden",children:[e.jsx("div",{className:"select-none pointer-events-none",style:{filter:"blur(4px)",opacity:.45},children:Oe(ye[1])}),e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center z-10 gap-2",children:[e.jsx(ve,{className:"h-4 w-4",style:{color:o?"#7c3aed":"#a78bfa"}}),e.jsxs("button",{onClick:()=>window.dispatchEvent(new CustomEvent("pronoto:open-upgrade")),className:"text-[11px] font-bold transition-opacity hover:opacity-80 text-center px-2",style:{color:o?"#6d28d9":"#c4b5fd",textDecoration:"underline",textUnderlineOffset:"3px"},children:["Unlock ",Nt[ye[1]]," with Plus →"]})]})]})]})]}),$>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-foreground
1/60 mb-2.5 px-0.5 flex items-center gap-1.5",children:"🎙️ Presentation Analytics"}),e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-2.5 mb-4",children:[e.jsxs("div",{className:"rounded-2xl p-4 border",style:{background:"rgba(249,115,22,0.08)",borderColor:"rgba(249,115,22,0.25)"},children:[e.jsx("p",{className:"text-3xl font-black leading-none mb-1",style:{color:o?"#c2410c":"#fb923c",textShadow:o?void 0:"0 0 20px rgba(249,115,22,0.6)"},children:$}),e.jsx("p",{className:"text-sm font-semibold",style:{color:"rgb(var(--foreground) / 0.8)"},children:"Total sessions"}),e.jsx("p",{className:"text-xs mt-0.5",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:"presentations practiced"})]}),e.jsxs("div",{className:"rounded-2xl p-4 border",style:{background:"rgba(249,115,22,0.06)",borderColor:"rgba(249,115,22,0.2)"},children:[e.jsx("p",{className:"text-3xl font-black leading-none mb-1",style:{color:o?"#c2410c":"#fb923c",textShadow:o?void 0:"0 0 20px rgba(249,115,22,0.6)"},children:R}),e.jsx("p",{className:"text-sm font-semibold",style:{color:"rgb(var(--foreground) / 0.8)"},children:"This week"}),e.jsx("p",{className:"text-xs mt-0.5",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:R>=3?"strong week 🔥":R>0?"keep building":"no sessions yet"})]}),e.jsxs("div",{className:"rounded-2xl p-4 border",style:{background:"rgba(139,92,246,0.08)",borderColor:"rgba(139,92,246,0.2)"},children:[e.jsx("p",{className:"text-3xl font-black leading-none mb-1",style:{color:o?"#7c3aed":"#a78bfa",textShadow:o?void 0:"0 0 20px rgba(139,92,246,0.5)"},children:x.length}),e.jsx("p",{className:"text-sm font-semibold",style:{color:"rgb(var(--foreground) / 0.8)"},children:"Scripts"}),e.jsx("p",{className:"text-xs mt-0.5",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:E>0?`~${E} words avg`:"ready to practise"})]}),e.jsx("div",{className:"rounded-2xl p-4 border relative overflow-hidden",style:{background:"rgba(249,115,22,0.06)",borderColor:"rgba(249,115,22,0.18)"},children:b&&$e!==null?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-baseline gap-1 mb-1",children:[e.jsx("p",{className:"text-3xl font-black leading-none",style:{color:o?"#c2410c":"#fb923c",textShadow:o?void 0:"0 0 20px rgba(249,115,22,0.5)"},children:$e}),e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wide",style:{color:"rgba(249,115,22,0.6)"},children:"wpm"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-sm font-semibold",style:{color:"rgb(var(--foreground) / 0.8)"},children:"Best pace"}),e.jsxs(It,{delayDuration:150,children:[e.jsx(Lt,{asChild:!0,children:e.jsx("button",{type:"button",onClick:t=>t.stopPropagation(),className:"opacity-50 hover:opacity-90 transition-opacity","aria-label":"How this is calculated",children:e.jsx(Rt,{className:"h-3 w-3",style:{color:"rgb(var(--muted-foreground))"}})})}),e.jsx(Ot,{side:"top",className:"max-w-[220px] text-xs",children:"Based on your average pace across multiple rehearsals — the pace we'd recommend for confident, natural delivery."})]})]}),e.jsxs("p",{className:"text-xs mt-0.5",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:["avg across ",Me," rehearsal",Me===1?"":"s"]})]}):!b&&$e!==null?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"select-none pointer-events-none",style:{filter:"blur(4px)",opacity:.45},children:[e.jsxs("div",{className:"flex items-baseline gap-1 mb-1",children:[e.jsx("p",{className:"text-3xl font-black leading-none",style:{color:o?"#c2410c":"#fb923c"},children:$e}),e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wide",style:{color:"rgba(249,115,22,0.6)"},children:"wpm"})]}),e.jsx("p",{className:"text-sm font-semibold",style:{color:"rgb(var(--foreground) / 0.8)"},children:"Best pace"}),e.jsxs("p",{className:"text-xs mt-0.5",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:["avg across ",Me," rehearsal",Me===1?"":"s"]})]}),e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center z-10 gap-1 px-2",children:[e.jsx(ve,{className:"h-4 w-4",style:{color:o?"#7c3aed":"#a
178bfa"}}),e.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("pronoto:open-upgrade")),className:"text-[10px] font-bold transition-opacity hover:opacity-80 text-center leading-tight",style:{color:o?"#6d28d9":"#c4b5fd",textDecoration:"underline",textUnderlineOffset:"3px"},children:"Unlock Best pace with Plus →"})]})]}):Ue>0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-baseline gap-1 mb-1",children:[e.jsxs("p",{className:"text-3xl font-black leading-none",style:{color:o?"#c2410c":"#fb923c",textShadow:o?void 0:"0 0 20px rgba(249,115,22,0.5)"},children:[(Ue/100).toFixed(1),"x"]}),e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wide",style:{color:"rgba(249,115,22,0.6)"},children:"scroll"})]}),e.jsx("p",{className:"text-sm font-semibold",style:{color:"rgb(var(--foreground) / 0.8)"},children:"Ideal pace"}),e.jsxs("p",{className:"text-xs mt-0.5",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:["~",V," WPM speaking"]})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-3xl font-black leading-none mb-1",style:{color:"rgb(var(--muted-foreground) / 0.3)"},children:"—"}),e.jsx("p",{className:"text-sm font-semibold",style:{color:"rgb(var(--foreground) / 0.8)"},children:"Ideal pace"}),e.jsx("p",{className:"text-xs mt-0.5",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:"set speed in teleprompter"})]})})]}),(()=>{const t=Math.max(...Ae.map(s=>s.count),1);return e.jsxs("div",{className:"rounded-2xl p-4 border mb-4",style:{background:"rgba(249,115,22,0.08)",borderColor:"rgba(249,115,22,0.25)"},children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("p",{className:"text-xs font-bold uppercase tracking-widest flex items-center gap-1.5",style:{color:"rgba(249,115,22,0.9)"},children:[e.jsx(Tt,{className:"h-3.5 w-3.5"})," Activity"]}),e.jsx("span",{className:"text-xs font-medium",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:"last 12 weeks"})]}),b?e.jsxs(e.Fragment,{children:[e.jsx(it,{weeks:Ae,maxCount:t}),e.jsx("div",{className:"flex mt-1.5 gap-1",children:Ae.map(({weekStart:s,isCurrent:r})=>{const c=new Date(s),l=c.getDate()<=7;return e.jsx("div",{className:"flex-1 text-center",children:(l||r)&&e.jsx("span",{className:"text-[9px] font-semibold",style:{color:r?"#fb923c":"rgb(var(--muted-foreground) / 0.5)"},children:r?"Now":c.toLocaleDateString("en-US",{month:"short"})})},s)})})]}):e.jsxs("div",{className:"relative",children:[e.jsx("div",{style:{filter:"blur(6px)",pointerEvents:"none",opacity:.6},children:e.jsx(it,{weeks:Ae,maxCount:t})}),e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2",children:[e.jsx(ve,{className:"h-4 w-4",style:{color:o?"#7c3aed":"#a78bfa"}}),e.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("pronoto:open-upgrade")),className:"text-[11px] font-bold transition-opacity hover:opacity-80",style:{color:o?"#6d28d9":"#c4b5fd",textDecoration:"underline",textUnderlineOffset:"3px"}
1,children:"Unlock with Plus to see your 12-week history →"})]})]})]})})(),x.length>0&&(b?e.jsxs("div",{className:"rounded-2xl p-4 border space-y-3",style:{background:"rgba(139,92,246,0.08)",borderColor:"rgba(139,92,246,0.25)"},children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest",style:{color:"rgba(139,92,246,0.9)"},children:"📝 Script insights"}),e.jsx("p",{className:"text-[14px] font-semibold text-foregroundleading-snug",children:E>0?`Your scripts average ${E.toLocaleString()} words — about ${Math.round(E/130)} minute${Math.round(E/130)!==1?"s":""} to deliver`:`You have ${x.length} script${x.length!==1?"s":""} ready to practice`}),z&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"text-[13px] leading-snug",style:{color:"rgb(var(--foreground) / 0.8)"},children:["We found ",e.jsxs("span",{style:{color:o?"#c2410c":"#f97316"},children:[z.totalFillers," filler word",z.totalFillers!==1?"s":""]})," across your scripts — these hurt delivery confidence"]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:z.topFillers.map(({word:t,count:s})=>e.jsxs("span",{className:"px-2.5 py-1 rounded-full text-xs font-semibold",style:{background:"rgba(249,115,22,0.12)",color:o?"#c2410c":"#fb923c",border:"1px solid rgba(249,115,22,0.25)"},children:['"',t,'" ×',s]},t))}),z.worstScript&&e.jsxs("p",{className:"text-xs",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:['Most in "',z.worstScript.title,'" — ',z.worstScript.count," filler",z.worstScript.count!==1?"s":""]})]}),te.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("p",{className:"text-[13px] leading-snug",style:{color:"rgba(239,154,40,0.9)"},children:["⚠️ ",te.length===1?"One script is":`${te.length} scripts are`," over 300 words — consider trimming for smoother delivery"]}),te.slice(0,3).map(t=>e.jsxs("div",{className:"px-3 py-2 rounded-lg border",style:{background:"rgba(239,154,40,0.08)",borderColor:"rgba(239,154,40,0.2)"},children:[e.jsxs("p",{className:"text-[13px] font-semibold text-foregroundtruncate",children:['"',t.title,'"']}),e.jsxs("p",{className:"text-xs mt-0.5",style:{color:"rgb(var(--muted-foreground) / 0.85)"},children:[t.wordCount," words · ~",Math.round(t.wordCount/130)," min to deliver"]})]},t.id))]}),L.length>0&&e.jsxs("div",{children:[e.jsxs("p",{className:"text-[13px] leading-snug mb-2",style:{color:"rgb(var(--foreground) / 0.75)"},children:['🎙️ "',L[0].title,'"',L.length>1?` and ${L.length-1} other${L.length-1!==1?"s":""}`:""," ",L.length===1?"hasn't":"haven't"," been practiced in over 2 weeks — muscle memory fades fast"]}),e.jsx("button",{onClick:()=>u==null?void 0:u("prompter"),className:"text-[11px] font-bold px-3 py-1.5 rounded-lg transition-opacity hover:opacity-80",style:{background:"rgba(139,92,246,0.2)",color:o?"#7c3aed":"#a78bfa",border:"1px solid rgba(139,92,246,0.3)"},children:"Practice now →"})]}),!z&&te.length===0&&L.length===0&&e.jsx("p",{className:"text-[13px] leading-snug",style:{color:"rgb(var(--muted-foreground))"},children:x.length===1?`You have 1 script — ${E} words, ~${Math.round(E/130)} min. Add more to build a full presentation library.`:`${x.length} scripts, ${x.reduce((t,s)=>t+(s.description?s.description.replace(/<[^>]*>/g," ").trim().split(/\s+/).filter(Boolean).length:0),0).toLocaleString()} words total — that's about ${Math.round(x.reduce((t,s)=>t+(s.description?s.description.replace(/<[^>]*>/g," ").trim().split(/\s+/).filter(Boolean).length:0),0)/130)} minutes of material ready to deliver.`})]}):e.jsxs("div",{className:"rounded-2xl p-4 border overflow-hidden",style:{background:"rgba(139,92,246,0.08)",borderColor:"rgba(139,92,246,0.25)"},children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest mb-2",style:{color:"rgba(139,92,246,0.9)"},children:"📝 Teleprompter insights"}),e.jsx("p",{className:"text-[15px] font-bold leading-snug mb-0.5",style:{color:"rgb(var(--foreground))"},children:z?`We scanned your ${x.length} script${x.length!==1?"s":""} — and found ${z.totalFillers} thing${z.totalFillers!==1?"s":""} to fix`:te.length>0?`We scanned your ${x.length} script${x.length!==1?"s":""} — and spotted some issues`:`We scanned your ${x.length} script${x.length!==1?"s":""} — here's your delivery report`}),e.jsx("p",{className:"text-[12px] mb-3",style:{color:"rgb(var(--muted-foreground) / 0.8)"},children:"Unlock to get specific coaching for a confident, polished delivery."}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"space-y-2 mb-3 select-none pointer-events-none",style:{filter:"blur(4px)",opacity:.6},children:[z?{icon:"🗣️",label:`${z.totalFillers} filler word${z.totalFillers!==1?"s":""} detected`,sub:"words that make audiences tune out",color:o?"#c2410c":"#f97316"}:{icon:"🗣️",label:"Filler word scan complete",sub:"um, uh, basically, you know…",color:o?"#c2410c":"#f97316"},te.length>0?{icon:"✂️",label:`${te.length} script${te.length!==1?"s":""} may need trimming`,sub:"too long for confident delivery",color:o?"#b45309":"#f59e0b"}:{icon:"⏱️",label:`~${Math.round(E/130)} min avg delivery`,sub:"within a comfortable range",color:o?"#0e7490":"#06b6d4"},L.length>0?{icon:"🎙️",label:"Practice gap detected",sub:`"${L[0].title}" needs rehearsal`,color:o?"#b91c1c":"#ef4444"}:{icon:"🎙️",label:"Delivery pace coaching ready",sub:"based on your saved speed setting",color:o?"#6d28d9":"#8b5cf6"}].map((t,s)=>e.jsxs("div",{className:"flex items-start gap-2.5 px-3 py-2 rounded-lg",style:{background:"rgb(var(--muted) / 0.4)"},children:[e.jsx("span",{className:"text-base shrink-0 mt-0.5",children:t.icon}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[12px] font-semibold",style:{color:t.color},children:t.label}),e.jsx("p",{className:"text-[11px]",style:{color:"rgb(var(--muted-foreground) / 0.7)"},children:t.sub})]})]},s))}),e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"linear-gradient(to bottom, transparent 0%, rgba(139,92,246,0.06) 100%)"}})]}),e.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("pronoto:open-upgrade")),className:"w-full py-2.5 rounded-xl text-[13px] font-bold text-white transition-opacity hover:opacity-90",style:{background:"linear-gradient(135deg, #8b5cf6, #6d28d9)"},children:"Unlock delivery coaching & filler word analysis →"})]}))]})]})})}export{cs as LearningPulseView,ns as LockedPulseView};

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.