PageSourceSearch

https://www.shoplibas.com/cdn/shopifycloud/privacy-banner/storefront-banner.js

js shoplibas.com collected 2026-10-06 17:56:47 UTC 107,214 bytes, 1 lines download raw bytes

1var privacyBanner=function(n){"use strict";var e=function(){return e=Object.assign||function(n){for(var e,t=1,o=arguments.length;t<o;t++)for(var r in e=arguments[t])Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},e.apply(this,arguments)};function t(n,e,t,o){return new(t||(t=Promise))(function(r,i){function a(n){try{s(o.next(n))}catch(n){i(n)}}function c(n){try{s(o.throw(n))}catch(n){i(n)}}function s(n){var e;n.done?r(n.value):(e=n.value,e instanceof t?e:new t(function(n){n(e)})).then(a,c)}s((o=o.apply(n,e||[])).next())})}function o(n,e){var t,o,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,o=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(6===c[0]&&i.label<r[1]){i.label=r[1],r=c;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(c);break}r[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(n,i)}catch(n){c=[6,n],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}"function"==typeof SuppressedError&&SuppressedError;const r=()=>"undefined"==typeof window,i=()=>"undefined"!=typeof __CtaTestEnv__&&"true"===__CtaTestEnv__;let a=class{};a.warn=n=>{i()||console.warn(n)},a.error=n=>{i()||console.error(n)},a.info=n=>{i()||console.info(n)},a.debug=n=>{i()||console.debug(n)},a.trace=n=>{i()||console.trace(n)};const c=a;function s(n,e){if(null===n)return"null";if(Array.isArray(n)){return`[${n.map(n=>s(n,!0)).join(",")}]`}if("object"==typeof n){let t=[];for(const e in n)n.hasOwnProperty(e)&&void 0!==n[e]&&""!==n[e]&&t.push(`${e}:${s(n[e],!0)}`);const o=t.join(",");return e?`{${o}}`:o}return"string"==typeof n?JSON.stringify(n):`${n}`}function l(n,...e){if(0===e.length)return n;const t=e[0];return n[t]||(n[t]={}),l(n[t],...e.slice(1))}function d(n){try{return decodeURIComponent(n)}catch(n){return""}}function u(){if(!r())return window}function p(){var n,e;return!r()&&Boolean(null===(n=u())||void 0===n||null===(e=n.Shopify)||void 0===e?void 0:e.theme)}function f(){var n;return!r()&&Boolean(null===(n=u())||void 0===n?void 0:n.__CUSTOMER_ACCOUNT__)}function h(){if(r())return!1;try{return null!==document.querySelector('meta[name="serialized-trackingConsent"]')}catch{return!1}}function m(){try{return"undefined"!=typeof PerformanceServerTiming}catch{return!1}}class y extends TypeError{constructor(n){super(n),this.name="ConsentValidationError",Object.setPrototypeOf(this,y.prototype)}}const g="trackingConsentAccepted",v="trackingConsentDeclined",b="firstPartyMarketingConsentAccepted",w="thirdPartyMarketingConsentAccepted",C="analyticsConsentAccepted",x="preferencesConsentAccepted",k="firstPartyMarketingConsentDeclined",_="thirdPartyMarketingConsentDeclined",I="analyticsConsentDeclined",T="preferencesConsentDeclined",D="visitorConsentCollected",E="consentTrackingApiLoaded",S="yes",A="no",B="no_interaction",O="",P="",M="1",R="0",H="p",L="a",N="m",j="t",q="m",$="a",U="p",F="s",V="marketing",W="analytics",z="preferences",J="sale_of_data",G="email",X="headlessStorefront",K="rootDomain",Y="checkoutRootDomain",Z="storefrontRootDomain",Q="storefrontAccessToken",nn="isExtensionToken",en="metafields",tn="customerAccountRequestInfo",on="_tracking_consent";function rn(){try{return document.cookie}catch{return!1}}function an(){return function(n){const e=rn()?document.cookie.split("; "):[];for(let t=0;t<e.length;t++){const[o,r]=e[t].split("=");if(n===d(o))return d(r)}}(on)}function cn(n){return n===encodeURIComponent(d(n))}function sn(n,e,t,o){if(!cn(o))throw new TypeError("Cookie value is not correctly URI encoded.");if(!cn(n))throw new TypeError("Cookie name is not correctly URI encoded.");let r=`${n}=${o}`;r+="; path=/",e&&(r+=`; domain=${e}`),r+=`; expires=${new Date((new Date).getTime()+t).toUTCString()}`,document.cookie=r}const ln=["_shopify_y","_shopify_s",on];
1function dn(){if(r()||!function(){const n=rn();return!!n&&n.split(";").some(n=>ln.includes(n.split("=")[0].trim()))}())return;const n=window.location.hostname.split("."),e=["",...n.map((e,t)=>n.slice(t).join("."))];for(const n of ln)for(const t of e)try{sn(n,t,-1,"")}catch{}}let un=class n{constructor(){if(n.instance)return n.instance;n.instance=this}produce(n,e){if(!r())try{const t={schema_id:"customer_privacy_api_events/2.0",payload:{shop_domain:window.location.host,method_name:n,call_details:e||null}},o={accept:"*/*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","content-type":"application/json; charset=utf-8","x-monorail-edge-event-created-at-ms":String(Date.now()),"x-monorail-edge-event-sent-at-ms":String(Date.now())};if(!window.location.host.endsWith("spin.dev"))return fetch("https://monorail-edge.shopifysvc.com/v1/produce",{headers:o,body:JSON.stringify(t),method:"POST",mode:"cors",credentials:"omit"}).catch(()=>{});console.log("Monorail event from consent API:",o,t)}catch(n){}}};function pn(){var n,e;return r()?{}:(null===(n=window.Shopify)||void 0===n||null===(e=n.customerPrivacy)||void 0===e?void 0:e.config)||{}}un.instance=void 0;const fn=/^https?:\/\/([^/]+)(\/api\/(?:unstable|2\d{3}-\d{2})\/graphql\.json(?=$|\?))?/;function hn(n,e){if("fetch"!==n.initiatorType)return!1;const t=n.name.match(fn);if(!t)return!1;const[,o,r]=t;return o===e||!!r&&!(null==o||!o.endsWith(`.${e}`))}const mn="_cmp",yn="consentHeader";function gn(n){if(!r()){try{n=decodeURIComponent(n)}catch{}try{sessionStorage.setItem(yn,n)}catch{}}}function vn(n=mn){let e;if(e=_n()&&bn(()=>function(n=mn){var e,t;if(r())return;const o=null===(e=performance)||void 0===e||null===(t=e.getEntriesByType)||void 0===t?void 0:t.call(e,"resource"),i=window.location.host;let a=Cn[n];for(let e=o.length-1;e>=0;e--){const t=o[e];if(!hn(t,i))continue;const r=xn(t,n);if(r){a=r;break}}return Cn[n]=a,a}(n))||bn(()=>wn(n)),!e){if(n!==mn)return;let e;try{e=sessionStorage.getItem(yn)}catch{}return e||void 0}try{e=decodeURIComponent(e)}catch{}return e}function bn(n){try{return n()}catch{return}}function wn(n=mn){var e,t;if(!In()&&!function(){try{const n=performance.getEntriesByType("navigation")[0].serverTiming;return!!n&&0!=n.length}catch{return!1}}()){const n=new un;let e="failed_to_fetch";try{e=navigator.userAgent}catch{}n.produce("navigationServerTiming",JSON.stringify({failed:!0,userAgent:e,apiSupported:m()})),function(){if(In())return;l(u(),"Shopify","customerPrivacy").serverTimingSupportVerified=!0}()}const o=null===(e=performance)||void 0===e||null===(t=e.getEntriesByType)||void 0===t?void 0:t.call(e,"navigation");if(!o)return;const r=o.map(e=>xn(e,n)).find(n=>n);return r&&n===mn&&gn(r),r}const Cn={};function xn(n,e=mn){var t,o;if(n)return null===(t=n.serverTiming)||void 0===t||null===(o=t.find(n=>n.name==e))||void 0===o?void 0:o.description}function kn(){var n,e;const t=u();return!0===(null==t||null===(n=t.Shopify)||void 0===n||null===(e=n.customerPrivacy)||void 0===e?void 0:e.backendConsentEnabled)||!0===pn().asyncVisitorState}function _n(){return!r()&&(kn()||!p()&&!f()&&!h())}function In(){var n,e;const t=u();return null==t||null===(n=t.Shopify)||void 0===n||null===(e=n.customerPrivacy)||void 0===e?void 0:e.serverTimingSupportVerified}function Tn(){if(!r()){var n,e;const t=(null===(n=window.Shopify)||void 0===n||null===(e=n.customerPrivacy)||void 0===e?void 0:e.injectedConsent)||pn().injectedConsent;return t?d(t):void 0}}function Dn(){var n;if(!r())return null===(n=window.Shopify)||void 0===n?void 0:n.customerPrivacy}function En(){var n;return null===(n=Dn())||void 0===n?void 0:n.consentStatus}function Sn(n){const e=Dn();e&&(e.consentStatus=n)}function An(){On(E)}function Bn(n,e){void 0!==n.granular_consent&&function(n){Sn("loaded");const e=n[N],t=n[j],o=n[L],r=n[H];!0===e?On(b):!1===e&&On(k);!0===t?On(w):!1===t&&On(_);!0===o?On(C):!1===o&&On(I);!0===r?On(x):!1===r&&On(T);const i=function(n){const e={marketingAllowed:n[N],saleOfDataAllowed:n[j],analyticsAllowed:n[L],preferencesAllowed:n[H],firstPartyMarketingAllowed:n[N],thirdPartyMarketingAllowed:n[j]};return e}(n);On(D,i);const a=[o,r,e,t];a.every(n=>!0===n)&&On(g);a.every(n=>!1===n)&&On(v)}(e)}function On(n,e){if(!r())try{document.dispatchEvent(new CustomEvent(n,{detail:e||{}}))}catch(e){console.error(`[Shopify Customer Privacy] Error in event listener for "${n}":`,e)}}function Pn(){let n;if(n=r()?Tn():function(){var n,e;const t=null===(n=window.Shopify)||void 0===n||null===(e=n.customerPrivacy)||void 0===e?void 0:e.cachedConsent;return t?d(t):void 0}()||Tn()||new URLSearchParams(window.location.search).get("_cs")||void 0||an()||vn(),void 0!==n)return Nn(n)}function Mn(){try{let n=Pn();if(!n)return;return n}catch{return}}function Rn(){return{m:$n(q),a:$n($),p:$n(U),s:$n(F)}}function Hn(){return Rn()[F]}function Ln(n=null){return null===n&&(n=Mn()),void 0===n}function Nn(n){if("%"==n.slice(0,1))try{n=decodeURIComponent(n)}catch{}const e=n.slice(0,1);return"{"==e?function(n){var e;let t;try{t=JSON.parse(n)}catch{return}if("2.1"!==t.v)return;if(null===(e=t.con)||void 0===e||!e.CMP)return;return t}(n):"3"==e?function(n){const e=n.slice(1).split("_"),[t,o,r,i,a]=e;let c,s;try{c=e[5]?JSON.parse(e.slice(5).join("_")):void 0}catch{}if(a){const n=a.replace(/\*/g,"/").replace(/-/g,"+"),e=atob(n);let t="";for(let n=0;n<e.length;n++){const o=e.charCodeAt(n).toString(16);t+=1===o.length?"0"+o:o}s=[8,13,18,23].reduce((n,e)=>n.slice(0,e)+"-"+n.slice(e),t)}function l(n){const e=t.split(".")[0];return e.includes(n.toLowerCase())?R:e.includes(n.toUpperCase())?M:P}function d(n){return t.includes(n.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[$]:l($),[U]:l(U),[q]:l(q),[F]:l(F)}},region:o||"",cus:c,purposes:{[L]:d(L),[H]:d(H),[N]:d(N),[j]:d(j)},sale_of_data_region:"t"==i,display_banner:"t"==r,consent_id:s}}(n):void 0}function jn(n){switch(n){case M:return S;case R:return A;default:return O}}function qn(n){switch(n){case $:return W;case q:return V;case U:return z;case F:return J}}function $n(n){const e=Mn();if(!e)return P;const t=e.con.CMP;return t?t[n]:P}function Un(n){const e=Mn();if(!e||!e.purposes)return!0;const t=e.purposes[n];return"boolean"!=typeof t||t}function Fn(){return Un(H)}function Vn(){return Un(L)}function Wn(){return Un(N)}function zn(){return Un(j)}function Jn(){const n=Mn();return!!n&&("boolean"==typeof n.display_banner&&n.display_banner)}function Gn(){const n=Mn();return n&&n.sale_of_data_region||!1}const Xn="v0.2",Kn=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$/,Yn="00000000-0000-0000-0000-000000000000",Zn="00000000-0000-0000-5000-000000000000";function Qn(n){return!!n&&Kn.test(n.trim().toLowerCase())}function ne(n,e){if("string"!=typeof n)return;if(!Qn(n))return;const t=n.trim();if(t===Yn)return;if(t===Zn)return;return Number.isFinite(NaN)&&Date.now()>NaN?void 0:t}const ee="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";function te(n){return ee.replace(/[xy]/g,e=>{const t=n();return("x"===e?t:3&t|8).toString(16)})}function oe(){const n="undefined"!=typeof crypto?crypto:void 0;if("function"==typeof(null==n?void 0:n.randomUUID))return n.randomUUID();if("function"==typeof(null==n?void 0:n.getRandomValues)){const e=n.getRandomValues(new Uint8Array(36));let t=0;return te(()=>e[t++]%16)}return te(()=>16*Math.random()|0)}function re(n,e){const t=u();if(!t)return;const o=l(t,"Shopify","customerPrivacy","cachedToken");if(e){const t="_shopify_s"===n?18e5:31536e6;o[n]=e,o[n+"_expires_at"]=Date.now()+t}else delete o[n],delete o[n+"_expires_at"]}function ie(n,e){if(!n)return;const t=function(n){const e=new URL(n,window.location.origin),t=ce(n)?ae(e):ae(e).replace(window.location.origin,""),o=document.querySelectorAll(`a[href^="${t}"]`),r=document.querySelectorAll(`a[href*="${window.location.hostname}/customer_authentication"]`),i=new Set,a=[];for(let n=0;n<o.length;
1n++)i.has(o[n])||(i.add(o[n]),a.push(o[n]));for(let n=0;n<r.length;n++)i.has(r[n])||(i.add(r[n]),a.push(r[n]));return a}(n);if(t.length)for(let o=0;o<t.length;o++){const r=t[o],i=r.getAttribute("href");if(!i)continue;const a=new URL(i,window.location.origin);a.searchParams.set("_cs",e);const c=ce(n)?a.toString():a.toString().replace(window.location.origin,"");r.setAttribute("href",c)}}function ae(n){return`${n.origin}${e=n.pathname,e.replace(/\/$/,"")}`;var e}function ce(n){return n.startsWith("http://")||n.startsWith("https://")}const se="Shopify-Storefront-Consent-Management";function le(n){const e=n.granular_consent;return{query:`query { consentManagement { cookies(${s({visitorConsent:{marketing:e.marketing,analytics:e.analytics,preferences:e.preferences,saleOfData:e.sale_of_data,...e.metafields&&{metafields:e.metafields}},...e.email&&{visitorEmail:e.email},origReferrer:n.referrer,landingPage:n.landing_page})}) { trackingConsentCookie cookieDomain landingPageCookie origReferrerCookie shopifyUnique shopifyVisit } customerAccountUrl } }`,variables:{}}}function de(n,e,t,o){const r=e.granular_consent;let a="",s={};if(r.customerAccountRequestInfo)a=r.customerAccountRequestInfo.url,s=r.customerAccountRequestInfo.headers;else{const e=pn(),o=r.storefrontAccessToken||e.storefrontAccessToken||function(){if(!0===pn().isHeadless)return;try{const n=document.documentElement.querySelector("#shopify-features"),e="Could not find liquid access token";if(!n)return void c.warn(e);const t=n.textContent;if(!t)return void c.warn(e);let o;try{o=JSON.parse(t).accessToken}catch{return void c.warn(e)}return o||void c.warn(e)}catch{return void c.warn("Could not find liquid access token")}}();a=`${/^(localhost|127\.0\.0\.1)(:|$)/.test(n)?"http:":"https:"}//${n}/api/unstable/graphql.json`;const i=r.isExtensionToken?"Shopify-Storefront-Extension-Token":"x-shopify-storefront-access-token";s=o?{[i]:o}:{},t&&(s={...s,...t()})}const l={headers:{"content-type":"application/json",...!0===pn().asyncConsent&&new URL(a).origin===window.location.origin&&{[se]:"1"},...s,...i()?{"x-test-payload":JSON.stringify(e)}:{}},body:JSON.stringify(le(e)),method:"POST"};let d;try{d=fetch(a,l)}catch(n){d=Promise.reject(n)}return d.then(n=>{try{null==o||o(n)}catch{}if(n.ok)return n.json();{const e=new Error("Server error");throw e.cause={status:n.status},e}})}let ue;function pe(n,e,t,o={}){const r=pn().consentDomain||e.granular_consent.checkoutRootDomain||window.location.host;const i=()=>de(r,e,o.getVisitorTokenHeaders,o.onResponse).then(n=>{var r,i;const a=null==n||null===(r=n.data)||void 0===r?void 0:r.consentManagement;if(!a){var c;const e=(null!==(c=null==n?void 0:n.errors)&&void 0!==c?c:[]).map(n=>null==n?void 0:n.message).filter(Boolean).join("; ");throw new Error(e?`GraphQL error: ${e}`:"GraphQL response missing consentManagement")}const s=a.cookies.cookieDomain,u=a.cookies.trackingConsentCookie,p=a.cookies.shopifyUnique,f=a.cookies.shopifyVisit,h=null!==(i=a.customerAccountUrl)&&void 0!==i?i:"";if(!0===pn().asyncConsent&&u&&!function(n){try{return void 0!==Nn(d(n))}catch{return!1}}(u))throw new Error("Consent response contains unreadable consent");var m,y;if(u&&(m=u,l(window,"Shopify","customerPrivacy").cachedConsent=m,!0!==pn().asyncConsent&&gn(u)),re("_shopify_y",p),re("_shopify_s",f),!0===pn().asyncConsent)null!==(y=n.errors)&&void 0!==y&&y.length||!u||Ln()||dn();else if(function(n){return n.granular_consent.headlessStorefront}(e)&&!kn()){const n=31536e6,t=e.granular_consent,o=s||t.checkoutRootDomain||window.location.hostname,r=t.storefrontRootDomain||s||window.location.hostname;sn(on,o,n,u),r!==o&&sn(on,r,n,u)}return!1!==o.emitEvents&&Bn(e,{[H]:Fn(),[L]:Vn(),[N]:Wn(),[j]:zn()}),ie(h,u),void 0!==t&&t(null,n),n}).catch(n=>{var e;const o="Error while setting storefront API consent: "+n.message,r=null===(e=n.cause)||void 0===e?void 0:e.status,i={error:o};if(void 0!==r&&(i.statusCode=r),void 0===t)throw i;t(i)});if(!0!==pn().asyncConsent)return i();const a=ue=ue?ue.then(i,i):i(),c=()=>{ue===a&&(ue=void 0)};return a.then(c,c),a}const fe=[V,W,z,J],he=[...fe,G,K,Y,Z,Q,X,nn,en,tn],me=fe.map(n=>`"${n}"`).join(", "),ye="https://shopify.dev/docs/api/customer-privacy";function ge(n,e){if(r())throw new Error("setTrackingConsent is not supported in Node.js environments. This function requires browser APIs (XHR, cookies, window) and can only be called client-side.");const t=new un;if(Vn()&&t.produce("setTrackingConsent",Xn),function(n){if("boolean"!=typeof n&&"object"!=typeof n)throw new y(`setTrackingConsent received an invali
1d argument of type "${typeof n}". Expected an object with consent keys. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${ye} for documentation.`);if("object"==typeof n){const e=Object.keys(n);if(0===e.length)throw new y(`The submitted consent object is empty. Expected at least one consent key: ${me}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${ye} for documentation.`);for(const n of e)if(!he.includes(n))throw new y(`The submitted consent object contains an invalid key: "${n}". Valid keys are: ${me}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${ye} for documentation.`)}}(n),void 0!==e&&"function"!=typeof e)throw new y(`setTrackingConsent received an invalid callback of type "${typeof e}". The second argument must be a function if provided. Example: setTrackingConsent({ analytics: true }, (error, result) => { ... }). See ${ye} for documentation.`);const o=function(n){if(!n)return null;try{return we()?document.referrer:""}catch{return""}}(n.analytics),i=function(n){if(!n)return null;if(!we())return"/";try{return window.location.pathname+window.location.search}catch{return"/"}}(n.analytics);return pe(0,{granular_consent:n,...null!==o&&{referrer:o},...null!==i&&{landing_page:i}},e)}function ve(){const n=new un;if(Vn()&&n.produce("getTrackingConsent",Xn),Ln())return O;const e=Rn();return e[q]===M&&e[$]===M?S:e[q]===R||e[$]===R?A:B}function be(){return function(){const n=Mn();return Ln(n)?"":n.region||""}()}function we(){try{if(""===document.referrer)return!0;const n=document.createElement("a");return n.href=document.referrer,window.location.hostname!=n.hostname}catch{return!0}}function Ce(){return!!Ln()||Wn()&&Vn()}function xe(){return Gn()?"string"==typeof navigator.globalPrivacyControl?"1"!==navigator.globalPrivacyControl:"boolean"==typeof navigator.globalPrivacyControl?!navigator.globalPrivacyControl:null:null}function ke(){return Jn()&&ve()===B}function _e(){return!1===xe()?A:(n=Hn(),Ln()?O:n===P?B:jn(n));var n}function Ie(){return!0}function Te(n){return function(n){const e=Mn();if(Ln(e)||!e.cus)return;const t=e.cus[encodeURIComponent(n)];return t?decodeURIComponent(t):t}(n)}function De(){const n={},e=Rn();for(const t of Object.keys(e))n[qn(t)]=jn(e[t]);return n}function Ee(){return function(){const n=Mn();return n&&n.consent_id||""}()}const Se="shopify-y",Ae="shopify-s",Be="serialized-shopifyY",Oe="serialized-shopifyS";function Pe(n){if(!r())try{var e,t;return null===(e=document.querySelector(`meta[name="${n}"]`))||void 0===e||null===(t=e.getAttribute("content"))||void 0===t?void 0:t.trim()}catch{return}}function Me(n){const e=Pe(n);if(e)try{const n=JSON.parse(e);return"string"==typeof n?n.trim():void 0}catch{return}}function Re(n){if(!r())try{var e,t;const o=null===(e=document.querySelector(`meta[name="${n}"]`))||void 0===e||null===(t=e.getAttribute("data-expiration"))||void 0===t?void 0:t.trim();if(!o)return;const r=Number(o);return Number.isFinite(r)?r:void 0}catch{return}}function He(n){const e=Me(`${n}Expiration`);if(!e)return;const t=Number(e);return Number.isFinite(t)?t:void 0}function Le(n){return void 0!==n&&Date.now()>n}function Ne(n,e){const t=ne(Me(e));if(t&&!Le(He(e)))return t;const o=ne(Pe(n));return o&&!Le(Re(n))?o:void 0}function je(){return Ne(Se,Be)}function qe(){return Ne(Ae,Oe)}const $e={value:void 0,placeholder:!1,disallowed:!1,source:void 0,duplicated:!1,bothConventions:!1};function Ue(n,e){if(n)return n===Yn?{value:void 0,placeholder:!0,disallowed:!1,source:e}:n===Zn?{value:void 0,placeholder:!1,disallowed:!0,source:e}:{value:Qn(n)?n:void 0,placeholder:!1,disallowed:!1,source:e}}function Fe(n){if(r())return 0;try{return document.querySelectorAll(`meta[name="${n}"]`).length}catch{return 0}}function Ve(n,e){var t,o;let r=null!==(t=null!==(o=Ue(Me(e),"c1"))&&void 0!==o?o:Ue(Pe(n),"sfr"))&&void 0!==t?t:$e;return Le("c1"===r.source?He(e):"sfr"===r.source?Re(n):void 0)&&(r=$e),{...r,duplicated:Fe(n)>1||Fe(e)>1,bothConventions:!!Pe(n)&&!!Pe(e)}}class We{constructor(){if(this.endpoint="https://otlp-http-production.shopifysvc.com/v1/metrics",this.serviceName="consent-tracking-api",this.scopeName="consent-tracking-api-opentelemetry",We.instance)return We.instance;We.instance=this}increment(n,e={}){if(!r()&&n)try{const t=this.buildMetricBody(n,e);if(window.location.host.endsWith("spin.dev"))return void console.log("OpenTelemetry metric from consent API:",t);if("function"!=typeof fetch)return;return fetch(this.endpoint,{headers:{accept:"*/*","content-type":"application/json; charset=utf-8"},body:JSON.stringify(t),method:"POST",mode:"cors",credentials:"omit"}).catch(()=>{})}catch(n){}}buildMetricBody(n,e){const t=1e6*Date.now();return{resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:this.serviceName}}]},scopeMetrics:[{scope:{name:this.scopeName,version:"1.0.0",attributes:[]},metrics:[{name:n,unit:"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[{asDouble:1,startTimeUnixNano:t,timeUnixNano:t,attributes:ze(e)}]}}]}]}]}}}function ze(n){return Object.keys(n).reduce((e,t)=>
1{const o=n[t];return null==o||e.push({key:t,value:Je(o)}),e},[])}function Je(n){return"string"==typeof n?{stringValue:n}:"boolean"==typeof n?{boolValue:n}:isFinite(n)?Math.floor(n)===n?{intValue:n}:{doubleValue:n}:{stringValue:String(n)}}We.instance=void 0;const Ge=new We;function Xe(n,e){try{const t=function(){try{return window.location.href.includes("debug_token_source_instrumentation_force")}catch{return!1}}();if(!t&&Math.random()>=.01)return;const o={token:"_shopify_y"===n?"unique":"visit",source:e,forced:t,sample_rate:.01};t&&console.log("consent_tracking_api_tracking_token_read",o),Ge.increment("consent_tracking_api_tracking_token_read",o)}catch{}}function Ke(){const n=document.querySelector('[data-serialized-id="app-base-path"]');if(f()||n){var e;const t=document.querySelector('[data-serialized-id="preview-mode-data"]');if("/"!==JSON.parse((null==n?void 0:n.textContent)||"null")||!1!==(null===(e=JSON.parse((null==t?void 0:t.textContent)||"null"))||void 0===e?void 0:e.inPreviewMode))return;return new URL("/customer/api/unstable/graphql",window.location.origin).href}const{protocol:t,host:o}=function(){const n=pn().consentDomain||window.location.host;return{protocol:/^(localhost|127\.0\.0\.1)(:|$)/.test(n)?"http:":"https:",host:n}}();return`${t}//${o}/api/unstable/graphql.json`}async function Ye(n){try{var e;if(t=.01,!(Math.random()<t))return;let o=null;if(n)try{const e=await n.json();o=Array.isArray(null==e?void 0:e.errors)&&e.errors.length>0}catch{}!function(n,e,t){(new un).produce("persistOutcome",JSON.stringify({ok:n,status:e,graphqlErrors:t,sampleRate:.01}))}(!(null==n||!n.ok),null!==(e=null==n?void 0:n.status)&&void 0!==e?e:null,o)}catch{}var t}const Ze={};function Qe(n){try{var e,t;const i=null===(e=performance)||void 0===e||null===(t=e.getEntriesByType)||void 0===t?void 0:t.call(e,"resource");if(!i)return;const a=window.location.host;for(let e=i.length-1;e>=0;e--){var o,r;const t=i[e];if(!hn(t,a))continue;const c=null===(o=t.serverTiming)||void 0===o||null===(r=o.find(e=>e.name===n))||void 0===r?void 0:r.description;if(c)return c}return}catch{return}}function nt(n){try{var e,t,o,r;return null===(e=document.cookie)||void 0===e||null===(t=e.split(";"))||void 0===t||null===(o=t.find(e=>e.trim().startsWith(`${n}=`)))||void 0===o||null===(r=o.split("=")[1])||void 0===r?void 0:r.trim()}catch{return}}function et(n){if(_n()){const e=function(n){const e=Qe(n);return e&&(Ze[n]=e),e}(n);if(e)return{value:e,source:"resource"};const t=Ze[n];if(t)return{value:t,source:"cache"}}const e=function(n){try{var e,t,o,r;return null===(e=performance)||void 0===e||null===(t=e.getEntriesByType("navigation")[0])||void 0===t||null===(o=t.serverTiming)||void 0===o||null===(r=o.find(e=>e.name==n))||void 0===r?void 0:r.description}catch{return}}(n);return e?{value:e,source:"navigation"}:{value:void 0,source:null}}function tt(n,e,{generateFallback:t=!1,tag:o="unknown"}={}){if(t&&r())throw new Error("Token generateFallback is not supported in Node.js environments, just browsers.");if(!Vn()&&!Wn())return;const i=function(n){var e,t,o,r,i,a;const c=u();if(!c)return;const s=null===(e=c.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t||null===(o=t.cachedToken)||void 0===o?void 0:o[n],l=null===(r=c.Shopify)||void 0===r||null===(i=r.customerPrivacy)||void 0===i||null===(a=i.cachedToken)||void 0===a?void 0:a[n+"_expires_at"];return!s||!l||l<(new Date).getTime()?void 0:ne(s)}(n);if(i)return Xe(n,"window_cache"),i;const a=u();if(function(n){if(!n)return!1;try{const e=Object(n);return Reflect.has(e,"trackingUnique")||Reflect.has(e,"trackingVisit")}catch{return!1}}(null==a?void 0:a.ShopPay)){const e=function(n){const e=u();if(!e||!e.ShopPay)return;const t={_shopify_y:"trackingUnique",_shopify_s:"trackingVisit"}[n];if(!t)return;return ne(e.ShopPay[t])}(n);return Xe(n,"shop_pay"),e}const c=e();if(c)return Xe(n,"meta"),c;const s=function(n){const e=n.replace("_shopify",""),t=et(e),o=Number(et(`${e}e`).value);if(!o||Date.now()/1e3<o){const e=ne(t.value);return e&&Xe(n,t.source?`server_timing_${t.source}`:"server_timing_unknown"),e}}(n);if(s)return s;const l=ne(nt(n));
1if(l)return Xe(n,"cookie"),l;Xe(n,"missing");try{if(!t)return;if(!0===pn().asyncConsent&&"loaded"!==En())return;!function(n,e=!1,t="unknown"){var o,r;Ge.increment("consent_tracking_api_tracking_token_missing");const i=u();(new un).produce("trackingTokenMissing",JSON.stringify({token:n,hasTrekkie:!(null==i||!i.ShopifyAnalytics),hasTheme:!(null==i||null===(o=i.Shopify)||void 0===o||!o.theme),domain:null==i||null===(r=i.location)||void 0===r?void 0:r.hostname,fallbackRequested:e,tag:t}))}(n,t,o);const e=ot()?void 0:oe(),i=rt()?void 0:oe();return e&&re("_shopify_y",e),i&&re("_shopify_s",i),function(n,e){if(!r())try{const t=ne(n),o=ne(e);if(!t&&!o)return;const r=Ke();if(!r)return;const i=new URLSearchParams,a={"content-type":"application/json"};t&&(i.set("_y",t),a["X-Shopify-UniqueToken"]=t),o&&(i.set("_s",o),a["X-Shopify-VisitToken"]=o);const c=`${r}?${i.toString()}`;let s;try{s=fetch(c,{headers:a,body:JSON.stringify({query:"query { consentManagement { cookies(visitorConsent:{}) { cookieDomain } } }",variables:{}}),method:"POST",mode:"cors",credentials:"include"})}catch(n){s=Promise.reject(n)}s.then(n=>Ye(n),()=>Ye(void 0))}catch{}}(e,i),"_shopify_y"===n?e:i}catch{}}function ot({generateFallback:n=!1,tag:e="unknown"}={}){return tt("_shopify_y",je,{generateFallback:n,tag:e})}function rt({generateFallback:n=!1,tag:e="unknown"}={}){return tt("_shopify_s",qe,{generateFallback:n,tag:e})}function it(n){return nt("y"===n?"_shopify_y":"_shopify_s")}const at="95ba910bcec4542ef2a0b64cd7ca666c";function ct(n,e,t){try{var o;!function(n){const e=new XMLHttpRequest;e.open("POST","https://error-analytics-production.shopifysvc.com",!0),e.setRequestHeader("Content-Type","application/json"),e.setRequestHeader("Bugsnag-Api-Key",at),e.setRequestHeader("Bugsnag-Payload-Version","5");const t=function(n){var e;const t=function(n){return n?n.stackTrace||n.stack||n.description||n.name:void 0}(n.error);let o,r;if(null!==(e=n.error)&&void 0!==e&&e.name){var i,a;o=n.error.name,r=null!==(i=null===(a=n.error)||void 0===a?void 0:a.message)&&void 0!==i?i:""}else{const e=(t||"unknown error").split("\n")[0],i=e.indexOf(":");var c,s,l;if(i>0)o=e.substring(0,i).trim(),r=e.substring(i+1).trim();else o=e.trim()||"unknown error",r=(null===(c=n.error)||void 0===c?void 0:c.message)||(null===(s=n.error)||void 0===s?void 0:s.error)||(null===(l=n.error)||void 0===l?void 0:l.toString())||"No error message available"}return JSON.stringify({payloadVersion:5,notifier:{name:"ConsentTrackingAPI",version:"latest",url:"-"},events:[{exceptions:[{errorClass:o,message:r,stacktrace:[{file:"consent-tracking-api.js",lineNumber:"1",method:t}],type:"browserjs"}],context:"general",app:{id:"ConsentTrackingAPI",version:"latest"},metaData:{request:{shopId:n.shopId,shopUrl:window.location.href},device:{userAgent:window.navigator.userAgent},"Additional Notes":n.notes},unhandled:!1}]})}(n);e.send(t)}({error:n,context:null!=e?e:"",shopId:lt()||(null===(o=window.Shopify)||void 0===o?void 0:o.shop),notes:null!=t?t:""})}catch(n){}}function st(n){return(...e)=>{try{return n(...e)}catch(n){throw n instanceof y||ct(n),n}}}function lt(){try{var n;const e=null===(n=document.getElementById("shopify-features"))||void 0===n?void 0:n.textContent;return e?JSON.parse(e).shopId:null}catch(n){return null}}function dt(){return Wn()}function ut(){return Vn()}function pt(){return Fn()}function ft(){return zn()}function ht(n={useBugsnagReporting:!1}){return(({useBugsnagReporting:n})=>{Hn()!=R&&!1===xe()&&ge({sale_of_data:!1},()=>!1);const e={analyticsProcessingAllowed:Vn,currentVisitorConsent:De,doesMerchantSupportGranularConsent:Ie,firstPartyMarketingAllowed:dt,getCCPAConsent:_e,getRegion:be,getTrackingConsent:ve,getTrackingConsentMetafield:Te,marketingAllowed:dt,preferencesProcessingAllowed:Fn,saleOfDataAllowed:ft,saleOfDataRegion:Gn,setTrackingConsent:ge,shouldShowBanner:Jn,shouldShowGDPRBanner:ke,thirdPartyMarketingAllowed:ft,userCanBeTracked:Ce,consentId:Ee,unstable:{},__internal:{uniqueToken:ot,visitToken:rt},__metadata__:{name:"@shopify/consent-tracking-api",version:Xn,description:"Shopify Consent Tracking API"},config:pn()};if(!n)return e;const t=e;for(const n in t)if(t.hasOwnProperty(n)){const e=t[n];"function"==typeof e&&(t[n]=st(e))}return e})(n)}function mt(){return!(r()||p()||h()||f())}function yt(){var n,e;if(!mt())return;const t=null===(n=pn().debug)||void 0===n||null===(e=n.hydrogen)||void 0===e?void 0:e.generation;return 2===t||3===t?t:void 0}function gt(n=!1){var e,t;if(!mt())return;const o=yt();if(o)return 2===o?"classic":"new";const r=pn();return void 0===(null===(e=r.debug)||void 0===e||null===(t=e.hydrogen)||void 0===t?void 0:t.generation)?!0===r.asyncConsent?"new":n?"classic":void 0:void 0}let vt=!1;function bt(n,e){return!!n&&!!e}function wt(){try{return performance.now()}catch{return 0}}function Ct(){try{return window.__st.reqid}catch{return null}}
1function xt(){const n=function(){try{const n=Ct();if(!n)return null;const e=1e3*parseInt(n.split("-").slice(-1)[0],10);return Number.isFinite(e)?e:null}catch{return null}}();return n?(Date.now()-n)/1e3:null}function kt(){try{const n=navigator.userAgent;return!n||""===n.trim()||(!0===navigator.webdriver||/bot|crawl|curl|email|feed|fetch|googleother|headless|index|link|monitoring|robot|rss|scan|search|spider/i.test(n))}catch{return null}}const _t=/^https:\/\/shopify\.com\/\d+\/account\/?/i,It=/^https:\/\/shopify\..*?\.shop\.dev\/\d+\/account\/?/i,Tt=/^https:\/\/account\..*/i;function Dt(n){return function(){try{var n;const e=window.location.href;return _t.test(e)||It.test(e)||Tt.test(e)||(null===(n=window)||void 0===n?void 0:n.__CUSTOMER_ACCOUNT__)||null!==document.querySelector('[data-serialized-id="app-base-path"]')}catch{return!1}}()?"accounts":n.source||null}function Et(n,e,t){var o,i;const a=t.value,c=e.value,s=ne(c);return{hasCookie:!!n,cookieValid:n?!!ne(n):null,hasServerTiming:!!s,serverTimingDisallowed:(null==c?void 0:c.trim())===Zn,serverTimingSource:e.source,hasMeta:!!a,metaDuplicated:t.duplicated,bothConventions:t.bothConventions,metaPlaceholder:t.placeholder,metaDisallowed:t.disallowed,metaSource:Dt(t),cookieMatchesMeta:bt(n,a)?n===a:null,cookieMatchesServerTiming:bt(n,s)?n===s:null,metaMatchesServerTiming:bt(a,s)?a===s:null,cookieValue:n,metaValue:a,serverTimingValue:s,performanceNow:r()?0:wt(),htmlAgeSeconds:r()?null:xt(),requestId:Ct(),consentWasCollected:!(null===(o=window.Shopify)||void 0===o||null===(i=o.customerPrivacy)||void 0===i||!i.cachedConsent),isBot:kt()}}function St(n){return n.hasCookie||n.hasServerTiming||n.serverTimingDisallowed||null!==n.metaSource}function At(n){return n.hasServerTiming||n.serverTimingDisallowed||null!==n.metaSource}function Bt(){try{const n=new URLSearchParams(window.location.search);return n.has("_y")||n.has("_s")}catch{return!1}}function Ot(){try{var n,e,t;return null!==(n=null===(e=performance)||void 0===e||null===(t=e.getEntriesByType("navigation")[0])||void 0===t?void 0:t.type)&&void 0!==n?n:null}catch{return null}}function Pt(){try{var n,e;const o=Et(it("y"),et("_y"),Ve(Se,Be)),r=Et(it("s"),et("_s"),Ve(Ae,Oe));if(!St(o)&&!St(r))return;const i=At(o)||At(r),a=i?.01:.001;if(t=a,!(Math.random()<t))return;(new un).produce("trackingTokenParity",JSON.stringify({navigationType:Ot(),urlTokenOverride:Bt(),readyStateAtEmit:document.readyState,serverTimingSupported:m(),consentStored:!Ln(),analyticsAllowed:Vn(),controlSample:!i,sampleRate:a,hasTheme:null===(n=window)||void 0===n||null===(e=n.Shopify)||void 0===e?void 0:e.theme,href:window.location.href,y:o,s:r}))}catch{}var t}function Mt(){var n;r()||(vt||(vt=!0,n=Pt,"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>n(),{once:!0}):n())))}const Rt=.01,Ht="__shopifyClassicHydrogenVisitorStateInstrumentation";let Lt,Nt=!1,jt=!1;function qt(n,e){var t,o;const r=null==n?void 0:n.split(",").find(n=>n.trim().split(";",1)[0]===`_${e}`),i=null==r?void 0:r.match(/;\s*desc\s*=\s*(?:"([^"]*)"|([^;,\s]*))/i),a=null===(t=null!==(o=null==i?void 0:i[1])&&void 0!==o?o:null==i?void 0:i[2])||void 0===t?void 0:t.trim(),c=void 0!==r,s=!!ne(a),l=a===Zn;return{present:c,available:s,disallowed:l,invalid:c&&!s&&!l}}function $t(n,e){var t,o;const r=et("y"===n?"_y":"_s"),i=null===(t=r.value)||void 0===t?void 0:t.trim(),a=!!ne(i),c=i===Zn;return{available:!!ne("y"===n?ot():rt()),serverTimingAvailable:a,serverTimingDisallowed:c,serverTimingInvalid:void 0!==i&&!a&&!c,serverTimingSource:r.source,responseHeader:null!==(o=null==e?void 0:e[n])&&void 0!==o?o:null}}function Ut(n=null){return{y:$t("y",n),s:$t("s",n)}}function Ft(n){const e=null==n?void 0:n.statusCode;return"number"==typeof e?e:null}function Vt(n){var e;const t=null===(e=Qe(n))||void 0===e?void 0:e.trim(),o=!!ne(t),r=t===Zn;return{present:void 0!==t,available:o,disallowed:r,invalid:void 0!==t&&!o&&!r}}function Wt(){try{var n,e,t,o;return null!==(n=null===(e=performance)||void 0===e||null===(t=e.getEntriesByType)||void 0===t||null===(o=t.call(e,"resource"))||void 0===o?void 0:o.length)&&void 0!==n?n:null}catch{return null}}function zt(n,e=null){try{var t,o,r;(new un).produce("hydrogenVisitorState",JSON.stringify({...n,asyncConsent:!0===pn().asyncConsent,configuredServerTiming:null!==(t=null===(o=pn().debug)||void 0===o||null===(r=o.hydrogen)||void 0===r?void 0:r.serverTiming)&&void 0!==t?t:null,after:Ut(e),isBot:kt(),serverTimingSupported:m(),requestId:Ct(),htmlAgeSeconds:xt(),resourceScanEnabled:_n(),resourceUngated:{y:Vt("_y"),s:Vt("_s"),cmpPresent:void 0!==Qe("_cmp")},navigationYPresent:Jt("_y"),navigationSPresent:Jt("_s"),navigationCmpPresent:Jt("_cmp"),resourceEntryCount:Wt(),schemaVersion:4,sampleRate:Rt}))}catch{}}function Jt(n){try{var e,t,o;const r=null===(e=performance)||void 0===e||null===(t=e.getEntriesByType)||void 0===t?void 0:t.call(e,"navigation")[0];return!(null==r||null===(o=r.serverTiming)||void 0===o||!o.some(e=>
1e.name===n))}catch{return!1}}function Gt(){if(!jt){jt=!0;try{if(!0===pn().asyncConsent)return;if(Math.random()>=Rt)return;if("classic"!==gt(!0))return;zt({generation:"classic",flow:Jt("_server_tracking")?"classic_server_forwarded":Jt("_sfapi_proxy")?"classic_browser_fetch":"classic_no_fetch",requestOk:null,status:null,before:null})}catch{return}}}function Xt(){try{if(!function(){const n=pn();if(!0!==n.asyncConsent||!kn())return!1;try{const e=n.consentDomain||window.location.host,t=/^(localhost|127\.0\.0\.1)(:|$)/.test(e)?"http:":"https:";return new URL(`${t}//${e}`).origin===window.location.origin}catch{return!1}}())return;const n=gt();if(!n||Math.random()>=Rt)return;const e=Ut();let t=null,o=!1;return{observeResponse(n){t=function(n){try{const e=n.headers.get("server-timing");return{y:qt(e,"y"),s:qt(e,"s")}}catch{return null}}(n)},report(r,i){if(!o){o=!0;try{zt({generation:n,flow:"cta_initialize",requestOk:r,status:Ft(i),before:e},t)}catch{}}}}}catch{return}}function Kt(){const n=ot(),e=rt();return{...n?{"X-Shopify-UniqueToken":n}:{},...e?{"X-Shopify-VisitToken":e}:{}}}function Yt(){if(r())return;if(Lt)return Lt;const n=En();if("loading"===n)return;if("loaded"===n)return;const e=!0===pn().asyncConsent;if(!Ln()&&(!e||!an()))return void Sn("loaded");if(!e)return;Sn("loading");const t=function(){const n=Xt();return pe(0,{granular_consent:{}},void 0,{emitEvents:!1,getVisitorTokenHeaders:kn()?Kt:void 0,onResponse:e=>null==n?void 0:n.observeResponse(e)}).then(()=>{null==n||n.report(!0)},e=>{throw null==n||n.report(!1,e),e})}().then(()=>{Sn("loaded")});return Lt=t,t.then(()=>{Lt===t&&(Lt=void 0)},()=>{"loading"===En()&&Sn(void 0),Lt===t&&(Lt=void 0)}),t}function Zt(){try{return window.location.href.includes("debug_server_timing_instrumentation_hydrogen_force")}catch{return!1}}const Qt=/^https:\/\/monorail-edge\.shopifysvc\.com\/(?:unstable|v1)\/produce_batch(?:$|\?)/,no=/^https?:\/\/[^/]+\/\.well-known\/shopify\/monorail\/(?:unstable|v1)\/produce_batch(?:$|\?)/,eo="__shopifyHydrogenAnalyticsTokenInstrumentation";let to,oo=!1,ro=!1,io=!1;function ao(n){return Qt.test(n)?"monorail_edge":no.test(n)?"shop_domain":null}function co(n){var e;const t=it(n),o=null===(e=vn("y"===n?"_y":"_s"))||void 0===e?void 0:e.trim(),r=ne(o),i=o===Zn;return{hasCookie:!!t,cookieValid:t?!!ne(t):null,hasServerTiming:!!r,serverTimingDisallowed:i,serverTimingInvalid:void 0!==o&&!r&&!i,cookieMatchesServerTiming:t&&r?t===r:null,cookieValue:t,serverTimingValue:r}}function so(n,e,t){if(!io){io=!0;try{var o,r,i,a,c;const s=u(),l=Zt(),d=JSON.stringify({generation:n,asyncConsent:!0===pn().asyncConsent,configuredServerTiming:null!==(o=null===(r=pn().debug)||void 0===r||null===(i=r.hydrogen)||void 0===i?void 0:i.serverTiming)&&void 0!==o?o:null,endpoint:e,analyticsFetchStart:t.startTime,analyticsFetchEnd:t.responseEnd,y:co("y"),s:co("s"),analyticsAllowed:Vn(),consentStored:!Ln(),serverTimingSupported:m(),isBot:kt(),requestId:Ct(),htmlAgeSeconds:xt(),isHeadless:null!==(a=pn().isHeadless)&&void 0!==a?a:null,hasTheme:!(null==s||null===(c=s.Shopify)||void 0===c||!c.theme),hasTrekkie:!(null==s||!s.ShopifyAnalytics),forced:l,sampleRate:.01});l&&console.log("hydrogenAnalyticsTokenState",d),(new un).produce("hydrogenAnalyticsTokenState",d)}catch{}}}function lo(n){if(!ro){ro=!0;try{if("undefined"==typeof PerformanceObserver)return;to=new PerformanceObserver(e=>{try{for(const o of e.getEntries()){var t;const e=o;if("fetch"!==e.initiatorType)continue;const r=ao(e.name);if(r)return null===(t=to)||void 0===t||t.disconnect(),void so(n,r,e)}}catch{return}}),to.observe({type:"resource",buffered:!0})}catch{return}}}function uo(){const n=gt(!0);!n||"classic"!==n&&!0!==pn().asyncConsent||lo(n)}var po,fo,ho,mo,yo,go;!function(){try{var n,e,t,o,i;if(r()||p())return;if("function"!=typeof(null===(n=performance)||void 0===n?void 0:n.setResourceTimingBufferSize))return;if((null!==(e=null===(t=(o=performance).getEntriesByType)||void 0===t||null===(i=t.call(o,"resource"))||void 0===i?void 0:i.length)&&void 0!==e?e:0)>=1e3)return;performance.setResourceTimingBufferSize(1e3)}catch{}}(),function(n){n.BottomCenter="bottom_center",n.BottomFullWidth="bottom_full_width",n.BottomLeft="bottom_left",n.BottomRight="bottom_right",n.Center="center"}(po||(po={})),function(n){n.Custom="custom",n.Dark="dark",n.Light="light"}(fo||(fo={})),function(n){n[n.Yes=1]="Yes",n[n.No=0]="No"}(ho||(ho={})),function(n){n.StylesContainerId="shopify-pc__banner__styles",n.DialogId="shopify-pc__banner",n.DialogClass="shopify-pc__banner__dialog",n.WrapperClass="shopify-pc__banner__wrapper",n.BodyClass="shopify-pc__banner__body",n.BodyTitleId="shopify-pc__banner__body-title",n.BodyCopyPolicyLinkId="shopify-pc__banner__body-policy-link",n.ButtonsClass="shopify-pc__banner__btns",n.ButtonsGranularClass="shopify-pc__banner__btns-granular",n.ButtonAcceptId="shopify-pc__banner__btn-accept",n.ButtonAcceptClass="shopify-pc__banner__btn-accept",n.ButtonDeclineId="shopify-pc__banner__btn-decline",n.ButtonDeclineClass="shopify-pc__banner__btn-decline",n.ButtonManagePrefsId="shopify-pc__banner__btn-manage-prefs",n.ButtonManagePrefsClass="shopify-pc__banner__btn-manage-prefs"}(mo||(mo={})),function(n){n.StylesContainerId="shopify-pc__prefs__styles",n.OverlayId="shopify-pc__prefs__overlay",n.OverlayClass="shopify-pc__prefs__overlay",n.WrapperId="shopify-pc__prefs",n.WrapperClass="shopify-pc__prefs",n.DialogId="shopify-pc__prefs__dialog",n.DialogClass="shopify-pc__prefs__dialog",n.DialogScrollableClass="shopify-pc__prefs__scrollable",n.HeaderTitleId="shopify-pc__prefs__header-title",n.HeaderActionsClass="shopify-pc__prefs__header-actions",n.HeaderSaveId="shopify-pc__prefs__header-save",n.HeaderAcceptId="shopify-pc__prefs__header-accept",n.HeaderDeclineId="shopify-pc__prefs__header-decline",n.HeaderCloseId="shopify-pc__prefs__header-close",n.HeaderCloseClass="shopify-pc__prefs__header-close",n.IntroClass="shopify-pc__prefs__intro",n.IntroMainClass="shopify-pc__prefs__intro-main",n.IntroExplainWrapperClass="shopify-pc__prefs__intro-explain",n.IntroExplainAcceptClass="shopify-pc__prefs__intro-explain-accept",n.IntroExplainDeclineClass="shopify-pc__prefs__intro-explain-decline",n.OptionWrapperClass="shopify-pc__prefs__options",n.OptionClass="shopify-pc__prefs__option",n.OptionEssentialId="shopify-pc__prefs__essential",n.OptionEssentialInputId="shopify-pc__prefs__essential-input",n.OptionMarketingId="shopify-pc__prefs__marketing",n.OptionMarketingInputId="shopify-pc__prefs__marketing-input",n.OptionAnalyticsId="shopify-pc__prefs__analytics",n.OptionAnalyticsInputId="shopify-pc__prefs__analytics-input",n.OptionPreferencesId="shopify-pc__prefs__preferences",n.OptionPreferencesInputId="shopify-pc__prefs__preferences-input"}(yo||(yo={})),function(n){n.Black="#333",n.White="#fff",n.Gray="#ccc",n.Green="#3AA83A",n.LightGray="#F7F8F9",n.DarkGray="#36454F",n.VeryDarkGray="#666",n.VeryLightGray="#e5e5e5"}(go||(go={}));var vo=["ar","he","ur"];function bo(n){if(!n)return!1;var e=n.toLowerCase().replace(/_/g,"-").split("-")[0];return-1!==vo.indexOf(e)}var wo=function(n){return"\n    border: 1px solid ".concat(n.button.borderColor,";\n    color: ").concat(n.button.fontColor,";\n    background: ").concat(n.button.backgroundColor,";\n  ")};function Co(n,e,t,o){void 0===e&&(e="0,0,100,100"),void 0===t&&(t="0,0,0,100"),void 0===o&&(o="0,0,100,100");var r=n.split(","),i=r[0],a=r[1],c=r[2],s=r[3],l=e.split(","),d=l[0],u=l[1],p=l[2],f=l[3],h=t.split(","),m=h[0],y=h[1],g=h[2],v=h[3],b=o.split(","),w=b[0],C=b[1],x=b[2],k=b[3],_={hue:Number(i),saturation:Number(a),lightness:Number(c),alph
1a:Number(s)},I={hue:Number(d),saturation:Number(u),lightness:Number(p),alpha:Number(f)},T={hue:Number(m),saturation:Number(y),lightness:Number(g),alpha:Number(v)},D={hue:Number(w),saturation:Number(C),lightness:Number(x),alpha:Number(k)},E={hue:_.hue,saturation:_.saturation,lightness:_.lightness,alpha:_.alpha-10},S={hue:I.hue,saturation:I.saturation,lightness:I.lightness<50?I.lightness+14:I.lightness-12,alpha:I.alpha},A={hue:201,saturation:I.lightness<50?60:90,lightness:I.lightness<50?60:80,alpha:I.lightness<50?80:100};return{font:xo(_),fontSubdued:xo(E),buttonFont:xo(T),buttonBackground:xo(D),background:xo(I),divider:xo(S),focused:xo(A)}}function xo(n){return"hsl(".concat(n.hue,"deg, ").concat(n.saturation,"%, ").concat(n.lightness,"%, ").concat(n.alpha,"%)")}function ko(n,e,t,o,r){var i="0,0,0,100",a="0,0,100,100",c=Co("0,0,12,100","0,0,100,100","0,0,12,100","0,0,100,100"),s=Co("0,0,100,87","0,0,12,100","0,0,100,87","0,0,12,100"),l=Co(null!=e?e:i,null!=t?t:a,null!=o?o:i,null!=r?r:a),d=function(){switch(n){case fo.Light:return c;case fo.Dark:return s;case fo.Custom:return l;default:return c}}();return{backgroundColor:d.background,fontColor:d.font,fontSubduedColor:d.fontSubdued,sectionDivider:d.divider,iconColor:d.font,focused:d.focused,button:{borderColor:d.buttonFont,backgroundColor:d.buttonBackground,fontColor:d.buttonFont},primaryButton:{borderColor:d.buttonBackground,backgroundColor:d.buttonFont,fontColor:d.buttonBackground}}}function _o(n){var e=n.bannerData,t=n.selectorPrefix,o=n.locale,r=t?"".concat(t," "):"",i=bo(o),a=ko(e.theme.theme,e.theme.fontColor,e.theme.backgroundColor,e.theme.buttonFontColor,e.theme.buttonBackgroundColor);return"\n    ".concat(r,".").concat(yo.WrapperClass," {\n      position: relative;\n    }\n    ").concat(r,".").concat(yo.WrapperClass,':after {\n      content: "";\n      display: block;\n      clear: both;\n    }\n\n    ').concat(r,".").concat(yo.DialogClass," {\n      box-shadow: 0 5px 10px rgb(63 63 68 / 50%);\n      position: fixed;\n      z-index: 2000002;\n      opacity: 1;\n      background-color: ").concat(a.backgroundColor,";\n      max-height: 80%;\n      overflow-y: auto;\n      top: 50%;\n      transform: translate(0, -50%);\n      min-width: 280px;\n      border-radius: 3px;\n      display: flex;\n      flex-direction: column;\n      left: 25%;\n      width: 50%;\n      /* left is a fallback for Edge Legacy, which drops text-align: start */\n      text-align: left;\n      text-align: start;\n    }\n    @media only screen and (max-width: 1900px) {\n      ").concat(r,".").concat(yo.DialogClass," {\n        left: 20%;\n        width: 60%;\n      }\n    }\n    @media only screen and (max-width: 1600px) {\n      ").concat(r,".").concat(yo.DialogClass," {\n        left: 15%;\n        width: 70%;\n      }\n    }\n    @media only screen and (max-width: 1350px) {\n      ").concat(r,".").concat(yo.DialogClass," {\n        left: 5%;\n        width: 90%;\n      }\n    }\n\n    ").concat(r,".").concat(yo.OverlayClass," {\n      z-index: 2000001;\n      position: fixed;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: 100%;\n      background-color: rgba(0, 0, 0, 0.6);\n    }\n\n    /* Header */\n\n    ").concat(r,".").concat(yo.DialogClass," header {\n      display: flex;\n      flex-direction: row;\n      justify-content: space-between;\n      align-items: center;\n      padding: 32px 32px 20px 32px;\n      border-bottom: 1px solid ").concat(a.sectionDivider,";\n      position: relative;\n      background: transparent;\n    }\n\n    @media only screen and (max-width: 1200px) {\n      ").concat(r,".").concat(yo.DialogClass," header {\n        flex-direction: column;\n      }\n    }\n    @media only screen and (max-width: 400px) {\n      ").concat(r,".").concat(yo.DialogClass," header {\n        padding: 15px 20px 10px 20px;\n      }\n    }\n    ").concat(r,".").concat(yo.DialogClass," header h2 {\n      color: ").concat(a.fontColor,";\n      font-family: inherit;\n      margin: 0;\n      padding: 0 20px 0 0 !important;\n      font-weight: 600;\n      font-size: 130%;\n      line-height: 1.2;\n      width: 100%;\n      text-align: left;\n      text-align: start;\n      word-break: normal;\n    }\n    @media only screen and (max-width: 1200px) {\n      ").concat(r,".").concat(yo.DialogClass," header h2 {\n        margin: 0 0 .8em 0;\n        padding: 0 !important;\n        text-align: center;\n      }\n    }\n    @media only screen and (max-width: 750px) {\n      ").concat(r,".").concat(yo.DialogClass," header h2 {\n        text-align: left;\n        text-align: start;\n        padding: 0 25px 0 0 !important;\n      }\n    }\n\n    ").concat(r,".").concat(yo.HeaderCloseClass," {\n      position: absolute;\n      top: 40px;\n      right: 35px;\n      width: 24px;\n      height: 24px;\n      padding: 0;\n      margin: 0;\n      background: transparent;\n      border: none;\n      outline: none;\n      display: flex;\n      justify-content: center;\n      align-items: center;\n      align-content: center;\n      border-radius: 50%;\n      min-width: 24px;\n    }\n\n    ").concat(r,".").concat(yo.HeaderCloseClass," svg {\n      height: 12px;\n      width: 12px;\n    }\n\n    @media only screen and (max-width: 1200px) {\n      ").concat(r,".").concat(yo.HeaderCloseClass," {\n        top: 20px;\n        right: 20px;\n      }\n    }\n    @media only screen and (max-width: 750px) {\n      ").concat(r,".").concat(yo.HeaderCloseClass," {\n        top: 30px;\n        right: 30px;\n      }\n    }\n    @media only screen and (max-width: 400px) {\n      ").concat(r,".").concat(yo.HeaderCloseClass," {\n        top: 15px;\n        right: 15px;\n      }\n    }\n    ").concat(r,".").concat(yo.HeaderCloseClass,":hover {\n      cursor: pointer;\n    }\n    ").concat(r,".").concat(yo.HeaderCloseClass,":focus {\n      outline: none;\n      box-shadow: 0 0 0 3px ").concat(a.focused,";\n    }\n    ").concat(r,".").concat(yo.HeaderCloseClass," svg path {\n      fill: ").concat(a.fontColor,";\n    }\n    ").concat(r,".").concat(yo.HeaderCloseClass,":disabled svg path {\n      fill: ").concat(a.sectionDivider,";\n    }\n\n    ").concat(r,".").concat(yo.HeaderActionsClass," {\n      margin: 0;\n      display: flex;\n      justify-content: space-around;\n      flex-direction: row;\n      padding: 0 50px 0 0;\n      width: auto;\n    }\n\n    @media only screen and (max-width: 750px) {\n      ").concat(r,".").concat(yo.HeaderActionsClass," {\n        flex-direction: column;\n        width: 100%;\n      }\n    }\n    @media only screen and (max-width: 1200px) {\n      ").concat(r,".").concat(yo.HeaderActionsClass," {\n        padding: 0;\n      }\n    }\n    ").concat(r,".").concat(yo.HeaderActionsClass," button {\n      text-decoration: none;\n      font-family: inherit;\n      padding: 8px 25px 10px 25px;\n      margin: 0 20px 0 0;\n      font-size: 110%;\n      background: ").concat(a.button.backgroundColor,";\n      color: ").concat(a.button.fontColor,";\n      border: 1px solid ").concat(a.button.borderColor,";\n      white-space: nowrap;\n      border-radius: 2px;\n      line-height: 120%;\n      height: unset;\n    }\n    @media only screen and (max-width: 750px) {\n      ").concat(r,".").concat(yo.HeaderActionsClass," button {\n        width: 100%;\n        margin-bottom: 15px;\n      }\n    }\n    ").concat(r,".").concat(yo.HeaderActionsClass," button.primary {\n      background: ").concat(a.primaryButton.backgroundColor,";\n      color: ").concat(a.primaryButton.fontColor,";\n      border: 1px solid ").concat(a.primaryButton.borderColor,";\n    }\n    ").concat(r,".").concat(yo.HeaderActionsClass," button:last-child {\n      margin-right: 0;\n    }\n    ").concat(r,".").concat(yo.HeaderActionsClass," button:hover {\n      cursor: pointer;\n    }\n    ").concat(r,".").concat(yo.HeaderActionsClass," button:focus {\n      outline: none;\n      box-shadow: 0 0 0 4px ").concat(a.focused,";\n    }\n\n    ").concat(r,".").concat(yo.DialogScrollableClass," {\n      overflow-y: auto;\n      position: relative;\n    }\n\n    ").concat(r,".").concat(yo.DialogScrollableClass,"::-webkit-scrollbar {\n      width: 0px;\n      background: transparent;\n    }\n\n    /* Intro */\n\n    ").concat(r,".").concat(yo.IntroClass," h3 {\n      color: ").concat(a.fontColor,";\n      font-family: inherit;\n      margin: 0 0 15px 0;\n      padding: 0 !important;\n      font-weight: 600;\n      line-height: 1.2;\n      text-align: left;\n      text-align: start;\n    }\n    ").concat(r,".").concat(yo.IntroClass," p {\n      color: ").concat(a.fontSubduedColor,";\n      font-family: inherit;\n      margin: 0;\n      padding: 0;\n    }\n    ").concat(r,".").concat(yo.IntroClass," ul {\n      margin: 0;\n      padding: 0;\n    }\n    ").concat(r,".").concat(yo.IntroClass," ul li {\n      margin: 0 0 0.5em 1.7em;\n      padding: 0;\n      line-height: 1.2;\n    }\n    ").concat(r,".").concat(yo.IntroMainClass," {\n      padding: 20px 32px 0 32px;\n      line-height: 1.5;\n    }\n    @media only screen and (max-width: 400px) {\n      ").concat(r,".").concat(yo.IntroMainClass," {\n        padding: 20px 20px 0 20px;\n      }\n    }\n    ").concat(r,".").concat(yo.IntroMainClass," p {\n      padding-bottom: 20px;\n    }\n    ").concat(r,".").concat(yo.IntroMainClass," h3 {\n      font-size: 110%;\n    }\n    ").concat(r,".").concat(yo.IntroMainClass," p {\n      font-size: 105%;\n      margin: 0;\n      padding: 0;\n    }\n    ").concat(r,".").concat(yo.IntroExplainWrapperClass," {\n      display: flex;\n      flex-direction: row;\n      justify-content: center;\n      margin: 0;\n      padding: 20px 32px 0 32px;\n      color: ").concat(a.fontSubduedColor,";\n    }\n    @media only screen and (max-width: 700px) {\n      ").concat(r,".").concat(yo.IntroExplainWrapperClass," {\n        flex-direction: column;\n        padding-bottom: 0;\n      }\n    }\n    @media only screen and (max-width: 400px) {\n      ").concat(r,".").concat(yo.IntroExplainWrapperClass," {\n        padding: 20px 20px 0 20px;\n      }\n    }\n    ").concat(r,".").concat(yo.IntroExplainAcceptClass," {\n      width: 100%;\n      padding: 0 40px 0 0;\n    }\n    ").concat(r,".").concat(yo.IntroExplainAcceptClass," li {\n      list-style-type: disc;\n    }\n    @media only screen and (max-width: 700px) {\n      ").concat(r,".").concat(yo.IntroExplainAcceptClass," {\n        width: 100%;\n        padding-right: 0;\n      }\n    }\n    ").concat(r,".").concat(yo.IntroExplainAcceptClass," h3 {\n      font-size: 110%;\n    }\n\n    /* Options */\n\n    ").concat(r,".").concat(yo.OptionWrapperClass," {\n      padding: 0 32px 32px 32px;\n      color: ").concat(a.fontColor,";\n    }\n    @media only screen and (max-width: 400px) {\n      ").concat(r,".").concat(yo.OptionWrapperClass," {\n        padding: 0 20px 15px 20px;\n      }\n    }\n\n    ").concat(r,".").concat(yo.OptionClass," {\n      margin: 0;\n      font-size: 100%;\n      line-height: 1.1;\n      padding: 20px 0 0 0;\n    }\n    ").concat(r,".").concat(yo.OptionClass,":first-child {\n      padding: 25px 0 0 0;\n      margin: 20px 0 0 0;\n      border-top: 1px solid ").concat(a.sectionDivider,";\n    }\n    ").concat(r,".").concat(yo.OptionClass," label {\n      display: flex;\n      gap: 20px;\n      color: ").concat(a.fontColor,";\n      cursor: pointer;\n      font-family: inherit;\n      margin: 0 0 5px 0;\n      padding: 0;\n      font-weight: 600;\n      font-size: 110%;\n      line-height: 1.2;\n    }\n    ").concat(r,".").concat(yo.OptionClass," label input {\n      position: absolute;\n      clip: rect(1px, 1px, 1px, 1px);\n      padding: 0;\n      border: 0;\n      height: 1px;\n      width: 1px;\n      overflow: hidden;\n    }\n    ").concat(r,".").concat(yo.OptionClass," label span {\n      order: -1;\n      display: inline-block;\n      background-color: ").concat(a.backgroundColor,";\n      width: 24px;\n      height: 24px;\n    }\n    ").concat(r,".").concat(yo.OptionClass," label span svg {\n      background-color: ").concat(a.backgroundColor,";\n      border-radius: 3px;\n    }\n    ").concat(r,".").concat(yo.OptionClass,' label input[aria-readonly="true"] ~ span svg {\n      opacity: 0.2;
1\n      cursor: not-allowed;\n    }\n    ').concat(r,".").concat(yo.OptionClass," label input:focus ~ span {\n      background-color: ").concat(a.focused,";\n    }\n    ").concat(r,".").concat(yo.OptionClass," label input:focus ~ span svg {\n      outline: none;\n      border-radius: 5px;\n      box-shadow: 0 0 0 4px ").concat(a.focused,";\n    }\n    ").concat(r,".").concat(yo.OptionClass," p {\n      line-height: 1.3;\n      font-size: 100%;\n      color: ").concat(a.fontSubduedColor,";\n      margin: 0;\n      padding: 0 0 0 45px;\n    }\n    @media only screen and (max-width: 700px) {\n      ").concat(r,".").concat(yo.OptionClass," p {\n        width: 100%;\n        line-height: 1.4;\n      }\n    }\n    ").concat(i?function(n){var e="".concat(n,".").concat(yo.WrapperClass,'[dir="rtl"]');return"\n    ".concat(e," .").concat(yo.DialogClass," header h2 {\n      padding: 0 0 0 20px !important;\n    }\n    @media only screen and (max-width: 750px) {\n      ").concat(e," .").concat(yo.DialogClass," header h2 {\n        padding: 0 0 0 25px !important;\n      }\n    }\n    ").concat(e," .").concat(yo.HeaderCloseClass," {\n      right: auto;\n      left: 35px;\n    }\n    @media only screen and (max-width: 1200px) {\n      ").concat(e," .").concat(yo.HeaderCloseClass," {\n        right: auto;\n        left: 20px;\n      }\n    }\n    @media only screen and (max-width: 750px) {\n      ").concat(e," .").concat(yo.HeaderCloseClass," {\n        right: auto;\n        left: 30px;\n      }\n    }\n    @media only screen and (max-width: 400px) {\n      ").concat(e," .").concat(yo.HeaderCloseClass," {\n        right: auto;\n        left: 15px;\n      }\n    }\n    ").concat(e," .").concat(yo.HeaderActionsClass," {\n      padding: 0 0 0 50px;\n    }\n    @media only screen and (max-width: 1200px) {\n      ").concat(e," .").concat(yo.HeaderActionsClass," {\n        padding: 0;\n      }\n    }\n    ").concat(e," .").concat(yo.HeaderActionsClass," button {\n      /* Longhands so the base margin-bottom rules still apply at mobile widths */\n      margin-right: 0;\n      margin-left: 20px;\n    }\n    ").concat(e," .").concat(yo.HeaderActionsClass," button:last-child {\n      margin-left: 0;\n      margin-right: 0;\n    }\n    ").concat(e," .").concat(yo.IntroClass," ul li {\n      margin-right: 1.7em;\n      margin-left: 0;\n    }\n    ").concat(e," .").concat(yo.IntroExplainAcceptClass," {\n      padding-right: 0;\n      padding-left: 40px;\n    }\n    @media only screen and (max-width: 700px) {\n      ").concat(e," .").concat(yo.IntroExplainAcceptClass," {\n        padding-right: 0;\n        padding-left: 0;\n      }\n    }\n    ").concat(e," .").concat(yo.OptionClass," p {\n      padding-right: 45px;\n      padding-left: 0;\n    }\n  ")}(r):"","\n  ")}function Io(n){var e=n.bannerData,t=n.selectorPrefix,o=n.locale,r=t?"".concat(t," "):"",i=bo(o),a=ko(e.theme.theme,e.theme.fontColor,e.theme.backgroundColor,e.theme.buttonFontColor,e.theme.buttonBackgroundColor),c=function(n,e,t,o){void 0===o&&(o=!1);var r="1280px",i="".concat(t,".").concat(mo.DialogClass,'[dir="rtl"]'),a="\n    ".concat(t,".").concat(mo.WrapperClass," {\n      display: flex;\n      align-items: center;\n      justify-content: space-between;\n      flex-direction: column;\n    }\n  "),c="\n    position: fixed;\n    z-index: 2000000;\n    box-shadow: 0px 4px 10px rgb(63 63 68 / 40%);\n    max-height: 90%;\n    box-sizing: border-box;\n    opacity: 1;\n    padding: 32px;\n    background-color: ".concat(e.backgroundColor,";\n    overflow: auto;\n    -ms-overflow-style: none;\n    scrollbar-width: none;\n    border: none;\n    /* left is a fallback for Edge Legacy, which drops text-align: start */\n    text-align: left;\n    text-align: start;\n  "),s=function(){var n="\n      ".concat(t,".").concat(mo.ButtonsClass," {\n        flex-direction: column;\n      }\n      ").concat(t,".").concat(mo.ButtonsGranularClass," :nth-child(1) {\n        order: 3;\n      }\n      ").concat(t,".").concat(mo.ButtonsGranularClass," :nth-child(2) {\n        order: 1;\n      }\n      ").concat(t,".").concat(mo.ButtonsGranularClass," :nth-child(3) {\n        order: 2;\n      }\n    ");return"\n      @media only screen and (max-width: 480px) {\n        ".concat(n,"\n      }\n    ")},l="\n    ".concat(t,".").concat(mo.DialogClass," {\n      ").concat(c,"\n      bottom: 0%;\n      width: 100%;\n    }\n    ").concat(t,".").concat(mo.DialogClass," button {\n      margin: 0 10px 0 0;\n    }\n    @media only screen and (max-width: ").concat(r,") {\n      ").concat(t,".").concat(mo.DialogClass," button {\n        margin: 15px 10px 0 0;\n      }\n    }\n    ").concat(a,"\n    ").concat(t,".").concat(mo.WrapperClass," {\n      flex-direction: row;\n    }\n    @media only screen and (max-width: ").concat(r,") {\n      ").concat(t,".").concat(mo.WrapperClass," {\n        flex-direction: column;\n      }\n    }\n    ").concat(t,".").concat(mo.BodyClass," {\n      margin-right: 5%;\n      margin-bottom: 0;\n    }\n    @media only screen and (max-width: ").concat(r,") {\n      ").concat(t,".").concat(mo.BodyClass," {\n        margin-right: 0;\n        margin-bottom: 10px;\n        width: 100%;\n      }\n    }\n    ").concat(t,".").concat(mo.ButtonsClass," {\n      display: flex;\n      min-width: 580px;\n      flex-direction: row;\n    }\n    @media only screen and (max-width: ").concat(r,") {\n      ").concat(t,".").concat(mo.ButtonsClass," {\n        min-width: auto;\n        width: 100%;\n        justify-content: flex-end;\n      }\n    }\n    ").concat(s(),"\n  "),d="\n    ".concat(t,".").concat(mo.DialogClass," {\n      ").concat(c,"\n      top: 50%;\n      left: 25%;\n      width: 50%;\n      transform: translate(0, -50%);\n      min-width: 280px;\n      border-radius: 3px;\n    }\n    ").concat(a,"\n    @media only screen and (max-width: 1300px) {\n      ").concat(t,".").concat(mo.DialogClass," {\n        left: 15%;\n        width: 70%;\n      }\n    }\n    @media only screen and (max-width: 900px) {\n      ").concat(t,".").concat(mo.DialogClass," {\n        left: 5%;\n        width: 90%;\n      }\n    }\n    ").concat(t,".").concat(mo.BodyClass," {\n      width: 100%;\n      margin-bottom: 10px;\n    }\n    ").concat(t,".").concat(mo.ButtonsClass," {\n      display: flex;\n      width: 100%;\n      justify-content: flex-end;\n      flex-direction: row;\n    }\n    ").concat(s(),"\n  "),u="\n    ".concat(t,".").concat(mo.DialogClass," {\n      ").concat(c,"\n      bottom: 0;\n      left: 0;\n      max-width: 650px;\n      border-top-right-radius: 3px;\n    }\n    ").concat(a,"\n    ").concat(t,".").concat(mo.BodyClass," {\n      width: 100%;\n      margin-bottom: 10px;\n    }\n    ").concat(t,".").concat(mo.ButtonsClass," {\n      display: flex;\n      justify-content: flex-end;\n      width: 100%;\n      flex-direction: row;\n    }\n    ").concat(s(),"\n  "),p="\n    ".concat(t,".").concat(mo.DialogClass," {\n      ").concat(c,"\n      bottom: 0;\n      right: 0;\n      max-width: 650px;\n      border-top-left-radius: 3px;\n    }\n    ").concat(a,"\n    ").concat(t,".").concat(mo.BodyClass," {\n      width: 100%;\n      margin-bottom: 10px;\n    }\n    ").concat(t,".").concat(mo.ButtonsClass," {\n      display: flex;\n      justify-content: flex-end;\n      width: 100%;\n      flex-direction: row;\n    }\n    ").concat(s(),"\n  "),f="\n    ".concat(t,".").concat(mo.DialogClass," {\n      ").concat(c,"\n      bottom: 0;\n      left: 25%;\n      width: 50%;\n      min-width: 280px;\n      border-top-right-radius: 3px;\n      border-top-left-radius: 3px;\n    }\n    ").concat(a,"\n    @media only screen and (max-width: 1300px) {\n      ").concat(t,".").concat(mo.DialogClass," {\n        left: 15%;\n        width: 70%;\n      }\n    }\n    @media only screen and (max-width: 900px) {\n      ").concat(t,".").concat(mo.DialogClass," {\n        left: 5%;\n        width: 90%;\n      }\n    }\n    ").concat(t,".").concat(mo.BodyClass," {\n      width: 100%;\n      margin-bottom: 10px;\n    }\n    ").concat(t,".").concat(mo.ButtonsClass," {\n      display: flex;\n      width: 100%;\n      justify-content: flex-end;\n      flex-direction: row;\n    }\n    ").concat(s(),"\n  "),h="\n    ".concat(i," button {\n      margin: 15px 0 0 20px;\n    }\n  "),m="\n    ".concat(i," button {\n      margin: 0 0 0 10px;\n    }\n    @media only screen and (max-width: ").concat(r,") {\n      ").concat(i," button {\n        margin: 15px 0 0 10px;\n      }\n    }\n    ").concat(i," .").concat(mo.BodyClass," {\n      margin-right: 0;\n      margin-left: 5%;\n    }\n    @media only screen and (max-width: ").concat(r,") {\n      ").concat(i," .").concat(mo.BodyClass," {\n        margin-left: 0;\n      }\n    }\n  ");switch(n){case po.BottomFullWidth:return o?"".concat(l).concat(m):l;case po.Center:return o?"".concat(d).concat(h):d;
1case po.BottomLeft:return o?"".concat(u).concat(h):u;case po.BottomRight:return o?"".concat(p).concat(h):p;case po.BottomCenter:return o?"".concat(f).concat(h):f;default:return o?"".concat(l).concat(m):l}}(e.position,a,r,i),s=function(n,e){if(n===fo.Custom)return{accept:wo(e),decline:wo(e),manage:(t=e,"\n    border: none;\n    color: ".concat(t.fontColor,";\n    background: transparent;\n  "))};var t,o=n===fo.Dark,r="\n    background: ".concat(o?go.Black:go.White,";\n    color: ").concat(o?go.White:go.Black,";\n  ");return{accept:r,decline:r,manage:"\n    background: transparent;\n    border: none;\n    color: ".concat(o?go.White:go.Black,";\n  ")}}(e.theme.theme,a);return"\n    ".concat(r,".").concat(mo.DialogClass," h2 {\n      color: ").concat(a.fontColor,";\n      font-family: inherit;\n      font-size: 120%;\n      margin: 0 0 .5em 0;\n      padding: 0;\n      font-weight: bold;\n    }\n    ").concat(r,".").concat(mo.DialogClass," p {\n      color: ").concat(a.fontColor,";\n      font-family: inherit;\n      line-height: 1.3;\n      margin: 0;\n      padding: 0;\n    }\n    ").concat(r,".").concat(mo.DialogClass," a {\n      color: ").concat(a.fontColor,";\n      text-decoration: underline;\n    }\n    ").concat(r,".").concat(mo.DialogClass," button {\n      border: none;\n      text-decoration: none;\n      font-family: inherit;\n      padding: 8px 25px;\n      /* RTL mirrors this margin in getCSSForBannerPlacement (rtlDefaultButtons). */\n      margin: 15px 20px 0 0;\n      font-size: 100%;\n      flex-basis: 50%;\n      border-radius: 2px;\n      line-height: 120%;\n      height: unset;\n      text-align: center;\n    }\n    ").concat(r,".").concat(mo.DialogClass," button:focus {\n      outline: none;\n      box-shadow: 0 0 0 4px ").concat(a.focused,";\n    }\n    ").concat(r,".").concat(mo.DialogClass," button:hover {\n      cursor: pointer;\n    }\n    ").concat(r,".").concat(mo.DialogClass," button.").concat(mo.ButtonAcceptClass," {\n      border: 1px solid ").concat(a.button.borderColor,";\n      ").concat(s.accept,"\n    }\n    ").concat(r,".").concat(mo.DialogClass," button.").concat(mo.ButtonManagePrefsClass," {\n      text-decoration: underline;\n      ").concat(s.manage,"\n    }\n    ").concat(r,".").concat(mo.DialogClass," button.").concat(mo.ButtonManagePrefsClass,":focus {\n      box-shadow: none;\n    }\n    ").concat(r,".").concat(mo.DialogClass," button.").concat(mo.ButtonManagePrefsClass,":focus span {\n      outline: 2px solid ").concat(a.focused,";\n    }\n    ").concat(r,".").concat(mo.DialogClass," button.").concat(mo.ButtonDeclineClass," {\n      border: 1px solid ").concat(a.button.borderColor,";\n      ").concat(s.decline,"\n    }\n    ").concat(r,".").concat(mo.BodyClass," p a:focus {\n      outline: 2px solid ").concat(a.focused,";\n      box-shadow: none;\n    }\n    ").concat(c,"\n  ")}var To="8e9cb600c40a8849ba2b6151bb05805c";function Do(n,e,t){var o;try{!function(n){var e=new XMLHttpRequest;e.open("POST","https://error-analytics-production.shopifysvc.com",!0),e.setRequestHeader("Content-Type","application/json"),e.setRequestHeader("Bugsnag-Api-Key",To),e.setRequestHeader("Bugsnag-Payload-Version","5");var t=function(n){var e=function(n){return n.stackTrace||n.stack||n.description||n.name}(n.error),t=n.error&&"string"==typeof n.error.name&&n.error.name.trim()||"",o=n.error&&"string"==typeof n.error.message&&n.error.message.trim()||"",r=(e||"unknown error").split("\n")[0],i=t||"Error",a=o||r;return JSON.stringify({payloadVersion:5,notifier:{name:"privacyBanner",version:"latest",url:"-"},events:[{exceptions:[{errorClass:i.trim(),message:(a||"").trim(),stacktrace:[{file:"storefront-banner.js",lineNumber:"1",method:e}],type:"browserjs"}],context:n.context||"general",app:{id:"privacyBanner",version:"latest"},metaData:{request:{shopId:n.shopId,shopUrl:window.location.href},device:{userAgent:window.navigator.userAgent},"Additional Notes":n.notes},unhandled:!1}]})}(n);e.send(t)}({error:n,context:e,shopId:Eo()||(null===(o=window.Shopify)||void 0===o?void 0:o.shop),notes:t})}catch(n){}}function Eo(){var n;try{var e=null===(n=null===document||void 0===document?void 0:document.getElementById("shopify-features"))||void 0===n?void 0:n.textContent;
1return e?JSON.parse(e).shopId:null}catch(n){return null}}function So(n){var e=window.location.search.substring(1);if(0===e.length)return null;var t=e.split("&").map(function(n){return n.split("=")}),o=t.filter(function(e){return e[0]===n})[0];return(o?o[1]:null)||null}function Ao(n){var e={marketing:n.marketing,analytics:n.analytics,preferences:n.preferences,sale_of_data:n.sale_of_data};!(void 0!==pn().isHeadless)&&n.storefrontAccessToken&&(e.headlessStorefront=!0,e.checkoutRootDomain=n.checkoutRootDomain,e.storefrontRootDomain=n.storefrontRootDomain,e.storefrontAccessToken=n.storefrontAccessToken),ge(e,n.callback)}var Bo=function(){var n=De();return n.marketing===O&&n.analytics===O&&n.preferences===O},Oo=["127.0.0.1"],Po=function(){var n,e=Jn()&&Bo();return!window.location.pathname.match(/\/password$/)&&(n=window.location.hostname||window.location.host||"",!Oo.some(function(e){return n.startsWith(e)}))&&e},Mo=function(){return"1"===So("preview_privacy_banner")},Ro=function(){var n;return Boolean(!0===(null===(n=null===window||void 0===window?void 0:window.Shopify)||void 0===n?void 0:n.previewMode))&&Bo()},Ho=function(){return Mo()||Ro()},Lo=function(){function n(){}return n.getServerData=function(n,e,r,i,a){return t(this,void 0,void 0,function(){return o(this,function(t){return this.domain=n,this.accessToken=null!=e?e:a?void 0:this.liquidAccessToken(),this.locale=r,this.country=i,this.isOptionalToken=a,[2,this.getDataFromStorefrontApi()]})})},n.getEmbeddedData=function(){var n=document.getElementById("scb4127");if(n)return JSON.parse(n.textContent||"")},n.fetchParams=function(n){var e=n.accessToken,t=n.unlocalized,o=this.currentLanguage(),r=this.currentCountry(),i=!o||!r||t?"":"@inContext(language: ".concat(o,", country: ").concat(r,")"),a=Ho(),c={"content-type":"application/json"};return e&&(c["x-shopify-storefront-access-token"]=e),{headers:c,body:JSON.stringify({query:"\n        query bannerQuery ($isPreviewMode: Boolean = ".concat(a,") ").concat(i," {\n          consentManagement {\n            banner {\n              enabled\n              position\n              policyLinkText\n              policyLinkUrl\n              title\n              text\n              buttonPrefsOpenText\n              buttonAcceptText\n              buttonDeclineText\n              regionVisibility @include(if: $isPreviewMode)\n              theme {\n                theme\n                fontColor\n                backgroundColor\n                buttonFontColor\n                buttonBackgroundColor\n              }\n              preferences {\n                title\n                introTitle\n                introText\n                buttonAcceptText\n                buttonDeclineText\n                buttonSaveText\n                bulletPoints {\n                  enabled\n                  title\n                  firstText\n                  secondText\n                  thirdText\n                }\n                purposes {\n                  essentialName\n                  essentialDesc\n                  performanceName\n                  performanceDesc\n                  preferencesName\n                  preferencesDesc\n                  marketingName\n                  marketingDesc\n                }\n              }\n            }\n          }\n        }"),variables:{isPreviewMode:Ho()}}),method:"POST"}},n.getDataFromStorefrontApi=function(n){return t(this,void 0,void 0,function(){var t,r,i,a,c,s,l,d;return o(this,function(o){switch(o.label){case 0:if(!this.accessToken&&!this.isOptionalToken)throw new Error("Missing access token");return t=/^(localhost|127\.0\.0\.1)(:|$)/.test(this.domain||"")?"http":"https",r=this.domain?"".concat(t,"://").concat(this.domain):"",i="".concat(r,"/api/unstable/graphql.json"),[4,fetch(i,this.fetchParams({accessToken:this.accessToken,unlocalized:n}))];case 1:return 200!==(a=o.sent()).status?[3,3]:[4,a.json()];case 2:if((c=o.sent()).errors){if((s=c.errors.find(function(n){return"argumentLiteralsIncompatible"===n.extensions.code||"variableLiteralsIncompatible"===n.extensions.code}))&&!n)return l=s.message||"",d=l.includes("Directive 'inContext'")&&l.includes("invalid value"),window.Weglot||d?console.log("Banner localization error",s.message):Do(new Error(s.message),"DataFetching"),[2,this.getDataFromStorefrontApi(!0)];throw new Error(c.errors[0].message)}return[2,e({},c.data.consentManagement.banner)];case 3:throw new Error("Could not reach the server")}})})},n.liquidAccessToken=function(){var n=document.documentElement.querySelector("#shopify-features");if(n){var e=JSON.parse(n.textContent||"").accessToken;if(e)return e;console.warn("Could not find liquid access token")}else console.warn("Could not find liquid access token")},n.currentLanguage=function(){var n=this.locale;if(n){n=n.replace("-","_").toUpperCase();return["PT_BR","PT_PT","ZH_CN","ZH_TW"].includes(n)||(n=n.split("_")[0]),n}},n.currentCountry=function(){var n;return null===(n=this.country)||void 0===n?void 0:n.toUpperCase()},n}();function No(n,e,t){return(e=function(n){var e=function(n,e){if("object"!=typeof n||!n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var o=t.call(n,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"==typeof e?e:e+""}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function jo(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),t.push.apply(t,o)}return t}function qo(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};
1e%2?jo(Object(t),!0).forEach(function(e){No(n,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):jo(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))})}return n}const $o="http://localhost:8082",Uo="https://monorail-edge.shopifysvc.com",Fo="/v1/produce";class Vo{constructor(n){this.producer=n}do(n,e){return void 0!==n.schemaId?this.producer.produce(n):this.producer.produceBatch(n)}}function Wo(){if("undefined"!=typeof crypto&&crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();const n=new Array(36);for(let e=0;e<36;e++)n[e]=Math.floor(16*Math.random());return n[14]=4,n[19]=n[19]&=-5,n[19]=n[19]|=8,n[8]=n[13]=n[18]=n[23]="-",n.map(n=>n.toString(16)).join("")}function zo(n,e=!0){return n&&Object.keys(n).length&&e?Object.keys(n).map(e=>({[Jo(e)]:n[e]})).reduce((n,e)=>qo(qo({},n),e)):n}function Jo(n){return n.split(/(?=[A-Z])/).join("_").toLowerCase()}function Go(n){return n.events.map(n=>{let e=!0,t=!0;return n&&n.options&&Object.prototype.hasOwnProperty.call(n.options,"convertEventCase")&&(e=Boolean(n.options.convertEventCase)),n&&n.options&&Object.prototype.hasOwnProperty.call(n.options,"convertMetaDataCase")&&(t=Boolean(n.options.convertMetaDataCase)),{schema_id:n.schemaId,payload:zo(n.payload,e),metadata:zo(n.metadata,t)}})}class Xo extends Error{constructor(n){super(`Error producing to the Monorail Edge. Response received: ${JSON.stringify(n)}`),this.response=n,Object.setPrototypeOf(this,Xo.prototype)}}class Ko extends Error{constructor(n){super(`Error producing to the Monorail Edge. Response received: ${JSON.stringify(n)}`),Object.setPrototypeOf(this,Ko.prototype),this.response=n}}class Yo extends Error{constructor(n){super(`Error completing request. A network failure may have prevented the request from completing. Error: ${n}`),Object.setPrototypeOf(this,Yo.prototype)}}class Zo{static withEndpoint(n){return new Zo(`https://${new URL(n).hostname}`)}constructor(n=$o,e=!1){this.edgeDomain=n,this.keepalive=e}async produceBatch(n){const e={events:Go(n),metadata:zo(n.metadata)};let t;try{t=await fetch(this.produceBatchEndpoint(),{method:"post",headers:Qo(n.metadata),body:JSON.stringify(e),keepalive:this.keepalive})}catch(n){throw new Yo(n)}if(207===t.status){const n=await t.json();throw new Ko(n)}if(!t.ok)throw new Xo({status:t.status,message:await t.text()});return{status:t.status}}async produce(n){let e,t=!0;n&&n.options&&Object.prototype.hasOwnProperty.call(n.options,"convertEventCase")&&(t=Boolean(n.options.convertEventCase));try{e=await async function({endpoint:n,event:e,keepalive:t}){return fetch(null!=n?n:Uo+Fo,{method:"post",headers:Qo(e.metadata),body:JSON.stringify({schema_id:e.schemaId,payload:e.payload}),keepalive:t})}({endpoint:this.produceEndpoint(),keepalive:this.keepalive,event:qo(qo({},n),{},{payload:zo(n.payload,t)})})}catch(n){throw new Yo(n)}if(!e)throw new Xo({message:"No response from edge"});if(!e.ok)throw new Xo({status:e.status,message:await e.text()});return{status:e.status}}produceBatchEndpoint(){return this.edgeDomain+"/unstable/produce_batch"}produceEndpoint(){return this.edgeDomain+Fo}}function Qo(n){const e={"Content-Type":"application/json; charset=utf-8","X-Monorail-Edge-Event-Created-At-Ms":(n&&n.eventCreatedAtMs||Date.now()).toString(),"X-Monorail-Edge-Event-Sent-At-Ms":Date.now().toString(),"X-Monorail-Edge-Client-Message-Id":(n&&n.clientMessageId||Wo()).toString()};return n&&n.userAgent&&(e["User-Agent"]=n.userAgent),n&&n.remoteIp&&(e["X-Forwarded-For"]=n.remoteIp),e}class nr{static printWelcomeMessage(n){console.log(`%c👋 from Monorail%c\n\nWe've noticed that you're${n?"":" not"} running in debug mode. As such, we will ${n?"produce":"not produce"} Monorail events to the console. \n\nIf you want Monorail events to ${n?"stop":"start"} appearing here, %cset debugMode=${(!n).toString()}%c, for the Monorail Log Producer in your code.`,"font-size: large;","font-size: normal;","font-weight: bold;","font-weight: normal;")}constructor(n){this.sendToConsole=n,n&&nr.printWelcomeMessage(n)}produce(n){return this.sendToConsole&&console.log("Monorail event produced",n),new Promise(e=>{e(n)})}produceBatch(n){return this.sendToConsole&&console.log("Monorail Batch event produced",n),new Promise(e=>{e(n)})}}class er{static createLogProducer(n){return new er(new nr(n.debugMode),n.middleware||[])}
1static createHttpProducerWithEndpoint(n,e=[]){return new er(Zo.withEndpoint(n),e)}static createHttpProducer(n){const e=n.options&&n.options.keepalive;return new er(n.production?new Zo(Uo,e):new Zo($o,e),n.middleware||[])}static buildMiddlewareChain(n,e=0){return e===n.length?this.identityFn:t=>n[e].do(t,this.buildMiddlewareChain(n,e+1))}constructor(n,e){this.producer=n,this.middleware=e,this.executeChain=er.buildMiddlewareChain(this.middleware.concat(new Vo(n)))}produce(n){return n.metadata=qo({eventCreatedAtMs:Date.now(),clientMessageId:Wo()},n.metadata),this.executeChain(n)}produceBatch(n){return this.executeChain(n)}}var tr,or,rr,ir,ar=function(){function n(n){var e=void 0===n?{}:n,t=e.shopDomain,o=e.isHeadless;this.shopDomain=t,this.isHeadless=o,this.monorail=er.createHttpProducer({production:!0})}return n.prototype.shouldEmit=function(){return!(this.isHeadless&&!0)},n.prototype.emitInteraction=function(n,t){if(void 0===t&&(t=""),this.shouldEmit()){var o=this.getCommonPayload();try{this.monorail.produce({schemaId:"privacy_banner_interact/1.2",payload:e(e(e({},o),t&&{interactionMetadata:t}),{interactionType:n})})}catch(n){console.log("Error emitting interaction:",n)}}},n.prototype.emitRender=function(){if(this.shouldEmit()){var n=this.getCommonPayload();try{this.monorail.produce({schemaId:"privacy_banner_render/1.1",payload:e({},n)})}catch(n){console.log("Error emitting interaction:",n)}}},n.prototype.emitInitialized=function(){if(this.shouldEmit()){var n=this.getCommonPayload();try{this.monorail.produce({schemaId:"privacy_banner_initialized/1.0",payload:e({},n)})}catch(n){console.log("Error emitting interaction:",n)}}},n.prototype.getCommonPayload=function(){var n;return{shopPermanentDomain:this.shopDomain||(null===(n=window.Shopify)||void 0===n?void 0:n.shop),sessionToken:"deprecated",regulation:"CMP",path:window.location.pathname}},n}();function cr(n,e){return(null==e?void 0:e.id)&&n.setAttribute("id",e.id),(null==e?void 0:e.class)&&n.setAttribute("class",e.class),(null==e?void 0:e.onClick)&&n.addEventListener("click",e.onClick),(null==e?void 0:e.appendTo)&&e.appendTo.appendChild(n),(null==e?void 0:e.role)&&n.setAttribute("role",e.role),(null==e?void 0:e.autofocus)&&n.setAttribute("autofocus",""),(null==e?void 0:e.ariaHidden)&&n.setAttribute("aria-hidden","".concat(null==e?void 0:e.ariaHidden)),(null==e?void 0:e.dir)&&n.setAttribute("dir",e.dir),n}function sr(n){var e=cr(document.createElement("div"),n);return(null==n?void 0:n.text)&&(e.textContent=n.text),(null==n?void 0:n.ariaModal)&&e.setAttribute("aria-modal",n.ariaModal),(null==n?void 0:n.ariaLabelledby)&&e.setAttribute("aria-labelledby",n.ariaLabelledby),e}function lr(n){var e=cr(document.createElement("span"),n);return(null==n?void 0:n.text)&&(e.textContent=n.text),e}function dr(n){var e,t=cr(document.createElement("button"),n);return t.textContent=null!==(e=null==n?void 0:n.text)&&void 0!==e?e:null,n.disabled&&t.setAttribute("disabled",""),n.ariaHaspopup&&t.setAttribute("aria-haspopup",n.ariaHaspopup),n.type&&t.setAttribute("type",n.type),n.ariaLabel&&t.setAttribute("aria-label",n.ariaLabel),t}function ur(n){var e=cr(document.createElement("p"),n);return e.textContent=n.text,e}function pr(n,e){var t=cr(document.createElement(n),e);return t.textContent=e.text,t}function fr(n){return pr(rr.H2,n)}function hr(n){return pr(rr.H3,n)}function mr(n){var e=cr(document.createElement("style"),n);return e.textContent=n.content,e}function yr(n){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttributeNS(null,"width",n.width),e.setAttributeNS(null,"height",n.height),e.setAttributeNS(null,"viewBox","0 0 ".concat(n.width," ").concat(n.height)),(null==n?void 0:n.fillRule)&&e.setAttributeNS(null,"fill-rule",n.fillRule),(null==n?void 0:n.clipRule)&&e.setAttributeNS(null,"clip-rule",n.clipRule);var t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttributeNS(null,"fill",(null==n?void 0:n.colour)||"#000"),t.setAttributeNS(null,"d",n.path),e.appendChild(t),(null==n?void 0:n.id)&&e.setAttribute("id",n.id),(null==n?void 0:n.class)&&e.setAttribute("class",n.class),(null==n?void 0:n.dataIconType)&&e.setAttribute("data-icon-type",n.dataIconType),(null==n?void 0:n.ariaHidden)&&e.setAttribute("aria-hidden","".concat(null==n?void 0:n.ariaHidden)),(null==n?void 0:n.focusable)&&e.setAttribute("focusable","".concat(null==n?void 0:n.focusable)),(null==n?void 0:n.appendTo)&&n.appendTo.appendChild(e),e}function gr(n){var e=cr(document.createElement("section"),n);return(null==n?void 0:n.text)&&(e.textContent=n.text),(null==n?void 0:n.ariaModal)&&e.setAttribute("aria-modal",n.ariaModal),(null==n?void 0:n.ariaLabelledby)&&e.setAttribute("aria-labelledby",n.ariaLabelledby),e}function vr(n){var e=n.bannerData,t=n.locale,o=gr({id:mo.DialogId,class:mo.DialogClass,role:"alertdialog",ariaModal:"false",ariaLabelledby:mo.BodyTitleId,dir:bo(t)?"rtl":void 0}),r=sr({class:mo.WrapperClass});o.appendChild(r);var i=sr({class:mo.BodyClass});r.appendChild(i);var a=sr({class:mo.ButtonsClass});return a.classList.add(mo.ButtonsGranularClass),r.appendChild(a),function(n,e){if(n.title){var t=fr({id:mo.BodyTitleId,text:n.title});e.appendChild(t)}}(e,i),function(n,e){var t=ur({text:"".concat(n.text," ")}),o=function(n){var e=cr(document.createElement("a"),n);return e.setAttribute("href",n.href),e.textContent=n.text,e.setAttribute("target",void 0===n.target?"_blank":n.target),n.target&&"_blank"!==n.target||e.setAttribute("rel","noopener noreferrer"),e}({id:mo.BodyCopyPolicyLinkId,href:n.policyLinkUrl,target:"_blank",text:n.policyLinkText?n.policyLinkText:"Privacy Policy"});t.appendChild(o),e.appendChild(t)}(e,i),function(n,e){var t=lr({text:n.buttonPrefsOpenText}),o=dr({id:mo.ButtonManagePrefsId,class:mo.ButtonManagePrefsClass,ariaHaspopup:"dialog",type:"button"});o.appendChild(t),e.appendChild(o)}(e,a),function(n,e){e.appendChild(dr({id:mo.ButtonAcceptId,class:mo.ButtonAcceptClass,type:"button",text:n.buttonAcceptText}))}(e,a),function(n,e){e.appendChild(dr({id:mo.ButtonDeclineId,class:mo.ButtonDeclineClass,type:"button",text:n.buttonDeclineText}))}(e,a),o}function br(n,e){var t,o,r,i,a=(t={appendTo:n},cr(document.createElement("header"),t));o=a,r="Close dialog",yr({appendTo:i=dr({id:yo.HeaderCloseId,class:yo.HeaderCloseClass,ariaLabel:r,type:"button",text:""}),ariaHidden:!0,width:"12",height:"12",path:"M7.41401 6.00012L11.707 1.7072
11C12.098 1.31622 12.098 0.684236 11.707 0.293244C11.316 -0.097748 10.684 -0.097748 10.293 0.293244L6.00001 4.58615L1.70701 0.293244C1.31601 -0.097748 0.684006 -0.097748 0.293006 0.293244C-0.0979941 0.684236 -0.0979941 1.31622 0.293006 1.70721L4.58601 6.00012L0.293006 10.293C-0.0979941 10.684 -0.0979941 11.316 0.293006 11.707C0.488006 11.902 0.744006 12 1.00001 12C1.25601 12 1.51201 11.902 1.70701 11.707L6.00001 7.4141L10.293 11.707C10.488 11.902 10.744 12 11 12C11.256 12 11.512 11.902 11.707 11.707C12.098 11.316 12.098 10.684 11.707 10.293L7.41401 6.00012Z"}),o.appendChild(i),fr({id:yo.HeaderTitleId,text:e.preferences.title,appendTo:a});var c=sr({class:yo.HeaderActionsClass,appendTo:a});return function(n,e){n.appendChild(dr({id:yo.HeaderAcceptId,type:"button",text:e}))}(c,e.preferences.buttonAcceptText),function(n,e){n.appendChild(dr({id:yo.HeaderDeclineId,type:"button",text:e}))}(c,e.preferences.buttonDeclineText),function(n,e){n.appendChild(dr({id:yo.HeaderSaveId,type:"button",text:e}))}(c,e.preferences.buttonSaveText),a}function wr(n,e){var t=sr({class:yo.IntroClass,appendTo:n});return function(n,e){var t=sr({class:yo.IntroMainClass,appendTo:n});hr({text:e.preferences.introTitle,appendTo:t}),ur({text:e.preferences.introText,appendTo:t})}(t,e),e.preferences.bulletPoints.enabled&&function(n,e){var t=sr({class:yo.IntroExplainWrapperClass,appendTo:n}),o=sr({class:yo.IntroExplainAcceptClass,appendTo:t});hr({text:e.preferences.bulletPoints.title||"",appendTo:o});var r=[];e.preferences.bulletPoints.firstText&&r.push(e.preferences.bulletPoints.firstText);e.preferences.bulletPoints.secondText&&r.push(e.preferences.bulletPoints.secondText);e.preferences.bulletPoints.thirdText&&r.push(e.preferences.bulletPoints.thirdText);(function(n){var e=cr(document.createElement("ul"),n);n.lis&&n.lis.forEach(function(n){var t=document.createElement("li");t.textContent=n,e.appendChild(t)})})({lis:r,appendTo:o})}(t,e),t}function Cr(n){var t=n.themeColours,o=n.purpose,r=n.ids,i=n.parent,a=r.input===yo.OptionEssentialInputId,c=yr({dataIconType:"unchecked",width:"24",height:"24",path:"M5 2c-1.654 0-3 1.346-3 3v14c0 1.654 1.346 3 3 3h14c1.654 0 3-1.346 3-3v-14c0-1.654-1.346-3-3-3h-14zm19 3v14c0 2.761-2.238 5-5 5h-14c-2.762 0-5-2.239-5-5v-14c0-2.761 2.238-5 5-5h14c2.762 0 5 2.239 5 5z",colour:t.iconColor,focusable:!0}),s=function(n){return yr({dataIconType:"checked",width:"24",height:"24",path:"M19 0h-14c-2.762 0-5 2.239-5 5v14c0 2.761 2.238 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-8.959 17l-4.5-4.319 1.395-1.435 3.08 2.937 7.021-7.183 1.422 1.409-8.418 8.591z",colour:n,focusable:!0})}(t.iconColor),l=sr({class:yo.OptionClass,id:r.section}),d=function(n){var e=cr(document.createElement("label"),n);return e.setAttribute("for",n.for),(null==n?void 0:n.text)&&(e.textContent=n.text),e}({appendTo:l,for:r.input,text:o.description});!function(n){var e=cr(document.createElement("input"),n);e.setAttribute("type",n.type),n.checked&&e.setAttribute("checked","true"),n.disabled&&e.setAttribute("disabled","".concat(n.disabled)),(null==n?void 0:n.onChange)&&e.addEventListener("change",n.onChange),n.tabindex&&e.setAttribute("tabindex","".concat(n.tabindex)),!0===n.ariaReadonly&&e.setAttribute("aria-readonly","".concat(n.ariaReadonly))}(e({appendTo:d,id:r.input,type:"checkbox",checked:a,ariaReadonly:a},n.tabindex&&{tabindex:n.tabindex}));var u=lr({appendTo:d,ariaHidden:!0});u.appendChild(s),u.appendChild(c),ur({appendTo:l,text:o.longDescription}),a?(s.style.display="block",c.style.display="none"):(s.style.display="none",c.style.display="block"),i.appendChild(l)}function xr(n){var e=n.bannerData,t=bo(n.locale)?"rtl":void 0,o=sr({id:yo.WrapperId,class:yo.WrapperClass,dir:t}),r=sr({id:yo.OverlayId,class:yo.OverlayClass,text:" "});o.appendChild(r);var i=gr({id:yo.DialogId,class:yo.DialogClass,role:"dialog",ariaModal:"true",ariaLabelledby:yo.HeaderTitleId});o.appendChild(i),br(i,e);var a=sr({class:yo.DialogScrollableClass});return i.appendChild(a),wr(a,e),function(n,e){var t=ko(e.theme.theme,e.theme.fontColor,e.theme.backgroundColor,e.theme.buttonFontColor,e.theme.buttonBackgroun
1dColor),o=sr({class:yo.OptionWrapperClass});n.appendChild(o),Cr({themeColours:t,ids:{section:yo.OptionEssentialId,input:yo.OptionEssentialInputId},purpose:{description:e.preferences.purposes.essentialName,longDescription:e.preferences.purposes.essentialDesc},parent:o,tabindex:"-1"}),Cr({themeColours:t,ids:{section:yo.OptionPreferencesId,input:yo.OptionPreferencesInputId},purpose:{description:e.preferences.purposes.preferencesName,longDescription:e.preferences.purposes.preferencesDesc},parent:o}),Cr({themeColours:t,ids:{section:yo.OptionMarketingId,input:yo.OptionMarketingInputId},purpose:{description:e.preferences.purposes.marketingName,longDescription:e.preferences.purposes.marketingDesc},parent:o}),Cr({themeColours:t,ids:{section:yo.OptionAnalyticsId,input:yo.OptionAnalyticsInputId},purpose:{description:e.preferences.purposes.performanceName,longDescription:e.preferences.purposes.performanceDesc},parent:o})}(a,e),o}!function(n){n.Accepted="accept",n.Declined="decline",n.AcceptedAll="accept_all",n.DeclinedAll="decline_all",n.ManagePreferences="manage_preferences",n.Save="save",n.LeavePreferences="leave_preferences",n.PrivacyPolicyView="privacy_policy_view"}(tr||(tr={})),function(n){n.BottomFullWidth="bottom-full-width",n.BottomLeft="bottom-left",n.Center="center",n.BottomRight="bottom-right",n.BottomCenter="bottom-center"}(or||(or={})),function(n){n.H1="h1",n.H2="h2",n.H3="h3"}(rr||(rr={})),function(n){n.Escape="Escape",n.Tab="Tab"}(ir||(ir={}));var kr=function(){function n(n){var e=n.bannerData,t=n.storefrontAccessToken,o=n.checkoutRootDomain,r=n.storefrontRootDomain,i=n.isHeadless,a=n.locale;this.bannerData=e,this.locale=a,i?(this.storefrontAccessToken=t,this.checkoutRootDomain=o,this.storefrontRootDomain=r,this.logger=new ar({shopDomain:o,isHeadless:i})):this.logger=new ar}return n.show=function(){var n=document.getElementById(yo.WrapperId);null!==n&&(n.style.display="block",document.body.style.setProperty("overflow","hidden"))},n.hide=function(n){var e=document.getElementById(yo.WrapperId);null!==e&&(e.style.display="none",document.body.style.removeProperty("overflow")),n&&n.focus()},n.hideModalAndBanner=function(e){n.hide();var t=document.getElementById(mo.DialogId);null!==t&&(t.style.display="none"),e&&e.focus()},n.selectedConsent=function(){var n=document.getElementById(yo.OptionMarketingInputId),e=document.getElementById(yo.OptionAnalyticsInputId),t=document.getElementById(yo.OptionPreferencesInputId),o=n.checked?"1":"0",r=e.checked?"1":"0",i=t.checked?"1":"0";return"".concat(o).concat(r).concat(i)},n.prototype.init=function(){return t(this,void 0,void 0,function(){return o(this,function(n){return this.render(),[2]})})},n.prototype.setCheckboxesToCurrentConsent=function(){var n=document.getElementById(yo.OptionAnalyticsInputId),e=document.getElementById(yo.OptionPreferencesInputId),t=document.getElementById(yo.OptionMarketingInputId);this.handleOptionChange({target:n,isReadOnly:!1,sectionId:yo.OptionAnalyticsId,checked:ut()}),this.handleOptionChange({target:e,isReadOnly:!1,sectionId:yo.OptionPreferencesId,checked:pt()}),this.handleOptionChange({target:t,isReadOnly:!1,sectionId:yo.OptionMarketingId,checked:dt()})},n.prototype.render=function(){this.addCSS(this.bannerData),this.addHTML(this.bannerData),this.previouslyFocusedElement=document.activeElement,n.show(),this.setupCheckboxEventHandlers(),this.setupButtonEventHandlers(),this.setupKeyboardEventHandlers(),this.logger.emitInteraction(tr.ManagePreferences)},n.prototype.addCSS=function(n){var e=_o({bannerData:n,locale:this.locale}),t=mr({id:yo.StylesContainerId,content:e});document.head.appendChild(t)},n.prototype.addHTML=function(e){var t,o,r,i=xr({bannerData:e,locale:this.locale}),a=document.getElementById(mo.DialogId);o=i,null===(r=null==(t=a)?void 0:t.parentNode)||void 0===r||r.insertBefore(o,t.nextSibling);var c=document.getElementById(yo.DialogId);c&&(this.setCheckboxesToCurrentConsent(),c.dataset.consent=n.selectedConsent()),n.hide()},n.prototype.handleOptionChange=function(e){var t=e.target,o=e.isReadOnly,r=e.sectionId,i=e.checked;(void 0!==i&&i||o)&&(t.checked=!0);var a,c,s,l=t.checked,d=document.getElementById(r),u=d.querySelector('svg[data-icon-type="checked"]'),p=d.querySelector('svg[data-icon-type="unchecked"]');l?(u.style.display="block",p.style.display="none"):(u.style.display="none",p.style.display="block"),a=n.selectedConsent(),c=document.getElementById(yo.DialogId),s=document.getElementById(yo.HeaderSaveId),(null==c?void 0:c.dataset.consent)&&(null==c?void 0:c.dataset.consent)!==a?s.className="primary":s.className=""},n.prototype.setupCheckboxEventHandlers=function(){var n=this,e=document.getElementById(yo.OptionEssentialInputId);null==e||e.addEventListener("change",function(e){n.handleOptionChange({target:e.target,isReadOnly:!0,sectionId:yo.OptionEssentialId})});var t=document.getElementById(yo.OptionAnalyticsInputId);null==t||t.addEventListener("change",function(e){n.handleOptionChange({target:e.target,isReadOnly:!1,sectionId:yo.OptionAnalyticsId})});var o=document.getElementById(yo.OptionPreferencesInputId);null==o||o.addEventListener("change",function(e){n.handleOptionChange({target:e.target,isReadOnly:!1,sectionId:yo.OptionPreferencesId})});var r=document.getElementById(yo.OptionMarketingInputId);null==r||r.addEventListener("change",function(e){n.handleOptionChange({target:e.target,isReadOnly:!1,sectionId:yo.OptionMarketingId})})},n.prototype.setupButtonEventHandlers=function(){var e=this,t=document.getElementById(yo.HeaderCloseId);null==t||t.addEventListener("click",function(){n.hide(e.previouslyFocusedElement),e.logger.emitInteraction(tr.LeavePreferences)});var o=document.getElementById(yo.HeaderSaveId);null==o||o.addEventListener("click",function(){if(Mo())n.hideModalAndBanner(e.previouslyFocusedElement);else{var t=document.getElementById(yo.OptionMarketingInputId),o=document.getElementById(yo.OptionAnalyticsInputId),r=document.getElementById(yo.OptionPreferencesInputId),i=t.checked,a=o.checked,c=r.checked;Ao({marketing:i,analytics:a,preferences:c,checkoutRootDomain:e.checkoutRootDomain,storefrontRootDomain:e.storefrontRootDomain,storefrontAccessToken:e.storefrontAccessToken,callback:function(){n.hideModalAndBanner(e.previouslyFocusedElement)}}),e.logger.emitInteraction(tr.Save,"".concat(i?"m":"").concat(a?"a":"").concat(c?"p":""))}});var r=document.getElementById(yo.HeaderAcceptId);null==r||r.addEventListener("click",function(){Mo()?n.hideModalAndBanner(e.previouslyFocusedElement):(Ao({marketing:!0,analytics:!0,preferences:!0,checkoutRootDomain:e.checkoutRootDomain,storefrontRootDomain:e.storefrontRootDomain,storefrontAccessToken:e.storefrontAccessToken,callback:function(){n.hideModalAndBanner(e.previouslyFocusedElement)}}),e.logger.emitInteraction(tr.AcceptedAll))});var i=document.getElementById(yo.HeaderDeclineId);null==i||i.addEventListener("click",function(){Mo()?n.hideModalAndBanner(e.previouslyFocusedElement):(Ao({marketing:!1,analytics:!1,preferences:!1,checkoutRootDomain:e.checkoutRootDomain,storefrontRootDomain:e.storefrontRootDomain,storefrontAccessToken:e.storefrontAccessToken,callback:function(){n.hideModalAndBanner(e.previouslyFocusedElement)}}),e.logger.emitInteraction(tr.DeclinedAll))})},n.prototype.setupKeyboardEventHandlers=function(){var n=this,e=document.getElementById(yo.DialogId);if(e){var t=this.getFocusableElements(e);e.addEventListener("keydown",function(e){n.escToClose(e),n.tabTrap(e,t)}),this.focusFirstEle(t)}},n.prototype.getFocusableElements=function(n){return Array.from(n.querySelectorAll('button, [href], input
1:not([tabindex="-1"]), select, textarea, [tabindex="0"]'))},n.prototype.focusFirstEle=function(n){(null==n?void 0:n.length)&&n[0].focus()},n.prototype.escToClose=function(e){e.key===ir.Escape&&(n.hide(this.previouslyFocusedElement),this.logger.emitInteraction(tr.LeavePreferences))},n.prototype.tabTrap=function(n,e){if((null==e?void 0:e.length)&&n.key===ir.Tab){var t=e[0],o=e[e.length-1];t&&o&&(n.shiftKey&&document.activeElement===t?(n.preventDefault(),o.focus()):n.shiftKey||document.activeElement!==o||(n.preventDefault(),t.focus()))}},n}(),_r=function(){function n(n){var e=n.isHeadless,t=n.storefrontAccessToken,o=n.checkoutRootDomain,r=n.storefrontRootDomain,i=n.locale,a=n.country;this.locale=i,this.country=a,this.storefrontAccessToken=t,this.isHeadless=null!=e?e:Boolean(t),this.isHeadless&&(this.checkoutRootDomain=o,this.storefrontRootDomain=r),this.logger=new ar({shopDomain:o,isHeadless:this.isHeadless}),this.preferencesModal=void 0}return n.show=function(){var n=document.getElementById(mo.DialogId);if(null!==n){n.style.display="block";var e=function(n){if("Tab"===n.code){n.preventDefault();var t=document.getElementById(mo.ButtonManagePrefsId);null==t||t.focus()}window.removeEventListener("keydown",e)};window.addEventListener("keydown",e)}},n.hide=function(){var n=document.getElementById(mo.DialogId);null!==n&&(n.style.display="none")},n.prototype.init=function(){return t(this,arguments,void 0,function(t){var r,i,a;return void 0===t&&(t=!1),o(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),r=Boolean(this.isHeadless),[4,Lo.getServerData(this.checkoutRootDomain,this.storefrontAccessToken,this.locale,this.country,r)];case 1:return(i=o.sent())&&Object.keys(i).length?[4,"loading"!==document.readyState?Promise.resolve():new Promise(function(n){document.addEventListener("DOMContentLoaded",n)})]:(console.warn("banner not rendered due to lack of saved data"),[2,Promise.resolve(!1)]);case 2:return o.sent(),this.removeExistingElements(),this.render(e({},i)),t&&(this.preferencesModal=new kr({bannerData:i,storefrontAccessToken:this.storefrontAccessToken,checkoutRootDomain:this.checkoutRootDomain,storefrontRootDomain:this.storefrontRootDomain,isHeadless:this.isHeadless,locale:this.locale}),this.preferencesModal.init(),n.hide()),[2,Promise.resolve(!0)];case 3:return a=o.sent(),this.removeExistingElements(),[2,Promise.reject(a)];case 4:return[2]}})})},n.prototype.render=function(e){var t=e.enabled,o=window.Shopify.country,r=Ro()&&this.isCountryInRegionVisibility(o,e),i=Mo()||r||t;i&&!document.getElementById(mo.DialogId)&&(this.addCSS(e),this.addBannerHTML(e)),i&&Po()&&(n.show(),Ro()||this.logger.emitRender())},n.prototype.isCountryInRegionVisibility=function(n,e){var t;return null===(t=e.regionVisibility)||void 0===t?void 0:t.includes(n)},n.prototype.addCSS=function(n){var e=mr({id:mo.StylesContainerId,content:Io({bannerData:n,locale:this.locale})});document.head.appendChild(e)},n.prototype.addBannerHTML=function(n){var e=vr({bannerData:n,locale:this.locale}),t=document.getElementsByTagName("body")[0];t.insertBefore(e,t.firstChild),this.addEventListeners(n)},n.prototype.removeExistingElements=function(){var n,e,t,o,r=document.getElementById(mo.DialogId),i=document.getElementById(mo.StylesContainerId),a=document.getElementById(yo.WrapperId),c=document.getElementById(yo.StylesContainerId);null===(n=null==r?void 0:r.parentNode)||void 0===n||n.removeChild(r),null===(e=null==i?void 0:i.parentNode)||void 0===e||e.removeChild(i),null===(t=null==a?void 0:a.parentNode)||void 0===t||t.removeChild(a),null===(o=null==c?void 0:c.parentNode)||void 0===o||o.removeChild(c)},n.prototype.addEventListeners=function(n){var e=this;this.addEssentialEventListeners(),Mo()||this.addMetricsEventListeners();var t=document.getElementById(mo.ButtonManagePrefsId);null==t||t.addEventListener("click",function(t){t.preventDefault(),e.preferencesModal=new kr({bannerData:n,storefrontAccessToken:e.storefrontAccessToken,checkoutRootDomain:e.checkoutRootDomain,storefrontRootDomain:e.storefrontRootDomain,isHeadless:e.isHeadless,locale:e.locale}),e.preferencesModal.init()})},n.prototype.addEssentialEventListeners=function(){var e=this,t=document.getElementById(mo.ButtonAcceptId);null==t||t.addEventListener("click",function(){Mo()?n.hide():Ao({marketing:!0,analytics:!0,preferences:!0,checkoutRootDomain:e.checkoutRootDomain,storefrontRootDomain:e.storefrontRootDomain,storefrontAccessToken:e.storefrontAccessToken,callback:n.hide})});var o=document.getElementById(mo.ButtonDeclineId);null==o||o.addEventListener("click",function(){Mo()?n.hide():Ao({marketing:!1,analytics:!1,preferences:!1,checkoutRootDomain:e.checkoutRootDomain,storefrontRootDomain:e.storefrontRootDomain,storefrontAccessToken:e.storefrontAccessToken,callback:n.hide})})},n.prototype.addMetricsEventListeners=function(){var n=this,e=document.getElementById(mo.BodyCopyPolicyLinkId);null==e||e.addEventListener("click",function(){n.logger.emitInteraction(tr.PrivacyPolicyView)});var t=document.getElementById(mo.ButtonAcceptId);null==t||t.addEventListener("click",function(){n.logger.emitInteraction(tr.Accepted)});var o=document.getElementById(mo.ButtonDeclineId);null==o||o.addEventListener("click",function(){n.logger.emitInteraction(tr.Declined)})},n}(),Ir="#shopifyReshowConsentBanner";function Tr(n,e){var t,o=n.target;(null==(t=o)?void 0:t.closest('a[href$="'.concat(Ir,'"]')))&&e(n)}var Dr=!1;function Er(n){var e=n.isClassicHydrogen,t=n.asyncConsent,o=n.checkoutRootDomain;if(e&&!0!==t&&function(n){if(!n)return!1;try{var e=n.includes("://")?n:"".concat(window.location.protocol,"//").concat(n);return new URL(e).origin===window.location.origin}catch(n){return!1}}(o)&&function(){var n,e,t="function"==typeof(null===(e=null===(n=window.Shopify)||void 0===n?void 0:n.customerPrivacy)||void 0===e?void 0:e.setTrackingConsent),o=window.privacyBanner,r="function"==typeof(null==o?void 0:o.loadBanner)&&"function"==typeof(null==o?void 0:o.showPreferences);return t&&r}
1())try{!function(){if(r()||Nt)return;const n=window;if(!n[Ht])try{Object.defineProperty(n,Ht,{configurable:!0,value:!0}),document.addEventListener("shopifyCustomerPrivacyApiLoaded",Gt),Nt=!0}catch{return}}()}catch(n){}}function Sr(){return t(this,arguments,void 0,function(n){var e,r,i,a,c,s,l,d,u,p,f,h,m,y,g,v,b,w,C=this,x=void 0===n?{}:n,k=x.storefrontAccessToken,_=x.checkoutRootDomain,I=x.storefrontRootDomain,T=x.showPreferences,D=void 0!==T&&T,E=x.locale,S=x.country,A=x.forceShow,B=void 0!==A&&A;return o(this,function(n){return e=pn(),r=Boolean(k),i=null!==(h=e.isHeadless)&&void 0!==h?h:r,a=yt(),c=2===a||void 0===a&&void 0===(null===(y=null===(m=e.debug)||void 0===m?void 0:m.hydrogen)||void 0===y?void 0:y.generation)&&r&&void 0===e.isHeadless,s=r&&void 0===e.isHeadless&&!0!==e.asyncConsent,k||(k=e.storefrontAccessToken),_||(_=null!==(g=e.consentDomain)&&void 0!==g?g:window.location.hostname),I||(I=null!==(v=e.consentDomain)&&void 0!==v?v:window.location.hostname),E||(E=null===(b=null===window||void 0===window?void 0:window.Shopify)||void 0===b?void 0:b.locale),S||(S=null===(w=null===window||void 0===window?void 0:window.Shopify)||void 0===w?void 0:w.country),Er({isClassicHydrogen:c,asyncConsent:e.asyncConsent,checkoutRootDomain:_}),l=function(){return t(C,void 0,void 0,function(){var n,e;return o(this,function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),n=new ar({shopDomain:_,isHeadless:i}),!(Ho()||Po()||D||B)||function(){var n;return(null===(n=null===window||void 0===window?void 0:window.Shopify)||void 0===n?void 0:n.designMode)||!1}()?[3,2]:[4,new _r({isHeadless:i,storefrontAccessToken:k,checkoutRootDomain:_,storefrontRootDomain:I,locale:E,country:S}).init(D)];case 1:t.sent()&&(B&&_r.show(),s&&An()),t.label=2;case 2:return n.emitInitialized(),[3,4];case 3:return e=t.sent(),console.error("Error initializing banner",e),[3,4];case 4:return[2]}})})},s?(e.injectedConsent?l():(d=De(),Ao({marketing:(u={yes:!0,no:!1})[d.marketing],analytics:u[d.analytics],preferences:u[d.preferences],sale_of_data:u[d.sale_of_data],storefrontAccessToken:k,checkoutRootDomain:_,storefrontRootDomain:I,callback:l})),[2]):(p=Yt(),f=function(){return i&&(Dr||(Dr=!0,An())),l()},p?p.then(f,function(n){return console.error("Unable to collect initial consent",n),l()}):f(),[2])})})}var Ar=function(n){return"function"==typeof(null==n?void 0:n.setTrackingConsent)&&"function"==typeof(null==n?void 0:n.currentVisitorConsent)&&"function"==typeof(null==n?void 0:n.shouldShowBanner)};function Br(){window.Shopify||(window.Shopify={});var n=window.Shopify,e=n.customerPrivacy,t=n.trackingConsent;Ar(e)&&Ar(t)||(window.Shopify.customerPrivacy=window.Shopify.trackingConsent=ht())}function Or(){return t(this,arguments,void 0,function(n){var t,r;return void 0===n&&(n={}),o(this,function(o){switch(o.label){case 0:return t=pn(),r=Boolean(n.storefrontAccessToken),(t.isHeadless||r)&&Br(),[4,Sr(e(e({},n),{showPreferences:!0}))];case 1:return o.sent(),[2]}})})}function Pr(){var n,e;if("0"!==So("pb")){try{Mt()}catch(n){}try{!function(){if(r()||oo)return;const n=window;if(!n[eo]){oo=!0;try{if(Object.defineProperty(n,eo,{configurable:!0,value:!0}),!Zt()&&Math.random()>=.01)return;if(!0===pn().asyncConsent){const n=gt();return void(n&&lo(n))}document.addEventListener("shopifyCustomerPrivacyApiLoaded",uo,{once:!0})}catch{return}}}()}catch(n){}var t=pn(),o=Boolean(window.Shopify),i=null!==(n=t.isHeadless)&&void 0!==n?n:!o,a=null!==(e=t.isHeadless)&&void 0!==e?e:o;i&&Br(),a&&Sr();var c=function(n){n.preventDefault(),Or()};document.addEventListener("click",function(n){Tr(n,c)})}}return Pr(),n.boot=Pr,n.loadBanner=Sr,n.showBanner=function(){return t(this,arguments,void 0,function(n){var t,r;return void 0===n&&(n={}),o(this,function(o){switch(o.label){case 0:return t=pn(),r=Boolean(n.storefrontAccessToken),(t.isHeadless||r)&&Br(),[4,Sr(e(e({},n),{showPreferences:!1,forceShow:!0}))];case 1:return o.sent(),[2]}})})},n.showPreferences=Or,n}({});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.