import React, { useState, useEffect, useRef, useCallback, useMemo } from 'react'; import ReactDOM from 'react-dom/client'; // From types.ts interface GameLevel { id: number; images: string[]; answer: string; letters: string[]; hint?: string; } interface KeyboardLetter { letter: string; id: number; used: boolean; } interface GuessSlot { letter: string; keyboardId: number; } interface SavedGameState { levelId: number; lives: number; guessedLetters: string[]; // Storing as array for JSON compatibility } interface PlayerStats { completedLevelIds: number[]; totalHintsUsed: number; totalAnswersRevealed: number; achievements: string[]; // Array of unlocked achievement IDs totalPlayTimeSeconds: number; achievementUnlockTimes: { [key: string]: number }; hasUnlockedFullGame: boolean; levelsCompletedWithFullStars: number; } interface Achievement { id: string; name: string; description: string; check: (stats: PlayerStats) => boolean; icon: string; // Emoji icon } // From constants.ts // FIX: Changed `shuffleArray` from a generic arrow function to a standard function declaration. This resolves a TSX parsing ambiguity that was causing a cascade of errors throughout the file. function shuffleArray(array: T[]): T[] { const newArray = [...array]; for (let i = newArray.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [newArray[i], newArray[j]] = [newArray[j], newArray[i]]; } return newArray; } const GAME_KEY_PREFIX = '4PIC1RIVAYAT'; const PLAYER_STATS_KEY = `${GAME_KEY_PREFIX}_playerStats`; const GAME_STATE_KEY = `${GAME_KEY_PREFIX}_gameState`; const definedLevels: Omit[] = [ { answer: 'زياد الاسود', hint: 'NATHI DEEN MAGAR MOHABBAT', images: [ 'https://zahabapps.store/games/img/level_1_1.jpg', 'https://zahabapps.store/games/img/level_1_2.jpg', 'https://zahabapps.store/games/img/level_1_3.jpg', 'https://zahabapps.store/games/img/level_1_4.jpg' ], letters: [ 'و', 'د', 'ا', 'س', 'ل', 'ا', 'ي', 'ز', 'د', 'ا', 'ب', 'ت' ] }, { answer: 'نبي ابراهيم', hint: 'NABIULLAH SA NO MOJIZO CHE', images: [ 'https://zahabapps.store/games/img/level_2_1.jpg', 'https://zahabapps.store/games/img/level_2_2.jpg', 'https://zahabapps.store/games/img/level_2_3.jpg', 'https://zahabapps.store/games/img/level_2_4.jpg' ], letters: [ 'ي', 'ب', 'م', 'ا', 'ه', 'ي', 'ا', 'ر', 'ب', 'ن', 'ل', 'ت' ] }, { answer: 'الفيل', hint: 'JUZ AMMA NI EK SURAT', images: [ 'https://zahabapps.store/games/img/level_3_1.jpg', 'https://zahabapps.store/games/img/level_3_2.jpg', 'https://zahabapps.store/games/img/level_3_3.jpg', 'https://zahabapps.store/games/img/level_3_4.jpg' ], letters: [ 'ا', 'ل', 'ف', 'ي', 'ل', 'ش', 'م', 'ب', 'ص', 'ه', 'غ', 'ت' ] }, { answer: 'سيدنا حاتم', hint: 'HAR DAREES MA TILAWat THAI CHE', images: [ 'https://zahabapps.store/games/img/level_4_1.jpg', 'https://zahabapps.store/games/img/level_4_2.jpg', 'https://zahabapps.store/games/img/level_4_3.jpg', 'https://zahabapps.store/games/img/level_4_4.jpg' ], letters: [ 'ع', 'ح', 'م', 'ا', 'س', 'ي', 'د', 'ن', 'ا', 'ت', 'م', 'ل' ] }, { answer: 'مولاي راج', hint: 'MORBI', images: [ 'https://zahabapps.store/games/img/level_5_1.jpg', 'https://zahabapps.store/games/img/level_5_2.jpg', 'https://zahabapps.store/games/img/level_5_3.jpg', 'https://zahabapps.store/games/img/level_5_4.jpg' ], letters: [ 'ج', 'ا', 'ل', 'و', 'ر', 'م', 'ي', 'ا', 'ي', 'ه', 'ق', 'س' ] }, { answer: 'مجوسي', hint: 'IMAM HUSAIN SA MADAD MA PADHARA', images: [ 'https://zahabapps.store/games/img/level_6_1.jpg', 'https://zahabapps.store/games/img/level_6_2.jpg', 'https://zahabapps.store/games/img/level_6_3.jpg', 'https://zahabapps.store/games/img/level_6_4.jpg' ], letters: [ 'ش', 'س', 'ج', 'و', 'م', 'ي', 'ث', 'ف', 'ب', 'ا', 'غ', 'ح' ] }, { answer: 'بني رياح', hint: 'GULAAM NA QABILA NU NAAM', images: [ 'https://zahabapps.store/games/img/level_7_1.jpg', 'https://zahabapps.store/games/img/level_7_2.jpg', 'https://zahabapps.store/games/img/level_7_3.jpg', 'https://zahabapps.store/games/img/level_7_4.jpg' ], letters: [ 'ي', 'ب', 'ح', 'ا', 'ن', 'ر', 'ي', 'ا', 'ش', 'ز', 'و', 'ت' ] }, { answer: 'خيبر', hint: 'MARHAB', images: [ 'https://zahabapps.store/games/img/level_8_1.jpg', 'https://zahabapps.store/games/img/level_8_2.jpg', 'https://zahabapps.store/games/img/level_8_3.jpg', 'https://zahabapps.store/games/img/level_8_4.jpg' ], letters: [ 'ب', 'ي', 'ر', 'خ', 'ص', 'س', 'ح', 'ت', 'ث', 'ذ', 'ن', 'ا' ] }, { answer: 'بڑهيا', hint: 'KARBALA KI ZIYARAT BINA...', images: [ 'https://zahabapps.store/games/img/level_9_1.jpg', 'https://zahabapps.store/games/img/level_9_2.jpg', 'https://zahabapps.store/games/img/level_9_3.jpg', 'https://zahabapps.store/games/img/level_9_4.jpg' ], letters: [ 'ا', 'ڑ', 'ي', 'ه', 'ب', 'ز', 'م', 'ر', 'ت', 'غ', 'ح', 'ج' ] }, { answer: 'هجرة', hint: 'طلع البدر علينا', images: [ 'https://zahabapps.store/games/img/level_10_1.jpg', 'https://zahabapps.store/games/img/level_10_2.jpg', 'https://zahabapps.store/games/img/level_10_3.jpg', 'https://zahabapps.store/games/img/level_10_4.jpg' ], letters: [ 'ة', 'ج', 'ر', 'ه', 'ي', 'ع', 'ل', 'ا', 'ك', 'م', 'س', 'ب' ] }, { answer: 'خندق', hint: 'AA ZIKR NA BAAD NARAE TAKBEER BOLYE CHE', images: [ 'https://zahabapps.store/games/img/level_11_1.jpg', 'https://zahabapps.store/games/img/level_11_2.jpg', 'https://zahabapps.store/games/img/level_11_3.jpg', 'https://zahabapps.store/games/img/level_11_4.jpg' ], letters: [ 'ن', 'ق', 'خ', 'د', 'ت', 'ج', 'ب', 'ذ', 'ص', 'ش', 'س', 'ا' ] }, { answer: 'ركوع', hint: 'KAYA HALAT MA SADAQA?', images: [ 'https://zahabapps.store/games/img/level_12_1.jpg', 'https://zahabapps.store/games/img/level_12_2.jpg', 'https://zahabapps.store/games/img/level_12_3.jpg', 'https://zahabapps.store/games/img/level_12_4.jpg' ], letters: [ 'و', 'ك', 'ع', 'ر', 'س', 'ا', 'ي', 'ب', 'ه', 'ح', 'ش', 'ل' ] }, { answer: 'صدقة', hint: 'EK AMAL NA SABAB UMAR LAMBI THAI', images: [ 'https://zahabapps.store/games/img/level_13_1.jpg', 'https://zahabapps.store/games/img/level_13_2.jpg', 'https://zahabapps.store/games/img/level_13_3.jpg', 'https://zahabapps.store/games/img/level_13_4.jpg' ], letters: [ 'ص', 'ة', 'ق', 'د', 'ط', 'ا', 'ر', 'ب', 'ز', 'ح', 'س', 'ت' ] }, { answer: 'RAINMAKER', hint: 'SMB RA NO MOJIZO', images: [ 'https://zahabapps.store/games/img/level_14_1.jpg', 'https://zahabapps.store/games/img/level_14_2.jpg', 'https://zahabapps.store/games/img/level_14_3.jpg', 'https://zahabapps.store/games/img/level_14_4.jpg' ], letters: [ 'R', 'A', 'I', 'N', 'M', 'A', 'K', 'E', 'R', 'J', 'Y', 'B' ] }, { answer: 'يهودية', hint: 'AHSIN ILA MAN ASAA ILAIKA', images: [ 'https://zahabapps.store/games/img/level_15_1.jpg', 'https://zahabapps.store/games/img/level_15_2.jpg', 'https://zahabapps.store/games/img/level_15_3.jpg', 'https://zahabapps.store/games/img/level_15_4.jpg' ], letters: [ 'د', 'و', 'ة', 'ي', 'ه', 'ي', 'ا', 'ج', 'ب', 'ل', 'ت', 'ر' ] }, { answer: 'خانجي فير', hint: 'SAFAI KIDI', images: [ 'https://zahabapps.store/games/img/level_16_1.jpg', 'https://zahabapps.store/games/img/level_16_2.jpg', 'https://zahabapps.store/games/img/level_16_3.jpg', 'https://zahabapps.store/games/img/level_16_4.jpg' ], letters: [ 'خ', 'ا', 'ن', 'ج', 'ي', 'ف', 'ي', 'ر', 'ا', 'ب', 'م', 'ت' ] }, { answer: 'فاتحة', hint: '40 WAAR KAI SURAT?', images: [ 'https://zahabapps.store/games/img/level_17_1.jpg', 'https://zahabapps.store/games/img/level_17_2.jpg', 'https://zahabapps.store/games/img/level_17_3.jpg', 'https://zahabapps.store/games/img/level_17_4.jpg' ], letters: [ 'ح', 'ة', 'ت', 'ا', 'ف', 'ا', 'ص', 'ب', 'م', 'ل', 'ك', 'ي' ] }, { answer: 'معوّذتين', hint: 'KAI BE SURAT?', images: [ 'https://zahabapps.store/games/img/level_18_1.jpg', 'https://zahabapps.store/games/img/level_18_2.jpg', 'https://zahabapps.store/games/img/level_18_3.jpg', 'https://zahabapps.store/games/img/level_18_4.jpg' ], letters: [ 'ع', 'و', 'ذ', 'ت', 'ي', 'ن', 'م', 'ص', 'ض', 'ب', 'ل', 'ا' ] }, { answer: 'جابر', hint: 'ZIYARAT NO SHAUQ', images: [ 'https://zahabapps.store/games/img/level_19_1.jpg', 'https://zahabapps.store/games/img/level_19_2.jpg', 'https://zahabapps.store/games/img/level_19_3.jpg', 'https://zahabapps.store/games/img/level_19_4.jpg' ], letters: [ 'ر', 'ا', 'ج', 'ب', 'ي', 'ه', 'ل', 'س', 'ح', 'م', 'ت', 'ك' ] }, { answer: 'غدير خم', hint: 'MAN KUNTO MAWLAHO', images: [ 'https://zahabapps.store/games/img/level_20_1.jpg', 'https://zahabapps.store/games/img/level_20_2.jpg', 'https://zahabapps.store/games/img/level_20_3.jpg', 'https://zahabapps.store/games/img/level_20_4.jpg' ], letters: [ 'غ', 'د', 'ي', 'ر', 'خ', 'م', 'ا', 'ل', 'ف', 'ن', 'ب', 'س' ] }, { answer: 'موسى', hint: 'KAYA NABI AS?', images: [ 'https://zahabapps.store/games/img/level_21_1.jpg', 'https://zahabapps.store/games/img/level_21_2.jpg', 'https://zahabapps.store/games/img/level_21_3.jpg', 'https://zahabapps.store/games/img/level_21_4.jpg' ], letters: [ 'م', 'و', 'س', 'ى', 'ت', 'ل', 'ي', 'ا', 'ب', 'ه', 'ح', 'ج' ] }, { answer: 'انشقاق القمر', hint: 'GHANO AZEEM MOJIZA (ARABI)', images: [ 'https://zahabapps.store/games/img/level_22_1.jpg', 'https://zahabapps.store/games/img/level_22_2.jpg', 'https://zahabapps.store/games/img/level_22_3.jpg', 'https://zahabapps.store/games/img/level_22_4.jpg' ], letters: [ 'ا', 'ن', 'ش', 'ق', 'ا', 'ق', 'ا', 'ل', 'ق', 'م', 'ر', 'ت' ] }, { answer: 'وعده', hint: 'RASULALLAH SAW NA WAFAAT NA BAAD AARABI AAYA ANE TALAB KIDU', images: [ 'https://zahabapps.store/games/img/level_23_1.jpg', 'https://zahabapps.store/games/img/level_23_2.jpg', 'https://zahabapps.store/games/img/level_23_3.jpg', 'https://zahabapps.store/games/img/level_23_4.jpg' ], letters: [ 'و', 'ع', 'د', 'ه', 'ح', 'ت', 'ا', 'ب', 'م', 'ي', 'ل', 'س' ] }, { answer: 'حسن', hint: 'AGAR QABOOL KARAWI DO TO GULAAM AZAD. KAYA IMAM AS?', images: [ 'https://zahabapps.store/games/img/level_24_1.jpg', 'https://zahabapps.store/games/img/level_24_2.jpg', 'https://zahabapps.store/games/img/level_24_3.jpg', 'https://zahabapps.store/games/img/level_24_4.jpg' ], letters: [ 'ح', 'س', 'ن', 'ت', 'ج', 'ب', 'ا', 'ي', 'م', 'ل', 'ف', 'ه' ] }, { answer: 'ردّ الشمس', hint: 'ASR NI NAMAZ ADAA FARMAVI', images: [ 'https://zahabapps.store/games/img/level_25_1.jpg', 'https://zahabapps.store/games/img/level_25_2.jpg', 'https://zahabapps.store/games/img/level_25_3.jpg', 'https://zahabapps.store/games/img/level_25_4.jpg' ], letters: [ 'ر', 'د', 'ا', 'ل', 'ش', 'م', 'س', 'س', 'ب', 'ي', 'ف', 'ت' ] }, { answer: 'اٰدم', hint: 'IKHLAAS. MAWLAYA?', images: [ 'https://zahabapps.store/games/img/level_26_1.jpg', 'https://zahabapps.store/games/img/level_26_2.jpg', 'https://zahabapps.store/games/img/level_26_3.jpg', 'https://zahabapps.store/games/img/level_26_4.jpg' ], letters: [ 'ا', 'ٰ', 'د', 'م', 'ح', 'ج', 'ت', 'ب', 'ي', 'س', 'ه', 'و' ] }, { answer: 'كهمبات', hint: 'KAKA ANE KAKI AKELA. JAGAH?', images: [ 'https://zahabapps.store/games/img/level_27_1.jpg', 'https://zahabapps.store/games/img/level_27_2.jpg', 'https://zahabapps.store/games/img/level_27_3.jpg', 'https://zahabapps.store/games/img/level_27_4.jpg' ], letters: [ 'ك', 'ه', 'م', 'ب', 'ا', 'ت', 'ا', 'ل', 'ي', 'س', 'ر', 'ح' ] }, { answer: 'سلمان', hint: 'KAYA SAHEB NE AZAAD KIDA?', images: [ 'https://zahabapps.store/games/img/level_28_1.jpg', 'https://zahabapps.store/games/img/level_28_2.jpg', 'https://zahabapps.store/games/img/level_28_3.jpg', 'https://zahabapps.store/games/img/level_28_4.jpg' ], letters: [ 'س', 'ل', 'م', 'ا', 'ن', 'ح', 'ت', 'ب', 'ي', 'ه', 'ج', 'ف' ] }, { answer: 'فتح مصر', hint: 'لمثل هذا اليوم ارادك امير المؤمنين', images: [ 'https://zahabapps.store/games/img/level_29_1.jpg', 'https://zahabapps.store/games/img/level_29_2.jpg', 'https://zahabapps.store/games/img/level_29_3.jpg', 'https://zahabapps.store/games/img/level_29_4.jpg' ], letters: [ 'ف', 'ت', 'ح', 'م', 'ص', 'ر', 'ا', 'ل', 'ي', 'ب', 'ن', 'ه' ] }, { answer: 'عبد الله', hint: 'RAJA BHARMAL. KAYA SAHEB? MAWLAYA?', images: [ 'https://zahabapps.store/games/img/level_30_1.jpg', 'https://zahabapps.store/games/img/level_30_2.jpg', 'https://zahabapps.store/games/img/level_30_3.jpg', 'https://zahabapps.store/games/img/level_30_4.jpg' ], letters: [ 'ع', 'ب', 'د', 'ا', 'ل', 'ل', 'ه', 'ا', 'ح', 'م', 'ب', 'ج' ] }, { answer: 'حسن فير', hint: 'KAYA SAHEB YE AA MISAL JAWAB AAPO?', images: [ 'https://zahabapps.store/games/img/level_31_1.jpg', 'https://zahabapps.store/games/img/level_31_2.jpg', 'https://zahabapps.store/games/img/level_31_3.jpg', 'https://zahabapps.store/games/img/level_31_4.jpg' ], letters: [ 'ح', 'س', 'ن', 'ف', 'ي', 'ر', 'ا', 'م', 'ج', 'ت', 'ب', 'ه' ] }, { answer: 'لوكهو', hint: 'KEM BHAVE CHE?', images: [ 'https://zahabapps.store/games/img/level_32_1.jpg', 'https://zahabapps.store/games/img/level_32_2.jpg', 'https://zahabapps.store/games/img/level_32_3.jpg', 'https://zahabapps.store/games/img/level_32_4.jpg' ], letters: [ 'ل', 'و', 'ك', 'ه', 'و', 'ا', 'ب', 'ي', 'ت', 'س', 'ح', 'ج' ] }, { answer: 'بابجي', hint: 'KAYA MOULA?', images: [ 'https://zahabapps.store/games/img/level_33_1.jpg', 'https://zahabapps.store/games/img/level_33_2.jpg', 'https://zahabapps.store/games/img/level_33_3.jpg', 'https://zahabapps.store/games/img/level_33_4.jpg' ], letters: [ 'ب', 'ا', 'ب', 'ج', 'ي', 'ل', 'ت', 'ح', 'ه', 'س', 'ن', 'ف' ] }, { answer: 'داؤد', hint: 'KAYA DAI AL MUTLAQ RA?', images: [ 'https://zahabapps.store/games/img/level_34_1.jpg', 'https://zahabapps.store/games/img/level_34_2.jpg', 'https://zahabapps.store/games/img/level_34_3.jpg', 'https://zahabapps.store/games/img/level_34_4.jpg' ], letters: [ 'د', 'ا', 'ؤ', 'د', 'ج', 'ت', 'ب', 'ي', 'ل', 'ه', 'س', 'م' ] }, { answer: 'عبد علي', hint: 'KAYA DAI AL MUTLAQ RA?', images: [ 'https://zahabapps.store/games/img/level_35_1.jpg', 'https://zahabapps.store/games/img/level_35_2.jpg', 'https://zahabapps.store/games/img/level_35_3.jpg', 'https://zahabapps.store/games/img/level_35_4.jpg' ], letters: [ 'ع', 'ب', 'د', 'ع', 'ل', 'ي', 'ي', 'ا', 'ت', 'ه', 'ج', 'س' ] }, { answer: 'GULF WAR', hint: 'KAYA WAQT NI WAAT CHE?', images: [ 'https://zahabapps.store/games/img/level_36_1.jpg', 'https://zahabapps.store/games/img/level_36_2.jpg', 'https://zahabapps.store/games/img/level_36_3.jpg', 'https://zahabapps.store/games/img/level_36_4.jpg' ], letters: [ 'G', 'U', 'L', 'F', 'W', 'A', 'R', 'A', 'I', 'B', 'T', 'E' ] }, { answer: 'الامين', hint: 'هذا ___ قد طلع', images: [ 'https://zahabapps.store/games/img/level_37_1.jpg', 'https://zahabapps.store/games/img/level_37_2.jpg', 'https://zahabapps.store/games/img/level_37_3.jpg', 'https://zahabapps.store/games/img/level_37_4.jpg' ], letters: [ 'ا', 'ل', 'ا', 'م', 'ي', 'ن', 'ا', 'ت', 'ه', 'س', 'ج', 'ف' ] }, { answer: 'ابشّكما', hint: 'احبكما الي؟', images: [ 'https://zahabapps.store/games/img/level_38_1.jpg', 'https://zahabapps.store/games/img/level_38_2.jpg', 'https://zahabapps.store/games/img/level_38_3.jpg', 'https://zahabapps.store/games/img/level_38_4.jpg' ], letters: [ 'ا', 'ب', 'ش', 'ك', 'م', 'ا', 'ا', 'ت', 'ه', 'خ', 'ج', 'ل' ] }, { answer: 'برنية', hint: 'IMAM AS NA DEEDAAR.. SU CHEEZ CHE?', images: [ 'https://zahabapps.store/games/img/level_39_1.jpg', 'https://zahabapps.store/games/img/level_39_2.jpg', 'https://zahabapps.store/games/img/level_39_3.jpg', 'https://zahabapps.store/games/img/level_39_4.jpg' ], letters: [ 'ب', 'ر', 'ن', 'ي', 'ة', 'خ', 'ا', 'ت', 'م', 'ل', 'ه', 'ج' ] }, { answer: 'نور', hint: 'BEWE THAYA EK PAIDA', images: [ 'https://zahabapps.store/games/img/level_40_1.jpg', 'https://zahabapps.store/games/img/level_40_2.jpg', 'https://zahabapps.store/games/img/level_40_3.jpg', 'https://zahabapps.store/games/img/level_40_4.jpg' ], letters: [ 'ن', 'و', 'ر', 'ت', 'ي', 'ا', 'ب', 'ل', 'م', 'س', 'خ', 'ج' ] }, { answer: 'امينجي', hint: 'ILM MA IJTIHAAD', images: [ 'https://zahabapps.store/games/img/level_41_1.jpg', 'https://zahabapps.store/games/img/level_41_2.jpg', 'https://zahabapps.store/games/img/level_41_3.jpg', 'https://zahabapps.store/games/img/level_41_4.jpg' ], letters: [ 'ا', 'م', 'ي', 'ن', 'ج', 'ي', 'ا', 'ب', 'ت', 'ه', 'س', 'ف' ] }, { answer: 'ولادة', hint: 'MOHAMMED SAW NI', images: [ 'https://zahabapps.store/games/img/level_42_1.jpg', 'https://zahabapps.store/games/img/level_42_2.jpg', 'https://zahabapps.store/games/img/level_42_3.jpg', 'https://zahabapps.store/games/img/level_42_4.jpg' ], letters: [ 'و', 'ل', 'ا', 'د', 'ة', 'ة', 'ب', 'ت', 'ي', 'م', 'ه', 'س' ] }, { answer: 'راهب', hint: 'KONI ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_43_1.jpg', 'https://zahabapps.store/games/img/level_43_2.jpg', 'https://zahabapps.store/games/img/level_43_3.jpg', 'https://zahabapps.store/games/img/level_43_4.jpg' ], letters: [ 'ر', 'ا', 'ه', 'ب', 'ي', 'ل', 'ت', 'م', 'خ', 'س', 'ج', 'ن' ] }, { answer: 'سيدنا حاتم', hint: 'KONO MOJIZO CHE?', images: [ 'https://zahabapps.store/games/img/level_44_1.jpg', 'https://zahabapps.store/games/img/level_44_2.jpg', 'https://zahabapps.store/games/img/level_44_3.jpg', 'https://zahabapps.store/games/img/level_44_4.jpg' ], letters: [ 'س', 'ي', 'د', 'ن', 'ا', 'ح', 'ا', 'ت', 'م', 'ا', 'م', 'ب' ] }, { answer: 'قصاص', hint: 'SU CHEEZ NO KHAUF?', images: [ 'https://zahabapps.store/games/img/level_45_1.jpg', 'https://zahabapps.store/games/img/level_45_2.jpg', 'https://zahabapps.store/games/img/level_45_3.jpg', 'https://zahabapps.store/games/img/level_45_4.jpg' ], letters: [ 'ق', 'ص', 'ا', 'ص', 'ص', 'خ', 'ب', 'ت', 'م', 'ه', 'س', 'ج' ] }, { answer: 'مستنصر', hint: 'KAYA IMAM AS MOJIZO CHE?', images: [ 'https://zahabapps.store/games/img/level_46_1.jpg', 'https://zahabapps.store/games/img/level_46_2.jpg', 'https://zahabapps.store/games/img/level_46_3.jpg', 'https://zahabapps.store/games/img/level_46_4.jpg' ], letters: [ 'م', 'س', 'ت', 'ن', 'ص', 'ر', 'ا', 'ا', 'ل', 'ب', 'خ', 'ه' ] }, { answer: 'كولمبو', hint: 'KAI JAGAH AA MOJIZO THAYO?', images: [ 'https://zahabapps.store/games/img/level_47_1.jpg', 'https://zahabapps.store/games/img/level_47_2.jpg', 'https://zahabapps.store/games/img/level_47_3.jpg', 'https://zahabapps.store/games/img/level_47_4.jpg' ], letters: [ 'ك', 'و', 'ل', 'م', 'ب', 'و', 'ا', 'خ', 'ت', 'ه', 'س', 'ج' ] }, { answer: 'فاطمة', hint: 'ANDHA SI PARDO? KOIYE? SUKAM?', images: [ 'https://zahabapps.store/games/img/level_48_1.jpg', 'https://zahabapps.store/games/img/level_48_2.jpg', 'https://zahabapps.store/games/img/level_48_3.jpg', 'https://zahabapps.store/games/img/level_48_4.jpg' ], letters: [ 'ف', 'ا', 'ط', 'م', 'ة', 'ي', 'ل', 'خ', 'ب', 'ت', 'ه', 'س' ] }, { answer: 'حسد', hint: 'EK BAD KHULUQ NI ZIKR CHE', images: [ 'https://zahabapps.store/games/img/level_49_1.jpg', 'https://zahabapps.store/games/img/level_49_2.jpg', 'https://zahabapps.store/games/img/level_49_3.jpg', 'https://zahabapps.store/games/img/level_49_4.jpg' ], letters: [ 'ح', 'س', 'د', 'ت', 'ج', 'ب', 'ا', 'ي', 'م', 'ل', 'ه', 'ف' ] }, { answer: 'عبد القادر', hint: 'KAYA SAHEB NI ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_50_1.jpg', 'https://zahabapps.store/games/img/level_50_2.jpg', 'https://zahabapps.store/games/img/level_50_3.jpg', 'https://zahabapps.store/games/img/level_50_4.jpg' ], letters: [ 'ع', 'ب', 'د', 'ا', 'ل', 'ق', 'ا', 'د', 'ر', 'ي', 'م', 'ن' ] }, { answer: '1356', hint: 'AAP HAMARA QIBLA CHO (BAITULLAH NI CHAT) KAYA WARAS MA AAM BANU?', images: [ 'https://zahabapps.store/games/img/level_51_1.jpg', 'https://zahabapps.store/games/img/level_51_2.jpg', 'https://zahabapps.store/games/img/level_51_3.jpg', 'https://zahabapps.store/games/img/level_51_4.jpg' ], letters: [ '1', '3', '5', '6', '0', '4', '8', '2', '9', '7', '1', '3' ] }, { answer: 'باوا ملا خان', hint: 'KAYA SAHEB AMAL KARTA? SU KARTA THA?', images: [ 'https://zahabapps.store/games/img/level_52_1.jpg', 'https://zahabapps.store/games/img/level_52_2.jpg', 'https://zahabapps.store/games/img/level_52_3.jpg', 'https://zahabapps.store/games/img/level_52_4.jpg' ], letters: [ 'ب', 'ا', 'و', 'ا', 'م', 'ل', 'ا', 'خ', 'ا', 'ن', 'ا', 'ن' ] }, { answer: 'حسن فير', hint: 'KAYA SAHEB YE AA MISAL JAWAB AAPO?', images: [ 'https://zahabapps.store/games/img/level_53_1.jpg', 'https://zahabapps.store/games/img/level_53_2.jpg', 'https://zahabapps.store/games/img/level_53_3.jpg', 'https://zahabapps.store/games/img/level_53_4.jpg' ], letters: [ 'ح', 'س', 'ن', 'ف', 'ي', 'ر', 'ا', 'ا', 'ل', 'ب', 'ت', 'ه' ] }, { answer: 'سيدنا عباس', hint: 'KAYA DAI RA SALAM WASTE HATH NHOTA AAPTA? SUKAM?', images: [ 'https://zahabapps.store/games/img/level_54_1.jpg', 'https://zahabapps.store/games/img/level_54_2.jpg', 'https://zahabapps.store/games/img/level_54_3.jpg', 'https://zahabapps.store/games/img/level_54_4.jpg' ], letters: [ 'س', 'ي', 'د', 'ن', 'ا', 'ع', 'ب', 'ا', 'س', 'ا', 'ل', 'ه' ] }, { answer: 'هبة الله', hint: '1 LAKH 25 HAZAAR NU SAFINO. KAYA DAI NO MOJIZO?', images: [ 'https://zahabapps.store/games/img/level_55_1.jpg', 'https://zahabapps.store/games/img/level_55_2.jpg', 'https://zahabapps.store/games/img/level_55_3.jpg', 'https://zahabapps.store/games/img/level_55_4.jpg' ], letters: [ 'ه', 'ب', 'ة', 'ا', 'ل', 'ل', 'ه', 'ا', 'م', 'س', 'ج', 'ف' ] }, { answer: 'طي الارض', hint: 'HABIB BIN MAZAHIR NI SHAAN (MOJIZO)', images: [ 'https://zahabapps.store/games/img/level_56_1.jpg', 'https://zahabapps.store/games/img/level_56_2.jpg', 'https://zahabapps.store/games/img/level_56_3.jpg', 'https://zahabapps.store/games/img/level_56_4.jpg' ], letters: [ 'ط', 'ي', 'ا', 'ل', 'ا', 'ر', 'ض', 'ا', 'ت', 'ب', 'ه', 'س' ] }, { answer: 'ابراهيم', hint: 'KAYA SAHEB? QABR MA BARAKAT.', images: [ 'https://zahabapps.store/games/img/level_57_1.jpg', 'https://zahabapps.store/games/img/level_57_2.jpg', 'https://zahabapps.store/games/img/level_57_3.jpg', 'https://zahabapps.store/games/img/level_57_4.jpg' ], letters: [ 'ا', 'ب', 'ر', 'ا', 'ه', 'ي', 'م', 'ا', 'ت', 'س', 'ج', 'ف' ] }, { answer: 'اخواني', hint: 'SU KAHI NE YAAD FARMAYA?', images: [ 'https://zahabapps.store/games/img/level_58_1.jpg', 'https://zahabapps.store/games/img/level_58_2.jpg', 'https://zahabapps.store/games/img/level_58_3.jpg', 'https://zahabapps.store/games/img/level_58_4.jpg' ], letters: [ 'ا', 'خ', 'و', 'ا', 'ن', 'ي', 'ا', 'ب', 'ت', 'م', 'ه', 'س' ] }, { answer: 'النجاشي', hint: 'BADSHAH NO NAAM', images: [ 'https://zahabapps.store/games/img/level_59_1.jpg', 'https://zahabapps.store/games/img/level_59_2.jpg', 'https://zahabapps.store/games/img/level_59_3.jpg', 'https://zahabapps.store/games/img/level_59_4.jpg' ], letters: [ 'ا', 'ل', 'ن', 'ج', 'ا', 'ش', 'ي', 'ح', 'ت', 'ب', 'ه', 'س' ] }, { answer: 'حسن', hint: 'KAYA SAHEB YE JAWAB FARMAYO?', images: [ 'https://zahabapps.store/games/img/level_60_1.jpg', 'https://zahabapps.store/games/img/level_60_2.jpg', 'https://zahabapps.store/games/img/level_60_3.jpg', 'https://zahabapps.store/games/img/level_60_4.jpg' ], letters: [ 'ح', 'س', 'ن', 'ت', 'ج', 'ب', 'ا', 'ي', 'م', 'ل', 'ه', 'ف' ] }, { answer: 'حسن بن نوح', hint: 'KONO MOJIZO CHE?', images: [ 'https://zahabapps.store/games/img/level_61_1.jpg', 'https://zahabapps.store/games/img/level_61_2.jpg', 'https://zahabapps.store/games/img/level_61_3.jpg', 'https://zahabapps.store/games/img/level_61_4.jpg' ], letters: [ 'ح', 'س', 'ن', 'ب', 'ن', 'ن', 'و', 'ح', 'ا', 'ن', 'م', 'ل' ] }, { answer: 'شهاب الدين', hint: 'KAYA SAHEB?', images: [ 'https://zahabapps.store/games/img/level_62_1.jpg', 'https://zahabapps.store/games/img/level_62_2.jpg', 'https://zahabapps.store/games/img/level_62_3.jpg', 'https://zahabapps.store/games/img/level_62_4.jpg' ], letters: [ 'ش', 'ه', 'ا', 'ب', 'ا', 'ل', 'د', 'ي', 'ن', 'د', 'ي', 'ن' ] }, { answer: 'عيسى', hint: 'KHAUF ANE MOJIZA NI ZIKR. KAYA NABI AS?', images: [ 'https://zahabapps.store/games/img/level_63_1.jpg', 'https://zahabapps.store/games/img/level_63_2.jpg', 'https://zahabapps.store/games/img/level_63_3.jpg', 'https://zahabapps.store/games/img/level_63_4.jpg' ], letters: [ 'ع', 'ي', 'س', 'ى', 'ا', 'ح', 'ل', 'ب', 'ت', 'م', 'ه', 'ج' ] }, { answer: 'حرز سيفي', hint: 'SIDHPUR MA, 53MA DAI RA YE KAI DUA FAZAL FARMAVI?', images: [ 'https://zahabapps.store/games/img/level_64_1.jpg', 'https://zahabapps.store/games/img/level_64_2.jpg', 'https://zahabapps.store/games/img/level_64_3.jpg', 'https://zahabapps.store/games/img/level_64_4.jpg' ], letters: [ 'ح', 'ر', 'ز', 'س', 'ي', 'ف', 'ي', 'ا', 'ب', 'م', 'ل', 'ن' ] }, { answer: 'حكيم', hint: 'PURA MADINA BIMAAR CHE. KOIYE KAI TARAH SUDHARA?', images: [ 'https://zahabapps.store/games/img/level_65_1.jpg', 'https://zahabapps.store/games/img/level_65_2.jpg', 'https://zahabapps.store/games/img/level_65_3.jpg', 'https://zahabapps.store/games/img/level_65_4.jpg' ], letters: [ 'ح', 'ك', 'ي', 'م', 'ا', 'ل', 'ت', 'ب', 'ه', 'س', 'ج', 'ف' ] }, { answer: 'بسم الله', hint: 'CROW', images: [ 'https://zahabapps.store/games/img/level_66_1.jpg', 'https://zahabapps.store/games/img/level_66_2.jpg', 'https://zahabapps.store/games/img/level_66_3.jpg', 'https://zahabapps.store/games/img/level_66_4.jpg' ], letters: [ 'ب', 'س', 'م', 'ا', 'ل', 'ل', 'ه', 'ا', 'ر', 'ك', 'ت', 'ه' ] }, { answer: 'زوال', hint: 'MOULANA ALI NE JUNG MA SENI FIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_67_1.jpg', 'https://zahabapps.store/games/img/level_67_2.jpg', 'https://zahabapps.store/games/img/level_67_3.jpg', 'https://zahabapps.store/games/img/level_67_4.jpg' ], letters: [ 'ز', 'و', 'ا', 'ل', 'ي', 'ح', 'ت', 'ب', 'م', 'ه', 'س', 'ج' ] }, { answer: 'كرب وبلاء', hint: 'IMAM HUSAIN SA YE SU FARMAYU?', images: [ 'https://zahabapps.store/games/img/level_68_1.jpg', 'https://zahabapps.store/games/img/level_68_2.jpg', 'https://zahabapps.store/games/img/level_68_3.jpg', 'https://zahabapps.store/games/img/level_68_4.jpg' ], letters: [ 'ك', 'ر', 'ب', 'و', 'ب', 'ل', 'ا', 'ء', 'ي', 'س', 'ن', 'م' ] }, { answer: 'شهاب', hint: 'SHAYTAN NE SENA SI MARWAMA AAWE CHE?', images: [ 'https://zahabapps.store/games/img/level_69_1.jpg', 'https://zahabapps.store/games/img/level_69_2.jpg', 'https://zahabapps.store/games/img/level_69_3.jpg', 'https://zahabapps.store/games/img/level_69_4.jpg' ], letters: [ 'ش', 'ه', 'ا', 'ب', 'ل', 'ي', 'ح', 'ت', 'م', 'س', 'ج', 'ف' ] }, { answer: 'يونس', hint: 'KAYA NABI NI ZIKR CHE', images: [ 'https://zahabapps.store/games/img/level_70_1.jpg', 'https://zahabapps.store/games/img/level_70_2.jpg', 'https://zahabapps.store/games/img/level_70_3.jpg', 'https://zahabapps.store/games/img/level_70_4.jpg' ], letters: [ 'ي', 'و', 'ن', 'س', 'ا', 'ل', 'ح', 'ب', 'ت', 'م', 'ه', 'ج' ] }, { answer: 'ضيافة', hint: 'JABIR BIN ABDULLAH NA FARZANDO NI SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_71_1.jpg', 'https://zahabapps.store/games/img/level_71_2.jpg', 'https://zahabapps.store/games/img/level_71_3.jpg', 'https://zahabapps.store/games/img/level_71_4.jpg' ], letters: [ 'ض', 'ي', 'ا', 'ف', 'ة', 'ل', 'ح', 'ب', 'ت', 'م', 'ه', 'س' ] }, { answer: 'ITALIAN MAIL', hint: 'KAYA DAI NI ZIKR CHE? SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_72_1.jpg', 'https://zahabapps.store/games/img/level_72_2.jpg', 'https://zahabapps.store/games/img/level_72_3.jpg', 'https://zahabapps.store/games/img/level_72_4.jpg' ], letters: [ 'I', 'T', 'A', 'L', 'I', 'A', 'N', 'M', 'A', 'I', 'L', 'P' ] }, { answer: 'صلوات', hint: 'SU CHEEZ YE MARD NA HATH KAPWA SI BACHAYU?', images: [ 'https://zahabapps.store/games/img/level_73_1.jpg', 'https://zahabapps.store/games/img/level_73_2.jpg', 'https://zahabapps.store/games/img/level_73_3.jpg', 'https://zahabapps.store/games/img/level_73_4.jpg' ], letters: [ 'ص', 'ل', 'و', 'ا', 'ت', 'ي', 'ح', 'ب', 'م', 'ه', 'س', 'ج' ] }, { answer: 'انذار خاص', hint: 'KAI RIVAYAT CHE? RASULLAH SAW NE SU FARMAN THAYA?', images: [ 'https://zahabapps.store/games/img/level_74_1.jpg', 'https://zahabapps.store/games/img/level_74_2.jpg', 'https://zahabapps.store/games/img/level_74_3.jpg', 'https://zahabapps.store/games/img/level_74_4.jpg' ], letters: [ 'ا', 'ن', 'ذ', 'ا', 'ر', 'خ', 'ا', 'ص', 'ب', 'ت', 'م', 'ل' ] }, { answer: 'MADAGASCAR', hint: 'KAYA SHEHR MA SU MOJIZO THAYU?', images: [ 'https://zahabapps.store/games/img/level_75_1.jpg', 'https://zahabapps.store/games/img/level_75_2.jpg', 'https://zahabapps.store/games/img/level_75_3.jpg', 'https://zahabapps.store/games/img/level_75_4.jpg' ], letters: [ 'M', 'A', 'D', 'A', 'G', 'A', 'S', 'C', 'A', 'R', 'L', 'T' ] }, { answer: 'ملا واحد', hint: 'KAYA SAHEB NI ZU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_76_1.jpg', 'https://zahabapps.store/games/img/level_76_2.jpg', 'https://zahabapps.store/games/img/level_76_3.jpg', 'https://zahabapps.store/games/img/level_76_4.jpg' ], letters: [ 'م', 'ل', 'ا', 'و', 'ا', 'ح', 'د', 'ب', 'ت', 'ه', 'س', 'ا' ] }, { answer: 'سيف البحر', hint: 'KAYA JUNG NI SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_77_1.jpg', 'https://zahabapps.store/games/img/level_77_2.jpg', 'https://zahabapps.store/games/img/level_77_3.jpg', 'https://zahabapps.store/games/img/level_77_4.jpg' ], letters: [ 'س', 'ي', 'ف', 'ا', 'ل', 'ب', 'ح', 'ر', 'ت', 'م', 'ه', 'ا' ] }, { answer: 'ذمرمر', hint: 'KAYA IMAM NI SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_78_1.jpg', 'https://zahabapps.store/games/img/level_78_2.jpg', 'https://zahabapps.store/games/img/level_78_3.jpg', 'https://zahabapps.store/games/img/level_78_4.jpg' ], letters: [ 'ذ', 'م', 'ر', 'م', 'ر', 'ا', 'ل', 'خ', 'ب', 'ت', 'ه', 'س' ] }, { answer: 'يوسف', hint: 'KAYA NABI SABAQ LETA TO WARAMWAAR DOHRWATA? SUKAM AAM MISAL KARTA?', images: [ 'https://zahabapps.store/games/img/level_79_1.jpg', 'https://zahabapps.store/games/img/level_79_2.jpg', 'https://zahabapps.store/games/img/level_79_3.jpg', 'https://zahabapps.store/games/img/level_79_4.jpg' ], letters: [ 'ي', 'و', 'س', 'ف', 'ا', 'ل', 'خ', 'ب', 'ت', 'م', 'ه', 'ج' ] }, { answer: 'نجم الدين', hint: 'KAYA DAI NA WASTE EK JYOTISH NE PESHINOGOI KIDI? ANE SU KIDI?', images: [ 'https://zahabapps.store/games/img/level_80_1.jpg', 'https://zahabapps.store/games/img/level_80_2.jpg', 'https://zahabapps.store/games/img/level_80_3.jpg', 'https://zahabapps.store/games/img/level_80_4.jpg' ], letters: [ 'ن', 'ج', 'م', 'ا', 'ل', 'د', 'ي', 'ن', 'ت', 'خ', 'ه', 'ب' ] }, { answer: 'نجم الدين', hint: 'KAYA DAI NI SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_81_1.jpg', 'https://zahabapps.store/games/img/level_81_2.jpg', 'https://zahabapps.store/games/img/level_81_3.jpg', 'https://zahabapps.store/games/img/level_81_4.jpg' ], letters: [ 'ن', 'ج', 'م', 'ا', 'ل', 'د', 'ي', 'ن', 'ب', 'ت', 'خ', 'ه' ] }, { answer: 'بنو ثعلبة', hint: 'KAYA QABILA NI SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_82_1.jpg', 'https://zahabapps.store/games/img/level_82_2.jpg', 'https://zahabapps.store/games/img/level_82_3.jpg', 'https://zahabapps.store/games/img/level_82_4.jpg' ], letters: [ 'ب', 'ن', 'و', 'ث', 'ع', 'ل', 'ب', 'ة', 'ا', 'خ', 'ت', 'م' ] }, { answer: 'ميثاق', hint: '1347H MA SU THAYU? SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_83_1.jpg', 'https://zahabapps.store/games/img/level_83_2.jpg', 'https://zahabapps.store/games/img/level_83_3.jpg', 'https://zahabapps.store/games/img/level_83_4.jpg' ], letters: [ 'م', 'ي', 'ث', 'ا', 'ق', 'ل', 'خ', 'ب', 'ت', 'ه', 'س', 'ج' ] }, { answer: 'مهدي', hint: 'KAYA IMAM AS NI SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_84_1.jpg', 'https://zahabapps.store/games/img/level_84_2.jpg', 'https://zahabapps.store/games/img/level_84_3.jpg', 'https://zahabapps.store/games/img/level_84_4.jpg' ], letters: [ 'م', 'ه', 'د', 'ي', 'ا', 'ل', 'خ', 'ب', 'ت', 'س', 'ج', 'ف' ] }, { answer: 'معز امام', hint: 'KAYA IMAM AS NI SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_85_1.jpg', 'https://zahabapps.store/games/img/level_85_2.jpg', 'https://zahabapps.store/games/img/level_85_3.jpg', 'https://zahabapps.store/games/img/level_85_4.jpg' ], letters: [ 'م', 'ع', 'ز', 'ا', 'م', 'ا', 'م', 'ل', 'خ', 'ب', 'ت', 'ه' ] }, { answer: 'حوالچي', hint: 'KONA HASTAK KAYA DAI RA KAAMO SOPTA HATA?', images: [ 'https://zahabapps.store/games/img/level_86_1.jpg', 'https://zahabapps.store/games/img/level_86_2.jpg', 'https://zahabapps.store/games/img/level_86_3.jpg', 'https://zahabapps.store/games/img/level_86_4.jpg' ], letters: [ 'ح', 'و', 'ا', 'ل', 'چ', 'ي', 'ا', 'ب', 'ت', 'م', 'ه', 'س' ] }, { answer: 'امام حسن', hint: 'KAYA IMAM AS NI SU ZIKR CHE? HEIGHT OF?', images: [ 'https://zahabapps.store/games/img/level_87_1.jpg', 'https://zahabapps.store/games/img/level_87_2.jpg', 'https://zahabapps.store/games/img/level_87_3.jpg', 'https://zahabapps.store/games/img/level_87_4.jpg' ], letters: [ 'ا', 'م', 'ا', 'م', 'ح', 'س', 'ن', 'ا', 'ت', 'ل', 'ه', 'ف' ] }, { answer: 'صراط', hint: 'SU CHEEZ ANE EHNA WASF MA SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_88_1.jpg', 'https://zahabapps.store/games/img/level_88_2.jpg', 'https://zahabapps.store/games/img/level_88_3.jpg', 'https://zahabapps.store/games/img/level_88_4.jpg' ], letters: [ 'ص', 'ر', 'ا', 'ط', 'ي', 'ل', 'خ', 'ب', 'ت', 'م', 'ه', 'س' ] }, { answer: 'عبد القادر', hint: 'KAYA DAI RA YE AA AWQAAT MA BISMILLAH KEHWANU FARMAYU?', images: [ 'https://zahabapps.store/games/img/level_89_1.jpg', 'https://zahabapps.store/games/img/level_89_2.jpg', 'https://zahabapps.store/games/img/level_89_3.jpg', 'https://zahabapps.store/games/img/level_89_4.jpg' ], letters: [ 'ع', 'ب', 'د', 'ا', 'ل', 'ق', 'ا', 'د', 'ر', 'ه', 'ي', 'س' ] }, { answer: 'سيدهو', hint: 'AMEER YE SU ADAA KIDU? GRAPH SU CHE? SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_90_1.jpg', 'https://zahabapps.store/games/img/level_90_2.jpg', 'https://zahabapps.store/games/img/level_90_3.jpg', 'https://zahabapps.store/games/img/level_90_4.jpg' ], letters: [ 'س', 'ي', 'د', 'ه', 'و', 'ا', 'ل', 'خ', 'ب', 'ت', 'م', 'ج' ] }, { answer: 'منعم', hint: 'KONI QADR KARWANU FARMAYU?', images: [ 'https://zahabapps.store/games/img/level_91_1.jpg', 'https://zahabapps.store/games/img/level_91_2.jpg', 'https://zahabapps.store/games/img/level_91_3.jpg', 'https://zahabapps.store/games/img/level_91_4.jpg' ], letters: [ 'م', 'ن', 'ع', 'م', 'ي', 'ل', 'س', 'ب', 'ت', 'ا', 'ف', 'ج' ] }, { answer: 'صدقة', hint: 'IMAM AS YE SU SIKHAMAN AAPI HATI? SALAMATI KEM KHARIDWU?', images: [ 'https://zahabapps.store/games/img/level_92_1.jpg', 'https://zahabapps.store/games/img/level_92_2.jpg', 'https://zahabapps.store/games/img/level_92_3.jpg', 'https://zahabapps.store/games/img/level_92_4.jpg' ], letters: [ 'ص', 'د', 'ق', 'ة', 'س', 'ل', 'ا', 'م', 'ت', 'ي', 'و', 'ه' ] }, { answer: '49', hint: 'KITNA MA DAI RA NI SU ZIKR CHE? KONE KONE SADAQA APAI?', images: [ 'https://zahabapps.store/games/img/level_93_1.jpg', 'https://zahabapps.store/games/img/level_93_2.jpg', 'https://zahabapps.store/games/img/level_93_3.jpg', 'https://zahabapps.store/games/img/level_93_4.jpg' ], letters: [ '4', '9', '1', '2', '3', '5', '6', '7', '8', '0', 'A', 'B' ] }, { answer: 'قيصر', hint: 'KAYA BADSHAH YE NABI NA KAGAZ NO JAWAB AAPO TO MUSIBAT NA UTRI', images: [ 'https://zahabapps.store/games/img/level_94_1.jpg', 'https://zahabapps.store/games/img/level_94_2.jpg', 'https://zahabapps.store/games/img/level_94_3.jpg', 'https://zahabapps.store/games/img/level_94_4.jpg' ], letters: [ 'ق', 'ي', 'ص', 'ر', 'ر', 'ل', 'ك', 'ج', 'خ', 'د', 'ا', 'ه' ] }, { answer: 'اختبار', hint: 'KONA HASTAK KAYA DAI RA KAAMO SOPTA HATA?', images: [ 'https://zahabapps.store/games/img/level_95_1.jpg', 'https://zahabapps.store/games/img/level_95_2.jpg', 'https://zahabapps.store/games/img/level_95_3.jpg', 'https://zahabapps.store/games/img/level_95_4.jpg' ], letters: [ 'ا', 'خ', 'ت', 'ب', 'ا', 'ر', 'ي', 'ب', 'س', 'ش', 'ص', 'ض' ] }, { answer: 'وياج', hint: 'YE MUMIN BHAI SU CHEEZ SI PAAK THAYA? SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_96_1.jpg', 'https://zahabapps.store/games/img/level_96_2.jpg', 'https://zahabapps.store/games/img/level_96_3.jpg', 'https://zahabapps.store/games/img/level_96_4.jpg' ], letters: [ 'و', 'ي', 'ا', 'ج', 'ج', 'س', 'ل', 'خ', 'م', 'ن', 'ه', 'ب' ] }, { answer: 'سلمان', hint: 'KAYA SAHEB NI SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_97_1.jpg', 'https://zahabapps.store/games/img/level_97_2.jpg', 'https://zahabapps.store/games/img/level_97_3.jpg', 'https://zahabapps.store/games/img/level_97_4.jpg' ], letters: [ 'س', 'ل', 'م', 'ا', 'ن', 'ع', 'ي', 'ب', 'ت', 'ث', 'ج', 'خ' ] }, { answer: 'خيشوان', hint: 'KAYA BADSHAH NA WAZIR NI SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_98_1.jpg', 'https://zahabapps.store/games/img/level_98_2.jpg', 'https://zahabapps.store/games/img/level_98_3.jpg', 'https://zahabapps.store/games/img/level_98_4.jpg' ], letters: [ 'خ', 'ي', 'ش', 'و', 'ا', 'ن', 'ب', 'ت', 'ص', 'ر', 'ل', 'م' ] }, { answer: 'خمر', hint: 'KAI KHABEES CHEEZ NI SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_99_1.jpg', 'https://zahabapps.store/games/img/level_99_2.jpg', 'https://zahabapps.store/games/img/level_99_3.jpg', 'https://zahabapps.store/games/img/level_99_4.jpg' ], letters: [ 'خ', 'م', 'ر', 'خ', 'ا', 'د', 'ج', 'س', 'ش', 'ص', 'ض', 'ت' ] }, { answer: 'سلمان', hint: 'KAYA SAHEB KONA TARAF SI LAI NE AAYA?', images: [ 'https://zahabapps.store/games/img/level_100_1.jpg', 'https://zahabapps.store/games/img/level_100_2.jpg', 'https://zahabapps.store/games/img/level_100_3.jpg', 'https://zahabapps.store/games/img/level_100_4.jpg' ], letters: [ 'س', 'ل', 'م', 'ا', 'ن', 'ف', 'ا', 'ر', 'ش', 'ي', 'ب', 'ت' ] }, { answer: 'حرة الملكة', hint: 'KAYA MAWLAT NI SU ZIKR CHE?', images: [ 'https://zahabapps.store/games/img/level_101_1.jpg', 'https://zahabapps.store/games/img/level_101_2.jpg', 'https://zahabapps.store/games/img/level_101_3.jpg', 'https://zahabapps.store/games/img/level_101_4.jpg' ], letters: [ 'ح', 'ر', 'ة', 'ا', 'ل', 'م', 'ل', 'ك', 'ة', 'ي', 'ن', 'ش' ] }, { answer: 'KODAICANAL', hint: 'KAI JAGAH NO SU MOJIZO CHE?', images: [ 'https://zahabapps.store/games/img/level_102_1.jpg', 'https://zahabapps.store/games/img/level_102_2.jpg', 'https://zahabapps.store/games/img/level_102_3.jpg', 'https://zahabapps.store/games/img/level_102_4.jpg' ], letters: [ 'K', 'O', 'D', 'A', 'I', 'C', 'A', 'N', 'A', 'L', 'M', 'S' ] }, { answer: 'پل', hint: 'MAZDOOR YE SU BANAYU?', images: [ 'https://zahabapps.store/games/img/level_103_1.jpg', 'https://zahabapps.store/games/img/level_103_2.jpg', 'https://zahabapps.store/games/img/level_103_3.jpg', 'https://zahabapps.store/games/img/level_103_4.jpg' ], letters: [ 'پ', 'ل', 'ا', 'ب', 'ت', 'ح', 'ج', 'م', 'ن', 'و', 'ي', 'ص' ] } ].map(level => ({ ...level, answer: level.answer.normalize("NFC"), letters: shuffleArray(level.letters.map(l => l.normalize("NFC"))) })); const LEVELS: GameLevel[] = definedLevels.map((level, index) => ({ ...level, id: index + 1, })); const TOTAL_LEVEL_COUNT = LEVELS.length; const ACHIEVEMENTS: Achievement[] = [ { id: 'talib', name: 'Talib', description: 'Complete your first level.', check: (stats: PlayerStats) => stats.completedLevelIds.length >= 1, icon: '👣' }, { id: 'mujtahid', name: 'Mujtahid', description: 'Complete 5 levels.', check: (stats: PlayerStats) => stats.completedLevelIds.length >= 5, icon: '📜' }, { id: 'samajhnaar', name: 'Samajhnaar', description: 'Complete 15 levels.', check: (stats: PlayerStats) => stats.completedLevelIds.length >= 15, icon: '💡' }, { id: 'aalim', name: 'Aalim', description: 'Complete 25 levels.', check: (stats: PlayerStats) => stats.completedLevelIds.length >= 25, icon: '📖' }, { id: 'aarif', name: 'Aarif', description: 'Complete 53 levels.', check: (stats: PlayerStats) => stats.completedLevelIds.length >= 53, icon: '✒️' }, { id: 'mahir', name: 'Mahir', description: 'Complete 72 levels.', check: (stats: PlayerStats) => stats.completedLevelIds.length >= 72, icon: '🧠' }, { id: 'ustaad', name: 'Ustaad', description: 'Complete all 103 levels.', check: (stats: PlayerStats) => stats.completedLevelIds.length >= TOTAL_LEVEL_COUNT, icon: '🏆' }, ]; // From audio.ts let audioContext: AudioContext | null = null; let isAudioUnlocked = false; const unlockAudio = () => { if (isAudioUnlocked || typeof window === 'undefined') return; if (!audioContext) { try { audioContext = new (window.AudioContext || (window as any).webkitAudioContext)(); } catch (e) { console.error("Could not create AudioContext:", e); return; } } if (audioContext.state === 'suspended') { audioContext.resume().then(() => { isAudioUnlocked = true; }).catch(e => {}); } else { isAudioUnlocked = true; } } type SoundType = 'click' | 'place' | 'remove' | 'incorrect' | 'correct' | 'hint' | 'achievement'; const triggerHapticFeedback = (pattern: number | number[]) => { if (typeof window !== 'undefined' && window.navigator && 'vibrate' in window.navigator) { try { window.navigator.vibrate(pattern); } catch (e) { console.warn("Haptic feedback failed:", e); } } }; const hapticPatterns: { [key in SoundType]: number | number[] } = { click: 5, place: 10, remove: 5, incorrect: [10, 50, 10], correct: [100], hint: 20, achievement: [50, 50, 100] }; const playNote = (frequency: number, type: OscillatorType, duration: number, volume: number = 0.2) => { if (!audioContext || !isAudioUnlocked) return; const context = audioContext; const oscillator = context.createOscillator(); const gainNode = context.createGain(); oscillator.connect(gainNode); gainNode.connect(context.destination); oscillator.type = type; oscillator.frequency.setValueAtTime(frequency, context.currentTime); gainNode.gain.setValueAtTime(volume, context.currentTime); oscillator.start(context.currentTime); oscillator.stop(context.currentTime + duration); } const sounds: { [key in SoundType]: () => void } = { click: () => playNote(440, 'sine', 0.05, 0.2), place: () => playNote(660, 'sine', 0.05, 0.2), remove: () => playNote(330, 'sine', 0.05, 0.2), hint: () => { if (!audioContext || !isAudioUnlocked) return; const context = audioContext; const oscillator = context.createOscillator(); const gainNode = context.createGain(); oscillator.connect(gainNode); gainNode.connect(context.destination); oscillator.type = 'sine'; oscillator.frequency.setValueAtTime(880, context.currentTime); gainNode.gain.setValueAtTime(0.2, context.currentTime); gainNode.gain.exponentialRampToValueAtTime(0.0001, context.currentTime + 0.2); oscillator.start(context.currentTime); oscillator.stop(context.currentTime + 0.2); }, incorrect: () => { if (!audioContext || !isAudioUnlocked) return; playNote(392.00, 'sine', 0.1, 0.25); // G4 setTimeout(() => playNote(329.63, 'sine', 0.15, 0.25), 120); // E4 }, correct: () => { if (!audioContext || !isAudioUnlocked) return; playNote(523.25, 'sine', 0.08, 0.3); // C5 setTimeout(() => playNote(659.25, 'sine', 0.08, 0.3), 100); // E5 setTimeout(() => playNote(783.99, 'sine', 0.08, 0.3), 200); // G5 setTimeout(() => playNote(1046.50, 'triangle', 0.12, 0.3), 300); // C6 (sparkle) }, achievement: () => { if (!audioContext || !isAudioUnlocked) return; playNote(523.25, 'triangle', 0.1, 0.25); // C5 setTimeout(() => playNote(783.99, 'triangle', 0.1, 0.25), 100); // G5 setTimeout(() => playNote(1046.50, 'triangle', 0.2, 0.25), 200); // C6 }, }; const playSound = (sound: SoundType) => { unlockAudio(); if (sounds[sound]) { sounds[sound](); } if (hapticPatterns[sound]) { triggerHapticFeedback(hapticPatterns[sound]); } }; // From hooks/usePlayerStats.ts const usePlayerStats = () => { const [stats, setStats] = useState(() => { try { const savedStats = localStorage.getItem(PLAYER_STATS_KEY); if (savedStats) { const parsed = JSON.parse(savedStats); return { completedLevelIds: [], totalHintsUsed: 0, totalAnswersRevealed: 0, achievements: [], totalPlayTimeSeconds: 0, achievementUnlockTimes: {}, hasUnlockedFullGame: false, levelsCompletedWithFullStars: 0, ...parsed, }; } } catch (error) { console.error('Error loading player stats:', error); } return { completedLevelIds: [], totalHintsUsed: 0, totalAnswersRevealed: 0, achievements: [], totalPlayTimeSeconds: 0, achievementUnlockTimes: {}, hasUnlockedFullGame: false, levelsCompletedWithFullStars: 0, }; }); const [newlyUnlocked, setNewlyUnlocked] = useState([]); useEffect(() => { try { localStorage.setItem(PLAYER_STATS_KEY, JSON.stringify(stats)); } catch (error) { console.error('Error saving player stats:', error); } }, [stats]); const checkForNewAchievements = useCallback((currentStats: PlayerStats) => { const newAchievements: Achievement[] = []; ACHIEVEMENTS.forEach(achievement => { const isAlreadyUnlocked = currentStats.achievements.includes(achievement.id); if (!isAlreadyUnlocked && achievement.check(currentStats)) { newAchievements.push(achievement); } }); if (newAchievements.length > 0) { const newAchievementUnlockTimes = { ...currentStats.achievementUnlockTimes }; newAchievements.forEach(a => { newAchievementUnlockTimes[a.id] = currentStats.totalPlayTimeSeconds || 0; }); setStats(prevStats => ({ ...prevStats, achievements: [...prevStats.achievements, ...newAchievements.map(a => a.id)], achievementUnlockTimes: newAchievementUnlockTimes, })); setNewlyUnlocked(newAchievements); } }, []); const completeLevel = useCallback((levelId: number, livesRemaining: number, isFirstAttempt: boolean) => { setStats(prevStats => { if (prevStats.completedLevelIds.includes(levelId)) { return prevStats; } const isPerfect = isFirstAttempt && livesRemaining === 3; const newStats = { ...prevStats, completedLevelIds: [...prevStats.completedLevelIds, levelId].sort((a, b) => a - b), levelsCompletedWithFullStars: isPerfect ? (prevStats.levelsCompletedWithFullStars || 0) + 1 : (prevStats.levelsCompletedWithFullStars || 0), }; checkForNewAchievements(newStats); return newStats; }); }, [checkForNewAchievements]); const useHint = useCallback(() => { setStats(prevStats => { const newStats = { ...prevStats, totalHintsUsed: prevStats.totalHintsUsed + 1 }; checkForNewAchievements(newStats); return newStats; }); }, [checkForNewAchievements]); const useAnswerReveal = useCallback(() => { setStats(prevStats => ({ ...prevStats, totalAnswersRevealed: (prevStats.totalAnswersRevealed || 0) + 1, })); }, []); const clearNewlyUnlocked = useCallback(() => { setNewlyUnlocked([]); }, []); const addPlayTime = useCallback((seconds: number) => { setStats(prevStats => ({ ...prevStats, totalPlayTimeSeconds: (prevStats.totalPlayTimeSeconds || 0) + seconds, })); }, []); const unlockFullGame = useCallback(() => { setStats(prevStats => ({ ...prevStats, hasUnlockedFullGame: true, })); }, []); return { stats, completeLevel, useHint, useAnswerReveal, newlyUnlocked, clearNewlyUnlocked, addPlayTime, unlockFullGame }; }; // From utils/imagePreloader.ts const preloadImages = (urls: string[]): Promise => { const promises = urls.map(src => { return new Promise((resolve, reject) => { const img = new Image(); img.src = src; img.onload = () => resolve(); img.onerror = () => resolve(); }); }); return Promise.all(promises); }; // From utils/time.ts const formatSecondsToTime = (totalSeconds: number): string => { const hours = Math.floor(totalSeconds / 3600); const minutes = Math.floor((totalSeconds % 3600) / 60); const seconds = totalSeconds % 60; let timeString = ""; if (hours > 0) timeString += `${hours}h `; if (minutes > 0 || hours > 0) timeString += `${minutes}m `; timeString += `${seconds}s`; return timeString.trim() || "0s"; }; // From components/ui/icons.tsx const LockIcon = () => ( ); const ProfileIcon = () => ( ); const RefreshIcon = () => ( ); const ShareIcon = () => ( ); const StarIcon: React.FC<{ filled?: boolean }> = ({ filled = true }) => ( ); // From hooks/useFullScreen.ts const useFullScreen = () => { const [isFullScreen, setIsFullScreen] = useState(() => { if (typeof document === 'undefined') return false; return !!document.fullscreenElement; }); const toggleFullScreen = useCallback(() => { if (typeof document === 'undefined') return; if (!document.fullscreenElement) { document.documentElement.requestFullscreen().catch((err) => { console.error(`Error attempting to enable full-screen mode: ${err.message} (${err.name})`); }); } else { if (document.exitFullscreen) { document.exitFullscreen(); } } }, []); useEffect(() => { if (typeof document === 'undefined') return; const handleFullScreenChange = () => { setIsFullScreen(!!document.fullscreenElement); }; document.addEventListener('fullscreenchange', handleFullScreenChange); return () => { document.removeEventListener('fullscreenchange', handleFullScreenChange); }; }, []); return { isFullScreen, toggleFullScreen }; }; // From components/ui/FullScreenToggle.tsx const FullScreenToggle: React.FC = () => { const { isFullScreen, toggleFullScreen } = useFullScreen(); const handleToggle = () => { playSound('click'); toggleFullScreen(); }; return ( ); }; // From components/LevelSelect.tsx const LevelSelect: React.FC<{ levels: GameLevel[]; onSelectLevel: (level: GameLevel) => void; playerStats: PlayerStats; onShowProfile: () => void; }> = ({ levels, onSelectLevel, playerStats, onShowProfile }) => { const [currentPage, setCurrentPage] = React.useState(0); const levelsPerPage = 24; const pageCount = Math.ceil(levels.length / levelsPerPage); const highestUnlockedLevel = playerStats.completedLevelIds.length + 1; const handleNextPage = () => { playSound('click'); setCurrentPage(prev => Math.min(prev + 1, pageCount - 1)); }; const handlePrevPage = () => { playSound('click'); setCurrentPage(prev => Math.max(prev - 1, 0)); }; const handleRefresh = () => { playSound('click'); window.location.reload(); }; const startIndex = currentPage * levelsPerPage; const currentLevels = levels.slice(startIndex, startIndex + levelsPerPage); const totalPlayableLevels = levels.filter(l => l.answer !== "قادم").length; const completionPercentage = Math.round((playerStats.completedLevelIds.length / totalPlayableLevels) * 100); return (

Select a Level

playSound('click')} >

New Activity: Maqamaat Muqaddasah!

A new tile-removing guess activity. Check it out!

Play Now
Activity Progress {completionPercentage}%
{currentLevels.map((level) => { const isBeyondPaywall = level.id > 25 && !playerStats.hasUnlockedFullGame; const isLockedByProgress = level.id > highestUnlockedLevel && level.id !== 1; const isLocked = isLockedByProgress || isBeyondPaywall; const isCompleted = playerStats.completedLevelIds.includes(level.id); let buttonClass = 'bg-[#C85A48] text-white shadow-lg border-b-4 border-red-800 hover:bg-red-700 active:scale-95'; if (isLocked) { buttonClass = 'bg-[#EFE5D8] cursor-not-allowed'; } else if (isCompleted) { buttonClass = 'bg-green-700 text-white shadow-lg border-b-4 border-green-900 hover:bg-green-800 active:scale-95'; } return ( ); })}
{pageCount > 1 && (
Page {currentPage + 1} of {pageCount}
)}
); }; // From components/modals/ModalBase.tsx const ModalBase: React.FC<{ isOpen: boolean; onClose: () => void; children: React.ReactNode; ariaLabel: string; }> = ({ isOpen, onClose, children, ariaLabel }) => { if (!isOpen) return null; return (
e.stopPropagation()}> {children}
); }; // From components/modals/ConfirmationModal.tsx const ConfirmationModal: React.FC<{ isOpen: boolean; onClose: () => void; onConfirm: () => void; title: string; message: string; }> = ({ isOpen, onClose, onConfirm, title, message }) => { return (

{title}

{message}

); }; // From components/ui/StatCard.tsx const StatCard: React.FC<{ label: string; value: number | string }> = ({ label, value }) => (

{value}

{label}

); // From components/ProfileScreen.tsx const ProfileScreen: React.FC<{ stats: PlayerStats; onClose: () => void; }> = ({ stats, onClose }) => { const [sharingId, setSharingId] = useState(null); const [isResetModalOpen, setIsResetModalOpen] = useState(false); const handleShareAchievement = async (achievement: Achievement) => { playSound('click'); if (sharingId) return; setSharingId(achievement.id); const solvedCount = stats.completedLevelIds.length; const timeString = formatSecondsToTime(stats.totalPlayTimeSeconds || 0); const link = window.location.href; const message = `I unlocked the "${achievement.name}"\nI have solved ${solvedCount} Rivayaat in ${timeString}. Join me in this challenge ${link}`; try { if (navigator.share) { await navigator.share({ title: '4 Picture 1 Rivayat Achievement!', text: message }); } else if (navigator.clipboard) { await navigator.clipboard.writeText(message); alert('Achievement message copied to clipboard!'); } else { alert("Sharing is not supported, but you're awesome!"); } } catch (error) { console.error('Sharing failed:', error); } finally { setSharingId(null); } }; const formattedPlayTime = () => { return formatSecondsToTime(stats.totalPlayTimeSeconds || 0); }; const handleResetProgress = () => { localStorage.removeItem(PLAYER_STATS_KEY); localStorage.removeItem(GAME_STATE_KEY); window.location.reload(); }; return (

My Profile

Statistics

Achievements

    {ACHIEVEMENTS.map(achievement => { const isUnlocked = stats.achievements.includes(achievement.id); const unlockMetric = stats.achievementUnlockTimes?.[achievement.id]; return (
  • {achievement.icon}

    {achievement.name}

    {achievement.description}

    {isUnlocked && unlockMetric !== undefined && (

    {unlockMetric > 1000000000000 ? `Unlocked on ${new Date(unlockMetric).toLocaleDateString()}` : `Unlocked at: ${formatSecondsToTime(unlockMetric)}` }

    )}
    {isUnlocked && ( )}
  • ); })}
setIsResetModalOpen(false)} onConfirm={handleResetProgress} title="Reset Progress?" message="Are you sure you want to reset all your progress? This action cannot be undone." />
); }; // From components/ui/ImageWithLoader.tsx const imageCache = new Set(); const ImageWithLoader: React.FC<{ src: string; alt: string; onClick: () => void; ariaLabel: string; }> = ({ src, alt, onClick, ariaLabel }) => { const [isLoaded, setIsLoaded] = useState(imageCache.has(src)); useEffect(() => { if (imageCache.has(src)) { setIsLoaded(true); return; } let isMounted = true; const img = new Image(); img.src = src; img.onload = () => { if (isMounted) { setIsLoaded(true); imageCache.add(src); } }; return () => { isMounted = false; }; }, [src]); return ( ); }; // From components/ImageGrid.tsx const ImageGrid: React.FC<{ images: string[], onImageClick: (url: string) => void }> = ({ images, onImageClick }) => (
{images.map((src, index) => ( onImageClick(src)} ariaLabel={`Zoom hint image ${index + 1}`} /> ))}
); // From components/modals/CorrectAnswerModal.tsx const CorrectAnswerModal: React.FC<{ isOpen: boolean; level: GameLevel; onContinue: () => void; }> = ({ isOpen, level, onContinue }) => { if (!isOpen) return null; const answerLength = level.answer.length; let answerFontSize = 'text-4xl'; if (answerLength > 22) { answerFontSize = 'text-xl'; } else if (answerLength > 18) { answerFontSize = 'text-2xl'; } else if (answerLength > 14) { answerFontSize = 'text-3xl'; } const isRTL = /[\u0600-\u06FF]/.test(level.answer); return (

Well Done!

{}} />
{level.answer.split(' ').map((word, wordIndex) => { if (word === '') return null; const animationDelay = `${wordIndex * 0.15}s`; return ( {word} ); })}
); }; // From components/modals/HintModal.tsx const HintModal: React.FC<{ isOpen: boolean; onClose: () => void; hintText: string; }> = ({ isOpen, onClose, hintText }) => ( { playSound('click'); onClose(); }} ariaLabel="Game Hint">

Hint

{hintText}

); // From components/modals/ImageZoomModal.tsx const ImageZoomModal: React.FC<{ isOpen: boolean; imageUrl: string | null; onClose: () => void; }> = ({ isOpen, imageUrl, onClose }) => { if (!isOpen || !imageUrl) return null; return (
{ playSound('click'); onClose(); }} role="dialog" aria-modal="true" aria-label="Zoomed Image">
e.stopPropagation()}> Zoomed hint
); }; // From components/GameBoard.tsx const RevealAnswerModal: React.FC<{ isOpen: boolean; onClose: () => void; onShare: () => void; shareCount: number; }> = ({ isOpen, onClose, onShare, shareCount }) => { if (!isOpen) return null; return (

Reveal Answer

To instantly solve this level, please share the activity with 3 friends on WhatsApp.

Progress: {shareCount} / 3 Shares

); }; const GameOverModal: React.FC<{ isOpen: boolean; onTryAgain: () => void; }> = ({ isOpen, onTryAgain }) => { return ( {}} ariaLabel="Game Over">

Out of Lives!

Don't worry, you can try again.

); } const GameBoard: React.FC<{ level: GameLevel, onLevelComplete: (livesRemaining: number, isFirstAttempt: boolean) => void, onHintUsed: () => void, onAnswerRevealed: () => void }> = ({ level, onLevelComplete, onHintUsed, onAnswerRevealed }) => { const answerForLogic = useMemo(() => level.answer.replace(/\s/g, '').replace(/[\u064B-\u0652\u0670]/g, ''), [level.answer]); const uniqueAnswerLetters = useMemo(() => new Set(answerForLogic.split('')), [answerForLogic]); const [lives, setLives] = useState(3); const [guessedLetters, setGuessedLetters] = useState>(new Set()); const [gameStatus, setGameStatus] = useState<'playing' | 'won' | 'lost'>('playing'); const [hasTriedAgain, setHasTriedAgain] = useState(false); const [showHintModal, setShowHintModal] = useState(false); const [zoomedImage, setZoomedImage] = useState(null); const [isSharing, setIsSharing] = useState(false); const [timeOnLevel, setTimeOnLevel] = useState(0); const [isRevealAnswerEnabled, setIsRevealAnswerEnabled] = useState(false); const [showRevealModal, setShowRevealModal] = useState(false); const [shareCountForReveal, setShareCountForReveal] = useState(0); const isRTL = /[\u0600-\u06FF]/.test(level.answer); useEffect(() => { const savedStateRaw = localStorage.getItem(GAME_STATE_KEY); if (savedStateRaw) { try { const savedState: SavedGameState = JSON.parse(savedStateRaw); if (savedState.levelId === level.id) { setLives(savedState.lives); setGuessedLetters(new Set(savedState.guessedLetters)); } } catch (e) { console.error("Failed to parse saved game state:", e); localStorage.removeItem(GAME_STATE_KEY); } } }, [level.id]); useEffect(() => { if (gameStatus === 'playing') { const stateToSave: SavedGameState = { levelId: level.id, lives, guessedLetters: Array.from(guessedLetters) }; localStorage.setItem(GAME_STATE_KEY, JSON.stringify(stateToSave)); } }, [lives, guessedLetters, level.id, gameStatus]); useEffect(() => { if (gameStatus !== 'playing') return; const allLettersGuessed = [...uniqueAnswerLetters].every(letter => guessedLetters.has(letter)); if (allLettersGuessed) { playSound('correct'); setGameStatus('won'); } else if (lives <= 0) { playSound('incorrect'); setGameStatus('lost'); } }, [guessedLetters, lives, gameStatus, uniqueAnswerLetters]); useEffect(() => { if (gameStatus !== 'playing') return; const interval = setInterval(() => { setTimeOnLevel(prevTime => { const newTime = prevTime + 1; if (newTime >= 120 && !isRevealAnswerEnabled) { setIsRevealAnswerEnabled(true); } return newTime; }); }, 1000); return () => clearInterval(interval); }, [gameStatus, isRevealAnswerEnabled]); useEffect(() => { if (shareCountForReveal >= 3) { setShowRevealModal(false); onAnswerRevealed(); setGameStatus('won'); } }, [shareCountForReveal, onAnswerRevealed]); const resetLevel = () => { playSound('click'); setLives(3); setGuessedLetters(new Set()); setGameStatus('playing'); setTimeOnLevel(0); setIsRevealAnswerEnabled(false); localStorage.removeItem(GAME_STATE_KEY); setHasTriedAgain(true); } const handleKeyboardClick = (letter: string) => { if (gameStatus !== 'playing' || guessedLetters.has(letter)) return; const newGuessedLetters = new Set(guessedLetters); newGuessedLetters.add(letter); setGuessedLetters(newGuessedLetters); if (uniqueAnswerLetters.has(letter)) { playSound('place'); } else { playSound('incorrect'); setLives(prev => prev - 1); } }; const handleHintClick = () => { if (gameStatus !== 'playing') return; playSound('hint'); onHintUsed(); setShowHintModal(true); }; const handleImageClick = (imageUrl: string) => { playSound('click'); setZoomedImage(imageUrl); }; const createShareText = () => `Mane aa rivayat solve karwama madad kari sako cho?\n\nHint: ${level.hint || 'No hint available'}\nLetters: ${level.letters.join(', ')}\nAnswer length: ${answerForLogic.length} letters\n\nAap bhi shamil thaiye aa activity ma: ${window.location.href}`; const handleAskFriend = async () => { if (isSharing) return; setIsSharing(true); playSound('click'); try { const shareText = createShareText(); if (navigator.share) await navigator.share({ title: 'Help me solve this Rivayat!', text: shareText }); else window.open(`https://wa.me/?text=${encodeURIComponent(shareText)}`, '_blank'); } catch (error) { if (error instanceof Error && error.name !== 'AbortError') alert("Could not share. Please try again."); } finally { setIsSharing(false); } }; const handleShareForReveal = () => { const shareUrl = window.location.href; const shareText = `Salam, 4 Picture 1 Rivayat ni activity zaroor try karjo. Ekdum maza aavse. aa link par jaiye ${shareUrl}`; const whatsappUrl = `https://wa.me/?text=${encodeURIComponent(shareText)}`; window.open(whatsappUrl, '_blank'); setShareCountForReveal(prev => prev + 1); }; const answerLength = answerForLogic.length; let boxSizeClass = 'w-10 h-10 text-xl'; if (answerLength > 16) boxSizeClass = 'w-7 h-7 text-base'; else if (answerLength > 12) boxSizeClass = 'w-8 h-8 text-lg'; const words = level.answer.split(' '); return (
onLevelComplete(lives, !hasTriedAgain)} /> setShowHintModal(false)} hintText={level.hint || "No hint available."} /> setZoomedImage(null)} /> { setShowRevealModal(false); setShareCountForReveal(0); }} onShare={handleShareForReveal} shareCount={shareCountForReveal} />
{[...Array(3)].map((_, i) => )}
{words.map((word, wordIndex) => { const sanitizedWord = word.replace(/[\u064B-\u0652\u0670]/g, ''); if (sanitizedWord.length === 0) return null; return (
{sanitizedWord.split('').map((char, letterInWordIndex) => { const isRevealed = guessedLetters.has(char); return (
{isRevealed && {char}}
); })}
); })}
{level.letters.map((letter, id) => { const isGuessed = guessedLetters.has(letter); const isCorrect = uniqueAnswerLetters.has(letter); let buttonClass = "bg-[#C85A48] border-red-800 hover:bg-red-700"; if (isGuessed) { buttonClass = isCorrect ? "bg-green-600 border-green-800" : "bg-red-600 border-red-800 opacity-70"; } return ( )})}
); }; // From components/modals/AchievementModal.tsx const AchievementModal: React.FC<{ achievement: Achievement; stats: PlayerStats; onDismiss: () => void; }> = ({ achievement, stats, onDismiss }) => { const [isSharing, setIsSharing] = useState(false); const handleShare = async () => { playSound('click'); if (isSharing) return; setIsSharing(true); const solvedCount = stats.completedLevelIds.length; const timeString = formatSecondsToTime(stats.totalPlayTimeSeconds || 0); const link = window.location.href; const message = `I unlocked the "${achievement.name}"\nI have solved ${solvedCount} Rivayaat in ${timeString}. Join me in this challenge ${link}`; try { if (navigator.share) { await navigator.share({ title: '4 Picture 1 Rivayat Achievement!', text: message }); } else if (navigator.clipboard) { await navigator.clipboard.writeText(message); alert('Achievement message copied to clipboard!'); } else { alert("Sharing is not supported on your device."); } } catch (error) { console.error("Failed to share achievement:", error); } finally { setIsSharing(false); } }; const handleContinue = () => { playSound('click'); onDismiss(); }; return (
{achievement.icon}

{achievement.name}

{achievement.description}

); }; // From components/MubarakMohannaScreen.tsx const MubarakMohannaScreen: React.FC<{ onBack: () => void; }> = ({ onBack }) => { return (

Mubarak Mohanna

Aap 25 Levels paar kari chuka cho

); }; // From components/AdsenseAd.tsx declare global { interface Window { adsbygoogle: any[]; } } const AdsenseAd: React.FC = () => { const adContainerRef = useRef(null); useEffect(() => { const adContainer = adContainerRef.current; if (!adContainer) return; adContainer.innerHTML = ''; const ins = document.createElement('ins'); ins.className = 'adsbygoogle'; ins.style.display = 'block'; ins.style.width = '100%'; ins.setAttribute('data-ad-client', 'ca-pub-1678247058695040'); ins.setAttribute('data-ad-slot', '9843279854'); ins.setAttribute('data-ad-format', 'auto'); ins.setAttribute('data-full-width-responsive', 'true'); adContainer.appendChild(ins); const observer = new ResizeObserver(entries => { if (entries[0].contentRect.width > 0) { try { (window.adsbygoogle = window.adsbygoogle || []).push({}); } catch (e) { console.error('Adsense error:', e); } observer.disconnect(); } }); observer.observe(adContainer); return () => { observer.disconnect(); }; }, []); return ( ); }; // From components/SplashScreen.tsx const FeatureCard: React.FC<{ icon: string; title: string; description: string }> = ({ icon, title, description }) => (
{icon}

{title}

{description}

); const SplashScreen: React.FC<{ onStart: () => void }> = ({ onStart }) => { return (

4 Picture 1 Rivayat

Chalo 103 Rivayat Seekhye

How to Play

  1. Look at the 4 pictures for clues.
  2. Guess the Rivayat (story) they represent.
  3. Use the letters below to spell the answer.

Features

); }; // From components/EndScreen.tsx const EndScreen: React.FC<{ stats: PlayerStats; onPlayAgain: () => void; }> = ({ stats, onPlayAgain }) => { const trophyAchievement = ACHIEVEMENTS.find(a => a.id === 'ustaad'); const handleShare = async () => { playSound('click'); const timeString = formatSecondsToTime(stats.totalPlayTimeSeconds || 0); const link = window.location.href; const message = `Alhamdullilah! I have completed all ${TOTAL_LEVEL_COUNT} levels in 4 Picture 1 Rivayat. My total play time was ${timeString}. You should play too! ${link}`; try { if (navigator.share) { await navigator.share({ title: '4 Picture 1 Rivayat Completed!', text: message }); } else { alert('Sharing not supported on this device.'); } } catch (error) { console.error('Failed to share:', error); } }; return (
{trophyAchievement ? trophyAchievement.icon : '🏆'}

Mubarak!

{`You have completed all ${TOTAL_LEVEL_COUNT} Rivayaat.`}

); }; // From App.tsx type Screen = 'splash' | 'level_select' | 'playing' | 'profile' | 'unlock' | 'end_screen'; const App: React.FC = () => { const [screen, setScreen] = useState('splash'); const [currentLevel, setCurrentLevel] = useState(null); const { stats, completeLevel, useHint, useAnswerReveal, newlyUnlocked, clearNewlyUnlocked, addPlayTime, unlockFullGame } = usePlayerStats(); const [achievementQueue, setAchievementQueue] = useState([]); const playTimeIntervalRef = useRef(null); useEffect(() => { const urlParams = new URLSearchParams(window.location.search); const shouldUnlock = urlParams.get('unlock') === 'true'; if (shouldUnlock && !stats.hasUnlockedFullGame) { unlockFullGame(); window.history.replaceState(null, '', window.location.pathname); } }, [stats.hasUnlockedFullGame, unlockFullGame]); const startPlayTimeTracking = useCallback(() => { if (playTimeIntervalRef.current) clearInterval(playTimeIntervalRef.current); playTimeIntervalRef.current = window.setInterval(() => { addPlayTime(1); }, 1000); }, [addPlayTime]); const stopPlayTimeTracking = useCallback(() => { if (playTimeIntervalRef.current) { clearInterval(playTimeIntervalRef.current); playTimeIntervalRef.current = null; } }, []); useEffect(() => { if (screen === 'playing' && currentLevel) { startPlayTimeTracking(); } else { stopPlayTimeTracking(); } return () => stopPlayTimeTracking(); }, [screen, currentLevel, startPlayTimeTracking, stopPlayTimeTracking]); useEffect(() => { if (currentLevel) { const nextLevel = LEVELS.find(l => l.id === currentLevel.id + 1); if (nextLevel && nextLevel.answer !== "قادم") { const isBeyondPaywall = nextLevel.id > 25 && !stats.hasUnlockedFullGame; const highestUnlockedLevel = stats.completedLevelIds.length + 2; if (!isBeyondPaywall && nextLevel.id < highestUnlockedLevel) { preloadImages(nextLevel.images).catch(err => { console.warn("Failed to preload next level images:", err); }); } } } }, [currentLevel, stats.completedLevelIds, stats.hasUnlockedFullGame]); useEffect(() => { if (newlyUnlocked.length > 0) { playSound('achievement'); setAchievementQueue(prev => [...prev, ...newlyUnlocked]); clearNewlyUnlocked(); } }, [newlyUnlocked, clearNewlyUnlocked]); useEffect(() => { if (screen === 'splash') { const savedStateRaw = localStorage.getItem(GAME_STATE_KEY); if (savedStateRaw) { try { const { levelId } = JSON.parse(savedStateRaw); const levelToLoad = LEVELS.find(l => l.id === levelId); const highestUnlockedLevel = stats.completedLevelIds.length + 1; const isPastPaywall = levelToLoad && levelToLoad.id > 25 && !stats.hasUnlockedFullGame; if (levelToLoad && levelToLoad.id <= highestUnlockedLevel && !isPastPaywall) { setCurrentLevel(levelToLoad); setScreen('playing'); } else { localStorage.removeItem(GAME_STATE_KEY); } } catch (e) { console.error("Failed to parse saved game state:", e); localStorage.removeItem(GAME_STATE_KEY); } } } }, [screen, stats.completedLevelIds.length, stats.hasUnlockedFullGame]); const handleLevelSelect = (level: GameLevel) => { playSound('click'); setCurrentLevel(level); setScreen('playing'); }; const handleBackToMenu = () => { playSound('click'); setCurrentLevel(null); setScreen('level_select'); localStorage.removeItem(GAME_STATE_KEY); }; const handleLevelComplete = (livesRemaining: number, isFirstAttempt: boolean) => { if (currentLevel) { completeLevel(currentLevel.id, livesRemaining, isFirstAttempt); localStorage.removeItem(GAME_STATE_KEY); if ((stats.completedLevelIds.length + 1) >= TOTAL_LEVEL_COUNT) { setScreen('end_screen'); return; } if (currentLevel.id === 25 && !stats.hasUnlockedFullGame) { setScreen('unlock'); return; } const nextLevel = LEVELS.find(level => level.id === currentLevel.id + 1); const highestUnlockedLevel = stats.completedLevelIds.length + 2; if (nextLevel && nextLevel.id <= highestUnlockedLevel && nextLevel.answer !== "قادم") { setCurrentLevel(nextLevel); } else { handleBackToMenu(); } } }; const handleAskUs = () => { playSound('click'); const phoneNumber = '917304017253'; const message = "Salam Jameel. Ek query che"; const whatsappUrl = `https://wa.me/${phoneNumber}?text=${encodeURIComponent(message)}`; window.open(whatsappUrl, '_blank'); }; const renderScreen = () => { switch(screen) { case 'splash': return setScreen('level_select')} />; case 'end_screen': return ; case 'unlock': return ; case 'profile': return setScreen('level_select')} />; case 'playing': return currentLevel ? (

Level {currentLevel.id}

) : null; case 'level_select': default: return ( setScreen('profile')} /> ); } } return (
{renderScreen()} {(screen === 'level_select' || screen === 'profile') && } {achievementQueue.length > 0 && ( setAchievementQueue(q => q.slice(1))} /> )}
); }; const root = ReactDOM.createRoot(document.getElementById('root')!); root.render();