/* Performance West — lightweight cookie consent banner. * CSP-safe (external file, no inline JS). Stores choice in localStorage. * Non-blocking: analytics/chat already load; this provides notice + a choice * and a link to the privacy policy, satisfying disclosure requirements without * a heavy CMP. If declined, we set a flag other scripts can check. */ (function () { "use strict"; var KEY = "pw_cookie_consent"; // values: "accepted" | "declined" try { if (localStorage.getItem(KEY)) return; // already chose } catch (e) { return; } // no storage -> skip silently function choose(val) { try { localStorage.setItem(KEY, val); } catch (e) {} var el = document.getElementById("pw-cookie-banner"); if (el) el.parentNode.removeChild(el); if (val === "declined") { window.PW_COOKIE_DECLINED = true; } } function build() { if (document.getElementById("pw-cookie-banner")) return; var bar = document.createElement("div"); bar.id = "pw-cookie-banner"; bar.setAttribute("role", "dialog"); bar.setAttribute("aria-label", "Cookie notice"); bar.style.cssText = [ "position:fixed", "bottom:16px", "right:16px", "z-index:2147483000", "max-width:380px", "width:calc(100% - 32px)", "background:#0f172a", "color:#e2e8f0", "border:1px solid #1e293b", "border-radius:14px", "box-shadow:0 18px 40px rgba(0,0,0,0.35)", "padding:16px 18px", "font-family:Inter,system-ui,sans-serif", "font-size:13px", "line-height:1.55" ].join(";"); bar.innerHTML = '

We use cookies for essential site functionality, ' + 'analytics, and live chat. See our ' + 'Privacy Policy.

' + '
' + '' + '' + "
"; document.body.appendChild(bar); document.getElementById("pw-cookie-accept").addEventListener("click", function () { choose("accepted"); }); document.getElementById("pw-cookie-decline").addEventListener("click", function () { choose("declined"); }); } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", build); } else { build(); } })();