WANIFAHEEM12/SINGING.COM
0
1const pages = ["home","dashboard","mood","learn","practice","scenario-practice","lesson","scenarios","warning","quizzes","path","help","resources","privacy","settings"];2const progressKey="mindaid-progress";3const profileKey="mindaid-profile";4const languageKey="mindaid-language";5const languageText={6 "Roman Urdu":{"Home":"Ghar","Progress Dashboard":"Taraqqi Dashboard","Mood Patterns":"Mood ke Rujhan","Learn":"Seekhein","Practice":"Mashq","Scenarios":"Suratehaal","Quizzes":"Sawalat","Resources":"Wasail","Professional Help":"Mahir Madad","Privacy":"Khalwasiyaat","Settings & Profile":"Settings aur Profile","Search MindAid...":"MindAid dhoondein...","YOUR SPACE":"Aap ki jagah","Manage your profile, preferences, and learning experience.":"Apni profile, pasand aur learning experience manage karein.","Account details":"Account ki tafseel","Display name":"Naam","Learning role":"Learning ka kirdar","Save account details":"Account ki tafseel save karein","Preferred examples":"Pasandeeda misaalein","Conversation language":"Guftagu ki zaban","Examples in practice can reflect the language you choose.":"Practice ki misaalein aap ki pasand ki zaban mein hongi.","Profile":"Profile","Account":"Account","Notifications":"Notifications","Appearance":"Zahiri shakal","Language":"Zaban","Save changes":"Tabdeeliyan save karein","Privacy controls":"Khalwasiyaat controls","Student learner":"Student learner","Calm Mode":"Calm Mode","Reduce motion":"Kam harkat","Daily learning reminder":"Rozana learning reminder","Encouraging feedback":"Hausla dene wali feedback","English":"Angrezi","Roman Urdu":"Roman Urdu","Urdu":"Urdu","Back to Scenarios":"Suratehaal par wapas","Start Scenario →":"Mushahida shuru karein →","Save Scenario":"Mushahida save karein","Your Skills":"Aap ki skills","Continue Conversation →":"Guftagu jari rakhein →","See Final Evaluation →":"Aakhri jaiza dekhein →","Scenario Complete":"Mushahida mukammal","View My Progress":"Apni taraqqi dekhein"},7 "Urdu":{"Home":"گھر","Progress Dashboard":"ترقی کا ڈیش بورڈ","Mood Patterns":"مزاج کے رجحانات","Learn":"سیکھیں","Practice":"مشق","Scenarios":"حالات","Quizzes":"سوالات","Resources":"وسائل","Professional Help":"ماہر مدد","Privacy":"رازداری","Settings & Profile":"ترتیبات اور پروفائل","Search MindAid...":"MindAid تلاش کریں...","YOUR SPACE":"آپ کی جگہ","Manage your profile, preferences, and learning experience.":"اپنی پروفائل، ترجیحات اور سیکھنے کا تجربہ منظم کریں۔","Account details":"اکاؤنٹ کی تفصیل","Display name":"نام","Learning role":"سیکھنے کا کردار","Save account details":"اکاؤنٹ کی تفصیل محفوظ کریں","Preferred examples":"پسندیدہ مثالیں","Conversation language":"گفتگو کی زبان","Examples in practice can reflect the language you choose.":"مشق کی مثالیں آپ کی منتخب زبان میں ہوں گی۔","Profile":"پروفائل","Account":"اکاؤنٹ","Notifications":"اطلاعات","Appearance":"ظاہری شکل","Language":"زبان","Save changes":"تبدیلیاں محفوظ کریں","Privacy controls":"رازداری کے اختیارات","Student learner":"طالب علم","Calm Mode":"پرسکون موڈ","Reduce motion":"حرکت کم کریں","Daily learning reminder":"روزانہ سیکھنے کی یاد دہانی","Encouraging feedback":"حوصلہ افزا فیڈبیک","English":"انگریزی","Roman Urdu":"رومن اردو","Urdu":"اردو","Back to Scenarios":"حالات پر واپس جائیں","Start Scenario →":"مشق شروع کریں →","Save Scenario":"مشق محفوظ کریں","Your Skills":"آپ کی مہارتیں","Continue Conversation →":"گفتگو جاری رکھیں →","See Final Evaluation →":"حتمی جائزہ دیکھیں →","Scenario Complete":"مشق مکمل","View My Progress":"اپنی ترقی دیکھیں"}8};9const originalTextNodes=new WeakMap();10Object.assign(languageText["Roman Urdu"],{"Welcome back, Alex 👋":"Khush aamdeed, Alex 👋","Build the confidence to notice, listen, validate, and connect with people who may be struggling.":"Ghor karne, sunne, samajhne aur madad se jorne ka aitmaad paida karein.","Continue Practice →":"Mashq jari rakhein →","Explore Lessons":"Lessons dekhein","Daily Streak":"Rozana silsila","Course Progress":"Course ki taraqqi","Quiz Average":"Quiz ka ausat","Skills Earned":"Hasil ki gayi skills","Progress Overview":"Taraqqi ka jaiza","You're building strong communication habits.":"Aap behtar guftagu ki aadatein bana rahe hain.","Jump Back In":"Dobara jari rakhein","Explore Features":"Features dekhein","AI Practice Chat":"AI Practice Chat","Real-Life Scenarios":"Rozmarra ke halaat","Warning-Sign Guide":"Warning signs guide","Interactive Quizzes":"Interactive quizzes","Personalized Path":"Aap ka learning raasta","Resource Library":"Wasail ki library","Privacy Controls":"Khalwasiyaat controls","YOUR PROGRESS":"Aap ki taraqqi","See your learning rhythm, growing skills, and next best step.":"Apni learning, skills aur agla qadam dekhein.","Course completion":"Course mukammal","lessons completed":"lessons mukammal","This week":"Is haftay","Current learning streak 🔥":"Maujooda learning silsila 🔥","Skill confidence":"Skill par aitmaad","Average quiz score":"Quiz ka ausat score","Learning rhythm":"Learning ka andaaz","Your toolkit":"Aap ka toolkit","WELLBEING PATTERNS":"Wellbeing ke rujhan","Mood & Behavior Log":"Mood aur rawaiye ka record","Notice changes over time without labels or diagnosis. Your entries stay on this device.":"Waqt ke saath tabdeeliyan note karein, diagnosis ke baghair. Aap ka record isi device par rehta hai.","How are you today?":"Aaj aap kaisa mehsoos kar rahe hain?","Save today's pattern":"Aaj ka pattern save karein","Your recent signals":"Aap ke haal ke signals","SIMULATION LAB":"Simulation lab","Choose a situation and practice the first step.":"Ek surat-e-haal chunein aur pehla qadam practice karein.","All":"Sab","Friends":"Dost","Family":"Khandan","School":"School","Work":"Kaam","Online":"Online","Stress":"Tension","Support":"Madad","All difficulties":"Sab mushkil levels","Low concern":"Kam fikr","Medium concern":"Darmiyani fikr","High concern":"Zyada fikr","Practice →":"Mashq →","Save":"Save","AI TRAINER":"AI trainer","AI Conversation Practice":"AI guftagu ki mashq","Practice opening a supportive conversation in a safe simulation.":"Mehfooz simulation mein madadgar guftagu shuru karne ki mashq karein.","Send →":"Bhejain →","EXTRA SUPPORT":"Mazeed madad","Professional Help":"Mahir madad","Qualified professionals":"Qualified professionals","Immediate danger":"Fori khatra","Trusted person":"Bharosemand shakhs","Privacy Controls":"Khalwasiyaat controls","Manage what the learning experience remembers on this device.":"Is device par learning ke mehfooz record ko manage karein.","Clear local practice data":"Local practice data saaf karein","MindAid · Educational wellbeing practice · Designed for learning, not diagnosis.":"MindAid · Wellbeing learning practice · Diagnosis ke liye nahi."});11Object.assign(languageText["Urdu"],{"Welcome back, Alex 👋":"خوش آمدید، Alex 👋","Build the confidence to notice, listen, validate, and connect with people who may be struggling.":"غور کرنے، سننے، سمجھنے اور مدد سے جڑنے کا اعتماد پیدا کریں۔","Continue Practice →":"مشق جاری رکھیں →","Explore Lessons":"اسباق دیکھیں","Daily Streak":"روزانہ کا سلسلہ","Course Progress":"کورس کی پیش رفت","Quiz Average":"کوئز کا اوسط","Skills Earned":"حاصل کردہ مہارتیں","Progress Overview":"ترقی کا جائزہ","You're building strong communication habits.":"آپ بہتر گفتگو کی عادات بنا رہے ہیں۔","Jump Back In":"دوبارہ شروع کریں","Explore Features":"خصوصیات دیکھیں","AI Practice Chat":"AI گفتگو کی مشق","Real-Life Scenarios":"روزمرہ کے حالات","Warning-Sign Guide":"انتباہی علامات","Interactive Quizzes":"انٹرایکٹو سوالات","Personalized Path":"آپ کا ذاتی راستہ","Resource Library":"وسائل کی لائبریری","Privacy Controls":"رازداری کے اختیارات","YOUR PROGRESS":"آپ کی ترقی","See your learning rhythm, growing skills, and next best step.":"اپنی سیکھنے کی رفتار، مہارتیں اور اگلا قدم دیکھیں۔","Course completion":"کورس کی تکمیل","lessons completed":"اسباق مکمل","This week":"اس ہفتے","Current learning streak 🔥":"موجودہ سیکھنے کا سلسلہ 🔥","Skill confidence":"مہارت پر اعتماد","Average quiz score":"کوئز کا اوسط اسکور","Learning rhythm":"سیکھنے کی رفتار","Your toolkit":"آپ کا ٹول کٹ","WELLBEING PATTERNS":"بہبود کے رجحانات","Mood & Behavior Log":"مزاج اور رویے کا ریکارڈ","How are you today?":"آج آپ کیسا محسوس کر رہے ہیں؟","Save today's pattern":"آج کا ریکارڈ محفوظ کریں","Your recent signals":"آپ کے حالیہ اشارے","SIMULATION LAB":"تجرباتی مشق","Choose a situation and practice the first step.":"ایک صورت حال منتخب کریں اور پہلا قدم آزمائیں۔","All":"سب","Friends":"دوست","Family":"خاندان","School":"اسکول","Work":"کام","Online":"آن لائن","Stress":"ذہنی دباؤ","Support":"مدد","All difficulties":"تمام مشکل levels","Low concern":"کم تشویش","Medium concern":"درمیانی تشویش","High concern":"زیادہ تشویش","Practice →":"مشق →","AI TRAINER":"AI ٹرینر","AI Conversation Practice":"AI گفتگو کی مشق","Send →":"بھیجیں →","EXTRA SUPPORT":"اضافی مدد","Qualified professionals":"ماہر پیشہ ور افراد","Immediate danger":"فوری خطرہ","Trusted person":"قابل اعتماد شخص","Manage what the learning experience remembers on this device.":"اس ڈیوائس پر محفوظ learning record کو منظم کریں۔","Clear local practice data":"مقامی practice data صاف کریں","MindAid · Educational wellbeing practice · Designed for learning, not diagnosis.":"MindAid · Wellbeing learning practice · تشخیص کے لیے نہیں۔"});12Object.assign(languageText["Roman Urdu"],{"Welcome back, Alex":"Khush aamdeed, Alex","YOUR WELLBEING LEARNING SPACE":"Aap ki wellbeing learning space","PICK UP WHERE YOU LEFT OFF":"Jahan chora tha wahan se jari rakhein","Lessons":"Lessons","Quiz Avg.":"Quiz ka ausat","Time learned":"Seekhne ka waqt","Practice realistic conversations.":"Haqeeqi guftagu ki mashq karein.","Get instant supportive feedback.":"Fori madadgar feedback hasil karein.","Learn what to notice and do.":"Jo dekhna aur karna hai woh seekhein.","Test and strengthen your skills.":"Apni skills check aur mazboot karein.","Follow a learning route for you.":"Apne liye learning raasta follow karein.","Find trusted support options.":"Bharosemand madad ke options dekhein.","Guides, tools, and references.":"Guides, tools aur references.","Understand and manage your data.":"Apna data samjhein aur manage karein.","AI Mental Health Trainer":"AI Mental Health Trainer","Learn how to listen without rushing to fix the problem.":"Jaldi solution diye baghair sunna seekhein."});13Object.assign(languageText["Urdu"],{"Welcome back, Alex":"خوش آمدید، Alex","YOUR WELLBEING LEARNING SPACE":"آپ کی wellbeing learning space","PICK UP WHERE YOU LEFT OFF":"جہاں چھوڑا تھا وہاں سے جاری رکھیں","Lessons":"اسباق","Quiz Avg.":"کوئز کا اوسط","Time learned":"سیکھنے کا وقت","Practice realistic conversations.":"حقیقی گفتگو کی مشق کریں۔","Get instant supportive feedback.":"فوری مددگار فیڈبیک حاصل کریں۔","Learn what to notice and do.":"جو دیکھنا اور کرنا ہے وہ سیکھیں۔","Test and strengthen your skills.":"اپنی مہارتیں جانچیں اور مضبوط کریں۔","Follow a learning route for you.":"اپنے لیے سیکھنے کا راستہ اپنائیں۔","Find trusted support options.":"قابل اعتماد مدد کے اختیارات دیکھیں۔","Guides, tools, and references.":"رہنما، ٹولز اور حوالہ جات۔","Understand and manage your data.":"اپنا ڈیٹا سمجھیں اور منظم کریں۔","AI Mental Health Trainer":"AI ذہنی صحت ٹرینر","Learn how to listen without rushing to fix the problem.":"فوری حل دیے بغیر سننا سیکھیں۔"});14Object.assign(languageText["Roman Urdu"],{"Continue Practice":"Mashq jari rakhein","YOUR JOURNEY":"Aap ka safar","DISCOVER":"Daryaft karein","60% Completed":"60% mukammal","6 of 10 lessons":"10 mein se 6 lessons","6/10 Done":"6/10 mukammal","4 day streak":"4 din ka silsila","Resume Lesson":"Lesson jari rakhein","Module 3: Active Listening & Validation":"Module 3: Ghor se sunna aur tasdeeq","Quiz Avg.":"Quiz ka ausat","Time learned":"Seekhne ka waqt"});15Object.assign(languageText["Urdu"],{"Continue Practice":"مشق جاری رکھیں","YOUR JOURNEY":"آپ کا سفر","DISCOVER":"دریافت کریں","60% Completed":"60% مکمل","6 of 10 lessons":"10 میں سے 6 اسباق","6/10 Done":"6/10 مکمل","4 day streak":"4 دن کا سلسلہ","Resume Lesson":"سبق جاری رکھیں","Module 3: Active Listening & Validation":"ماڈیول 3: غور سے سننا اور توثیق","Quiz Avg.":"کوئز کا اوسط","Time learned":"سیکھنے کا وقت"});16Object.assign(languageText["Roman Urdu"],{"Resume Lesson →":"Lesson jari rakhein →"});17Object.assign(languageText["Urdu"],{"Resume Lesson →":"سبق جاری رکھیں →"});18Object.assign(languageText["Roman Urdu"],{19 "How to check in":"Kisi ka haal poochna",20 "Simple language for starting a caring conversation.":"Khuloos bhari guftagu shuru karne ke liye sada zaban.",21 "Read →":"Parhein →",22 "Active listening audio":"Ghor se sunne ki audio",23 "A short guided exercise for attention and reflection.":"Tawajjoh aur soch ke liye chhoti rehnuma mashq.",24 "Play →":"Chalayen →",25 "Conversation starters":"Guftagu shuru karne ke jumlay",26 "Open-ended prompts for different everyday situations.":"Mukhtalif rozmarra surat-e-haal ke liye khulay sawalat.",27 "Open →":"Kholen →",28 "Practical reading for better supportive conversations.":"Behtar madadgar guftagu ke liye amli mutalea.",29 "MindAid · Educational wellbeing practice · Designed for learning, not diagnosis.":"MindAid · Wellbeing ki taleemi mashq · Seekhne ke liye, tashkhis ke liye nahi."30});31Object.assign(languageText["Urdu"],{32 "How to check in":"خیریت پوچھنے کا طریقہ",33 "Simple language for starting a caring conversation.":"خلوص بھری گفتگو شروع کرنے کے لیے سادہ زبان۔",34 "Read →":"پڑھیں →",35 "Active listening audio":"غور سے سننے کی آڈیو",36 "A short guided exercise for attention and reflection.":"توجہ اور غور کے لیے مختصر رہنما مشق۔",37 "Play →":"چلائیں →",38 "Conversation starters":"گفتگو شروع کرنے والے جملے",39 "Open-ended prompts for different everyday situations.":"مختلف روزمرہ صورت حال کے لیے کھلے سوالات۔",40 "Open →":"کھولیں →",41 "Practical reading for better supportive conversations.":"بہتر مددگار گفتگو کے لیے عملی مطالعہ۔",42 "MindAid · Educational wellbeing practice · Designed for learning, not diagnosis.":"MindAid · بہبود کی تعلیمی مشق · سیکھنے کے لیے، تشخیص کے لیے نہیں۔"43});44Object.assign(languageText["Roman Urdu"],{45 "Learning Center":"Learning ka markaz",46 "Short, practical lessons designed around everyday supportive communication.":"Rozmarra madadgar guftagu ke liye chhotay aur amli lessons.",47 "✓ Complete":"✓ Mukammal",48 "● In progress":"● Jari hai",49 "Locked next":"Agla lesson lock hai",50 "1. Listening Basics":"1. Sunne ki bunyaad",51 "Focus, presence, and patience.":"Tawajjoh, mojoodgi aur sabr.",52 "Review →":"Dobara dekhein →",53 "2. Starting a Conversation":"2. Guftagu shuru karna",54 "Open gently and directly.":"Narmi aur seedhe andaaz mein baat shuru karein.",55 "3. Validation":"3. Tasdeeq",56 "Respond without judgment or pressure.":"Bina faisla sunaye ya dabao ke jawab dein.",57 "Continue →":"Jari rakhein →",58 "4. Asking Open Questions":"4. Khulay sawalat poochna",59 "Invite people to share in their own words.":"Logon ko apne alfaaz mein baat karne ka mauqa dein.",60 "5. Warning Signs":"5. Chetavni ki nishaniyan",61 "Know when extra support may be needed.":"Samjhein ke kab mazeed madad ki zaroorat ho sakti hai.",62 "6. Connecting to Help":"6. Madad se jorna",63 "Encourage professional support safely.":"Mehfooz tareeqe se professional madad ki taraf rahnumai karein.",64 "Preview →":"Mulaheza karein →",65 "AI MENTAL HEALTH TRAINER":"AI zehni sehat trainer"66});67Object.assign(languageText["Urdu"],{68 "Learning Center":"سیکھنے کا مرکز",69 "Short, practical lessons designed around everyday supportive communication.":"روزمرہ مددگار گفتگو کے لیے مختصر اور عملی اسباق۔",70 "✓ Complete":"✓ مکمل",71 "● In progress":"● جاری ہے",72 "Locked next":"اگلا سبق بند ہے",73 "1. Listening Basics":"1. سننے کی بنیاد",74 "Focus, presence, and patience.":"توجہ، موجودگی اور صبر۔",75 "Review →":"دوبارہ دیکھیں →",76 "2. Starting a Conversation":"2. گفتگو شروع کرنا",77 "Open gently and directly.":"نرمی اور براہ راست انداز میں بات شروع کریں۔",78 "3. Validation":"3. توثیق",79 "Respond without judgment or pressure.":"بغیر فیصلہ سنائے یا دباؤ کے جواب دیں۔",80 "Continue →":"جاری رکھیں →",81 "4. Asking Open Questions":"4. کھلے سوالات پوچھنا",82 "Invite people to share in their own words.":"لوگوں کو اپنے الفاظ میں بات کرنے کا موقع دیں۔",83 "5. Warning Signs":"5. انتباہی علامات",84 "Know when extra support may be needed.":"جانیں کہ کب اضافی مدد کی ضرورت ہو سکتی ہے۔",85 "6. Connecting to Help":"6. مدد سے جوڑنا",86 "Encourage professional support safely.":"محفوظ طریقے سے پیشہ ورانہ مدد کی طرف رہنمائی کریں۔",87 "Preview →":"پیش نظارہ →",88 "AI MENTAL HEALTH TRAINER":"AI ذہنی صحت ٹرینر"89});90Object.assign(languageText["Roman Urdu"],{"Which response is the most supportive opening?":"Sab se madadgar shuruat kaunsi hai?","What is a key part of validation?":"Tasdeeq ka aham hissa kya hai?","Which is an open-ended question?":"Khula sawal kaunsa hai?","You look depressed. What's wrong?":"Tum pareshan lag rahe ho. Kya hua?","I've noticed you've been quieter lately. How have you been?":"Maine dekha hai tum kuch arsay se khamosh ho. Kaise ho?","You need to talk to someone immediately.":"Tumhein foran kisi se baat karni chahiye.","Fixing the person's problem quickly":"Masla foran hal karna","Telling them to stay positive":"Unhein positive rehne ka kehna","Acknowledging their feelings without judgment":"Unke ehsaas ko baghair faisla sunaye samajhna","Are you okay?":"Kya tum theek ho?","Did you sleep?":"Kya tum soye?","What has been on your mind lately?":"Aaj kal tumhare zehan mein kya hai?","Check answer":"Jawab check karein","Next question":"Agla sawal","Choose an answer first.":"Pehle ek jawab chunein.","Correct — great supportive instinct!":"Durust — bohat achi madadgar soch!","Not quite. Review the highlighted best response.":"Bilkul nahi. Highlighted behtareen jawab dekhein.","Quiz complete ✓":"Quiz mukammal ✓","AI Trainer is thinking…":"AI Trainer soch raha hai…","Nice approach.":"Acha tareeqa.","Language feedback:":"Zaban par feedback:","Empathy: strong":"Empathy: mazboot","Open question: strong":"Khula sawal: mazboot","Pressure: low":"Pressure: kam","Judgment-free language: strong":"Bila-faisla zaban: mazboot"});91Object.assign(languageText["Urdu"],{"Which response is the most supportive opening?":"سب سے مددگار آغاز کون سا ہے؟","What is a key part of validation?":"تصدیق کا اہم حصہ کیا ہے؟","Which is an open-ended question?":"کھلا سوال کون سا ہے؟","You look depressed. What's wrong?":"آپ پریشان لگ رہے ہیں۔ کیا ہوا؟","I've noticed you've been quieter lately. How have you been?":"میں نے محسوس کیا ہے کہ آپ کچھ عرصے سے خاموش ہیں۔ آپ کیسے ہیں؟","You need to talk to someone immediately.":"آپ کو فوراً کسی سے بات کرنی چاہیے۔","Fixing the person's problem quickly":"مسئلہ فوراً حل کرنا","Telling them to stay positive":"انہیں مثبت رہنے کا کہنا","Acknowledging their feelings without judgment":"ان کے احساسات کو بغیر فیصلہ سنائے سمجھنا","Are you okay?":"کیا آپ ٹھیک ہیں؟","Did you sleep?":"کیا آپ سوئے؟","What has been on your mind lately?":"آج کل آپ کے ذہن میں کیا ہے؟","Check answer":"جواب چیک کریں","Next question":"اگلا سوال","Choose an answer first.":"پہلے ایک جواب منتخب کریں۔","Correct — great supportive instinct!":"درست — بہت اچھی مددگار سوچ!","Not quite. Review the highlighted best response.":"بالکل نہیں۔ نمایاں کیے گئے بہترین جواب کو دیکھیں۔","Quiz complete ✓":"کوئز مکمل ✓","AI Trainer is thinking…":"AI ٹرینر سوچ رہا ہے…","Nice approach.":"اچھا طریقہ۔","Language feedback:":"زبان پر فیڈبیک:","Empathy: strong":"ہمدردی: مضبوط","Open question: strong":"کھلا سوال: مضبوط","Pressure: low":"دباؤ: کم","Judgment-free language: strong":"بغیر فیصلے کی زبان: مضبوط"});92Object.assign(languageText["Roman Urdu"],{"They answer softly and need a little space. Try a gentle observation and an open question.":"Woh ahista jawab dete hain aur unhein thori jagah chahiye. Narmi se dekhi hui baat aur khula sawal karein.","They sound rushed and overloaded. Validate the pressure before offering one small next step.":"Woh jaldi mein aur bohat bojh mehsoos kar rahe hain. Agla chhota qadam dene se pehle unka pressure samjhein.","They are expressing frustration. Keep your tone calm, avoid correcting, and reflect what you heard.":"Woh frustration ka izhar kar rahe hain. Lehja pur-sukoon rakhein, tokne se bachein aur jo suna woh dohrayein.","They may need presence more than solutions. Acknowledge the loss and let silence be okay.":"Unhein solution se zyada aap ki mojoodgi chahiye. Nuqsan ko tasleem karein aur khamoshi ko bhi theek samjhein.","Emotion-aware trainer · now":"Jazbaat samajhne wala trainer · abhi","Empathy: add a feeling acknowledgment":"Empathy: ehsaas ko tasleem karein","Open question: invite them to share":"Khula sawal: unhein share karne ki dawat dein","Pressure: soften directives":"Pressure: hidayat ko narm karein","Judgment: remove labels":"Faisla: labels hata dein"});93Object.assign(languageText["Urdu"],{"They answer softly and need a little space. Try a gentle observation and an open question.":"وہ آہستہ جواب دے رہے ہیں اور انہیں کچھ جگہ چاہیے۔ نرمی سے مشاہدہ اور کھلا سوال کریں۔","They sound rushed and overloaded. Validate the pressure before offering one small next step.":"وہ جلدی میں اور بہت بوجھ محسوس کر رہے ہیں۔ اگلا چھوٹا قدم دینے سے پہلے ان کے دباؤ کو سمجھیں۔","They are expressing frustration. Keep your tone calm, avoid correcting, and reflect what you heard.":"وہ مایوسی کا اظہار کر رہے ہیں۔ لہجہ پرسکون رکھیں، ٹوکنے سے بچیں اور جو سنا اسے بیان کریں۔","They may need presence more than solutions. Acknowledge the loss and let silence be okay.":"انہیں حل سے زیادہ آپ کی موجودگی چاہیے۔ نقصان کو تسلیم کریں اور خاموشی کو بھی ٹھیک سمجھیں۔","Emotion-aware trainer · now":"جذبات سمجھنے والا ٹرینر · ابھی","Empathy: add a feeling acknowledgment":"ہمدردی: احساس کو تسلیم کریں","Open question: invite them to share":"کھلا سوال: انہیں بات کرنے کی دعوت دیں","Pressure: soften directives":"دباؤ: ہدایات کو نرم کریں","Judgment: remove labels":"فیصلہ: labels ختم کریں"});94Object.assign(languageText["Roman Urdu"],{"Scenario:":"Suratehaal:","A friend seems unusually quiet and distant.":"Ek dost aam se zyada khamosh aur door lag raha hai.","Goal:":"Maqsad:","Practice opening a supportive conversation.":"Madadgar guftagu shuru karne ki mashq karein.","Roleplay personality":"Roleplay shakhsiyat","Emotion lens: waiting for your message":"Jazbaati nazar: aap ke paigham ka intezar","Trainer online":"Trainer online","Hi Alex! Let's practice. Imagine Jordan has skipped lunch three days in a row and avoids eye contact. What is your opening message to Jordan?":"Hi Alex! Mashq karte hain. Sochiye Jordan teen din se lunch nahi kar raha aur nazrein milaane se bach raha hai. Aap Jordan se pehli baat kya kahenge?","Hey Jordan, I've noticed you've been pretty quiet lately and skipped lunch a lot. Is everything ok?":"Hey Jordan, maine dekha hai tum kuch arsay se khamosh ho aur lunch bhi miss kar rahe ho. Kya sab theek hai?","Great job! You noticed specific behaviors without sounding accusatory. Want to try asking an open-ended follow-up question?":"Bohat acha! Aap ne ilzam lagaye baghair specific rawaiye notice kiye. Kya aap khula follow-up sawal karna chahenge?","Suggested response:":"Tajweez shuda jawab:","I'm here for you if you ever want to chat.":"Jab bhi baat karna chaho, main tumhare saath hoon.","Type a supportive message...":"Madadgar paigham likhein...","Send →":"Bhejain →","AFTER-PRACTICE SCORE":"MASHQ KE BAAD SCORE","Supportive Communication Score":"Madadgar guftagu ka score","Coaching feedback reflects language patterns in this practice only. It is not a mental-health assessment.":"Yeh feedback sirf is mashq ki zaban par mabni hai, mental-health assessment nahi.","Empathy":"Empathy","Listening":"Sunna","Judgment-free":"Bila-faisla","Open questions":"Khulay sawalat"});95Object.assign(languageText["Urdu"],{"Scenario:":"صورت حال:","A friend seems unusually quiet and distant.":"ایک دوست معمول سے زیادہ خاموش اور دور لگ رہا ہے۔","Goal:":"مقصد:","Practice opening a supportive conversation.":"مددگار گفتگو شروع کرنے کی مشق کریں۔","Roleplay personality":"کردار کی شخصیت","Emotion lens: waiting for your message":"جذباتی نظر: آپ کے پیغام کا انتظار","Trainer online":"ٹرینر آن لائن","Hi Alex! Let's practice. Imagine Jordan has skipped lunch three days in a row and avoids eye contact. What is your opening message to Jordan?":"Hi Alex! مشق کرتے ہیں۔ تصور کریں Jordan تین دن سے lunch نہیں کر رہا اور نظریں ملانے سے بچ رہا ہے۔ آپ Jordan سے پہلی بات کیا کہیں گے؟","Hey Jordan, I've noticed you've been pretty quiet lately and skipped lunch a lot. Is everything ok?":"Hey Jordan، میں نے محسوس کیا ہے کہ آپ کچھ عرصے سے خاموش ہیں اور lunch بھی چھوڑ رہے ہیں۔ کیا سب ٹھیک ہے؟","Great job! You noticed specific behaviors without sounding accusatory. Want to try asking an open-ended follow-up question?":"بہت اچھا! آپ نے الزام لگائے بغیر مخصوص رویے محسوس کیے۔ کیا آپ کھلا follow-up سوال پوچھنا چاہیں گے؟","Suggested response:":"تجویز کردہ جواب:","I'm here for you if you ever want to chat.":"جب بھی بات کرنا چاہیں، میں آپ کے ساتھ ہوں۔","Type a supportive message...":"مددگار پیغام لکھیں...","Send →":"بھیجیں →","AFTER-PRACTICE SCORE":"مشق کے بعد اسکور","Supportive Communication Score":"مددگار گفتگو کا اسکور","Coaching feedback reflects language patterns in this practice only. It is not a mental-health assessment.":"یہ feedback صرف اس مشق کی زبان پر مبنی ہے، ذہنی صحت کا جائزہ نہیں۔","Empathy":"ہمدردی","Listening":"سننا","Judgment-free":"بغیر فیصلے کے","Open questions":"کھلے سوالات"});96Object.assign(languageText["Roman Urdu"],{"Empathy: strong":"Empathy: mazboot","Open question: strong":"Khula sawal: mazboot","Pressure: low":"Pressure: kam","Judgment-free language: strong":"Bila-faisla zaban: mazboot"});97Object.assign(languageText["Urdu"],{"Empathy: strong":"ہمدردی: مضبوط","Open question: strong":"کھلا سوال: مضبوط","Pressure: low":"دباؤ: کم","Judgment-free language: strong":"بغیر فیصلے کی زبان: مضبوط"});98Object.assign(languageText["Roman Urdu"],{"LESSON PREVIEW":"LESSON KA MULAHEZA","Questions to explore":"Jin sawalon par ghour karna hai","Invite someone to try these questions":"Kisi ko yeh sawalat azmane ki dawat dein","WhatsApp":"WhatsApp","Email":"Email","Other":"Degar","Close →":"Band karein →","LESSON REVIEW · COMPLETE":"LESSON REVIEW · MUKAMMAL","Learning objectives":"Seekhne ke maqasid","Key takeaways":"Aham baatein","Real-life scenario":"Rozmarra ki surat-e-haal","Start interactive practice":"Interactive mashq shuru karein","Choose a supportive response":"Madadgar jawab chunein","Question to explore":"Ghour ka sawal","5 minutes":"5 minutes"});99Object.assign(languageText["Urdu"],{"LESSON PREVIEW":"سبق کا پیش نظارہ","Questions to explore":"غور کرنے والے سوالات","Invite someone to try these questions":"کسی کو یہ سوالات آزمانے کی دعوت دیں","WhatsApp":"WhatsApp","Email":"ای میل","Other":"دیگر","Close →":"بند کریں →","LESSON REVIEW · COMPLETE":"سبق کا جائزہ · مکمل","Learning objectives":"سیکھنے کے مقاصد","Key takeaways":"اہم باتیں","Real-life scenario":"روزمرہ کی صورت حال","Start interactive practice":"انٹرایکٹو مشق شروع کریں","Choose a supportive response":"مددگار جواب منتخب کریں","Question to explore":"غور کا سوال","5 minutes":"5 منٹ"});100Object.assign(languageText["Roman Urdu"],{"Invite people to share in their own words with a calm, curious question.":"Logon ko pur-sukoon aur dilchaspi bhare sawal ke zariye apne alfaaz mein baat karne ki dawat dein.","What would you say to encourage them to share more about what they’re experiencing?":"Aap unhein apne tajurbe ke bare mein mazeed batane ke liye kya kahenge?","How have things been feeling for you lately?":"Aaj kal aap ko sab kuch kaisa mehsoos ho raha hai?","What has been on your mind recently?":"Haal hi mein aap ke zehan mein kya chal raha hai?","Would you like to tell me more about what happened?":"Kya aap batana chahenge ke kya hua?","Invitation: Would you like to talk about what has been on your mind?":"Dawat: Kya aap batana chahenge ke aap ke zehan mein kya chal raha hai?"});101Object.assign(languageText["Urdu"],{"Invite people to share in their own words with a calm, curious question.":"پرسکون اور تجسس بھرے سوال کے ذریعے لوگوں کو اپنے الفاظ میں بات کرنے کی دعوت دیں۔","What would you say to encourage them to share more about what they’re experiencing?":"آپ انہیں اپنے تجربے کے بارے میں مزید بتانے کی ترغیب دینے کے لیے کیا کہیں گے؟","How have things been feeling for you lately?":"آج کل آپ کو سب کچھ کیسا محسوس ہو رہا ہے؟","What has been on your mind recently?":"حال ہی میں آپ کے ذہن میں کیا چل رہا ہے؟","Would you like to tell me more about what happened?":"کیا آپ بتانا چاہیں گے کہ کیا ہوا؟","Invitation: Would you like to talk about what has been on your mind?":"دعوت: کیا آپ بتانا چاہیں گے کہ آپ کے ذہن میں کیا چل رہا ہے؟"});102const previewQuestionTranslations={103 "Roman Urdu":["Aap unhein apne tajurbe ke bare mein mazeed batane ke liye kya kahenge?","Aaj kal aap ko sab kuch kaisa mehsoos ho raha hai?","Haal hi mein aap ke zehan mein kya chal raha hai?","Kya aap batana chahenge ke kya hua?","Dawat: Kya aap batana chahenge ke aap ke zehan mein kya chal raha hai?"],104 "Urdu":["آپ انہیں اپنے تجربے کے بارے میں مزید بتانے کی ترغیب دینے کے لیے کیا کہیں گے؟","آج کل آپ کو سب کچھ کیسا محسوس ہو رہا ہے؟","حال ہی میں آپ کے ذہن میں کیا چل رہا ہے؟","کیا آپ بتانا چاہیں گے کہ کیا ہوا؟","دعوت: کیا آپ بتانا چاہیں گے کہ آپ کے ذہن میں کیا چل رہا ہے؟"]105};106const lessonReviewTranslations={107 "Urdu":{108 "1. Listening Basics":{overview:"جانیں کہ توجہ سے سننا دوسرے شخص کو سنا، قابل احترام اور کم تنہا محسوس کرنے میں کیسے مدد دیتا ہے۔",objectives:["بغیر اندازے کے تبدیلیوں کو محسوس کریں۔","موجودگی، صبر اور غور سے سننے کا استعمال کریں۔","مشورہ دینے سے پہلے توقف کریں۔"],takeaways:["مخصوص مشاہدات لیبلز کے مقابلے میں زیادہ خیال رکھنے والے محسوس ہوتے ہیں۔","خاموشی کسی کو اپنے الفاظ تلاش کرنے کی جگہ دے سکتی ہے۔","سننا بھی مدد ہے، چاہے آپ مسئلہ حل نہ کر سکیں۔"],scenario:"آپ کے ہم جماعت سام نے گروپ ورک کے دوران خاموشی اختیار کر لی ہے۔ آپ اس پر دباؤ ڈالے بغیر خیریت پوچھنا چاہتے ہیں۔",practice:{question:"کون سا آغاز غور سے سننے کو ظاہر کرتا ہے؟",answers:["آپ حال ہی میں پریشان لگ رہے ہیں، کیا مسئلہ ہے؟","میں نے محسوس کیا ہے کہ آپ آج کچھ خاموش ہیں۔ کیا آپ چاہیں گے کہ میں آپ کے ساتھ رہوں؟","ہر شخص دباؤ محسوس کرتا ہے۔ آپ جلد بہتر محسوس کریں گے۔"],feedback:"یہ جواب مخصوص تبدیلی کو نرمی سے محسوس کرتا ہے اور سامنے والے کو انتخاب دیتا ہے۔"},quiz:[{question:"جب کوئی شخص دور دور لگے تو پہلا مددگار قدم کیا ہے؟",answers:["بغیر کسی لیبل کے جو آپ نے محسوس کیا اسے بیان کریں۔","دوسروں سے اس کے رویے کی وضاحت مانگیں۔","اسے بتائیں کہ مسئلہ کیسے حل کرنا ہے۔"]},{question:"گفتگو میں خاموشی کیوں مددگار ہو سکتی ہے؟",answers:["اس سے ثابت ہوتا ہے کہ آپ سننا ختم کر چکے ہیں۔","اس سے شخص کو سوچنے اور جواب دینے کی جگہ ملتی ہے۔","اس سے احساسات کو تسلیم کرنے سے بچا جا سکتا ہے۔"]},{question:"کون سا جواب فعال سننے کی عکاسی کرتا ہے؟",answers:["یہ مشکل لگتا ہے۔ آپ کے لیے یہ تجربہ کیسا رہا؟","آپ کو اس کی فکر کرنا چھوڑ دینی چاہیے۔","میں بالکل جانتا ہوں کہ آپ کو کیا چاہیے۔"]}]},109 "2. Starting a Conversation":{overview:"واضح مشاہدات، گرمجوشی اور دوسرے شخص کی رفتار کے احترام کے ساتھ خیال رکھنے والی گفتگو شروع کرنے کی مشق کریں۔",objectives:["خیریت پوچھنے کے لیے پُرسکون وقت منتخب کریں۔","لیبلز کے بجائے مشاہدات سے بات شروع کریں۔","کھلا سوال پوچھیں اور جواب سنیں۔"],takeaways:["نرم آغاز دباؤ کم کرتا ہے۔","خیال ظاہر کرنے کے لیے بہترین الفاظ ضروری نہیں۔","کسی سے بات کرنے پر مجبور کیے بغیر مدد پیش کریں۔"],scenario:"آپ کی دوست آمنہ نے دوپہر کے کھانے میں آنا چھوڑ دیا ہے اور ایک لفظی پیغامات بھیجتی ہے۔ آپ کم دباؤ والا پیغام بھیجنے کا فیصلہ کرتے ہیں۔",practice:{question:"سب سے مددگار پیغام کون سا ہے؟",answers:["آپ عجیب رویہ اختیار کر رہے ہیں۔ بتائیں کیا ہو رہا ہے؟","میں نے محسوس کیا ہے کہ آپ حال ہی میں کچھ خاموش ہیں۔ آپ کیسے ہیں؟","آپ کو ابھی فوراً کسی سے بات کرنی چاہیے۔"],feedback:"یہ جواب ایک واضح مشاہدے کو کھلی دعوت کے ساتھ جوڑتا ہے، بغیر الزام یا دباؤ کے۔"},quiz:[{question:"خیریت پوچھنا کم فیصلہ کن کیسے محسوس ہوتا ہے؟",answers:["شخص کی وضاحت کے لیے لیبل استعمال کر کے۔","جو آپ نے محسوس کیا اسے بیان کر کے۔","اس کا دوسرے دوستوں سے موازنہ کر کے۔"]},{question:"کون سا سوال کسی کو بات کرنے کی دعوت دیتا ہے؟",answers:["کیا آپ ٹھیک ہیں؟","آپ ایسا کیوں کر رہے ہیں؟","آج کل آپ کے ذہن میں کیا چل رہا ہے؟"]},{question:"کھلا سوال پوچھنے کے بعد آپ کو کیا کرنا چاہیے؟",answers:["جب وہ بولیں تو اپنے مشورے کی منصوبہ بندی کریں۔","سنیں اور ان کے جواب کو گفتگو کی رہنمائی کرنے دیں۔","جواب ملنے تک سوال دہراتے رہیں۔"]}]}110 },111 "Roman Urdu":{112 "1. Listening Basics":{overview:"Seekhein ke tawajjoh se sunna doosre shakhs ko suna, mohtaram aur kam tanha mehsoos karne mein kaise madad deta hai.",objectives:["Baghair andazay ke tabdeeliyon ko notice karein.","Mojoodgi, sabr aur ghor se sunne ka istemal karein.","Mashwara dene se pehle waqfa karein."],takeaways:["Khaas mushahide labels ke muqable mein zyada khayal rakhne wale mehsoos hote hain.","Khamoshi kisi ko apne alfaaz dhoondne ki jagah de sakti hai.","Sunna bhi madad hai, chahe aap masla hal na kar sakein."],scenario:"Aap ke classmate Sam ne group work ke duran khamoshi ikhtiyar kar li hai. Aap us par pressure dale baghair haal poochna chahte hain.",practice:{question:"Kaunsa aghaz ghor se sunne ko zahir karta hai?",answers:["Aap haal hi mein pareshan lag rahe hain, kya masla hai?","Maine mehsoos kiya hai ke aap aaj kuch khamosh hain. Kya aap chahenge ke main aap ke saath rahoon?","Har shakhs pressure mehsoos karta hai. Aap jald behtar mehsoos karenge."],feedback:"Yeh jawab khaas tabdeeli ko narmi se notice karta hai aur saamne wale ko choice deta hai."},quiz:[{question:"Jab koi shakhs door door lage to pehla madadgar qadam kya hai?",answers:["Baghair label ke jo aap ne notice kiya woh bayan karein.","Doosron se us ke rawaiye ki wazahat maangein.","Usay batayein ke masla kaise hal karna hai."]},{question:"Guftagu mein khamoshi kyun madadgar ho sakti hai?",answers:["Is se sabit hota hai ke aap sunna khatam kar chuke hain.","Is se shakhs ko sochne aur jawab dene ki jagah milti hai.","Is se ehsaas tasleem karne se bacha ja sakta hai."]},{question:"Kaunsa jawab active listening ki aksari karta hai?",answers:["Yeh mushkil lagta hai. Aap ke liye yeh tajurba kaisa raha?","Aap ko is ki fikr karna chhor dena chahiye.","Main bilkul janta hoon ke aap ko kya chahiye."]}]},113 "2. Starting a Conversation":{overview:"Wazeh mushahide, garmajoshi aur doosre shakhs ki raftaar ke ehtram ke saath khayal rakhne wali guftagu shuru karne ki mashq karein.",objectives:["Haal poochne ke liye pur-sukoon waqt chunein.","Labels ke bajaye mushahide se baat shuru karein.","Khula sawal poochein aur jawab sunhein."],takeaways:["Narm aghaz pressure kam karta hai.","Khayal zahir karne ke liye behtareen alfaaz zaroori nahi.","Kisi ko baat karne par majboor kiye baghair madad pesh karein."],scenario:"Aap ki dost Amina ne lunch par aana chhor diya hai aur ek lafzi paigham bhejti hai. Aap kam pressure wala paigham bhejne ka faisla karte hain.",practice:{question:"Sab se madadgar paigham kaunsa hai?",answers:["Aap ajeeb rawaiya ikhtiyar kar rahe hain. Batayein kya ho raha hai?","Maine mehsoos kiya hai ke aap haal hi mein kuch khamosh hain. Aap kaise hain?","Aap ko abhi foran kisi se baat karni chahiye."],feedback:"Yeh jawab wazeh mushahide ko khuli dawat ke saath jorta hai, baghair ilzam ya pressure ke."},quiz:[{question:"Khairiyat poochna kam faisla-kun kaise mehsoos hota hai?",answers:["Shakhs ki wazahat ke liye labels istemal kar ke.","Jo aap ne notice kiya usay bayan kar ke.","Us ka doosre doston se muqabla kar ke."]},{question:"Kaunsa sawal kisi ko baat karne ki dawat deta hai?",answers:["Kya aap theek hain?","Aap aisa kyun kar rahe hain?","Aaj kal aap ke zehan mein kya chal raha hai?"]},{question:"Khula sawal poochne ke baad aap ko kya karna chahiye?",answers:["Jab woh bolein to apne mashware ki planning karein.","Sunhein aur unke jawab ko guftagu ki rahnumai karne dein.","Jawab milne tak sawal dohrate rahein."]}]}114 }115};116function localizedReviewData(title){const data=reviewData(title),translation=lessonReviewTranslations[localStorage.getItem(languageKey)||"English"]?.[canonicalLessonTitle(title)];if(!translation)return data;return {...data,overview:translation.overview||data.overview,objectives:translation.objectives||data.objectives,takeaways:translation.takeaways||data.takeaways,scenario:translation.scenario||data.scenario,practice:translation.practice||data.practice,quiz:(translation.quiz||[]).map((question,index)=>({...data.quiz[index],...question}))};}117Object.assign(languageText["Roman Urdu"],{"Back to lessons":"Lessons par wapas","MODULE 3 · 12 MINUTES":"MODULE 3 · 12 MINUTES","Active Listening & Validation":"Ghour se sunna aur tasdeeq","Good support starts with making space for another person to be heard.":"Behtareen madad is baat se shuru hoti hai ke doosre shakhs ko sune jane ki jagah di jaye.","What validation means":"Tasdeeq ka matlab","Validation means acknowledging someone's feelings and experience without automatically agreeing with every conclusion they make.":"Tasdeeq ka matlab kisi ke ehsaas aur tajurbe ko tasleem karna hai, baghair unki har baat se foran ittefaq kiye.","Name what you notice.":"Jo aap mehsoos karein usay bayan karein.","Listen before offering solutions.":"Hal pesh karne se pehle sunhein.","Use curious, open-ended questions.":"Dilchaspi bhare, khulay sawalat istemal karein.","Respect their pace and boundaries.":"Unki raftaar aur hudood ka ehtram karein."});118Object.assign(languageText["Urdu"],{"Back to lessons":"اسباق پر واپس جائیں","MODULE 3 · 12 MINUTES":"ماڈیول 3 · 12 منٹ","Active Listening & Validation":"غور سے سننا اور توثیق","Good support starts with making space for another person to be heard.":"بہتر مدد اس بات سے شروع ہوتی ہے کہ دوسرے شخص کو سنے جانے کی جگہ دی جائے۔","What validation means":"توثیق کا مطلب","Validation means acknowledging someone's feelings and experience without automatically agreeing with every conclusion they make.":"توثیق کا مطلب کسی کے احساسات اور تجربے کو تسلیم کرنا ہے، بغیر ان کے ہر نتیجے سے فوراً اتفاق کیے۔","Name what you notice.":"جو آپ محسوس کریں اسے بیان کریں۔","Listen before offering solutions.":"حل پیش کرنے سے پہلے سنیں۔","Use curious, open-ended questions.":"تجسس بھرے، کھلے سوالات استعمال کریں۔","Respect their pace and boundaries.":"ان کی رفتار اور حدود کا احترام کریں۔"});119Object.assign(languageText["Roman Urdu"],{"INTERACTIVE PRACTICE":"INTERACTIVE MASHQ","Choose a supportive response":"Madadgar jawab chunein","Choose one response to see immediate coaching feedback.":"Fori rehnumai dekhne ke liye ek jawab chunein.","Great instinct":"Bohat achi soch","A helpful adjustment":"Ek madadgar behtari","Continue to mini quiz":"Mini quiz ki taraf jayein","MINI QUIZ":"MINI QUIZ","Check your understanding":"Apni samajh check karein","Question":"Sawal","of":"mein se","Select an answer for instant feedback.":"Fori feedback ke liye ek jawab chunein.","Correct":"Durust","Review this idea":"Is baat ko dobara dekhein","That response reflects the lesson skill.":"Yeh jawab lesson ki skill ko zahir karta hai.","The highlighted response best matches the lesson skill.":"Highlight kiya gaya jawab lesson ki skill se sab se zyada milta hai.","See your results":"Apna result dekhein","Next question":"Agla sawal","LESSON REVIEW COMPLETE":"LESSON REVIEW MUKAMMAL","Nice work on":"Aap ne acha kaam kiya","correct":"durust","Completion badge earned":"Completion badge hasil hua","Review Again":"Dobara dekhein","Practice Now":"Abhi mashq karein","Back to Learning Center":"Learning markaz par wapas"});120Object.assign(languageText["Urdu"],{"INTERACTIVE PRACTICE":"انٹرایکٹو مشق","Choose a supportive response":"مددگار جواب منتخب کریں","Choose one response to see immediate coaching feedback.":"فوری رہنمائی دیکھنے کے لیے ایک جواب منتخب کریں۔","Great instinct":"بہت اچھی سوچ","A helpful adjustment":"ایک مددگار بہتری","Continue to mini quiz":"منی کوئز کی طرف جائیں","MINI QUIZ":"منی کوئز","Check your understanding":"اپنی سمجھ چیک کریں","Question":"سوال","of":"میں سے","Select an answer for instant feedback.":"فوری فیڈبیک کے لیے ایک جواب منتخب کریں۔","Correct":"درست","Review this idea":"اس بات کو دوبارہ دیکھیں","That response reflects the lesson skill.":"یہ جواب سبق کی مہارت کو ظاہر کرتا ہے۔","The highlighted response best matches the lesson skill.":"نمایاں کیا گیا جواب سبق کی مہارت سے سب سے زیادہ مطابقت رکھتا ہے۔","See your results":"اپنا نتیجہ دیکھیں","Next question":"اگلا سوال","LESSON REVIEW COMPLETE":"سبق کا جائزہ مکمل","Nice work on":"آپ نے اچھا کام کیا","correct":"درست","Completion badge earned":"تکمیل کا بیج حاصل ہوا","Review Again":"دوبارہ دیکھیں","Practice Now":"ابھی مشق کریں","Back to Learning Center":"سیکھنے کے مرکز پر واپس جائیں"});121Object.assign(languageText["Roman Urdu"],{"Start with what you notice.":"Jo aap notice karein us se shuru karein."," Choose a calm moment and describe the change gently, without labels or assumptions. You might say, “I have noticed you have seemed quieter lately, and I wanted to check in.” Specific observations feel more caring than guesses about how someone feels.":" Pur-sukoon waqt chunein aur tabdeeli ko narmi se bayan karein, labels ya andazon ke baghair. Aap keh sakte hain, “Maine notice kiya hai ke aap kuch arsay se khamosh lag rahe hain aur main aap ka haal poochna chahta/chahti thi.” Khaas mushahide, kisi ke ehsaas ka andaza lagane se zyada khayal rakhne wale hote hain.","Give the person room to answer in their own way. Ask an open question such as, “How have things been for you recently?” Then listen without rushing to fill the silence. You do not need to solve the problem immediately; being present and taking their experience seriously can be a meaningful form of support.":"Shakhs ko apne andaaz mein jawab dene ki jagah dein. Khula sawal poochein, jaise, “Haal hi mein aap kaise rahe hain?” Phir khamoshi bharne ki jaldi kiye baghair sunhein. Masla foran hal karna zaroori nahi; mojood rehna aur unke tajurbe ko sanjeedgi se lena bhi aham madad hai.","Reflect what you hear before offering advice. Phrases like “That sounds exhausting” or “It makes sense that this feels difficult” acknowledge their experience without claiming to know exactly what they need. You can also ask, “Would you like me to listen, help you think through options, or give you some space?”":"Mashwara dene se pehle jo aap sunhein usay dohrayein. “Yeh bohat thaka dene wala lagta hai” ya “Samajh aata hai ke yeh mushkil mehsoos hota hai” jaise jumlay unke tajurbe ko tasleem karte hain. Aap yeh bhi pooch sakte hain, “Kya aap chahte hain main sunun, options par ghour karne mein madad karun, ya aap ko kuch space doon?”","Try this opening":"Yeh shuruat azmayein","“I am here with you. You do not have to explain everything perfectly. What has been on your mind?”":"“Main aap ke saath hoon. Aap ko har baat perfect tareeqe se samjhana zaroori nahi. Aap ke zehan mein kya chal raha hai?”","When someone seems quiet:":"Jab koi khamosh lage:","When someone feels overwhelmed:":"Jab koi bohat bojh mehsoos kare:","When you want to offer support:":"Jab aap madad pesh karna chahein:","When someone needs space:":"Jab kisi ko space chahiye:","A useful reminder":"Ek aham yaad-dihani","Keep your tone gentle, ask one open question, and listen to the answer instead of planning your next reply.":"Lehja narm rakhein, ek khula sawal poochein aur apne aglay jawab ki planning ke bajaye jawab sunhein.","Play":"Chalayen","Pause":"Waqfa","Resume":"Dobara jari karein","Stop":"Band karein","Ready to listen":"Sunne ke liye tayyar","Listening...":"Sun raha hai...","Paused":"Waqfa","Audio unavailable":"Audio dastiyab nahi","Play active listening audio":"Ghor se sunne ki audio chalayen","Pause active listening audio":"Ghor se sunne ki audio rokhein","Resume active listening audio":"Ghor se sunne ki audio dobara jari karein","Stop active listening audio":"Ghor se sunne ki audio band karein"});122Object.assign(languageText["Urdu"],{"Start with what you notice.":"جو آپ محسوس کریں اس سے شروع کریں۔"," Choose a calm moment and describe the change gently, without labels or assumptions. You might say, “I have noticed you have seemed quieter lately, and I wanted to check in.” Specific observations feel more caring than guesses about how someone feels.":" پُرسکون وقت منتخب کریں اور تبدیلی کو نرمی سے بیان کریں، بغیر لیبل یا اندازے کے۔ آپ کہہ سکتے ہیں، “میں نے محسوس کیا ہے کہ آپ کچھ عرصے سے خاموش لگ رہے ہیں اور میں خیریت پوچھنا چاہتا/چاہتی ہوں۔” مخصوص مشاہدات کسی کے احساسات کے اندازے سے زیادہ خیال رکھنے والے ہوتے ہیں۔","Give the person room to answer in their own way. Ask an open question such as, “How have things been for you recently?” Then listen without rushing to fill the silence. You do not need to solve the problem immediately; being present and taking their experience seriously can be a meaningful form of support.":"شخص کو اپنے انداز میں جواب دینے کی جگہ دیں۔ کھلا سوال پوچھیں، جیسے، “حال ہی میں آپ کیسے رہے ہیں؟” پھر خاموشی بھرنے کی جلدی کیے بغیر سنیں۔ مسئلہ فوراً حل کرنا ضروری نہیں؛ موجود رہنا اور ان کے تجربے کو سنجیدگی سے لینا بھی اہم مدد ہے۔","Reflect what you hear before offering advice. Phrases like “That sounds exhausting” or “It makes sense that this feels difficult” acknowledge their experience without claiming to know exactly what they need. You can also ask, “Would you like me to listen, help you think through options, or give you some space?”":"مشورہ دینے سے پہلے جو آپ سنیں اسے دہرائیں۔ “یہ بہت تھکا دینے والا لگتا ہے” یا “سمجھ آتا ہے کہ یہ مشکل محسوس ہوتا ہے” جیسے جملے ان کے تجربے کو تسلیم کرتے ہیں۔ آپ یہ بھی پوچھ سکتے ہیں، “کیا آپ چاہتے ہیں کہ میں سنوں، اختیارات پر غور کرنے میں مدد دوں، یا آپ کو کچھ جگہ دوں؟”","Try this opening":"یہ آغاز آزمائیں","“I am here with you. You do not have to explain everything perfectly. What has been on your mind?”":"“میں آپ کے ساتھ ہوں۔ آپ کو ہر بات بہترین طریقے سے سمجھانے کی ضرورت نہیں۔ آپ کے ذہن میں کیا چل رہا ہے؟”","When someone seems quiet:":"جب کوئی خاموش لگے:","When someone feels overwhelmed:":"جب کوئی بہت بوجھ محسوس کرے:","When you want to offer support:":"جب آپ مدد پیش کرنا چاہیں:","When someone needs space:":"جب کسی کو جگہ چاہیے:","A useful reminder":"ایک اہم یاد دہانی","Keep your tone gentle, ask one open question, and listen to the answer instead of planning your next reply.":"لہجہ نرم رکھیں، ایک کھلا سوال پوچھیں اور اپنے اگلے جواب کی منصوبہ بندی کے بجائے جواب سنیں۔","Play":"چلائیں","Pause":"روکیں","Resume":"دوبارہ جاری کریں","Stop":"بند کریں","Ready to listen":"سننے کے لیے تیار","Listening...":"سن رہا ہے...","Paused":"وقفہ","Audio unavailable":"آڈیو دستیاب نہیں","Play active listening audio":"غور سے سننے کی آڈیو چلائیں","Pause active listening audio":"غور سے سننے کی آڈیو روکیں","Resume active listening audio":"غور سے سننے کی آڈیو دوبارہ جاری کریں","Stop active listening audio":"غور سے سننے کی آڈیو بند کریں"});123Object.assign(languageText["Urdu"],{"Choose a calm moment and describe the change gently, without labels or assumptions. You might say, “I have noticed you have seemed quieter lately, and I wanted to check in.” Specific observations feel more caring than guesses about how someone feels.":"پُرسکون وقت منتخب کریں اور تبدیلی کو نرمی سے بیان کریں، بغیر لیبل یا اندازے کے۔ آپ کہہ سکتے ہیں، “میں نے محسوس کیا ہے کہ آپ کچھ عرصے سے خاموش لگ رہے ہیں اور میں خیریت پوچھنا چاہتا/چاہتی ہوں۔” مخصوص مشاہدات کسی کے احساسات کے اندازے سے زیادہ خیال رکھنے والے ہوتے ہیں۔","When someone seems quiet:":"جب کوئی خاموش لگے:","I have noticed you have been a little quieter lately. How have you been?":"میں نے محسوس کیا ہے کہ آپ حال ہی میں کچھ خاموش ہیں۔ آپ کیسے رہے ہیں؟","When someone feels overwhelmed:":"جب کوئی بہت بوجھ محسوس کرے:","It sounds like a lot is happening. Would it help to talk through one thing at a time?":"لگتا ہے بہت کچھ ہو رہا ہے۔ کیا ایک وقت میں ایک بات پر گفتگو کرنا مددگار ہوگا؟","When you want to offer support:":"جب آپ مدد پیش کرنا چاہیں:","I am here to listen. Would you prefer advice, practical help, or simply some company?":"میں سننے کے لیے یہاں ہوں۔ کیا آپ مشورہ، عملی مدد یا صرف ساتھ پسند کریں گے؟","When someone needs space:":"جب کسی کو جگہ چاہیے:","I understand. I will give you some room, and I am here whenever you feel ready to talk. Respect their answer and avoid repeated pressure.":"میں سمجھتا/سمجھتی ہوں۔ میں آپ کو کچھ جگہ دوں گا/گی، اور جب آپ بات کے لیے تیار ہوں تو میں یہاں ہوں۔ ان کے جواب کا احترام کریں اور بار بار دباؤ ڈالنے سے بچیں۔"});124Object.assign(languageText["Roman Urdu"],{"KNOW WHAT TO NOTICE":"Jo dekhna zaroori hai","Warning-Sign Guide":"Chetavni ki nishaniyon ka guide","Learning signs can help you decide when to check in or encourage extra support.":"Nishaniyon ko samajhna aap ko yeh tay karne mein madad de sakta hai ke kab haal poochna ya mazeed madad ki taraf rahnumai karni hai.","Changes in routine":"Rozmarra ke mamool mein tabdeeli","Major changes in sleep, eating, energy, attendance, or everyday habits.":"Neend, khane, tawanai, hazri ya rozmarra ki aadaton mein bari tabdeeli.","Social withdrawal":"Logon se doori","Pulling away from people or activities they usually value.":"Logon ya un sargarmiyon se door hona jinhein woh aam tor par pasand karte hain.","Persistent distress":"Jari pareshani","Ongoing sadness, anxiety, hopelessness, anger, or feeling overwhelmed.":"Musalsal udaasi, bechaini, mayoosi, ghussa ya bohat bojh mehsoos karna.","Immediate concern":"Fori tashweesh","If someone may be in immediate danger, contact local emergency services or a qualified professional.":"Agar kisi ko foran khatre ka imkaan ho to maqami emergency services ya qualified professional se rabta karein.","MindAid is an educational practice tool, not a diagnostic service or replacement for professional care.":"MindAid taleemi mashq ka tool hai, tashkhis ya professional care ka badal nahi.","EXTRA SUPPORT":"Mazeed madad","Professional Help":"Mahir madad","MindAid can help you learn supportive communication, but it cannot diagnose conditions or provide emergency care.":"MindAid aap ko madadgar guftagu seekhne mein madad de sakta hai, lekin yeh tashkhis ya emergency care nahi de sakta.","SUPPORT RISK NAVIGATOR":"Madad ki zaroorat ka jaiza","Choose guidance based on what you notice":"Jo aap dekhein us ke mutabiq rahnumai chunein","Green":"Sabz","Yellow":"Peela","Orange":"Narangi","Red":"Surkh","Normal check-in":"Mamooli haal poochna","Encourage support":"Madad ki taraf rahnumai","Consider professional help":"Professional madad par ghour karein","Immediate safety guidance":"Fori hifazati rahnumai","These levels organize next steps; they do not diagnose anyone.":"Yeh darje aglay qadam samajhne ke liye hain; yeh kisi ki tashkhis nahi karte.","Qualified professionals":"Mahireen","Pakistan emergency guidance":"Pakistan emergency guidance","Trusted person":"Bharosemand shakhs","Pakistan-focused examples":"Pakistan par mabni misaalein","English: \"I'm here with you.\"":"English: \"Main aap ke saath hoon.\"","Roman Urdu: \"Main tumhare saath hoon, baat karna chaho to sununga/sunungi.\"":"Roman Urdu: \"Main tumhare saath hoon, baat karna chaho to sununga/sunungi.\"","Urdu: \"Aap tanha nahi hain; main sunne ke liye yahan hoon.\"":"Urdu: \"Aap tanha nahi hain; main sunne ke liye yahan hoon.\""});125Object.assign(languageText["Urdu"],{"KNOW WHAT TO NOTICE":"جن باتوں پر غور کریں","Warning-Sign Guide":"انتباہی علامات کا رہنما","Learning signs can help you decide when to check in or encourage extra support.":"علامات کو سمجھنا آپ کو یہ فیصلہ کرنے میں مدد دے سکتا ہے کہ کب خیریت پوچھنی ہے یا اضافی مدد کی طرف رہنمائی کرنی ہے۔","Changes in routine":"روزمرہ معمول میں تبدیلی","Major changes in sleep, eating, energy, attendance, or everyday habits.":"نیند، کھانے، توانائی، حاضری یا روزمرہ عادات میں بڑی تبدیلی۔","Social withdrawal":"لوگوں سے دوری","Pulling away from people or activities they usually value.":"لوگوں یا ان سرگرمیوں سے دور ہونا جنہیں وہ عام طور پر اہم سمجھتے ہیں۔","Persistent distress":"مسلسل پریشانی","Ongoing sadness, anxiety, hopelessness, anger, or feeling overwhelmed.":"مسلسل اداسی، بے چینی، مایوسی، غصہ یا بہت زیادہ بوجھ محسوس کرنا۔","Immediate concern":"فوری تشویش","If someone may be in immediate danger, contact local emergency services or a qualified professional.":"اگر کسی کو فوری خطرہ ہو سکتا ہے تو مقامی ایمرجنسی سروسز یا کسی ماہر سے رابطہ کریں۔","MindAid is an educational practice tool, not a diagnostic service or replacement for professional care.":"MindAid تعلیمی مشق کا ٹول ہے، تشخیص یا پیشہ ورانہ نگہداشت کا متبادل نہیں۔","EXTRA SUPPORT":"اضافی مدد","Professional Help":"ماہر مدد","MindAid can help you learn supportive communication, but it cannot diagnose conditions or provide emergency care.":"MindAid آپ کو مددگار گفتگو سیکھنے میں مدد دے سکتا ہے، لیکن یہ تشخیص یا ہنگامی نگہداشت فراہم نہیں کر سکتا۔","SUPPORT RISK NAVIGATOR":"مدد کی ضرورت کا جائزہ","Choose guidance based on what you notice":"جو آپ محسوس کریں اس کے مطابق رہنمائی منتخب کریں","Green":"سبز","Yellow":"پیلا","Orange":"نارنجی","Red":"سرخ","Normal check-in":"عام خیریت پوچھنا","Encourage support":"مدد کی ترغیب دیں","Consider professional help":"پیشہ ورانہ مدد پر غور کریں","Immediate safety guidance":"فوری حفاظتی رہنمائی","These levels organize next steps; they do not diagnose anyone. If there is immediate danger, contact local emergency services now.":"یہ درجے اگلے قدم سمجھنے کے لیے ہیں، کسی کی تشخیص نہیں کرتے۔ فوری خطرے کی صورت میں ابھی مقامی ایمرجنسی سروسز سے رابطہ کریں۔","Qualified professionals":"ماہر پیشہ ور افراد","Consider a licensed mental-health professional for assessment, treatment, or ongoing support.":"جائزے، علاج یا مسلسل مدد کے لیے لائسنس یافتہ ذہنی صحت کے ماہر سے رابطہ کرنے پر غور کریں۔","Pakistan emergency guidance":"پاکستان کے لیے ہنگامی رہنمائی","For immediate danger in Pakistan, call Rescue 1122 or contact local emergency services and stay with the person if safe.":"پاکستان میں فوری خطرے کی صورت میں ریسکیو 1122 یا مقامی ایمرجنسی سروسز کو کال کریں اور اگر محفوظ ہو تو اس شخص کے ساتھ رہیں۔","Trusted person":"قابل اعتماد شخص","Encourage a trusted family member, teacher, doctor, or counselor to join the support plan.":"کسی قابل اعتماد گھر کے فرد، استاد، ڈاکٹر یا کونسلر کو مدد کے منصوبے میں شامل کریں۔","Pakistan-focused examples":"پاکستان پر مبنی مثالیں","English: \"I'm here with you.\"":"انگریزی: \"میں آپ کے ساتھ ہوں۔\"","Roman Urdu: \"Main tumhare saath hoon, baat karna chaho to sununga/sunungi.\"":"رومن اردو: \"میں آپ کے ساتھ ہوں، بات کرنا چاہیں تو میں سنوں گا/گی۔\"","Urdu: \"Aap tanha nahi hain; main sunne ke liye yahan hoon.\"":"اردو: \"آپ تنہا نہیں ہیں؛ میں سننے کے لیے یہاں ہوں۔\""});126Object.assign(languageText["Roman Urdu"],{"Toggle theme":"Theme badlein","Notifications":"Notifications","Account synced locally":"Account local tor par sync hai","PROFILE PREVIEW":"Profile ka mulaheza","Make your learning space feel like yours.":"Apni learning space ko apni pasand ka banayein.","Edit profile":"Profile edit karein","Student learner · Joined September 2026":"Student learner · September 2026 mein shamil hue","Level 4 · Empathy Builder":"Level 4 · Empathy Builder","750 XP to Level 5":"Level 5 ke liye 750 XP","PREFERENCES":"Pasandida settings","Keep your practice habit moving.":"Apni practice ki aadat jari rakhein.","Show coaching notes after practice.":"Practice ke baad coaching notes dikhayein.","Save changes":"Tabdeeliyan save karein","Privacy controls":"Khalwasiyaat controls","YOUR WELLBEING LEARNING SPACE":"Aap ki wellbeing learning space","Learn. Practice. Support.":"Seekhein. Mashq karein. Madad karein.","Small steps matter":"Chhotay qadam aham hain","Keep growing your support skills.":"Apni support skills barhate rahein.","You are making progress":"Aap taraqqi kar rahe hain","4 day streak":"4 din ka silsila","Daily Streak":"Rozana silsila","Course Progress":"Course ki taraqqi","Quiz Average":"Quiz ka ausat","Skills Earned":"Hasil ki gayi skills","Progress Overview":"Taraqqi ka jaiza","Jump Back In":"Dobara jari rakhein","Explore Features":"Features dekhein","Your toolkit":"Aap ka toolkit","Last 7 days":"Pichlay 7 din","How are you today?":"Aaj aap kaisa mehsoos kar rahe hain?","Date":"Tareekh","Mood":"Mizaj","Sleep":"Neend","Energy":"Tawanai","Social activity":"Samaji sargarmi","Stress level":"Tanao ki satah","Save today's pattern":"Aaj ka pattern save karein","Your recent signals":"Aap ke haal ke ishare","AI TRAINER":"AI TRAINER","AI Conversation Practice":"AI guftagu ki mashq","Talk with MindAid Assistant or practice a supportive conversation in a safe educational simulation.":"MindAid Assistant se baat karein ya mehfooz taleemi simulation mein madadgar guftagu ki mashq karein.","Practice Scenario":"Scenario ki mashq","Clear conversation":"Guftagu saaf karein","Start scenario":"Scenario shuru karein","Get educational feedback":"Taleemi feedback hasil karein","Send":"Bhejain","Learning Center":"Learning ka markaz","Short, practical lessons designed around everyday supportive communication.":"Rozmarra madadgar guftagu ke liye chhotay aur amli lessons.","Real-Life Scenarios":"Rozmarra ke scenarios","Choose a situation and practice the first step.":"Ek surat-e-haal chun kar pehla qadam azmayein.","Warning-Sign Guide":"Chetavni ki nishaniyon ka guide","Interactive Quiz":"Interactive quiz","Personalized Learning Path":"Aap ka zaati learning raasta","Professional Help":"Mahir madad","Resource Library":"Wasail ki library","Privacy Controls":"Khalwasiyaat controls","Settings & Profile":"Settings aur profile"});127Object.assign(languageText["Urdu"],{"Toggle theme":"تھیم تبدیل کریں","Account synced locally":"اکاؤنٹ مقامی طور پر ہم آہنگ ہے","PROFILE PREVIEW":"پروفائل کا پیش نظارہ","Make your learning space feel like yours.":"اپنی سیکھنے کی جگہ کو اپنی پسند کا بنائیں۔","Edit profile":"پروفائل میں ترمیم کریں","Student learner · Joined September 2026":"طالب علم · ستمبر 2026 میں شامل ہوئے","Level 4 · Empathy Builder":"لیول 4 · ہمدردی بنانے والا","750 XP to Level 5":"لیول 5 کے لیے 750 XP","PREFERENCES":"ترجیحات","Keep your practice habit moving.":"اپنی مشق کی عادت جاری رکھیں۔","Show coaching notes after practice.":"مشق کے بعد رہنمائی کے نوٹس دکھائیں۔","Use fewer animated transitions.":"کم متحرک تبدیلیاں استعمال کریں۔","YOUR WELLBEING LEARNING SPACE":"آپ کی بہبود کی سیکھنے کی جگہ","Learn. Practice. Support.":"سیکھیں۔ مشق کریں۔ مدد کریں۔","Small steps matter":"چھوٹے قدم اہم ہیں","Keep growing your support skills.":"اپنی مددگار مہارتیں بڑھاتے رہیں۔","You are making progress":"آپ ترقی کر رہے ہیں","4 day streak":"4 دن کا سلسلہ","Progress Overview":"ترقی کا جائزہ","Jump Back In":"دوبارہ جاری رکھیں","Explore Features":"خصوصیات دیکھیں","Your toolkit":"آپ کا ٹول کٹ","Last 7 days":"گزشتہ 7 دن","How are you today?":"آج آپ کیسا محسوس کر رہے ہیں؟","Date":"تاریخ","Mood":"مزاج","Sleep":"نیند","Energy":"توانائی","Social activity":"سماجی سرگرمی","Stress level":"تناؤ کی سطح","Your recent signals":"آپ کے حالیہ اشارے","AI TRAINER":"اے آئی ٹرینر","AI Conversation Practice":"اے آئی گفتگو کی مشق","Talk with MindAid Assistant or practice a supportive conversation in a safe educational simulation.":"MindAid Assistant سے بات کریں یا محفوظ تعلیمی مشق میں مددگار گفتگو آزمائیں۔","Practice Scenario":"مشق کا منظرنامہ","Clear conversation":"گفتگو صاف کریں","Start scenario":"منظرنامہ شروع کریں","Get educational feedback":"تعلیمی فیڈبیک حاصل کریں","Send":"بھیجیں","Short, practical lessons designed around everyday supportive communication.":"روزمرہ مددگار گفتگو کے لیے مختصر اور عملی اسباق۔","Choose a situation and practice the first step.":"ایک صورت حال منتخب کریں اور پہلا قدم آزمائیں۔","Warning-Sign Guide":"انتباہی علامات کا رہنما","Interactive Quiz":"انٹرایکٹو کوئز","Personalized Learning Path":"ذاتی سیکھنے کا راستہ","Resource Library":"وسائل کی لائبریری","Settings & Profile":"ترتیبات اور پروفائل"});128function getUserProfile(){return JSON.parse(localStorage.getItem(profileKey)||'{"name":"Alex Williams","role":"Student learner"}');}129function applyProfile(){const profile=getUserProfile(),name=profile.name||"Alex Williams",initials=name.split(/\s+/).map(part=>part[0]).join("").slice(0,2).toUpperCase();document.querySelectorAll(".profile b,.profile-overview h2").forEach(el=>el.textContent=name);document.querySelectorAll(".profile span,.large-avatar").forEach(el=>el.textContent=initials);const input=[...document.querySelectorAll(".setting-input input")].find(el=>el.value.includes("Alex")||el.value===profile.name);if(input)input.value=name;document.querySelectorAll(".profile small").forEach(el=>el.textContent=profile.role||"Student learner");}130function applyLanguage(language=localStorage.getItem(languageKey)||"English"){const dictionary=languageText[language]||{};document.querySelectorAll("input[placeholder]").forEach(input=>{const source=input.dataset.originalPlaceholder||input.placeholder;input.dataset.originalPlaceholder=source;input.placeholder=dictionary[source]||source});document.querySelectorAll("[title],[aria-label]").forEach(element=>["title","aria-label"].forEach(attribute=>{const source=element.dataset[`original${attribute.replace("-","").replace(/^./,letter=>letter.toUpperCase())}`]||element.getAttribute(attribute);if(!source)return;element.dataset[`original${attribute.replace("-","").replace(/^./,letter=>letter.toUpperCase())}`]=source;element.setAttribute(attribute,dictionary[source]||source)}));const walker=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT);while(walker.nextNode()){const node=walker.currentNode;if(!originalTextNodes.has(node))originalTextNodes.set(node,node.nodeValue);const original=originalTextNodes.get(node),source=original.trim();if(source){const leading=original.match(/^\s*/)[0],trailing=original.match(/\s*$/)[0];node.nodeValue=leading+(dictionary[source]||source)+trailing;}}document.documentElement.lang=language==="Urdu"?"ur":language==="Roman Urdu"?"ur-Latn":"en";const select=document.getElementById("languageSelect");if(select){[...select.options].forEach((option,index)=>option.value=["English","Roman Urdu","Urdu"][index]||option.value);select.value=language;}}131function localizedText(text){return (languageText[localStorage.getItem(languageKey)||"English"]||{})[text]||text;}132function getProgress(){return JSON.parse(localStorage.getItem(progressKey)||'{"lessons":6,"quizScores":[],"sessions":0,"activity":[]}');}133function saveProgress(progress){localStorage.setItem(progressKey,JSON.stringify(progress));renderProgress();}134function renderProgress(){135 const progress=getProgress(), lessons=Math.min(10,Math.max(0,progress.lessons||0)), completion=Math.round(lessons*10), scores=progress.quizScores||[], average=scores.length?Math.round(scores.reduce((sum,score)=>sum+score,0)/scores.length):85, activity=progress.activity||[], recent=activity.slice(-7), streak=recent.length?Math.min(7,new Set(recent).size):4;136 const completionEl=document.getElementById("dashboardCompletion"), bar=document.getElementById("dashboardProgressBar");137 if(completionEl)completionEl.textContent=`${completion}%`; if(bar)bar.style.width=`${completion}%`;138 document.getElementById("dashboardLessons")?.replaceChildren(`${lessons} of 10 lessons completed`); document.getElementById("dashboardStreak")?.replaceChildren(streak); document.getElementById("dashboardQuizAverage")?.replaceChildren(`${average}%`); document.getElementById("dashboardQuizTrend").textContent=scores.length?`${scores.length} quiz result${scores.length===1?"":"s"} recorded`:`Demo baseline · complete a quiz to update`;139 document.getElementById("dashboardActivity").textContent=recent.length?`${recent.length} learning session${recent.length===1?"":"s"} recorded`:`Start a learning session today`;140 document.querySelectorAll("#activityChart i").forEach((bar,index)=>{const day=new Date();day.setDate(day.getDate()-6+index);const key=day.toISOString().slice(0,10),count=activity.filter(item=>item===key).length;bar.style.height=`${count?Math.min(100,35+count*25):8}%`;bar.title=count?`${count} session${count===1?"":"s"}`:"No session"});141 document.querySelectorAll("#dashboardSkills span").forEach((skill,index)=>{const earned=lessons>index+1||scores.length>index;skill.querySelector("b").textContent=earned?"✓":"→"});142}143function recordActivity(){const progress=getProgress(),today=new Date().toISOString().slice(0,10);progress.activity=[...(progress.activity||[]),today].slice(-30);saveProgress(progress);}144 145const lessonReviews={146 "1. Listening Basics":{icon:"👂",duration:"8 minutes",overview:"Learn how focused attention helps another person feel heard, respected, and less alone.",objectives:["Notice changes without making assumptions.","Use presence, patience, and reflective listening.","Pause before offering advice."],takeaways:["Specific observations feel more caring than labels.","Silence can give someone room to find their words.","Listening is support, even when you cannot solve the problem."],scenario:"Your classmate Sam has been quiet during group work. You want to check in without putting them on the spot.",practice:{question:"Which opening best shows attentive listening?",answers:["You have been distracted lately. What is wrong?","I noticed you have been quieter today. Would you like some company?","Everyone gets stressed. You will feel better soon."],correct:1,feedback:"This notices a specific change, stays gentle, and gives Sam a choice."},quiz:[{question:"What is a helpful first step when someone seems withdrawn?",answers:["Describe what you notice without a label.","Ask other people to explain their behavior.","Tell them exactly how to fix it."],correct:0},{question:"Why can a pause be useful in a conversation?",answers:["It proves you are finished listening.","It gives the person room to think and respond.","It avoids acknowledging feelings."],correct:1},{question:"Which response reflects active listening?",answers:["That sounds difficult. What has it been like for you?","You should stop worrying about it.","I know exactly what you need."],correct:0}],badge:"Attentive Listener"},147 "2. Starting a Conversation":{icon:"🗣️",duration:"10 minutes",overview:"Practice opening a caring conversation with clear observations, warmth, and respect for another person's pace.",objectives:["Choose a calm moment to check in.","Open with observations instead of labels.","Ask an open question and listen to the answer."],takeaways:["A gentle opening lowers pressure.","You do not need the perfect words to show care.","Offer support without demanding disclosure."],scenario:"Your friend Amina has stopped joining lunch and replies with one-word messages. You decide to send a low-pressure check-in.",practice:{question:"Which message is the most supportive opening?",answers:["You are acting weird. Tell me what is going on.","I have noticed you have been quieter lately. How have you been?","You need to talk to someone right now."],correct:1,feedback:"This combines a concrete observation with an open invitation, without blame or pressure."},quiz:[{question:"What makes a check-in feel less judgmental?",answers:["Using labels to explain the person.","Describing what you have noticed.","Comparing them with other friends."],correct:1},{question:"Which question invites someone to share?",answers:["Are you okay?","Why are you doing this?","What has been on your mind lately?"],correct:2},{question:"What should you do after asking an open question?",answers:["Plan your advice while they speak.","Listen and let their answer guide you.","Repeat the question until they answer."],correct:1}],badge:"Caring Opener"},148 "4. Asking Open Questions":{icon:"🧭",duration:"5 minutes",overview:"Invite people to share in their own words with a calm, curious question.",objectives:["Notice the moment to check in.","Ask without pressure or assumptions.","Let the other person explain in their own words."],takeaways:["Clear, open questions create space.","A single question can lower pressure.","You do not need to solve everything to be supportive."],scenario:"A friend says they feel overwhelmed but cannot explain why. You want a gentle question that invites them to talk.",previewQuestions:["What would you say to encourage them to share more about what they’re experiencing?","How have things been feeling for you lately?","What has been on your mind recently?","Would you like to tell me more about what happened?","Invitation: Would you like to talk about what has been on your mind?"],badge:"Open-Question Starter"}149};150let lessonReviewState=null;151function canonicalLessonTitle(title){return Object.keys(lessonReviews).find(key=>key===title||localizedText(key)===title)||title;}152function reviewData(title){return lessonReviews[canonicalLessonTitle(title)]||lessonReviews["1. Listening Basics"]}153function openLessonReview(title){lessonReviewState={title:canonicalLessonTitle(title),step:"overview",practiceAnswer:null,quizIndex:0,quizScore:0,quizAnswered:false};document.getElementById("lessonReviewModal").classList.add("open");document.getElementById("lessonReviewModal").setAttribute("aria-hidden","false");document.body.classList.add("review-open");renderLessonReview();applyLanguage();}154function openLessonPreview(title){lessonReviewState={title:canonicalLessonTitle(title),step:"preview",practiceAnswer:null,quizIndex:0,quizScore:0,quizAnswered:false};document.getElementById("lessonReviewModal").classList.add("open");document.getElementById("lessonReviewModal").setAttribute("aria-hidden","false");document.body.classList.add("review-open");renderLessonReview();applyLanguage();}155function closeLessonReview(){document.getElementById("lessonReviewModal")?.classList.remove("open");document.getElementById("lessonReviewModal")?.setAttribute("aria-hidden","true");document.body.classList.remove("review-open");}156function renderLessonReviewContent(){157 const data=localizedReviewData(lessonReviewState.title),content=document.getElementById("lessonReviewContent");158 if(!content)return;159 const list=items=>items.map(item=>"<li>"+item+"</li>").join("");160 const options=(items,correct,selected,attribute,disabled)=>items.map((item,index)=>"<button class=\"review-option "+(disabled&&index===correct?"correct ":"")+(disabled&&index===selected&&index!==correct?"incorrect":"")+"\" data-"+attribute+"=\""+index+"\" "+(disabled?"disabled":"")+"><b>"+String.fromCharCode(65+index)+"</b><span>"+item+"</span></button>").join("");161 if(lessonReviewState.step==="preview"){const selectedLanguage=localStorage.getItem(languageKey)||"English",questions=previewQuestionTranslations[selectedLanguage]||data.previewQuestions,overview=localizedText(data.overview),title=localizedText(lessonReviewState.title),inviteText="Try these open questions with someone you care about: "+questions.join(" | ");const shareUrl=encodeURIComponent(window.location.href);const shareMessage=encodeURIComponent(inviteText);content.innerHTML="<div class=\"review-hero\"><span class=\"review-icon\">"+data.icon+"</span><div><p class=\"eyebrow\">"+localizedText("LESSON PREVIEW")+"</p><h2 id=\"reviewTitle\">"+title+"</h2><div class=\"review-meta\"><span>◷ "+localizedText(data.duration)+"</span></div></div></div><p class=\"review-overview\">"+overview+"</p><div class=\"review-scenario preview-questions\"><p class=\"review-label\">"+localizedText("Questions to explore")+"</p><ol>"+questions.map(question=>"<li>"+question+"</li>").join("")+"</ol></div><div class=\"preview-invite\"><p class=\"review-label\">"+localizedText("Invite someone to try these questions")+"</p><div class=\"preview-invite-actions\"><a class=\"preview-share whatsapp\" href=\"https://wa.me/?text="+shareMessage+"\" target=\"_blank\" rel=\"noopener\">"+localizedText("WhatsApp")+"</a><a class=\"preview-share email\" href=\"mailto:?subject=MindAid open questions&body="+shareMessage+"%0A%0A"+shareUrl+"\">"+localizedText("Email")+"</a><button class=\"preview-share other\" type=\"button\" data-invite-share>"+localizedText("Other")+"</button></div></div><button class=\"primary review-next\" data-review-action=\"close-preview\">"+localizedText("Close →")+"</button>";return}162 if(lessonReviewState.step==="overview"){content.innerHTML="<div class=\"review-hero\"><span class=\"review-icon\">"+data.icon+"</span><div><p class=\"eyebrow\">LESSON REVIEW · COMPLETE</p><h2 id=\"reviewTitle\">"+lessonReviewState.title+"</h2><div class=\"review-meta\"><span>✓ Completed</span><span>◷ "+data.duration+"</span></div></div></div><p class=\"review-overview\">"+data.overview+"</p><div class=\"review-columns\"><div><p class=\"review-label\">Learning objectives</p><ul>"+list(data.objectives)+"</ul></div><div><p class=\"review-label\">Key takeaways</p><ul>"+list(data.takeaways)+"</ul></div></div><div class=\"review-scenario\"><p class=\"review-label\">Real-life scenario</p><p>"+data.scenario+"</p></div><button class=\"primary review-next\" data-review-action=\"practice\">Start interactive practice <span>→</span></button>";return}163 if(lessonReviewState.step==="practice"){const practice=data.practice,answered=lessonReviewState.practiceAnswer!==null;content.innerHTML="<div class=\"review-progress\"><span>INTERACTIVE PRACTICE</span><b>1 of 1</b></div><h2>Choose a supportive response</h2><p class=\"review-prompt\">"+practice.question+"</p><div class=\"review-options\">"+options(practice.answers,practice.correct,lessonReviewState.practiceAnswer,"review-practice",answered)+"</div>"+(answered?"<div class=\"review-feedback\"><strong>"+(lessonReviewState.practiceAnswer===practice.correct?"Great instinct":"A helpful adjustment")+"</strong><p>"+practice.feedback+"</p></div><button class=\"primary review-next\" data-review-action=\"quiz\">Continue to mini quiz <span>→</span></button>":"<p class=\"review-hint\">Choose one response to see immediate coaching feedback.</p>");return}164 if(lessonReviewState.step==="quiz"){const quiz=data.quiz,q=quiz[lessonReviewState.quizIndex],answered=lessonReviewState.quizAnswered,last=lessonReviewState.quizIndex===quiz.length-1;content.innerHTML="<div class=\"review-progress\"><span>MINI QUIZ</span><b>Question "+(lessonReviewState.quizIndex+1)+" of "+quiz.length+"</b></div><h2>Check your understanding</h2><p class=\"review-prompt\">"+q.question+"</p><div class=\"review-options\">"+options(q.answers,q.correct,lessonReviewState.selectedQuizAnswer,"review-quiz",answered)+"</div>"+(answered?"<div class=\"review-feedback\"><strong>"+(lessonReviewState.selectedQuizAnswer===q.correct?"Correct":"Review this idea")+"</strong><p>"+(lessonReviewState.selectedQuizAnswer===q.correct?"That response reflects the lesson skill.":"The highlighted response best matches the lesson skill.")+"</p></div><button class=\"primary review-next\" data-review-action=\""+(last?"result":"next-quiz")+"\">"+(last?"See your results":"Next question")+" <span>→</span></button>":"<p class=\"review-hint\">Select an answer for instant feedback.</p>");return}165 const score=Math.round(lessonReviewState.quizScore/data.quiz.length*100);content.innerHTML="<div class=\"review-result\"><div class=\"review-badge\">🏆</div><p class=\"eyebrow\">LESSON REVIEW COMPLETE</p><h2>Nice work on "+lessonReviewState.title+"</h2><div class=\"review-score\"><strong>"+score+"%</strong><span>"+lessonReviewState.quizScore+" of "+data.quiz.length+" correct</span></div><div class=\"completion-badge\"><span>✓</span><div><b>"+data.badge+"</b><small>Completion badge earned</small></div></div><p class=\"review-result-note\">You revisited the core ideas and practiced choosing a supportive response in a realistic moment.</p><div class=\"review-actions\"><button class=\"primary\" data-review-action=\"again\">Review Again</button><button class=\"secondary\" data-review-action=\"practice-now\">Practice Now</button><button class=\"secondary\" data-review-action=\"back\">Back to Learning Center</button></div></div>";applyLanguage();166}167function renderLessonReview(){renderLessonReviewContent();applyLanguage();}168document.addEventListener("click",event=>{const action=event.target.closest("[data-review-action]")?.dataset.reviewAction;if(action){if(action==="practice"){lessonReviewState.step="practice";renderLessonReview()}else if(action==="quiz"){lessonReviewState.step="quiz";renderLessonReview()}else if(action==="next-quiz"){lessonReviewState.quizIndex++;lessonReviewState.quizAnswered=false;renderLessonReview()}else if(action==="result"){lessonReviewState.step="result";renderLessonReview()}else if(action==="again"){openLessonReview(lessonReviewState.title)}else if(action==="close-preview"){closeLessonReview()}else if(action==="practice-now"){closeLessonReview();showPage("practice")}else if(action==="back"){closeLessonReview();showPage("learn")}}const shareButton=event.target.closest("[data-invite-share]");if(shareButton){const shareText="Try these open questions with someone you care about: "+reviewData(lessonReviewState.title).previewQuestions.join(" | ");if(navigator.share){navigator.share({title:"MindAid open questions",text:shareText,url:window.location.href}).catch(()=>{})}else if(navigator.clipboard){navigator.clipboard.writeText(shareText+"\n"+window.location.href).then(()=>showToast("Invite text copied"))}else{showToast("Sharing is not supported here")}}const practice=event.target.closest("[data-review-practice]");if(practice&&lessonReviewState&&lessonReviewState.practiceAnswer===null){lessonReviewState.practiceAnswer=Number(practice.dataset.reviewPractice);renderLessonReview()}const quiz=event.target.closest("[data-review-quiz]");if(quiz&&lessonReviewState&&!lessonReviewState.quizAnswered){const data=localizedReviewData(lessonReviewState.title);lessonReviewState.selectedQuizAnswer=Number(quiz.dataset.reviewQuiz);lessonReviewState.quizAnswered=true;if(lessonReviewState.selectedQuizAnswer===data.quiz[lessonReviewState.quizIndex].correct)lessonReviewState.quizScore++;renderLessonReview()}});169document.querySelectorAll("[data-review-close]").forEach(button=>button.addEventListener("click",closeLessonReview));170document.addEventListener("keydown",event=>{if(event.key==="Escape"&&document.getElementById("lessonReviewModal")?.classList.contains("open"))closeLessonReview()});171 172function showPage(name){173 if(!pages.includes(name)) name="home";174 document.querySelectorAll(".page").forEach(p=>p.classList.remove("active-page"));175 const target=document.getElementById("page-"+name);176 if(target) target.classList.add("active-page");177 document.querySelectorAll("[data-page]").forEach(el=>{178 el.classList.toggle("active", el.dataset.page===name);179 });180 document.querySelector(".main").scrollTo?.({top:0,behavior:"smooth"});181 window.scrollTo({top:0,behavior:"smooth"});182 target?.querySelectorAll(".reveal, .dashboard-card, .panel, .settings-card, .profile-card").forEach((el,index)=>{el.style.setProperty("--reveal-delay",`${index * 70}ms`);el.classList.add("animate-in")});183 applyLanguage();184 applyProfile();185 if(location.hash !== "#"+name) history.pushState(null,"","#"+name);186}187let activeScenarioId="quiet-classmate", scenarioState=null;188function scenarioData(id){189 const data=window.mindAidScenarios[id]||window.mindAidScenarios["quiet-classmate"];190 if(data.stages.length)return data;191 const safe=data.concern==="High";192 data.stages=[193 {prompt:"What would you say first?",options:[{text:"I’m here with you. What has been hardest lately?",quality:"excellent",feedback:"You combine warmth with an open question.",empathy:20,listening:20,communication:20,safety:15,next:"Thank you for asking. I have been carrying a lot."},{text:"You should just push through it.",quality:"needs",feedback:"Advice before listening can feel like pressure.",empathy:7,listening:6,communication:8,safety:7,next:"I do not feel understood."},{text:"That sounds like a lot. Do you want company or space?",quality:"helpful",feedback:"You validate their experience and offer choice.",empathy:18,listening:18,communication:18,safety:14,next:"I think talking would help."}]},194 {prompt:"How do you continue?",options:[{text:"Would you like to tell me more in your own words?",quality:"excellent",feedback:"You make room for their pace and perspective.",empathy:17,listening:21,communication:18,safety:12,next:"I have not known how to ask for help."},{text:"I know exactly what you need.",quality:"unhelpful",feedback:"Avoid assumptions and diagnosis. Stay curious.",empathy:3,listening:3,communication:4,safety:2,next:"I would rather not talk."}]},195 {prompt:safe?"They mention feeling unable to cope. What is responsible?":"What support could you offer?",safety:safe,options:[{text:"Stay supportive, listen, and help connect them with a trusted person or qualified professional.",quality:"excellent",feedback:"You take the concern seriously without diagnosing or promising secrecy.",empathy:17,listening:17,communication:18,safety:24,next:"That feels like a possible next step."},{text:"Ignore it and change the topic.",quality:"unhelpful",feedback:"A concern should not be dismissed. Acknowledge it and seek appropriate support.",empathy:2,listening:2,communication:3,safety:0,next:"They become more distant."}]},196 {prompt:"How do you close the conversation?",options:[{text:"I’m glad you told me. We can take one small next step together.",quality:"excellent",feedback:"You offer continuity without taking responsibility for fixing everything.",empathy:18,listening:17,communication:19,safety:17,next:"Thank you for staying with me."},{text:"Let me know when you are fixed.",quality:"unhelpful",feedback:"People are not problems to fix. Keep the door open with care.",empathy:3,listening:3,communication:4,safety:3,next:"Okay."}]}197 ]; return data;198}199function scenarioKeyFromCard(card){return card?.dataset.scenario||card?.querySelector("h3")?.textContent.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")||"quiet-classmate";}200function startScenarioPractice(id){activeScenarioId=id;scenarioState={stage:0,score:0,skills:{empathy:0,listening:0,communication:0,safety:0},answered:false};showPage("scenario-practice");renderScenarioIntro();}201function scenarioShell(data,content){return `<div class="scenario-practice-shell"><button class="back" data-page="scenarios">← Back to Scenarios</button>${content}</div>`}202function renderScenarioIntro(){const data=scenarioData(activeScenarioId);document.getElementById("scenarioPracticeApp").innerHTML=scenarioShell(data,`<div class="scenario-intro-card"><div class="scenario-intro-art">${data.icon}</div><p class="eyebrow">${data.category.toUpperCase()} · SIMULATION</p><h1>${data.title}</h1><div class="practice-meta"><span>${data.difficulty}</span><span>${data.duration}</span><span>+${data.xp} XP</span><span class="concern ${data.concern.toLowerCase()}">● ${data.concern} Concern</span></div><p class="practice-lead">${data.description}</p><div class="practice-disclaimer">This simulation is for mental-health first-aid learning and communication practice. It does not diagnose, treat, or replace professional help.</div><div class="practice-actions"><button class="primary" id="startScenario">Start Scenario →</button><button class="secondary" id="savePracticeScenario">♡ Save Scenario</button></div></div>`);applyLanguage();document.getElementById("startScenario").onclick=()=>{scenarioState={stage:0,score:0,skills:{empathy:0,listening:0,communication:0,safety:0},answered:false};renderScenarioStage()};document.getElementById("savePracticeScenario").onclick=()=>{const saved=new Set(JSON.parse(localStorage.getItem("mindaid-saved-scenarios")||"[]"));saved.add(data.title);localStorage.setItem("mindaid-saved-scenarios",JSON.stringify([...saved]));showToast("Scenario saved for later")};}203function renderScenarioStage(){const data=scenarioData(activeScenarioId),stage=data.stages[scenarioState.stage],progress=Math.round((scenarioState.stage/data.stages.length)*100);document.getElementById("scenarioPracticeApp").innerHTML=scenarioShell(data,`<div class="practice-layout"><aside class="practice-sidebar"><div class="practice-mini-art">${data.icon}</div><h2>${data.title}</h2><p>${data.difficulty} · ${data.duration}</p><strong>+${data.xp} XP</strong><div class="practice-progress"><span>STEP ${scenarioState.stage+1} / ${data.stages.length}</span><i><b style="width:${progress}%"></b></i></div><div class="practice-disclaimer">Educational practice only. Not diagnosis or emergency care.</div></aside><main class="conversation-panel"><div class="conversation-head"><span class="online">● Simulation live</span><span>${data.category}</span></div><div class="conversation-bubble"><div class="avatar">${data.icon}</div><div><small>${data.title}</small><p>${scenarioState.stage===0?data.opening:(scenarioState.lastMessage||stage.prompt)}</p></div></div><p class="choice-label">${stage.prompt}</p><div class="response-options">${stage.options.map((option,index)=>`<button class="response-option" data-choice="${index}"><b>${String.fromCharCode(65+index)}</b><span>${option.text}</span></button>`).join("")}</div><div id="responseFeedback"></div></main><aside class="skills-panel"><p class="eyebrow">YOUR SKILLS</p><h3>Live score</h3>${["empathy","listening","communication","safety"].map(skill=>`<div class="skill-meter"><span>${skill.replace(/^./,letter=>letter.toUpperCase())}<b>${scenarioState.skills[skill]}%</b></span><i><b style="width:${scenarioState.skills[skill]}%"></b></i></div>`).join("")}<span class="form-note">Scores are learning feedback, not a clinical assessment.</span></aside></div>`);applyLanguage();document.querySelectorAll(".response-option").forEach(button=>button.onclick=()=>selectScenarioResponse(Number(button.dataset.choice)));}204function selectScenarioResponse(index){if(scenarioState.answered)return;const data=scenarioData(activeScenarioId),stage=data.stages[scenarioState.stage],option=stage.options[index];scenarioState.answered=true;scenarioState.lastMessage=option.next;Object.keys(scenarioState.skills).forEach(skill=>scenarioState.skills[skill]=Math.min(100,scenarioState.skills[skill]+(option[skill]||0)));scenarioState.score+=option.quality==="excellent"?22:option.quality==="helpful"?18:option.quality==="needs"?11:6;const label=option.quality==="excellent"?"Excellent Response":option.quality==="helpful"?"Helpful Response":option.quality==="needs"?"Needs Improvement":"Potentially Unhelpful";document.querySelectorAll(".response-option")[index].classList.add("chosen");document.getElementById("responseFeedback").innerHTML=`<div class="feedback-panel"><p class="eyebrow">WHY THIS RESPONSE ${option.quality==="unhelpful"?"NEEDS WORK":"HELPS"}</p><h3>${label} <span>+${option.quality==="excellent"?20:option.quality==="helpful"?15:8} XP</span></h3><p>${option.feedback}</p><div class="feedback-scores"><b>Empathy +${option.empathy||0}</b><b>Listening +${option.listening||0}</b><b>Communication +${option.communication||0}</b><b>Safety +${option.safety||0}</b></div><button class="primary" id="continueScenario">${scenarioState.stage===data.stages.length-1?"See Final Evaluation →":"Continue Conversation →"}</button></div>`;document.querySelectorAll(".skill-meter").forEach(meter=>{const key=meter.querySelector("span").firstChild.textContent.trim().toLowerCase();const value=scenarioState.skills[key]||0;meter.querySelector("span b").textContent=`${value}%`;meter.querySelector("i b").style.width=`${value}%`});document.getElementById("continueScenario").onclick=()=>{if(scenarioState.stage===data.stages.length-1)completeScenario();else{scenarioState.stage++;scenarioState.answered=false;renderScenarioStage()}};}205function completeScenario(){const data=scenarioData(activeScenarioId),overall=Math.min(100,Math.round(scenarioState.score/data.stages.length*4.1+45)),progress=getProgress();progress.completedScenarios=[...(progress.completedScenarios||[]),activeScenarioId].filter((id,index,array)=>array.indexOf(id)===index);progress.xp=(progress.xp||0)+data.xp;progress.activity=[...(progress.activity||[]),new Date().toISOString().slice(0,10)].slice(-30);saveProgress(progress);document.getElementById("scenarioPracticeApp").innerHTML=scenarioShell(data,`<div class="scenario-complete"><div class="complete-badge">🎉</div><p class="eyebrow">SCENARIO COMPLETE</p><h1>Well done, Alex</h1><div class="overall-score"><small>Overall Score</small><strong>${overall}/100</strong></div><div class="final-skills">${Object.entries(scenarioState.skills).map(([skill,value])=>`<div><span>${skill}</span><b>${Math.min(99,Math.max(55,value+55))}%</b><i><em style="width:${Math.min(99,Math.max(55,value+55))}%"></em></i></div>`).join("")}</div><div class="learning-summary"><h3>Learning Summary</h3>${data.summary.map(item=>`<p>✓ ${item}</p>`).join("")}</div><p class="personal-feedback">Your practice showed ${scenarioState.skills.listening>=scenarioState.skills.empathy?"strong listening instincts":"growing empathy"}. Keep building one supportive response at a time.</p><div class="practice-actions"><button class="primary" id="retryScenario">↻ Retry Scenario</button><button class="secondary" data-page="practice">🤖 Practice with AI</button><button class="secondary" data-page="dashboard">📊 View My Progress</button></div></div>`);document.getElementById("retryScenario").onclick=()=>startScenarioPractice(activeScenarioId);}206const completeScenarioBase=completeScenario;207completeScenario=function(){const progress=getProgress(),wasFirst=!(progress.completedScenarios||[]).length;completeScenarioBase();if(wasFirst){const updated=getProgress();updated.badges=[...(updated.badges||[]),"First Scenario"].filter((badge,index,array)=>array.indexOf(badge)===index);localStorage.setItem(progressKey,JSON.stringify(updated));showToast("🏆 Badge unlocked: First Scenario");}};208document.addEventListener("click",e=>{209 const el=e.target.closest("[data-page]");210 if(el){e.preventDefault();const courseCard=el.closest(".course-card");const title=courseCard?.querySelector("h3")?.textContent.trim();const fourthLessonTitle=localizedText("4. Asking Open Questions");if(courseCard && title && !courseCard.classList.contains("done") && (title==="4. Asking Open Questions"||title===fourthLessonTitle)){openLessonPreview("4. Asking Open Questions");document.querySelector(".sidebar")?.classList.remove("open");return;}if(courseCard && courseCard.classList.contains("done")){openLessonReview(title);document.querySelector(".sidebar")?.classList.remove("open");return;}if(el.dataset.page==="practice"&&el.closest(".scenario-item")){startScenarioPractice(scenarioKeyFromCard(el.closest(".scenario-item")))}else{showPage(el.dataset.page)}document.querySelector(".sidebar")?.classList.remove("open")}211});212window.addEventListener("popstate",()=>showPage(location.hash.slice(1)||"home"));213showPage(location.hash.slice(1)||"home");214renderProgress();215applyProfile();216applyLanguage();217 218let activeScenarioCategory="all";219function showToast(message){let toast=document.getElementById("mindaidToast");if(!toast){toast=document.createElement("div");toast.id="mindaidToast";document.body.appendChild(toast)}toast.textContent=message;toast.classList.add("show");clearTimeout(showToast.timer);showToast.timer=setTimeout(()=>toast.classList.remove("show"),1800)}220function filterScenarios(){221 const difficulty=document.getElementById("difficultyFilter")?.value||"all";222 const concern=document.getElementById("concernFilter")?.value||"all";223 let visible=0;224 document.querySelectorAll(".scenario-item").forEach(card=>{225 const matchesCategory=activeScenarioCategory==="all"||card.dataset.category.split(" ").includes(activeScenarioCategory);226 const matchesDifficulty=difficulty==="all"||card.dataset.difficulty===difficulty;227 const matchesConcern=concern==="all"||card.dataset.concern===concern;228 const show=matchesCategory&&matchesDifficulty&&matchesConcern;229 card.hidden=!show;230 if(show)visible++;231 });232 const count=document.getElementById("scenarioCount"); if(count)count.textContent=`${visible} scenario${visible===1?"":"s"}`;233 document.getElementById("emptyScenarios")?.classList.toggle("visible",visible===0);234}235document.querySelectorAll("#categoryFilters .filter").forEach(button=>button.addEventListener("click",()=>{document.querySelectorAll("#categoryFilters .filter").forEach(item=>item.classList.remove("active"));button.classList.add("active");activeScenarioCategory=button.dataset.category;filterScenarios()}));236document.getElementById("difficultyFilter")?.addEventListener("change",filterScenarios);237document.getElementById("concernFilter")?.addEventListener("change",filterScenarios);238document.querySelectorAll(".save-scenario").forEach(button=>button.addEventListener("click",()=>{const card=button.closest(".scenario-item"),title=card.querySelector("h3").textContent,saved=new Set(JSON.parse(localStorage.getItem("mindaid-saved-scenarios")||"[]"));if(saved.has(title)){saved.delete(title);button.classList.remove("saved");button.textContent="♡";showToast(`${title} removed from saved scenarios`)}else{saved.add(title);button.classList.add("saved");button.textContent="♥";showToast(`${title} saved for later`)}localStorage.setItem("mindaid-saved-scenarios",JSON.stringify([...saved]))}));239JSON.parse(localStorage.getItem("mindaid-saved-scenarios")||"[]").forEach(title=>{const card=[...document.querySelectorAll(".scenario-item")].find(item=>item.querySelector("h3").textContent===title);if(card){const button=card.querySelector(".save-scenario");button.classList.add("saved");button.textContent="♥"}});240filterScenarios();241 242document.getElementById("menuBtn")?.addEventListener("click",()=>document.querySelector(".sidebar").classList.toggle("open"));243document.getElementById("themeBtn")?.addEventListener("click",()=>{244 document.body.classList.toggle("dark");245 localStorage.setItem("mindaid-theme",document.body.classList.contains("dark")?"dark":"light");246});247if(localStorage.getItem("mindaid-theme")==="dark") document.body.classList.add("dark");248document.getElementById("profileBtn")?.addEventListener("click",()=>showPage("settings"));249document.getElementById("reduceMotion")?.addEventListener("change",e=>document.body.classList.toggle("reduce-motion",e.target.checked));250document.getElementById("editProfile")?.addEventListener("click",()=>alert("Profile editing is ready for your account connection."));251document.getElementById("saveSettings")?.addEventListener("click",e=>{e.target.textContent="Saved ✓";setTimeout(()=>e.target.textContent="Save changes",1600)});252document.querySelectorAll(".settings-tab").forEach(tab=>tab.addEventListener("click",()=>{const target=tab.dataset.settingsTab;document.querySelectorAll(".settings-tab").forEach(item=>item.classList.toggle("active",item===tab));document.querySelectorAll(".settings-section").forEach(section=>section.classList.toggle("active",section.dataset.settingsSection===target))}));253document.getElementById("calmMode")?.addEventListener("change",e=>{document.body.classList.toggle("calm-mode",e.target.checked);localStorage.setItem("mindaid-calm-mode",e.target.checked?"on":"off")});254if(localStorage.getItem("mindaid-calm-mode")==="on"){document.body.classList.add("calm-mode");if(document.getElementById("calmMode"))document.getElementById("calmMode").checked=true;}255document.getElementById("saveAccount")?.addEventListener("click",e=>{const input=[...document.querySelectorAll(".setting-input input")].find(field=>field.value.trim());const role=document.querySelector(".setting-input select")?.value||"Student learner";const name=input?.value.trim()||"Alex Williams";localStorage.setItem(profileKey,JSON.stringify({name,role}));applyProfile();e.target.textContent="Account saved ✓";showToast("Profile details saved locally");setTimeout(()=>e.target.textContent="Save account details",1600)});256document.getElementById("languageSelect")?.addEventListener("change",e=>{localStorage.setItem(languageKey,e.target.value);applyLanguage(e.target.value);if(document.getElementById("lessonReviewModal")?.classList.contains("open")&&lessonReviewState){renderLessonReview();}showToast(`Language set to ${e.target.value}`)});257window.addEventListener("storage",event=>{if(event.key===languageKey&&event.newValue){applyLanguage(event.newValue);if(document.getElementById("lessonReviewModal")?.classList.contains("open")&&lessonReviewState){renderLessonReview();}}});258 259function escapeHtml(s){return String(s).replace(/[&<>"']/g,m=>({"&":"&","<":"<",">":">",'"':""","'":"'"}[m]));}260 261const questions=[262 {q:"Which response is the most supportive opening?",a:["You look depressed. What's wrong?","I've noticed you've been quieter lately. How have you been?","You need to talk to someone immediately."],c:1},263 {q:"What is a key part of validation?",a:["Fixing the person's problem quickly","Telling them to stay positive","Acknowledging their feelings without judgment"],c:2},264 {q:"Which is an open-ended question?",a:["Are you okay?","Did you sleep?","What has been on your mind lately?"],c:2}265];266let qi=0, selected=-1;267function renderQuiz(){268 const q=questions[qi]; document.getElementById("qNum").textContent=qi+1; document.getElementById("question").textContent=localizedText(q.q);269 const box=document.getElementById("answers"); box.innerHTML="";270 q.a.forEach((x,i)=>{const b=document.createElement("button");b.className="answer";b.textContent=localizedText(x);b.onclick=()=>{selected=i;document.querySelectorAll(".answer").forEach(a=>a.classList.remove("selected"));b.classList.add("selected")};box.appendChild(b)});271 document.getElementById("quizResult").textContent=""; document.getElementById("nextQ").textContent=localizedText("Check answer");272}273document.getElementById("nextQ")?.addEventListener("click",()=>{274 if(selected<0){document.getElementById("quizResult").textContent=localizedText("Choose an answer first.");return}275 const q=questions[qi];276 document.querySelectorAll(".answer")[q.c].classList.add("correct");277 const progress=getProgress(); progress.quizScores=[...(progress.quizScores||[]),selected===q.c?100:60].slice(-20); saveProgress(progress);278 if(selected===q.c) document.getElementById("quizResult").textContent=`✓ ${localizedText("Correct — great supportive instinct!")}`;279 else {document.querySelectorAll(".answer")[selected].classList.add("wrong");document.getElementById("quizResult").textContent=localizedText("Not quite. Review the highlighted best response.")}280 if(qi<questions.length-1){document.getElementById("nextQ").textContent=localizedText("Next question");document.getElementById("nextQ").onclick=()=>{qi++;selected=-1;renderQuiz()}}281 else document.getElementById("nextQ").textContent=localizedText("Quiz complete ✓");282});283renderQuiz();284 285document.getElementById("clearData")?.addEventListener("click",()=>{286 localStorage.removeItem("mindaid-theme"); alert("Local MindAid preferences cleared.");287});288const moodForm=document.getElementById("moodForm");289document.querySelectorAll("input[type=range]").forEach(input=>input.addEventListener("input",()=>{const output=document.getElementById(`${input.id.replace("Value","")}Output`);if(output) output.textContent=`${input.value} / 10`}));290document.getElementById("moodDate")?.setAttribute("value",new Date().toISOString().slice(0,10));291function renderMoodTrend(entries){292 const bars=document.querySelectorAll("#trendBars i");293 if(!bars.length)return;294 const recent=entries.slice(-7);295 bars.forEach((bar,index)=>{296 const entry=recent[index];297 if(!entry){bar.style.height="8%";bar.classList.add("empty");return}298 const wellbeing=(Number(entry.sleep)+Number(entry.energy)+Number(entry.social)+(10-Number(entry.stress)))/4;299 bar.style.height=`${Math.max(12,wellbeing*10)}%`;300 bar.classList.remove("empty");301 bar.querySelector("b").textContent=new Date(`${entry.date}T00:00:00`).toLocaleDateString("en-US",{weekday:"short"}).slice(0,1);302 bar.title=`${entry.date}: ${entry.mood}, wellbeing pattern ${Math.round(wellbeing)}/10`;303 });304}305function loadMoodTrend(){306 const entries=JSON.parse(localStorage.getItem("mindaid-mood-log")||"[]");307 renderMoodTrend(entries);308 const latest=entries.at(-1);309 if(latest)document.getElementById("patternNote").textContent=`Latest note: ${latest.mood} mood, ${latest.sleep}/10 sleep, ${latest.stress}/10 stress. This is a wellbeing pattern, not a diagnosis.`;310}311moodForm?.addEventListener("submit",e=>{e.preventDefault();const entry={date:document.getElementById("moodDate").value,mood:document.getElementById("moodValue").value,sleep:document.getElementById("sleepValue").value,energy:document.getElementById("energyValue").value,social:document.getElementById("socialValue").value,stress:document.getElementById("stressValue").value};const entries=JSON.parse(localStorage.getItem("mindaid-mood-log")||"[]");entries.push(entry);const savedEntries=entries.slice(-7);localStorage.setItem("mindaid-mood-log",JSON.stringify(savedEntries));renderMoodTrend(savedEntries);recordActivity();document.getElementById("moodSaved").textContent="Saved locally. Keep noticing, without judging.";document.getElementById("patternNote").textContent=`Latest note: ${entry.mood} mood, ${entry.sleep}/10 sleep, ${entry.stress}/10 stress. This is a wellbeing pattern, not a diagnosis.`});312loadMoodTrend();313document.querySelectorAll(".risk").forEach(button=>button.addEventListener("click",()=>{document.querySelectorAll(".risk").forEach(item=>item.classList.remove("selected"));button.classList.add("selected")}));314document.getElementById("globalSearch")?.addEventListener("keydown",e=>{315 if(e.key==="Enter"){316 const q=e.target.value.toLowerCase();317 const map=q.includes("mood")||q.includes("pattern")?"mood":q.includes("dashboard")||q.includes("progress")?"dashboard":q.includes("quiz")?"quizzes":q.includes("practice")||q.includes("chat")?"practice":q.includes("warning")?"warning":q.includes("resource")?"resources":q.includes("privacy")?"privacy":q.includes("lesson")?"learn":"home";318 showPage(map);319 }320});321 322 323document.querySelectorAll(".resource-read-toggle").forEach(button=>button.addEventListener("click",()=>{324 const reading=document.getElementById(button.getAttribute("aria-controls"));325 const expanded=button.getAttribute("aria-expanded")==="true";326 reading.hidden=expanded;327 button.setAttribute("aria-expanded",String(!expanded));328 button.textContent=expanded?"Read →":"Close ↑";329}));330 331const resourceCards=[...document.querySelectorAll("#page-resources .resource-list article")];332const checkInCard=resourceCards[0];333const checkInButton=checkInCard?.querySelector("button");334checkInButton?.addEventListener("click",()=>{335 let reading=checkInCard.querySelector(".resource-reading");336 if(!reading){337 reading=document.createElement("section");338 reading.className="resource-reading";339 reading.innerHTML=`<p><strong>Start with what you notice.</strong> Choose a calm moment and describe the change gently, without labels or assumptions. You might say, “I have noticed you have seemed quieter lately, and I wanted to check in.” Specific observations feel more caring than guesses about how someone feels.</p><p>Give the person room to answer in their own way. Ask an open question such as, “How have things been for you recently?” Then listen without rushing to fill the silence. You do not need to solve the problem immediately; being present and taking their experience seriously can be a meaningful form of support.</p><p>Reflect what you hear before offering advice. Phrases like “That sounds exhausting” or “It makes sense that this feels difficult” acknowledge their experience without claiming to know exactly what they need. You can also ask, “Would you like me to listen, help you think through options, or give you some space?”</p><p>If they mention feeling unsafe, unable to cope, or at risk of harming themselves, take it seriously. Stay with them if it is safe, involve a trusted person or qualified professional, and contact local emergency services if there is immediate danger. Support does not mean handling a crisis alone.</p><div class="resource-takeaway"><strong>Try this opening</strong><span>“I am here with you. You do not have to explain everything perfectly. What has been on your mind?”</span></div>`;340 checkInCard.querySelector("div")?.appendChild(reading);applyLanguage();341 checkInButton.setAttribute("aria-expanded","true");342 checkInButton.textContent="Close ↑";343 return;344 }345 const expanded=checkInButton.getAttribute("aria-expanded")==="true";346 reading.hidden=expanded;347 checkInButton.setAttribute("aria-expanded",String(!expanded));348 checkInButton.textContent=expanded?"Read →":"Close ↑";349});350 351const conversationStartersCard=resourceCards[2];352const conversationStartersButton=conversationStartersCard?.querySelector("button");353conversationStartersButton?.addEventListener("click",()=>{354 let reading=conversationStartersCard.querySelector(".resource-reading");355 if(!reading){356 reading=document.createElement("section");357 reading.className="resource-reading";358 reading.innerHTML=`<p><strong>When someone seems quiet:</strong> “I have noticed you have been a little quieter lately. How have you been?”</p><p><strong>When someone feels overwhelmed:</strong> “It sounds like a lot is happening. Would it help to talk through one thing at a time?”</p><p><strong>When you want to offer support:</strong> “I am here to listen. Would you prefer advice, practical help, or simply some company?”</p><p><strong>When someone needs space:</strong> “I understand. I will give you some room, and I am here whenever you feel ready to talk.” Respect their answer and avoid repeated pressure.</p><div class="resource-takeaway"><strong>A useful reminder</strong><span>Keep your tone gentle, ask one open question, and listen to the answer instead of planning your next reply.</span></div>`;359 conversationStartersCard.querySelector("div")?.appendChild(reading);applyLanguage();360 conversationStartersButton.setAttribute("aria-expanded","true");361 conversationStartersButton.textContent="Close ↑";362 return;363 }364 const expanded=conversationStartersButton.getAttribute("aria-expanded")==="true";365 reading.hidden=expanded;366 conversationStartersButton.setAttribute("aria-expanded",String(!expanded));367 conversationStartersButton.textContent=expanded?"Open →":"Close ↑";368});369 370// Active Listening Audio: use the browser's built-in SpeechSynthesis API only.371const activeListeningCard=resourceCards[1];372const speechSupported="speechSynthesis" in window&&"SpeechSynthesisUtterance" in window;373if(activeListeningCard){374 const originalButton=activeListeningCard.querySelector("button");375 const audioContent=activeListeningCard.querySelector("div");376 const guidedAudioText="Take a quiet moment and settle into a comfortable position. Take a slow breath in, and gently breathe out. Bring your attention to the sounds around you. Notice one sound that is close. Now notice one sound that is farther away. You do not need to judge or change anything. Simply listen and stay present. If your thoughts wander, gently bring your attention back to the sounds around you. Active listening begins with being present, patient, and curious. Take one final slow breath, and when you are ready, return your attention to the present moment.";377 if(originalButton&&audioContent){378 originalButton.remove();379 const controls=document.createElement("div");380 controls.className="active-audio-controls";381 controls.innerHTML=`<div class="audio-actions"><button type="button" class="audio-control audio-play" aria-label="Play active listening audio">Play</button><button type="button" class="audio-control audio-pause" aria-label="Pause active listening audio" disabled>Pause</button><button type="button" class="audio-control audio-resume" aria-label="Resume active listening audio" disabled>Resume</button><button type="button" class="audio-control audio-stop" aria-label="Stop active listening audio" disabled>Stop</button></div><div class="audio-status-row"><div class="audio-waves" aria-hidden="true"><i></i><i></i><i></i><i></i><i></i></div><span class="audio-status" role="status">Ready to listen</span></div><p class="audio-fallback" role="alert" hidden>Audio playback is not supported in this browser.</p>`;382 audioContent.appendChild(controls);383 const playButton=controls.querySelector(".audio-play"),pauseButton=controls.querySelector(".audio-pause"),resumeButton=controls.querySelector(".audio-resume"),stopButton=controls.querySelector(".audio-stop"),status=controls.querySelector(".audio-status"),waves=controls.querySelector(".audio-waves"),fallback=controls.querySelector(".audio-fallback");384 let activeUtterance=null,selectedVoice=null;385 const setStatus=(label,playing=false)=>{status.textContent=label;waves.classList.toggle("is-speaking",playing);};386 const updateButtons=(state)=>{playButton.disabled=state==="playing";pauseButton.disabled=state!=="playing";resumeButton.disabled=state!=="paused";stopButton.disabled=state!=="playing"&&state!=="paused";};387 const chooseVoice=()=>{const voices=speechSynthesis.getVoices();selectedVoice=voices.find(voice=>/^en(-|_)(US|GB)/i.test(voice.lang)&&!/(espeak|compact|remote)/i.test(voice.name))||voices.find(voice=>/^en/i.test(voice.lang))||voices[0]||null;};388 const finishAudio=()=>{activeUtterance=null;updateButtons("ready");setStatus("Ready to listen");};389 if(!speechSupported){playButton.disabled=true;pauseButton.disabled=true;resumeButton.disabled=true;stopButton.disabled=true;fallback.hidden=false;setStatus("Audio unavailable");}390 else{391 chooseVoice();392 speechSynthesis.onvoiceschanged=chooseVoice;393 playButton.addEventListener("click",()=>{speechSynthesis.cancel();chooseVoice();const utterance=new SpeechSynthesisUtterance(guidedAudioText);utterance.lang=selectedVoice?.lang||"en-US";utterance.voice=selectedVoice||null;utterance.rate=.88;utterance.pitch=1;utterance.onstart=()=>{activeUtterance=utterance;updateButtons("playing");setStatus("Listening...",true)};utterance.onend=finishAudio;utterance.onerror=finishAudio;activeUtterance=utterance;updateButtons("playing");setStatus("Listening...",true);speechSynthesis.speak(utterance);});394 pauseButton.addEventListener("click",()=>{if(activeUtterance&&speechSynthesis.speaking&&!speechSynthesis.paused){speechSynthesis.pause();updateButtons("paused");setStatus("Paused");}});395 resumeButton.addEventListener("click",()=>{if(activeUtterance&&speechSynthesis.paused){speechSynthesis.resume();updateButtons("playing");setStatus("Listening...",true);}});396 stopButton.addEventListener("click",()=>{speechSynthesis.cancel();finishAudio();});397 }398 }399}400 