const DATA = [ { "name": "حسن عبدالله بن مهدي", "url": "https://stat2025-map.static.hf.space/ES/01.html" }, { "name": "منيره سعود بن عبدالعزيز القوز", "url": "https://stat2025-map.static.hf.space/ES/02.html" }, { "name": "نايف علي ال قحيصان", "url": "https://stat2025-map.static.hf.space/ES/03.html" }, { "name": "غلا عبدالعزيز بن هندي الفلاحي", "url": "https://stat2025-map.static.hf.space/ES/04.html" }, { "name": "مصطفى علي ال عباس", "url": "https://stat2025-map.static.hf.space/ES/05.html" }, { "name": "جمانه عزيز بن مساعد", "url": "https://stat2025-map.static.hf.space/ES/06.html" }, { "name": "أمجاد عبدالله احمد الزهراني", "url": "https://stat2025-map.static.hf.space/ES/07.html" }, { "name": "وضحى هادي بن صريع", "url": "https://stat2025-map.static.hf.space/ES/08.html" }, { "name": "تهاني خالد بن عبدالله", "url": "https://stat2025-map.static.hf.space/ES/09.html" }, { "name": "محمد يعقوب السبع", "url": "https://stat2025-map.static.hf.space/ES/10.html" }, { "name": "رنا صقر بن قاسم", "url": "https://stat2025-map.static.hf.space/ES/11.html" }, { "name": "نور عيد علي الثاني", "url": "https://stat2025-map.static.hf.space/ES/12.html" }, { "name": "أشواق عبدالكريم بن محمد الحنطي", "url": "https://stat2025-map.static.hf.space/ES/13.html" }, { "name": "ياسمين عيسى المطوع", "url": "https://stat2025-map.static.hf.space/ES/14.html" }, { "name": "أميره أحمد علي علوي", "url": "https://stat2025-map.static.hf.space/ES/15.html" }, { "name": "عبدالله سالم عبدالله الهاجري", "url": "https://stat2025-map.static.hf.space/ES/16.html" }, { "name": "ابرار تركي بن محمد", "url": "https://stat2025-map.static.hf.space/ES/17.html" }, { "name": "منال أحمد بن مريع", "url": "https://stat2025-map.static.hf.space/ES/18.html" }, { "name": "دانه احمد عبده دريب", "url": "https://stat2025-map.static.hf.space/ES/19.html" }, { "name": "نور عبدالرحمن عبدالوهاب الدخيل", "url": "https://stat2025-map.static.hf.space/ES/20.html" }, { "name": "عالية محمد علي الربيع", "url": "https://stat2025-map.static.hf.space/ES/21.html" }, { "name": "خديجه حسين بن علي هنبوبه", "url": "https://stat2025-map.static.hf.space/ES/22.html" }, { "name": "أبرار ناصر ابن ثامر", "url": "https://stat2025-map.static.hf.space/ES/23.html" }, { "name": "محاسن سلطان عبدالله الأحمد", "url": "https://stat2025-map.static.hf.space/ES/24.html" }, { "name": "سارة صالح ناصر القحطاني", "url": "https://stat2025-map.static.hf.space/ES/25.html" }, { "name": "بيان سعود بن مرشد الرحيلي", "url": "https://stat2025-map.static.hf.space/ES/26.html" }, { "name": "ملاك خليفة تركي الحيمود", "url": "https://stat2025-map.static.hf.space/ES/27.html" }, { "name": "محمد صالح بن عبدالله الخضير", "url": "https://stat2025-map.static.hf.space/ES/28.html" }, { "name": "عادل صالح عواد المويس", "url": "https://stat2025-map.static.hf.space/ES/29.html" } ] function normalizeArabic(s) { if (!s) return ""; return String(s) .trim() .toLowerCase() .replace(/[\u064B-\u065F\u0670\u06D6-\u06ED]/g, "") .replace(/\u0640/g, "") .replace(/[إأآٱ]/g, "ا") .replace(/ى/g, "ي") .replace(/ة/g, "ه") .replace(/^ال\s+/g, "") .replace(/\s+/g, " "); } function escapeHtml(str) { return String(str) .replaceAll("&", "&") .replaceAll("<", "<") .replaceAll(">", ">") .replaceAll('"', """) .replaceAll("'", "'"); } function highlightMatch(name, rawQuery) { if (!rawQuery) return escapeHtml(name); const tokens = rawQuery.trim().split(/\s+/).filter(Boolean); if (!tokens.length) return escapeHtml(name); const t = tokens[0]; const idx = name.indexOf(t); if (idx === -1) return escapeHtml(name); const before = escapeHtml(name.slice(0, idx)); const mid = escapeHtml(name.slice(idx, idx + t.length)); const after = escapeHtml(name.slice(idx + t.length)); return `${before}${mid}${after}`; } const elQ = document.getElementById("q"); const elResults = document.getElementById("results"); const elCount = document.getElementById("countPill"); const elTotal = document.getElementById("totalChip"); const toast = document.getElementById("toast"); const toastText = document.getElementById("toastText"); elTotal.innerHTML = `إجمالي: ${DATA.length}`; function showToast(msg = "تم نسخ الرابط") { toastText.textContent = msg; toast.classList.add("show"); clearTimeout(window.__toastT); window.__toastT = setTimeout(() => toast.classList.remove("show"), 1200); } async function copyLink(url) { try { await navigator.clipboard.writeText(url); showToast(); } catch (e) { const ta = document.createElement("textarea"); ta.value = url; document.body.appendChild(ta); ta.select(); document.execCommand("copy"); document.body.removeChild(ta); showToast(); } } function renderResults(list, rawQuery) { elResults.innerHTML = ""; if (!list.length) { elCount.textContent = "النتائج: 0"; elResults.innerHTML = `