// بيانات الروابط (تم توليدها من ملف Excel) const DATA = [ { "name": "ابراهيم بن محمد بن صالح الجباره", "url": "https://stat2025-map.static.hf.space/Rahn/01.html" }, { "name": "ابراهيم فالح عبدالله السليمان", "url": "https://stat2025-map.static.hf.space/Rahn/02.html" }, { "name": "احمد يحي محمد حقوي", "url": "https://stat2025-map.static.hf.space/Rahn/03.html" }, { "name": "اسماعيل خليفه بن اسماعيل السماعيل", "url": "https://stat2025-map.static.hf.space/Rahn/04.html" }, { "name": "أحمد عبدالهادي عبدالواحد الحيدر", "url": "https://stat2025-map.static.hf.space/Rahn/05.html" }, { "name": "خالد عبدالله بن خالد الحجي", "url": "https://stat2025-map.static.hf.space/Rahn/06.html" }, { "name": "عبدالرحمن فالح بن عبدالله الرويشد", "url": "https://stat2025-map.static.hf.space/Rahn/07.html" }, { "name": "عبدالعزيز فهد عبدالعزيز العبلان", "url": "https://stat2025-map.static.hf.space/Rahn/08.html" }, { "name": "عبدالله سعيد هلال الغامدي", "url": "https://stat2025-map.static.hf.space/Rahn/09.html" }, { "name": "عبدالله طارق بن عبدالله الشعيل", "url": "https://stat2025-map.static.hf.space/Rahn/10.html" }, { "name": "حمد بن عبداللطيف بن حمد النويشي", "url": "https://stat2025-map.static.hf.space/Rahn/11.html" }, { "name": "علي عبدالجليل بن علي آل رمضان", "url": "https://stat2025-map.static.hf.space/Rahn/12.html" }, { "name": "عمران فخري بن عمران الشرفا", "url": "https://stat2025-map.static.hf.space/Rahn/13.html" }, { "name": "فواز عبدالكريم بن طلال العوهلي", "url": "https://stat2025-map.static.hf.space/Rahn/14.html" }, { "name": "تغريد يحي بن دحباش سودي", "url": "https://stat2025-map.static.hf.space/Rahn/15.html" }, { "name": "أمل احمد بن مبارك الحمادي", "url": "https://stat2025-map.static.hf.space/Rahn/16.html" }, { "name": "بثينه يوسف بن ابراهيم الحساوي", "url": "https://stat2025-map.static.hf.space/Rahn/17.html" }, { "name": "فاطمه سعد بن عبدالله الدليلي", "url": "https://stat2025-map.static.hf.space/Rahn/18.html" }, { "name": "نوف احمد جابر المالكي", "url": "https://stat2025-map.static.hf.space/Rahn/19.html" }, { "name": "ضحى منصور بن صالح العنكي", "url": "https://stat2025-map.static.hf.space/Rahn/20.html" }, { "name": "منيره جدوع عقلا الشمري", "url": "https://stat2025-map.static.hf.space/Rahn/21.html" }, { "name": "شهد يوسف بن عبدالله الحكيم", "url": "https://stat2025-map.static.hf.space/Rahn/22.html" }, { "name": "أمال صالح محمد العبدالعزيز", "url": "https://stat2025-map.static.hf.space/Rahn/23.html" }, { "name": "لجينه علي عبدالواحد الصانع", "url": "https://stat2025-map.static.hf.space/Rahn/24.html" }, { "name": "رينا عبدالله عبدالعزيز المهناء", "url": "https://stat2025-map.static.hf.space/Rahn/25.html" }, { "name": "عماد بن عيسى بن احمد الجمعان", "url": "https://stat2025-map.static.hf.space/Rahn/26.html" }, { "name": "عيسى عادل بن عيسى الجمعان", "url": "https://stat2025-map.static.hf.space/Rahn/27.html" }, { "name": "احلا صالح العصيمي", "url": "https://stat2025-map.static.hf.space/Rahn/28.html" }, { "name": "سكينه محمد بن جاسم الموسى", "url": "https://stat2025-map.static.hf.space/Rahn/29.html" }, { "name": "سهل سعد بن عايد الشمري", "url": "https://stat2025-map.static.hf.space/Rahn/30.html" }, { "name": "زهره بنت دخيل بن احمد العوض", "url": "https://stat2025-map.static.hf.space/Rahn/31.html" }, { "name": "محمد سعد بن غربي العنزي", "url": "https://stat2025-map.static.hf.space/Rahn/32.html" }, { "name": "علي جابر بن علي الشدي", "url": "https://stat2025-map.static.hf.space/Rahn/33.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 = `