/* ANA SUKAR | User-approved assets | Draft 944829411 */ (function () { var logoUrl = "https://cdn.files.salla.network/cdn-cgi/image/fit=scale-down,width=264,quality=90,format=auto/other/1547899492/fc672622-ef63-4572-8a04-c99f8f0fa2fd-original.webp"; function applyApprovedBrandAssets() { document.querySelectorAll('.store-header .navbar-brand img').forEach(function (image) { image.src = logoUrl; image.removeAttribute('srcset'); image.alt = 'أنا سكر | ANA SUKAR'; }); var icon = document.querySelector('link[data-anasukar-favicon]'); if (!icon) { icon = document.createElement('link'); icon.setAttribute('data-anasukar-favicon', 'approved'); } icon.rel = 'icon'; icon.type = 'image/webp'; icon.href = logoUrl; document.head.appendChild(icon); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', applyApprovedBrandAssets, { once: true }); } else { applyApprovedBrandAssets(); } window.addEventListener('pageshow', applyApprovedBrandAssets); })(); /* ANA SUKAR | Draft footer information */ (function () { var returnFocus = null; function installFooterInformation() { var footer = document.querySelector('.store-footer'); if (!footer) return; var brandIndex = 0; footer.querySelectorAll('a').forEach(function (anchor) { if (anchor.textContent.trim().toLowerCase() === 'anasukar') { anchor.textContent = 'أنا سكر'; anchor.setAttribute('data-ana-brand-name', 'true'); if (brandIndex++ === 0) anchor.classList.add('ana-footer-brand-title'); } }); var footerMenu = footer.querySelector('salla-menu[source="footer"]'); if (footerMenu && !footer.querySelector('.ana-footer-links')) { var links = document.createElement('nav'); links.className = 'ana-footer-links'; links.setAttribute('aria-label', 'معلومات أنا سكر'); links.innerHTML = 'من نحنالشحن والتوصيلتواصل معنا عبر واتساب'; footerMenu.parentNode.insertBefore(links, footerMenu); } if (!document.getElementById('ana-information-dialog')) { var dialog = document.createElement('dialog'); dialog.id = 'ana-information-dialog'; dialog.className = 'ana-info-dialog'; dialog.setAttribute('aria-labelledby', 'ana-information-title'); dialog.innerHTML = '

'; document.body.appendChild(dialog); dialog.querySelector('.ana-dialog-close').addEventListener('click', function () { dialog.close(); }); dialog.addEventListener('click', function (event) { if (event.target === dialog) dialog.close(); }); dialog.addEventListener('close', function () { if (returnFocus && returnFocus.isConnected) returnFocus.focus(); }); } if (!document.getElementById('ana-footer-information-style')) { var style = document.createElement('style'); style.id = 'ana-footer-information-style'; style.textContent = '.ana-footer-links{display:grid;gap:9px;margin:0 0 9px}.ana-footer-brand-title{font-size:23px;font-weight:700}.ana-info-dialog{box-sizing:border-box;width:560px;max-width:calc(100vw - 32px);max-height:85vh;overflow:auto;margin:auto;padding:28px;border:1px solid #C3982C;border-radius:20px;background:#FEF6E9;color:#750C20;direction:rtl;font-family:inherit;box-shadow:0 20px 70px rgba(51,10,20,.22)}.ana-info-dialog::backdrop{background:rgba(32,12,17,.48)}.ana-dialog-close{float:left;width:36px;height:36px;border:1px solid #E8D2CA;border-radius:50%;font-size:26px;line-height:1;background:transparent;color:#750C20;cursor:pointer}.ana-info-dialog h2{margin:0 0 20px;font-size:25px;line-height:1.6;color:#850E25}.ana-information-content p{font-size:16px;line-height:1.95;margin:0 0 16px;color:#69434A}.ana-information-content .ana-dialog-contact{display:inline-flex;justify-content:center;align-items:center;padding:12px 24px;background:#850E25;color:#FEF6E9;border-radius:10px;min-height:46px}.ana-info-dialog a:focus-visible,.ana-info-dialog button:focus-visible{outline:2px solid #C3982C;outline-offset:3px}@media(max-width:767px){.ana-info-dialog{padding:22px}.ana-info-dialog h2{font-size:22px}.ana-information-content p{font-size:15px}.ana-dialog-contact{width:100%}}'; document.head.appendChild(style); } } document.addEventListener('click', function (event) { var trigger = event.target.closest && event.target.closest('[data-ana-info]'); if (!trigger) return; var kind = trigger.getAttribute('data-ana-info'); if (kind !== 'about' && kind !== 'shipping') return; event.preventDefault(); installFooterInformation(); var dialog = document.getElementById('ana-information-dialog'); if (!dialog) return; returnFocus = trigger; dialog.querySelector('h2').textContent = kind === 'about' ? 'من نحن' : 'الشحن والتوصيل'; dialog.querySelector('.ana-information-content').innerHTML = kind === 'about' ? '

أنا سكر علامة متخصصة في فساتين البنات للمناسبات والحفلات، مع تشكيلة من الملابس الشتوية وإكسسوارات تنسيق الإطلالات.

نحرص على عرض الموديلات والمقاسات ومعلومات المنتج لمساعدتك في اختيار الإطلالة الأنسب. يمكنك الرجوع إلى دليل المقاسات وسياسات المتجر قبل إتمام طلبك.

أنا سكر.. والحلى أنتم.

' : '

للاستفسار عن مدة التوصيل ورسوم الشحن إلى مدينتك، تواصلي مع خدمة العملاء قبل الطلب.

إذا كان لديك طلب قائم، أرسلي رقم الطلب إلى خدمة العملاء لتسهيل متابعة الشحنة.

استفسري عبر واتساب'; if (!dialog.open) dialog.showModal(); }); if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', installFooterInformation, {once:true}); else installFooterInformation(); window.addEventListener('pageshow', installFooterInformation); })(); /* ANA SUKAR | Floating WhatsApp | Draft 944829411 */ (function () { function installFloatingWhatsApp() { if (document.getElementById('ana-floating-whatsapp')) return; var link = document.createElement('a'); link.id = 'ana-floating-whatsapp'; link.href = 'https://wa.me/966540768870'; link.target = '_blank'; link.rel = 'noopener noreferrer'; link.setAttribute('aria-label', 'تواصلي معنا عبر واتساب'); link.title = 'تواصلي معنا عبر واتساب'; link.innerHTML = ''; var style = document.createElement('style'); style.id = 'ana-floating-whatsapp-style'; style.textContent = '#ana-floating-whatsapp{position:fixed;right:24px;bottom:calc(24px + env(safe-area-inset-bottom,0px));z-index:40;display:flex;align-items:center;justify-content:center;width:58px;height:58px;border:2px solid #fff;border-radius:50%;background:#25D366;color:#fff!important;box-shadow:0 4px 18px rgba(0,0,0,.18);text-decoration:none;line-height:1;transition:background .18s,box-shadow .18s}#ana-floating-whatsapp:hover{background:#128C7E;box-shadow:0 6px 22px rgba(0,0,0,.23)}#ana-floating-whatsapp:focus-visible{outline:3px solid #850E25;outline-offset:4px}@media(max-width:767px){#ana-floating-whatsapp{right:16px;bottom:calc(88px + env(safe-area-inset-bottom,0px));width:54px;height:54px}}@media(prefers-reduced-motion:reduce){#ana-floating-whatsapp{transition:none}}'; if (!document.getElementById(style.id)) document.head.appendChild(style); document.body.appendChild(link); } if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', installFloatingWhatsApp, {once:true}); else installFloatingWhatsApp(); window.addEventListener('pageshow', installFloatingWhatsApp); })(); /* Contact email is synchronized once by the scoped observer below. */ /* ANA SUKAR | Analytics uses Salla native GA4. Removed inactive GTM-NXCRCQNJ loader after verifying published version 4. */ /* Approved visible contact email */ (function () { function syncEmail() { document.querySelectorAll('.store-header a[href^="mailto:"], .store-footer a[href^="mailto:"]').forEach(function (a) { if (a.getAttribute('href') !== 'mailto:anasukar.ksa@gmail.com') a.setAttribute('href', 'mailto:anasukar.ksa@gmail.com'); var walker = document.createTreeWalker(a, NodeFilter.SHOW_TEXT); while (walker.nextNode()) { var node = walker.currentNode; var text = node.nodeValue.split('ana.sukar2020@gmail.com').join('anasukar.ksa@gmail.com'); if (text !== node.nodeValue) node.nodeValue = text; } }); } function start() { syncEmail(); var pending = false; var observer = new MutationObserver(function () { if (pending) return; pending = true; window.requestAnimationFrame(function () { pending = false; syncEmail(); }); }); document.querySelectorAll('.store-header, .store-footer').forEach(function (region) { observer.observe(region, {childList: true, subtree: true, characterData: true}); }); } if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', start, {once: true}); else start(); })(); /* ANA SUKAR | Shipping details and mobile WhatsApp placement */ (function () { document.addEventListener('click', function (event) { var target = event.target.closest && event.target.closest('[data-ana-info="shipping"]'); if (!target) return; var content = document.querySelector('#ana-information-dialog .ana-information-content'); if (!content) return; content.innerHTML = '

سمسا داخل السعودية

' + '

مدة الشحن المعروضة في صفحة الدفع: من يوم إلى 3 أيام عمل.

' + '

رسوم الشحن العادي: 29 ريالًا لأول 15 كجم، قبل أي ضريبة تُطبّق. تظهر التكلفة النهائية في صفحة الدفع بحسب عنوانكِ ووزن الشحنة.

' + '

شحن مجاني للطلبات المؤهلة من 600 ريال داخل السعودية.

' + '

استفسري عبر واتساب

'; }); var style = document.createElement('style'); style.textContent = '@media (max-width:767px){body.index #ana-floating-whatsapp{right:12px;bottom:calc(14px + env(safe-area-inset-bottom,0px));width:44px;height:44px}body.index #ana-floating-whatsapp svg{width:24px;height:24px}}'; document.head.appendChild(style); })(); /* ANA SUKAR | Prioritize the above-the-fold homepage banner */ (function () { if (!document.body.classList.contains("index")) return; var banner = document.querySelector('[data-testid="store-home-fixed-banner"] img'); if (!banner) return; banner.loading = "eager"; banner.setAttribute("fetchpriority", "high"); banner.width = 1440; banner.height = 599; })();