āĻ¸ā§āϕ⧁āϞ āϏāϰāĻŦāϰāĻžāĻš āϤāĻžāϞāĻŋāĻ•āĻž

⧍ā§Ļ⧍ā§Ģ-⧍ā§Ļ⧍ā§Ŧ āĻ¸ā§āϕ⧁āϞ āĻŦāĻ›āϰ⧇āϰ āϜāĻ¨ā§āϝ āĻ—ā§āϰ⧇āĻĄ-āύāĻŋāĻ°ā§āĻĻāĻŋāĻˇā§āϟ āĻšā§‡āĻ•āϞāĻŋāĻ¸ā§āϟ, āĻŦāĻžāĻœā§‡āϟ āĻŸā§āĻ°ā§āϝāĻžāĻ•āĻŋāĻ‚ āĻāĻŦāĻ‚ āĻ…āĻ°ā§āĻĨ āϏāĻžāĻļā§āϰāϝāĻŧā§€ āϟāĻŋāĻĒāϏ āϏāĻš āϏāĻŽā§āĻĒā§‚āĻ°ā§āĻŖ āĻŦā§āϝāĻžāĻ•-āϟ⧁-āĻ¸ā§āϕ⧁āϞ āĻļāĻĒāĻŋāĻ‚ āĻ—āĻžāχāĻĄāĨ¤

📚 2025-2026 School Year Ready āĻšāĻžāϞāύāĻžāĻ—āĻžāĻĻāĻ•ā§ƒāϤ

āύāϤ⧁āύ āĻ¸ā§āϕ⧁āϞ āĻŦāĻ›āϰ⧇āϰ āϜāĻ¨ā§āϝ āĻšāĻžāϞāύāĻžāĻ—āĻžāĻĻāĻ•ā§ƒāϤ āĻŦāĻŋāĻ¸ā§āϤ⧃āϤ āϏāϰāĻŦāϰāĻžāĻš āϤāĻžāϞāĻŋāĻ•āĻž, āĻ—ā§āϰ⧇āĻĄ-āύāĻŋāĻ°ā§āĻĻāĻŋāĻˇā§āϟ āĻĒā§āϰāϝāĻŧā§‹āϜāύ⧀āϝāĻŧāϤāĻž, āĻŦāĻžāĻœā§‡āϟ-āĻŦāĻžāĻ¨ā§āϧāĻŦ āĻŦāĻŋāĻ•āĻ˛ā§āĻĒ āĻāĻŦāĻ‚ āĻ…āĻ°ā§āĻĨ āϏāĻžāĻļā§āϰāϝāĻŧā§€ āĻŦāĻŋāĻļ⧇āώāĻœā§āĻž āĻļāĻĒāĻŋāĻ‚ āĻ•ā§ŒāĻļāϞāĨ¤

āφāĻĒāύāĻžāϰ āϏāĻ¨ā§āϤāĻžāύ⧇āϰ āĻ—ā§āϰ⧇āĻĄ āϞ⧇āϭ⧇āϞ āύāĻŋāĻ°ā§āĻŦāĻžāϚāύ āĻ•āϰ⧁āύ

🎒
āĻ•āĻŋāĻ¨ā§āĻĄāĻžāϰāĻ—āĻžāĻ°ā§āĻŸā§‡āύ
āĻŦāϝāĻŧāϏ ā§Ģ-ā§Ŧ
📝
āĻĒā§āϰāĻžāĻĨāĻŽāĻŋāĻ•
āĻ—ā§āϰ⧇āĻĄ ā§§-ā§Ģ
📚
āĻŽāĻŋāĻĄāϞ āĻ¸ā§āϕ⧁āϞ
āĻ—ā§āϰ⧇āĻĄ ā§Ŧ-ā§Ž
🎓
āĻšāĻžāχ āĻ¸ā§āϕ⧁āϞ
āĻ—ā§āϰ⧇āĻĄ ⧝-⧧⧍
💰 āĻ…āĻ°ā§āĻĨ āϏāĻžāĻļā§āϰāϝāĻŧā§€ āĻļāĻĒāĻŋāĻ‚ āϟāĻŋāĻĒāϏ
  • āĻŸā§āϝāĻžāĻ•ā§āϏ-āĻĢā§āϰāĻŋ āϏāĻĒā§āϤāĻžāĻšāĻžāĻ¨ā§āϤ⧇ āĻļāĻĒāĻŋāĻ‚ āĻ•āϰ⧁āύ (āĻ…āύ⧇āĻ• āϰāĻžāĻœā§āϝ⧇ āφāĻ—āĻ¸ā§āϟ ⧍-ā§Ē, ⧍ā§Ļ⧍ā§Ģ)
  • āĻŽā§ŒāϞāĻŋāĻ• āϏāϰāĻŦāϰāĻžāĻšā§‡āϰ āϜāĻ¨ā§āϝ āĻœā§‡āύ⧇āϰāĻŋāĻ• āĻŦā§āĻ°ā§āϝāĻžāĻ¨ā§āĻĄ āĻ•āĻŋāύ⧁āύ - āĻāϗ⧁āϞ⧋ āĻāĻ•āχ āϰāĻ•āĻŽ āĻ•āĻžāϜ āĻ•āϰ⧇
  • āĻļāĻĒāĻŋāĻ‚ āĻ•āϰāĻžāϰ āφāϗ⧇ āĻŦāĻžāĻĄāĻŧāĻŋāϤ⧇ āϕ⧀ āφāϛ⧇ āϤāĻž āĻšā§‡āĻ• āĻ•āϰ⧁āύ
  • āĻ…āĻ¨ā§āϝ āĻĒāϰāĻŋāĻŦāĻžāϰ⧇āϰ āϏāĻžāĻĨ⧇ āĻāĻ•āϏāĻžāĻĨ⧇ āĻŦ⧇āĻļāĻŋ āĻĒāϰāĻŋāĻŽāĻžāϪ⧇ āĻ•āĻŋāύ⧇ āĻ­āĻžāϞ⧋ āĻĻāĻžāĻŽā§‡ āĻ•āĻŋāύ⧁āύ
  • āĻ…āϤāĻŋāϰāĻŋāĻ•ā§āϤ āϏāĻžāĻļā§āϰāϝāĻŧ⧇āϰ āϜāĻ¨ā§āϝ āĻ¸ā§āĻŸā§‹āϰ⧇āϰ āϞāϝāĻŧā§āϝāĻžāϞāϟāĻŋ āĻĒā§āϰ⧋āĻ—ā§āϰāĻžāĻŽ āĻāĻŦāĻ‚ āϕ⧁āĻĒāύ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻ•āϰ⧁āύ
  • āĻĒāϰ⧇āϰ āĻŦāĻ›āϰ⧇āϰ āϏāϰāĻŦāϰāĻžāĻšā§‡āϰ āϜāĻ¨ā§āϝ āϏāĻŋāϜāύ āĻļ⧇āώ⧇āϰ āĻŦāĻŋāĻ•ā§āϰāϝāĻŧ āĻĨ⧇āϕ⧇ āĻ•āĻŋāύ⧁āύ
  • āϕ⧇āύāĻžāϰ āφāϗ⧇ āĻ…āύāϞāĻžāχāύ āĻ“ āĻ¸ā§āĻŸā§‹āϰ⧇āϰ āĻĻāĻžāĻŽ āϤ⧁āϞāύāĻž āĻ•āϰ⧁āύ
  • āϏāĻŦāĻ•āĻŋāϛ⧁ āĻāĻ•āϏāĻžāĻĨ⧇ āĻ•āĻŋāύāĻŦ⧇āύ āύāĻž - āĻ•āĻŋāϛ⧁ āϏāϰāĻŦāϰāĻžāĻš āϏ⧇āĻŽāĻŋāĻ¸ā§āϟāĻžāϰ⧇āϰ āĻŽāĻžāĻāĻžāĻŽāĻžāĻāĻŋ āĻĒāĻ°ā§āϝāĻ¨ā§āϤ āĻ…āĻĒ⧇āĻ•ā§āώāĻž āĻ•āϰāϤ⧇ āĻĒāĻžāϰ⧇

📋 āĻĻā§āϰ⧁āϤ āĻ—ā§āϰ⧇āĻĄā§‡āϰ āωāĻĻāĻžāĻšāϰāĻŖ

āĻ•āĻŋāĻ¨ā§āĻĄāĻžāϰāĻ—āĻžāĻ°ā§āĻŸā§‡āύ āĻ¸ā§āϟāĻžāĻ°ā§āϟāĻžāϰ
āĻĒā§āϰāĻĨāĻŽāĻŦāĻžāϰ⧇āϰ āĻ¸ā§āϕ⧁āϞ āĻļāĻŋāĻ•ā§āώāĻžāĻ°ā§āĻĨā§€āĻĻ⧇āϰ āϜāĻ¨ā§āϝ āĻĒā§āϰāϝāĻŧā§‹āϜāύ⧀āϝāĻŧ āϜāĻŋāύāĻŋāϏāĻĒāĻ¤ā§āϰ
ā§ŠāϝāĻŧ āĻļā§āϰ⧇āĻŖāĻŋāϰ āĻ¸ā§āĻŸā§āϝāĻžāĻ¨ā§āĻĄāĻžāĻ°ā§āĻĄ
āĻĒā§āϰāĻžāĻĨāĻŽāĻŋāĻ• āĻļāĻŋāĻ•ā§āώāĻžāĻ°ā§āĻĨā§€āĻĻ⧇āϰ āϜāĻ¨ā§āϝ āϏāĻŽā§āĻĒā§‚āĻ°ā§āĻŖ āϤāĻžāϞāĻŋāĻ•āĻž
ā§­āĻŽ āĻļā§āϰ⧇āĻŖāĻŋāϰ āϏ⧁āϏāĻ‚āĻ—āĻ āĻŋāϤ
āϏāĻ‚āĻ—āĻ āύ-āϕ⧇āĻ¨ā§āĻĻā§āϰāĻŋāĻ• āĻŽāĻžāĻ§ā§āϝāĻŽāĻŋāĻ• āĻ¸ā§āϕ⧁āϞ⧇āϰ āϤāĻžāϞāĻŋāĻ•āĻž
āωāĻšā§āϚ āĻŦāĻŋāĻĻā§āϝāĻžāϞāϝāĻŧ āωāĻ¨ā§āύāϤ
āĻŦāĻŋāώāϝāĻŧ-āĻ­āĻŋāĻ¤ā§āϤāĻŋāĻ• āĻšāĻžāχ āĻ¸ā§āϕ⧁āϞ āϏāϰāĻŦāϰāĻžāĻš
āĻŦāĻžāĻœā§‡āϟ-āĻŦāĻžāĻ¨ā§āϧāĻŦ āϤāĻžāϞāĻŋāĻ•āĻž
āĻļ⧁āϧ⧁āĻŽāĻžāĻ¤ā§āϰ āĻĒā§āϰāϝāĻŧā§‹āϜāύ⧀āϝāĻŧ āϜāĻŋāύāĻŋāϏ, ā§Ģā§Ļ āĻĄāϞāĻžāϰ⧇āϰ āĻ•āĻŽ
āĻĒā§āϰāĻŋāĻŽāĻŋāϝāĻŧāĻžāĻŽ āĻ•āĻŽāĻĒā§āϞāĻŋāϟ
āϗ⧁āϰ⧁āĻ¤ā§āĻŦāĻĒā§‚āĻ°ā§āĻŖ āĻļāĻŋāĻ•ā§āώāĻžāĻ°ā§āĻĨā§€āĻĻ⧇āϰ āϜāĻ¨ā§āϝ āωāĻšā§āϚāĻŽāĻžāύ⧇āϰ āϏāϰāĻŦāϰāĻžāĻš

đŸ›ī¸ āĻ¸ā§āϕ⧁āϞ⧇āϰ āϜāĻ¨ā§āϝ āϕ⧇āύāĻžāĻ•āĻžāϟāĻžāϰ āĻĒāϰāĻŋāĻ•āĻ˛ā§āĻĒāύāĻž āĻ•āϰāϛ⧇āύ?

āĻ­āĻžāϞ⧋ āĻ¸ā§āϕ⧁āϞ āϏāϰāĻŦāϰāĻžāĻš āĻ¸ā§āĻŸā§‹āϰ āĻāĻŦāĻ‚ āĻļāĻŋāĻ•ā§āώāĻžāĻŽā§‚āϞāĻ• āφāĻ•āĻ°ā§āώāĻŖ āϰāϝāĻŧ⧇āϛ⧇ āĻāĻŽāύ āĻļāĻšāϰ⧇ āĻĒāĻžāϰāĻŋāĻŦāĻžāϰāĻŋāĻ• āĻ­ā§āϰāĻŽāϪ⧇āϰ āϏāĻžāĻĨ⧇ āϏāϰāĻŦāϰāĻžāĻš āϕ⧇āύāĻžāĻ•āĻžāϟāĻž āĻāĻ•āĻ¤ā§āϰāĻŋāϤ āĻ•āϰ⧁āύ

✨ Smart Nation's Core Infrastructure: WIA Code ✨

āĻĄā§āϰ⧋āύ āĻĄā§‡āϞāĻŋāĻ­āĻžāϰāĻŋ, āĻ¸ā§āĻŦāϝāĻŧāĻ‚āĻ•ā§āϰāĻŋāϝāĻŧ āĻĄā§āϰāĻžāχāĻ­āĻŋāĻ‚, āϜāϰ⧁āϰāĻŋ āωāĻĻā§āϧāĻžāϰ āĻāĻŦāĻ‚ āφāϰāĻ“ āĻ…āύ⧇āĻ• āĻ•āĻŋāϛ⧁ - āφāĻĒāύāĻžāϰ āĻĻ⧇āĻļ⧇āϰ āϜāĻ¨ā§āϝ āϏāĻŽā§āĻĒā§‚āĻ°ā§āĻŖ āĻŦāĻŋāύāĻžāĻŽā§‚āĻ˛ā§āϝ⧇ ā§Šā§Ļ āĻĻāĻŋāύ āĻ­āĻŦāĻŋāĻˇā§āϝāϤ⧇āϰ āĻ…āĻ­āĻŋāĻœā§āĻžāϤāĻž āύāĻŋāύ!

āĻĄāĻŦā§āϞāĻŋāωāφāχāĻ āϕ⧋āĻĄ āϏāĻŽā§āĻĒāĻ°ā§āϕ⧇ āφāϰāĻ“ āϜāĻžāύ⧁āύ

🤖 āφāĻĒāύāĻžāϰ āĻāφāχ āϏāĻšāĻ•āĻžāϰ⧀ āĻŦ⧇āϛ⧇ āύāĻŋāύ

đŸ’Ŧ āĻšā§āϝāĻžāϟāϜāĻŋāĻĒāĻŋāϟāĻŋ
āϏāĻŦāĻšā§‡āϝāĻŧ⧇ āĻŦāĻšā§āĻŽā§āĻ–ā§€ â€ĸ āĻ¸ā§āϕ⧁āϞ āϏāϰāĻŦāϰāĻžāĻšā§‡āϰ āϏ⧁āĻĒāĻžāϰāĻŋāĻļ⧇āϰ āϜāĻ¨ā§āϝ āϏ⧇āϰāĻž
🧠 āĻ•ā§āϞāĻĄ
āϏ⧇āϰāĻž āϝ⧁āĻ•ā§āϤāĻŋ â€ĸ āĻŦāĻžāĻœā§‡āϟ āĻĒāϰāĻŋāĻ•āĻ˛ā§āĻĒāύāĻž āĻāĻŦāĻ‚ āϏāĻ‚āĻ—āĻ āύ⧇āϰ āϜāĻ¨ā§āϝ āύāĻŋāϖ⧁āρāϤ
✨ āĻœā§‡āĻŽāĻŋāύāĻžāχ āĻĢā§āϰāĻŋ
āĻĻ⧈āύāĻŋāĻ• āĻĢā§āϰāĻŋ āϏ⧀āĻŽāĻž â€ĸ āĻ…āĻ¨ā§āϤāĻ°ā§āύāĻŋāĻ°ā§āĻŽāĻŋāϤ āĻļāĻĒāĻŋāĻ‚ āĻ—āĻžāχāĻĄ
`); printWindow.document.close(); printWindow.print(); trackEvent('print_checklist', { grade: SUPPLY_DATA.selectedGrade }); } function generatePrintableChecklist() { const gradeData = SUPPLY_LISTS[SUPPLY_DATA.selectedGrade]; if (!gradeData) return '

āĻ…āύ⧁āĻ—ā§āϰāĻš āĻ•āϰ⧇ āĻĒā§āϰāĻĨāĻŽā§‡ āĻāĻ•āϟāĻŋ āĻ—ā§āϰ⧇āĻĄ āϞ⧇āϭ⧇āϞ āύāĻŋāĻ°ā§āĻŦāĻžāϚāύ āĻ•āϰ⧁āύāĨ¤

'; let html = `

${gradeData.title}

`; html += `

āĻœā§‡āύāĻžāϰ⧇āϟ āĻ•āϰāĻž āĻšāϝāĻŧ⧇āϛ⧇: ${new Date().toLocaleDateString()}

`; html += `

āĻŽā§‹āϟ āĻŦāĻžāĻœā§‡āϟ: ${SUPPLY_DATA.budget.total.toFixed(2)}


`; Object.entries(gradeData.categories).forEach(([categoryName, items]) => { html += `

${categoryName}

`; items.forEach((item, index) => { const itemId = `${categoryName}-${index}`; const checked = SUPPLY_DATA.checkedItems.has(itemId) ? '☑' : '☐'; html += `
${checked} ${item.name} - ${item.description} ${item.priority} (${item.price})
`; }); html += '
'; }); return html; } function exportToEmail() { const checklist = generateTextChecklist(); const subject = `School Supply Checklist - ${SUPPLY_DATA.selectedGrade}`; const body = encodeURIComponent(checklist); window.location.href = `mailto:?subject=${subject}&body=${body}`; trackEvent('email_checklist', { grade: SUPPLY_DATA.selectedGrade }); } function generateTextChecklist() { const gradeData = SUPPLY_LISTS[SUPPLY_DATA.selectedGrade]; if (!gradeData) return 'Please select a grade level first.'; let text = `${gradeData.title}\n`; text += `Generated: ${new Date().toLocaleDateString()}\n`; text += `Total Budget: ${SUPPLY_DATA.budget.total.toFixed(2)}\n\n`; Object.entries(gradeData.categories).forEach(([categoryName, items]) => { text += `${categoryName}:\n`; items.forEach((item, index) => { const itemId = `${categoryName}-${index}`; const checked = SUPPLY_DATA.checkedItems.has(itemId) ? '[✓]' : '[ ]'; text += ` ${checked} ${item.name} - ${item.description} (${item.price})\n`; }); text += '\n'; }); return text; } function shareChecklist() { if (navigator.share) { navigator.share({ title: `School Supply Checklist - ${SUPPLY_DATA.selectedGrade}`, text: generateTextChecklist(), url: window.location.href }); } else { // Fallback: copy to clipboard navigator.clipboard.writeText(generateTextChecklist()).then(() => { showNotification('Checklist copied to clipboard!', 'success'); }); } trackEvent('share_checklist', { grade: SUPPLY_DATA.selectedGrade }); } function resetChecklist() { if (confirm('Are you sure you want to reset all checked items?')) { SUPPLY_DATA.checkedItems.clear(); SUPPLY_DATA.budget.total = 0; document.querySelectorAll('.supply-checkbox').forEach(checkbox => { checkbox.checked = false; }); updateProgress(); updateBudget(); localStorage.removeItem('schoolSupplyChecklist'); showNotification('Checklist reset successfully!', 'success'); } } function loadSampleGrade(sampleType) { const samples = { 'kindergarten-sample': 'kindergarten', 'elementary-sample': 'elementary', 'middle-sample': 'middle', 'high-sample': 'high', 'budget-sample': 'elementary', 'premium-sample': 'high' }; const grade = samples[sampleType]; if (grade) { selectGrade(grade); // For budget sample, only check essential items if (sampleType === 'budget-sample') { setTimeout(() => { document.querySelectorAll('.supply-checkbox').forEach(checkbox => { const item = checkbox.closest('.supply-item'); const priority = item.querySelector('.priority-essential'); if (priority) { checkbox.checked = true; checkbox.dispatchEvent(new Event('change')); } }); }, 500); } showNotification(`Loaded ${sampleType.replace('-', ' ')}`, 'success'); } } // Utility Functions function showNotification(message, type = 'success') { const toast = document.createElement('div'); toast.className = `toast ${type}`; toast.textContent = message; document.body.appendChild(toast); setTimeout(() => { toast.remove(); }, 3000); } function showOTA() { const otaContainer = document.getElementById('otaContainer'); if (otaContainer && (otaContainer.style.display === 'none' || !otaContainer.style.display)) { otaContainer.style.display = 'block'; setTimeout(() => { const otaHeader = document.querySelector('.ota-header h3'); if (otaHeader) { otaHeader.style.animation = 'pulse 1s ease-in-out'; } }, 100); } } function trackEvent(eventName, data = {}) { if (typeof gtag !== 'undefined') { gtag('event', eventName, { 'event_category': TOOL_CONFIG.category, 'event_label': TOOL_CONFIG.name, ...data }); } } // AI Assistant Functions function openAIModal() { const modal = document.getElementById('aiModal'); modal.classList.add('show'); if (aiModalState.apiKey && aiModalState.currentView === 'gemini') { showGeminiChat(); } else { showAISelector(); } updateAPIKeyStatus(); } function closeAIModal() { const modal = document.getElementById('aiModal'); modal.classList.remove('show'); setTimeout(() => { aiModalState.currentView = 'selector'; showAISelector(); }, 300); } function showAISelector() { document.getElementById('aiModalTitle').textContent = 'Choose Your AI Assistant'; document.getElementById('aiSelector').style.display = 'flex'; document.getElementById('geminiChat').style.display = 'none'; document.getElementById('apiKeySetup').style.display = 'none'; aiModalState.currentView = 'selector'; } function showGeminiChat() { document.getElementById('aiModalTitle').innerHTML = '✨ Gemini AI Assistant'; document.getElementById('aiSelector').style.display = 'none'; document.getElementById('geminiChat').style.display = 'flex'; document.getElementById('apiKeySetup').style.display = 'none'; aiModalState.currentView = 'gemini'; const chatMessages = document.getElementById('chatMessages'); if (!chatMessages.innerHTML.trim()) { addMessage('assistant', `Hello! I'm here to help with back-to-school shopping: â€ĸ Grade-specific supply recommendations â€ĸ Budget-friendly shopping strategies â€ĸ Where to find the best deals â€ĸ Organization tips for different age groups â€ĸ Alternatives to expensive items What school supply questions can I help with?`); } } function showAPIKeySetup() { document.getElementById('aiModalTitle').textContent = 'āĻœā§‡āĻŽāĻŋāύāĻŋ āĻāĻĒāĻŋāφāχ āϏ⧇āϟāφāĻĒ'; document.getElementById('aiSelector').style.display = 'none'; document.getElementById('geminiChat').style.display = 'none'; document.getElementById('apiKeySetup').style.display = 'block'; aiModalState.currentView = 'setup'; } function selectAI(aiType) { switch(aiType) { case 'chatgpt': const toolContext = `I'm using a School Supply Checklist tool for back-to-school shopping. The tool helps plan supplies for Kindergarten through High School with budget tracking and grade-specific recommendations. Can you help me with school supply shopping strategies, budget planning, and organization tips for students?`; const chatUrl = `https://chat.openai.com/?q=${encodeURIComponent(toolContext)}`; window.open(chatUrl, '_blank'); closeAIModal(); trackEvent('ai_selection', { ai_type: 'chatgpt' }); break; case 'claude': const claudeContext = `I'm working with a School Supply Checklist tool for back-to-school planning. Can you help me understand the best shopping strategies, budget-friendly alternatives, and organization systems for different grade levels?`; const claudeUrl = `https://claude.ai/chat?q=${encodeURIComponent(claudeContext)}`; window.open(claudeUrl, '_blank'); closeAIModal(); trackEvent('ai_selection', { ai_type: 'claude' }); break; case 'gemini': if (!aiModalState.apiKey) { showAPIKeySetup(); } else { showGeminiChat(); } trackEvent('ai_selection', { ai_type: 'gemini' }); break; } } function saveGeminiApiKey() { const apiKey = document.getElementById('geminiApiKeyInput').value.trim(); if (apiKey) { localStorage.setItem('geminiApiKey', apiKey); aiModalState.apiKey = apiKey; showGeminiChat(); updateAPIKeyStatus(); } else { alert('āĻ…āύ⧁āĻ—ā§āϰāĻš āĻ•āϰ⧇ āĻāĻ•āϟāĻŋ āĻŦ⧈āϧ āĻāĻĒāĻŋāφāχ āϕ⧀ āĻĒā§āϰāĻŦ⧇āĻļ āĻ•āϰāĻžāύ'); } } function updateAPIKeyStatus() { const statusEl = document.getElementById('apiKeyStatus'); if (aiModalState.apiKey) { statusEl.innerHTML = 'āĻāĻĒāĻŋāφāχ āϕ⧀ āĻĒāϰāĻŋāĻŦāĻ°ā§āϤāύ āĻ•āϰ⧁āύ'; } else { statusEl.textContent = 'āϕ⧋āύ⧋ āĻāĻĒāĻŋāφāχ āϕ⧀ āϏ⧇āϟ āĻ•āϰāĻž āύ⧇āχ'; } } function addMessage(type, content) { const chatMessages = document.getElementById('chatMessages'); const messageDiv = document.createElement('div'); messageDiv.className = `message ${type}`; if (type === 'user') { messageDiv.innerHTML = `You: ${content}`; } else { messageDiv.innerHTML = `✨ Gemini:
${content.replace(/\n/g, '
')}`; } chatMessages.appendChild(messageDiv); chatMessages.scrollTop = chatMessages.scrollHeight; } async function sendToGemini() { const input = document.getElementById('geminiInput'); const message = input.value.trim(); if (!message) return; addMessage('user', message); input.value = ''; const loadingMsg = document.createElement('div'); loadingMsg.className = 'message assistant'; loadingMsg.innerHTML = '✨ Gemini:
Checking school supply recommendations...'; loadingMsg.id = 'loading-message'; document.getElementById('chatMessages').appendChild(loadingMsg); try { const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=${aiModalState.apiKey}`, { method: 'āĻĒā§‹āĻ¸ā§āϟ', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ contents: [{ parts: [{ text: `Context: User is using a School Supply Checklist tool for back-to-school shopping. Tool features: Grade-specific supply lists (K-12), budget tracking, priority categorization, printable checklists, and money-saving tips. The tool helps families plan and budget for school supplies efficiently. User question: ${message} Please provide helpful school supply shopping advice, budget tips, or grade-specific recommendations as appropriate. Focus on practical, actionable guidance for parents and students preparing for the school year.` }] }], generationConfig: { temperature: 0.7, maxOutputTokens: 1000 } }) }); const data = await response.json(); document.getElementById('loading-message').remove(); if (data.candidates && data.candidates[0] && data.candidates[0].content) { const reply = data.candidates[0].content.parts[0].text; addMessage('assistant', reply); } else { addMessage('assistant', 'Sorry, I could not generate a response. Please try again.'); } } catch (error) { document.getElementById('loading-message')?.remove(); if (error.message.includes('āĻāĻĒāĻŋāφāχ āϕ⧀')) { addMessage('error', 'Invalid API key. Please check your API key and try again.'); showAPIKeySetup(); } else { addMessage('error', 'Failed to connect to Gemini. Please check your internet connection and try again.'); } } } // Dynamic Tool Count Functions async function updateToolCount() { try { const response = await fetch('/api/tool-count.php'); const data = await response.json(); document.querySelectorAll('.dynamic-tools-count').forEach(el => { el.textContent = `${data.count}+ free online tools in 206 languages. No signup, no fees, just tools that work.`; }); document.querySelectorAll('.dynamic-count').forEach(el => { const prefix = el.getAttribute('data-text') || ''; const suffix = el.getAttribute('data-suffix') || ''; const icon = el.textContent.split(' ')[0] || ''; el.textContent = `${icon} ${prefix} ${data.count}+ ${suffix}`; }); } catch (error) { const fallbackCount = 333; document.querySelectorAll('.dynamic-tools-count').forEach(el => { el.textContent = `${fallbackCount}+ free online tools in 206 languages. No signup, no fees, just tools that work.`; }); document.querySelectorAll('.dynamic-count').forEach(el => { const prefix = el.getAttribute('data-text') || ''; const suffix = el.getAttribute('data-suffix') || ''; const icon = el.textContent.split(' ')[0] || ''; el.textContent = `${icon} ${prefix} ${fallbackCount}+ ${suffix}`; }); } } function updateCurrentYear() { const currentYear = new Date().getFullYear(); document.querySelectorAll('.current-year').forEach(el => { el.textContent = currentYear; }); } // Event Listeners document.addEventListener('āĻĄāĻŽāĻ•āύāĻŸā§‡āĻ¨ā§āϟāϞ⧋āĻĄā§‡āĻĄ', function() { // AI button event document.getElementById('aiBtn').addEventListener('click', openAIModal); // Modal outside click to close document.getElementById('aiModal').addEventListener('click', function(e) { if (e.target === this) { closeAIModal(); } }); // Keyboard events document.addEventListener('keydown', function(e) { if (e.key === 'āĻāĻ¨ā§āϟāĻžāϰ') { const geminiInput = document.getElementById('geminiInput'); if (document.activeElement === geminiInput) { sendToGemini(); } } if (e.key === 'āĻāĻ¸ā§āϕ⧇āĻĒ') { closeAIModal(); } }); // Load saved data const savedData = localStorage.getItem('schoolSupplyChecklist'); if (savedData) { try { const data = JSON.parse(savedData); if (data.grade && SUPPLY_LISTS[data.grade]) { selectGrade(data.grade); setTimeout(() => { data.checkedItems.forEach(itemId => { const checkbox = document.getElementById(itemId); if (checkbox) { checkbox.checked = true; checkbox.dispatchEvent(new Event('change')); } }); }, 500); } } catch (error) { console.error('Error loading saved data:', error); } } updateAPIKeyStatus(); updateCurrentYear(); updateToolCount(); }); // Analytics window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-XXXXXXXXX'); trackEvent('page_view', { tool: TOOL_CONFIG.name, category: TOOL_CONFIG.category });