(function(){let s=document.currentScript?.dataset.root||"ta",c="ta:ready",u="_tac";function r(){return globalThis[s]}function l(){return new Promise(function(t){let e=r();if(e){t(e);return}function n(i){if(i.detail?.root!==s)return;let o=r();o&&(globalThis.removeEventListener(c,n),t(o))}globalThis.addEventListener(c,n)})}function p(){let t=r();return!t||f(u)==="0"?!1:t.hasConsent===!1}function f(t){if(typeof document>"u"||!document.cookie)return null;let e=encodeURIComponent(t)+"=",n=document.cookie.split("; ");for(let i of n)if(i.indexOf(e)===0)return decodeURIComponent(i.substring(e.length));return null}function m(){if(!p()||document.getElementById("ta-consent-banner"))return;let t=document.createElement("div");t.id="ta-consent-banner",t.setAttribute("style",["position:fixed","left:16px","right:16px","bottom:16px","box-sizing:border-box","z-index:9999","display:flex","flex-wrap:wrap","align-items:center","justify-content:space-between","gap:12px","width:min(560px,calc(100% - 32px))","max-width:100%","margin:0 auto","padding:12px","border:1px solid rgba(0,0,0,0.12)","border-radius:8px","background:rgba(255,255,255,0.96)","color:#222","font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif","font-size:13px","line-height:1.4","box-shadow:0 4px 16px rgba(0,0,0,0.08)"].join(";"));let e=document.createElement("span");e.textContent="Can we turn on analytics to help improve this site?",e.setAttribute("style",["flex:1 1 220px","min-width:0"].join(";"));let n=document.createElement("div");n.setAttribute("style",["display:flex","flex:1 0 auto","flex-wrap:wrap","gap:8px","justify-content:flex-end"].join(";"));let i=["cursor:pointer","border:1px solid rgba(0,0,0,0.16)","border-radius:6px","padding:6px 10px","background:#fff","color:#222","font:inherit","white-space:nowrap","flex:1 0 auto","min-width:max-content"].join(";"),o=document.createElement("button");o.type="button",o.textContent="Sure",o.setAttribute("style",i+";font-weight:600");let a=document.createElement("button");a.type="button",a.textContent="No thanks",a.setAttribute("style",i),o.addEventListener("click",function(){r()?.consent?.(),t.remove()}),a.addEventListener("click",function(){r()?.revoke?.(),t.remove()}),n.appendChild(o),n.appendChild(a),t.appendChild(e),t.appendChild(n),document.body.appendChild(t)}function d(){l().then(function(){m()})}document.body?d():document.addEventListener("DOMContentLoaded",d)})();