' + '
' + '

Not Available in Preview

' + '

The customer dashboard will be available when you deploy your store. It is not accessible during the store preview.

' + '' + '
'); document.close(); } function sendLocation(){ try { var pathname = String(window.location.pathname || '/'); if (isBlockedPath(pathname)) { showBlockedPage(); return; } send('PREVIEW_LOCATION', { href: String(window.location.href || ''), pathname: pathname, search: String(window.location.search || ''), hash: String(window.location.hash || '') }); } catch {} } if (document.readyState === 'complete' || document.readyState === 'interactive') { setTimeout(function(){ sendLocation(); }, 0); } else { window.addEventListener('DOMContentLoaded', function(){ sendLocation(); }, { once: true }); } var originalPushState = history.pushState; history.pushState = function(){ var result = originalPushState.apply(this, arguments); sendLocation(); return result; }; var originalReplaceState = history.replaceState; history.replaceState = function(){ var result = originalReplaceState.apply(this, arguments); sendLocation(); return result; }; window.addEventListener('popstate', sendLocation); window.addEventListener('hashchange', sendLocation); // Intercept link clicks to blocked routes before full-page navigation document.addEventListener('click', function(e) { var el = e.target; while (el && el.tagName !== 'A') el = el.parentElement; if (!el || !el.href) return; try { var url = new URL(el.href, window.location.origin); if (url.origin === window.location.origin && isBlockedPath(url.pathname)) { e.preventDefault(); e.stopPropagation(); originalPushState.call(history, null, '', url.pathname); showBlockedPage(); } } catch(ex){} }, true); // Detect Vite error overlay (vite-error-overlay custom element) function checkViteOverlay(){ var overlay = document.querySelector('vite-error-overlay'); if (!overlay) return; var msg = ''; try { var root = overlay.shadowRoot || overlay; var msgEl = root.querySelector('.message-body') || root.querySelector('.message') || root.querySelector('pre'); if (msgEl) msg = msgEl.textContent || ''; } catch(e){} if (!msg) msg = overlay.textContent || 'Vite error detected'; send('VITE_ERROR', { message: msg.slice(0, 4000) }); } // Observe DOM for vite-error-overlay insertion var observer = new MutationObserver(function(mutations){ for (var i = 0; i < mutations.length; i++){ var added = mutations[i].addedNodes; for (var j = 0; j < added.length; j++){ if (added[j].nodeName && added[j].nodeName.toLowerCase() === 'vite-error-overlay'){ setTimeout(checkViteOverlay, 50); return; } } } }); observer.observe(document.documentElement, { childList: true, subtree: true }); // Also check on load in case overlay is already present if (document.readyState === 'complete' || document.readyState === 'interactive') { setTimeout(checkViteOverlay, 100); } else { window.addEventListener('DOMContentLoaded', function(){ setTimeout(checkViteOverlay, 100); }, { once: true }); } // Listen for navigation commands from parent window.addEventListener('message', function(e){ if (!e.data || !e.data.type) return; if (e.data.type === 'PREVIEW_GO_BACK') { history.back(); } else if (e.data.type === 'PREVIEW_GO_FORWARD') { history.forward(); } }); })();