!function(){var e={3177:function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperty=r,t.objectSpread2=function(e){for(var t=1;t{try{return e(...t)}catch(e){throw n(e),e}}}},3249:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1449),o=n(5814);t.updateTrackingConsent=function(e,t,n){const i=new XMLHttpRequest,a=JSON.stringify(e);i.open("POST","/set_tracking_consent.json",!0),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=function(){if(4!==i.readyState)return;r.resetCookieCache();const a=function(e){try{return JSON.parse(e)}catch(e){return{error:"Unknown error"}}}(i.responseText);var s;0===(s=i.status)||200>=s&&s<400?(o.dispatchEvents(e,n),t(null,a)):t(a)},i.send(a)}},7560:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6304),o=n(1449);const i="_cmp_a";function a(){return o.readCookie(i)}function s(e){const t=a();if(!t)return!0;const n=t.purposes[e];return"boolean"!=typeof n||n}t.CMP_ANSWERS_COOKIE_NAME=i,t.analyticsProcessingAllowed=function(){return s(r.DataProcessingPurpose.ANALYTICS)},t.firstPartyMarketingProcessingAllowed=function(){return s(r.DataProcessingPurpose.FIRST_PARTY_MARKETING)},t.preferencesProcessingAllowed=function(){return s(r.DataProcessingPurpose.PREFERENCES)},t.saleOfDataRegion=function(){const e=a();return e&&e.sale_of_data_region||!1},t.shouldShowBanner=function(){const e=a();return!!e&&"boolean"==typeof e.display_banner&&e.display_banner},t.thirdPartyMarketingProcessingAllowed=function(){return s(r.DataProcessingPurpose.THIRD_PARTY_MARKETING)}},5841:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6304),o=n(8920),i=n(2488),a=n(1449);const s="_tracking_consent";function c(){const e=a.readCookie(s);if(void 0!==e&&!function(e){if(![r.CookieVersion.V2_0,r.CookieVersion.V2_1].includes(e.v))return!0;const t=Object.keys(e).filter((e=>"region"!==e));return!i.areArraysEqual(t,r.CookieKeys)}(e))return e}function u(){try{let e=c();if(!e)return;return e.v===r.CookieVersion.V2_0?function(e){const t=e.con||{};return{con:{CMP:{[r.ConsentSignal.MARKETING]:t.GDPR||r.ConsentValuesV2.NO_VALUE,[r.CmpV2_1ConsentKeys.ANALYTICS]:t.GDPR||r.ConsentValuesV2.NO_VALUE,[r.CmpV2_1ConsentKeys.PREFERENCES]:t.GDPR||r.ConsentValuesV2.NO_VALUE,[r.CmpV2_1ConsentKeys.GPC]:r.ConsentValuesV2.NO_VALUE,[r.CmpV2_1ConsentKeys.SALE_OF_DATA]:t.CCPA||r.ConsentValuesV2.NO_VALUE}},reg:e.reg,v:r.CookieVersion.V2_1,lim:e.lim}}(e):e}catch(e){return}}function p(){return{m:l(r.ConsentSignal.MARKETING),a:l(r.ConsentSignal.ANALYTICS),p:l(r.ConsentSignal.PREFERENCES),s:l(r.ConsentSignal.SALE_OF_DATA),g:l(r.ConsentSignal.GPC)}}function d(e=null){return null===e&&(e=u()),void 0===e}function l(e){if(e==r.ConsentSignal.GPC)return o.consentMethods.isGPCSignalPresent()?o.consentMethods.isGPCOptOutPresent()?r.ConsentValuesV2.DECLINED:r.ConsentValuesV2.ACCEPTED:r.ConsentValuesV2.NO_VALUE;const t=u();if(!t)return r.ConsentValuesV2.NO_VALUE;const n=t.con.CMP;return n?n[e]:r.ConsentValuesV2.NO_VALUE}t.CONSENT_COOKIE_NAME=s,t.getCCPAConsentValue=function(){return p()[r.ConsentSignal.SALE_OF_DATA]},t.getCMPConsentValues=p,t.getCookieVersion=function(){const e=c();switch(null==e?void 0:e.v){case"2.0":return r.CookieVersion.V2_0;case"2.1":return r.CookieVersion.V2_1;default:return}},t.getRegulationValue=function(){const e=u();return d(e)?r.TrackingRegulations.NO_VALUE:e.reg},t.getShopPrefsValue=function(){const e=u();return d(e)?{limit:[]}:{limit:e.lim}},t.getSignal=l,t.readCookieAndTransform=u,t.setHeadlessTrackingConsent=function(e,t){const n=e.marketing&&e.analytics&&e.preferences;let o;o=void 0===e.sale_of_data?r.ConsentValuesV2.NO_VALUE:e.sale_of_data?r.ConsentValuesV2.ACCEPTED:r.ConsentValuesV2.DECLINED;const i={v:r.CookieVersion.V2_0,reg:r.TrackingRegulations.NO_VALUE,lim:[r.TrackingRegulationLimitations.GDPR_BLOCK_ALL,r.TrackingRegulationLimitations.CCPA],con:{GDPR:n?r.ConsentValuesV2.ACCEPTED:r.ConsentValuesV2.DECLINED,CCPA:o}};a.writeCookie(s,e.rootDomain,31536e6,i),t(null)},t.transformConsentToDisplaySchema=function(e){switch(e){case r.ConsentValuesV2.ACCEPTED:return r.ConsentValuesV1.ACCEPTED;case r.ConsentValuesV2.DECLINED:return r.ConsentValuesV1.DECLINED;default:return r.ConsentValuesV1.NO_VALUE}},t.transformKeyToDisplayName=function(e){switch(e){case r.CmpV2_1ConsentKeys.ANALYTICS:return r.CmpV2_1ConsentDisplayKeys.ANALYTICS;case r.CmpV2_1ConsentKeys.MARKETING:return r.CmpV2_1ConsentDisplayKeys.MARKETING;case r.CmpV2_1ConsentKeys.PREFERENCES:return r.CmpV2_1ConsentDisplayKeys.PREFERENCES;case r.CmpV2_1ConsentKeys.SALE_OF_DATA:return r.CmpV2_1ConsentDisplayKeys.SALE_OF_DATA;case r.CmpV2_1ConsentKeys.GPC:return r.CmpV2_1ConsentDisplayKeys.GPC}},t.validCookieDoesNotExist=d},8920:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3177),o=n(6304),i=n(5841),a=n(7560),s=n(2290),c=n(2488),u=n(3249);function p(){if(i.validCookieDoesNotExist())return o.ConsentValuesV1.NO_VALUE;const e=i.getCMPConsentValues();return e[o.CmpV2_1ConsentKeys.MARKETING]===o.ConsentValuesV2.ACCEPTED&&e[o.CmpV2_1ConsentKeys.ANALYTICS]===o.ConsentValuesV2.ACCEPTED?o.ConsentValuesV1.ACCEPTED:e[o.CmpV2_1ConsentKeys.MARKETING]===o.ConsentValuesV2.DECLINED||e[o.CmpV2_1ConsentKeys.ANALYTICS]===o.ConsentValuesV2.DECLINED?o.ConsentValuesV1.DECLINED:o.ConsentValuesV1.NO_INTERACTION}function d(){const e=i.getRegulationValue();return e in o.TrackingRegulations?e:o.TrackingRegulations.NO_VALUE}function l(){return i.getShopPrefsValue()}function f(e){return E(o.TrackingRegulationLimitations.GDPR_BLOCK_ALL)&&e?y()?document.referrer:"":null}function g(e){return E(o.TrackingRegulationLimitations.GDPR_BLOCK_ALL)&&e?y()?window.location.pathname+window.location.search:"/":null}function v(){return"string"==typeof navigator.globalPrivacyControl?"1"===navigator.globalPrivacyControl:Boolean(navigator.globalPrivacyControl)}function h(e,t){return s.regulationEnforcementDict[e].includes(t)}function y(){if(""===document.referrer)return!0;const e=document.createElement("a");return e.href=document.referrer,window.location.hostname!=e.hostname}function _(){return E(o.TrackingRegulationLimitations.GDPR)||E(o.TrackingRegulationLimitations.GDPR_BLOCK_ALL)}function m(){const e=d();if(e===o.TrackingRegulations.NO_VALUE)return!1;const t=l();return!c.isArrayEmpty(t.limit)&&t.limit.some((t=>h(e,t)))}function C(){return!!i.validCookieDoesNotExist()||function(){if(!_())return!0;const e=i.getCMPConsentValues();return e[o.CmpV2_1ConsentKeys.MARKETING]===o.ConsentValuesV2.ACCEPTED&&e[o.CmpV2_1ConsentKeys.ANALYTICS]===o.ConsentValuesV2.ACCEPTED||e[o.CmpV2_1ConsentKeys.MARKETING]!==o.ConsentValuesV2.DECLINED&&e[o.CmpV2_1ConsentKeys.ANALYTICS]!==o.ConsentValuesV2.DECLINED&&d()!==o.TrackingRegulations.GDPR}()}function E(e){return l().limit.includes(e)}function P(){return d()===o.TrackingRegulations.CCPA&&!!E(o.TrackingRegulationLimitations.CCPA)&&v()}function T(){return!P()&&(!!i.validCookieDoesNotExist()||!1!==C()&&(E(o.TrackingRegulationLimitations.CCPA_BLOCK_ALL)?d()!==o.TrackingRegulations.CCPA:!E(o.TrackingRegulationLimitations.CCPA)||i.getCCPAConsentValue()!==o.ConsentValuesV2.DECLINED))}function A(){return P()?o.ConsentValuesV1.DECLINED:(e=i.getCCPAConsentValue(),i.validCookieDoesNotExist()?o.ConsentValuesV1.NO_VALUE:e===o.ConsentValuesV2.NO_VALUE?o.ConsentValuesV1.NO_INTERACTION:i.transformConsentToDisplaySchema(e));var e}function I(e){if(!_())return!0;const t=i.getCMPConsentValues();return t[e]===o.ConsentValuesV2.ACCEPTED||t[e]!==o.ConsentValuesV2.DECLINED&&d()!==o.TrackingRegulations.GDPR}function S(){return i.getCookieVersion()===o.CookieVersion.V2_1}const w={getTrackingConsent:p,setTrackingConsent:function(e,t){if(i.validCookieDoesNotExist()){const e="Shop is not configured to block privacy regulation in online store settings.";return console.warn(e),t({error:e})}if(function(e){if(S()){if("boolean"!=typeof e&&"object"!=typeof e)throw TypeError("setTrackingConsent must be called with a boolean or object consent value");if("object"==typeof e){const t=Object.keys(e);if(0===t.length)throw TypeError("The submitted consent object is empty.");const n=[o.CmpV2_1ConsentDisplayKeys.MARKETING,o.CmpV2_1ConsentDisplayKeys.ANALYTICS,o.CmpV2_1ConsentDisplayKeys.PREFERENCES,o.CmpV2_1ConsentDisplayKeys.SALE_OF_DATA];for(const e of t)if(!n.includes(e))throw TypeError(`The submitted consent object should only contain the following keys: ${n.join(", ")}.`)}}else if("boolean"!=typeof e)throw TypeError("setTrackingConsent must be called with a boolean consent value")}(e),"function"!=typeof t)throw TypeError("setTrackingConsent must be called with a callback function");if("object"==typeof e){const n=f(e.analytics),o=g(e.analytics);return u.updateTrackingConsent(r.objectSpread2(r.objectSpread2({granular_consent:e},null!==n&&{referrer:n}),null!==o&&{landing_page:o}),t,S())}{const n=f(e),o=g(e);return u.updateTrackingConsent(r.objectSpread2(r.objectSpread2({consent:e},null!==n&&{referrer:n}),null!==o&&{landing_page:o}),t,S())}},userCanBeTracked:C,getRegulation:d,isRegulationEnforced:m,getShopPrefs:l,shouldShowGDPRBanner:function(){return d()===o.TrackingRegulations.GDPR&&m()&&p()===o.ConsentValuesV1.NO_INTERACTION},userDataCanBeSold:T,setCCPAConsent:function(e,t){if("boolean"!=typeof e)throw TypeError("setCCPAConsent must be called with a boolean consent value");if("function"!=typeof t)throw TypeError("setCCPAConsent must be called with a callback function");return u.updateTrackingConsent({ccpa_consent:e},t,S())},getCCPAConsent:A,shouldShowCCPABanner:function(){return d()===o.TrackingRegulations.CCPA&&l().limit.includes(o.TrackingRegulationLimitations.CCPA)&&A()===o.ConsentValuesV1.NO_INTERACTION},haveAnalyticsConsent:function(){return S()?a.analyticsProcessingAllowed():I(o.CmpV2_1ConsentKeys.ANALYTICS)},havePreferencesConsent:function(){return S()?a.preferencesProcessingAllowed():I(o.CmpV2_1ConsentKeys.PREFERENCES)},haveFirstPartyMarketingConsent:function(){return S()?a.firstPartyMarketingProcessingAllowed():I(o.CmpV2_1ConsentKeys.MARKETING)},haveThirdPartyMarketingConsent:function(){return S()?a.thirdPartyMarketingProcessingAllowed():!!I(o.CmpV2_1ConsentKeys.MARKETING)&&!!T()},getCCPAConsentValue:i.getCCPAConsentValue,merchantEnforcingRegulationLimit:E,isGPCSignalPresent:function(){return void 0!==navigator.globalPrivacyControl},isGPCOptOutPresent:v,isValidGPCSignalOptOutPresent:P,exposeBetaFunctionality:S,shouldShowBanner:function(){return S()&&a.shouldShowBanner()&&i.getSignal(o.ConsentSignal.ANALYTICS)===o.ConsentValuesV2.NO_VALUE&&i.getSignal(o.ConsentSignal.MARKETING)===o.ConsentValuesV2.NO_VALUE&&i.getSignal(o.ConsentSignal.PREFERENCES)===o.ConsentValuesV2.NO_VALUE},saleOfDataRegion:function(){return S()&&a.saleOfDataRegion()}};t.consentMethods=w},1449:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n={};t.readCookie=function(e){if(e in n)return n[e];const t=document.cookie?document.cookie.split("; "):[];n[e]=void 0;for(let r=0;r!1));const e={getTrackingConsent:s.withBugsnag(c),setTrackingConsent:s.withBugsnag(u),userCanBeTracked:s.withBugsnag(p),getRegulation:s.withBugsnag(d),isRegulationEnforced:s.withBugsnag(l),getShopPrefs:s.withBugsnag(f),shouldShowGDPRBanner:s.withBugsnag(g),userDataCanBeSold:s.withBugsnag(v),setCCPAConsent:s.withBugsnag(h),getCCPAConsent:s.withBugsnag(y),shouldShowCCPABanner:s.withBugsnag(_),doesMerchantSupportGranularConsent:s.withBugsnag(S)};if(i.consentMethods.exposeBetaFunctionality()){const t={analyticsProcessingAllowed:s.withBugsnag(m),preferencesProcessingAllowed:s.withBugsnag(C),firstPartyMarketingAllowed:s.withBugsnag(E),thirdPartyMarketingAllowed:s.withBugsnag(P),currentVisitorConsent:s.withBugsnag(w),shouldShowBanner:s.withBugsnag(T),saleOfDataRegion:s.withBugsnag(A)};e.unstable=t}return e},t.thirdPartyMarketingAllowed=P,t.userCanBeTracked=p,t.userDataCanBeSold=v},2290:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6304);const o={"":[],GDPR:[r.TrackingRegulationLimitations.GDPR,r.TrackingRegulationLimitations.GDPR_BLOCK_ALL],CCPA:[r.TrackingRegulationLimitations.CCPA_BLOCK_ALL,r.TrackingRegulationLimitations.CCPA]};t.regulationEnforcementDict=o},6304:function(e,t){"use strict";var n,r,o,i,a,s,c,u,p,d;Object.defineProperty(t,"__esModule",{value:!0}),t.TrackingEvents=void 0,(n=t.TrackingEvents||(t.TrackingEvents={})).TRACKING_ACCEPTED="trackingConsentAccepted",n.TRACKING_DECLINED="trackingConsentDeclined",n.FIRST_PARTY_MARKETING_ACCEPTED="firstPartyMarketingConsentAccepted",n.THIRD_PARTY_MARKETING_ACCEPTED="thirdPartyMarketingConsentAccepted",n.ANALYTICS_ACCEPTED="analyticsConsentAccepted",n.PREFERENCES_ACCEPTED="preferencesConsentAccepted",n.FIRST_PARTY_MARKETING_DECLINED="firstPartyMarketingConsentDeclined",n.THIRD_PARTY_MARKETING_DECLINED="thirdPartyMarketingConsentDeclined",n.ANALYTICS_DECLINED="analyticsConsentDeclined",n.PREFERENCES_DECLINED="preferencesConsentDeclined",n.CONSENT_COLLECTED="visitorConsentCollected",t.CookieVersion=void 0,(r=t.CookieVersion||(t.CookieVersion={})).V2_0="2.0",r.V2_1="2.1",t.ConsentValuesV1=void 0,(o=t.ConsentValuesV1||(t.ConsentValuesV1={})).ACCEPTED="yes",o.DECLINED="no",o.NO_INTERACTION="no_interaction",o.NO_VALUE="",t.ConsentValuesV2=void 0,(i=t.ConsentValuesV2||(t.ConsentValuesV2={})).NO_VALUE="",i.ACCEPTED="1",i.DECLINED="0",t.TrackingRegulations=void 0,(a=t.TrackingRegulations||(t.TrackingRegulations={})).GDPR="GDPR",a.CCPA="CCPA",a.NO_VALUE="",t.DataProcessingPurpose=void 0,(s=t.DataProcessingPurpose||(t.DataProcessingPurpose={})).PREFERENCES="p",s.ANALYTICS="a",s.FIRST_PARTY_MARKETING="m",s.THIRD_PARTY_MARKETING="t",t.TrackingRegulationLimitations=void 0,(c=t.TrackingRegulationLimitations||(t.TrackingRegulationLimitations={})).CCPA_BLOCK_ALL="CCPA_BLOCK_ALL",c.GDPR="GDPR",c.GDPR_BLOCK_ALL="GDPR_BLOCK_ALL",c.CCPA="CCPA",t.CmpV2_1ConsentKeys=void 0,(u=t.CmpV2_1ConsentKeys||(t.CmpV2_1ConsentKeys={})).MARKETING="m",u.ANALYTICS="a",u.PREFERENCES="p",u.GPC="g",u.SALE_OF_DATA="s",t.ConsentSignal=void 0,(p=t.ConsentSignal||(t.ConsentSignal={})).MARKETING="m",p.ANALYTICS="a",p.PREFERENCES="p",p.GPC="g",p.SALE_OF_DATA="s",t.CmpV2_1ConsentDisplayKeys=void 0,(d=t.CmpV2_1ConsentDisplayKeys||(t.CmpV2_1ConsentDisplayKeys={})).MARKETING="marketing",d.ANALYTICS="analytics",d.PREFERENCES="preferences",d.GPC="gpc",d.SALE_OF_DATA="sale_of_data",t.CookieKeys=["lim","v","con","reg"]},2488:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.areArraysEqual=function(e,t){const n=t.slice().sort();return e.length===t.length&&e.slice().sort().every(((e,t)=>e===n[t]))},t.isArrayEmpty=function(e){return 0===e.length}},1863:function(e,t,n){e.exports=n(5461)},7385:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EcommerceIntegration=t.PSEUDO_PAGE_EVENTS=t.PAYMENT_STEP_STARTED=t.SHIPPING_STEP_SUBMITTED=t.SHIPPING_STEP_STARTED=t.ADDRESS_STEP_SUBMITTED=t.CONTACT_STEP_SUBMITTED=t.CONTACT_STEP_STARTED=t.ANALYTICS_ADDED_PAYMENT=t.ANALYTICS_PERFORMED_SEARCH=t.ANALYTICS_STARTED_ORDER=t.ANALYTICS_COMPLETED_ORDER=t.ANALYTICS_ADDED_PRODUCT=t.ANALYTICS_VIEWED_PRODUCT_CATEGORY=t.ANALYTICS_VIEWED_PRODUCT=t.ANALYTICS_PAGE_VIEW=t.ANALYTICS_GENERIC_EVENT=t.analyticsEvents=void 0;var i=n(997),a=n(1102),s=n(6851),c=n(7662),u=n(372),p=n(1930),d=c.TrackingEvents;t.analyticsEvents={viewedProduct:/^[ _]?viewed[ _]?product[ _]?$/i,viewedProductCategory:/^[ _]?viewed[ _]?product[ _]?category[ _]?$/i,viewedProductVariant:/^[ _]?viewed[ _]?product[ _]?variant[ _]?$/i,addedProduct:/^[ _]?added[ _]?product[ _]?$/i,completedOrder:/^[ _]?completed[ _]?order[ _]?$/i,startedOrder:/^[ _]?started[ _]?order[ _]?$/i,performedSearch:/^[ _]?performed[ _]?search[ _]?$/i,addedPayment:/^[ _]?added[ _]?payment[ _]?$/i,contactStepStarted:/^[ _]?contact[ _]?step[ _]?started[ _]?$/i,contactStepSubmitted:/^[ _]?contact[ _]?step[ _]?submitted[ _]?$/i,addressStepSubmitted:/^[ _]?address[ _]?step[ _]?submitted[ _]?$/i,shippingStepStarted:/^[ _]?shipping[ _]?step[ _]?started[ _]?$/i,shippingStepSubmitted:/^[ _]?shipping[ _]?step[ _]?submitted[ _]?$/i,paymentStepStarted:/^[ _]?payment[ _]?step[ _]?started[ _]?$/i},t.ANALYTICS_GENERIC_EVENT="genericEvent",t.ANALYTICS_PAGE_VIEW="pageView",t.ANALYTICS_VIEWED_PRODUCT="viewedProduct",t.ANALYTICS_VIEWED_PRODUCT_CATEGORY="viewedProductCategory",t.ANALYTICS_ADDED_PRODUCT="addedProduct",t.ANALYTICS_COMPLETED_ORDER="completedOrder",t.ANALYTICS_STARTED_ORDER="startedOrder",t.ANALYTICS_PERFORMED_SEARCH="performedSearch",t.ANALYTICS_ADDED_PAYMENT="addedPayment",t.CONTACT_STEP_STARTED="contactStepStarted",t.CONTACT_STEP_SUBMITTED="contactStepSubmitted",t.ADDRESS_STEP_SUBMITTED="addressStepSubmitted",t.SHIPPING_STEP_STARTED="shippingStepStarted",t.SHIPPING_STEP_SUBMITTED="shippingStepSubmitted",t.PAYMENT_STEP_STARTED="paymentStepStarted",t.PSEUDO_PAGE_EVENTS=[t.CONTACT_STEP_STARTED,t.SHIPPING_STEP_STARTED,t.PAYMENT_STEP_STARTED];var l=function(e){function n(t,n,r){var o=e.call(this,t,n)||this;return o.wrapTrack(),o.setPixelStub(),o.ensureTrackingConsent((function(){o.initialize(r)}),r),o}return o(n,e),n.prototype.ensureTrackingConsent=function(e,t){c.isMerchantOnGranularConsentBeta()||(c.isLegacyGdprEnforced()?(document.addEventListener(d.TRACKING_ACCEPTED,e),t()):e())},n.prototype.wrapTrack=function(){var e=this.track;this.track=function(n){var r=n.event,o=!1;for(var i in t.analyticsEvents){var a=t.analyticsEvents[i];if(this[i]&&a.test(r)){this[i].apply(this,[n]),o=!0;break}}o||e.apply(this,Array.prototype.slice.call(arguments))}},n.prototype.addMonorailBatchEvent=function(e){if(s.default.appName&&s.default.appName in p.appNameToEcommerceEventSchemaId){var t=this.getEcommercePixelIds();i.addBatchEvent({schemaId:e.schemaId?e.schemaId:p.appNameToEcommerceEventSchemaId[s.default.appName],payload:a.objectAssignFilterUndefined({shop_id:s.default.shopId,partner_name:this.getEcommerceMetricsTag(),event_name:e.eventName,unique_token:s.default.uniqToken,visit_token:s.default.visitToken,integration_id:this.getIntegrationId()},{pixel_id:t&&t.length>0?t[0]:void 0,event_properties:e.eventProperties,checkout_token:s.default.checkoutToken,event_id:e.eventId})})}},n}(u.Integration);t.EcommerceIntegration=l},372:function(e,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.length)return n.substr(t.length)}},8523:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ConsentPurposes=void 0,(n=t.ConsentPurposes||(t.ConsentPurposes={})).FIRST_PARTY_MARKETING="m",n.THIRD_PARTY_MARKETING="t",n.ANALYTICS="a",n.PREFERENCES="p"},542:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsentValuesV2=t.ConsentPurposes=t.IntegrationTypes=void 0;var r=n(8523);Object.defineProperty(t,"ConsentPurposes",{enumerable:!0,get:function(){return r.ConsentPurposes}});var o,i=n(6222);Object.defineProperty(t,"IntegrationTypes",{enumerable:!0,get:function(){return i.IntegrationTypes}}),(o=t.ConsentValuesV2||(t.ConsentValuesV2={})).NO_VALUE="",o.ACCEPTED="1",o.DECLINED="0"},6222:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.IntegrationTypes=void 0,(n=t.IntegrationTypes||(t.IntegrationTypes={})).ECOMMERCE="EcommerceIntegration",n.INTEGRATION="Integration"},8878:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2&&(c.lineNumber=p[1],c.columnNumber=p[2],parseInt(c.lineNumber,10)>1e5))return}this.sendBugsnagXhr(n,u,c,s,o,i,e.appConfig,e.notes)}}},997:function(e,t){"use strict";var n=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t>>0;try{t=performance.now()>>>0}catch(e){t=0}var n=Math.abs(e+t).toString(16).toLowerCase();return"00000000".substr(0,8-n.length)+n}t.UniqueIdManager=s,t.buildToken=c,t.hexTime=u},1102:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPseudoPageEvent=t.canonical=t.generateShopifyDValue=t.isUnstableBrowserVersion=t.UNSTABLE_BROWSER_VERSION_SET=t.objectAssignFilterUndefined=void 0;var r=n(7e3),o=n(7385),i=n(1503),a=/^https?:\/\//;t.objectAssignFilterUndefined=function(e,t){for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e},t.UNSTABLE_BROWSER_VERSION_SET=new Set(["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134"]),t.isUnstableBrowserVersion=function(){return t.UNSTABLE_BROWSER_VERSION_SET.has(r.virtualWindow().userAgent())},t.generateShopifyDValue=function(){return(new Date).toJSON()},t.canonical=function(){for(var e=i.virtualDocument().getElementsByTagName("link"),t=0;t0?null===(a=null==p?void 0:p.variants[0])||void 0===a?void 0:a.id:void 0,f=(null===(u=null===(c=window.ShopifyAnalytics)||void 0===c?void 0:c.meta)||void 0===u?void 0:u.selectedVariantId)||l,g={schemaId:d.buyWithPrimePresenceSchemaId,payload:r(r(r({shop_id:o},e.data&&{event_message:e.data}),p&&{product_id:p.id}),f&&{product_variant_id:Number(f)})};s.produce([g])}}catch(e){v.reportError("buyWithPrimeError",e)}}))},e.prototype.getNavigationType=function(){try{var e="PerformanceNavigationTiming",t=f.getNavigationTypeExperimental();return t||(t=f.getNavigationTypeLegacy(),e="performance.navigation"),t?{navigationType:t,navigationApi:e}:{navigationType:"unknown",navigationApi:"unknown"}}catch(e){c.reportError("navigation_api_error",e)}return{navigationType:"error",navigationApi:"error"}},e.prototype.initialize=function(e,t,n){var r=this;this.trekkie=new o.Trekkie((function(){setTimeout((function(){r.loadIntegrations(e,t,n)}),0)})),this.integrations[0]!==this.trekkie&&this.integrations.unshift(this.trekkie)},e.prototype.getS2SEventId=function(e,t){var n,r,o;void 0===e&&(e=void 0),void 0===t&&(t={});var i={navigationApi:this.navigationInfo.navigationApi,navigationType:this.navigationInfo.navigationType},a=y.WebPixelEventNameMap[e];try{if("product_added_to_cart"===a&&(null===(n=window.Shopify)||void 0===n?void 0:n.evids)){var s=function(e){if(e.productId&&e.variantId)return e.productId.toString()+"-"+e.variantId.toString()}(t);o=window.Shopify.evids(a,{analyticsFramework:"trekkie",cacheKey:s})}else o=(null===(r=window.Shopify)||void 0===r?void 0:r.evids)&&a?window.Shopify.evids(a,{analyticsFramework:"trekkie"}):p.buildToken()}catch(e){o=p.buildToken()}return{s2sMetadata:i,eventId:"string"==typeof o&&o.length>0?o:p.buildToken()}},e.prototype.loadIntegrations=function(e,t,n){var r=this,o=this.waitFor(e.length,(function(){try{n()}catch(e){c.reportError("readyCallback",e)}r.allIntegrationsHaveLoaded=!0,r.flushMonorailEventsIfLoaded()}));if(u.isMerchantOnGranularConsentBeta()){u.haveConsentForIntegration(this.trekkie)||(m.Trekkie=[!1,this.trekkie,[]]);for(var i=0,a=e;i0?e:e+a.search();var t=a.href(),n=t.indexOf("#");return-1===n?t:t.slice(0,n)},e.prototype.setupGranularConsentEventListener=function(e){Object.keys(e).length>0&&(this.defList=this.consentCollectedListener.bind(this),document.addEventListener(u.TrackingEvents.CONSENT_COLLECTED,this.defList))},e.prototype.consentCollectedListener=function(e){this.handleConsentCollectedEvent(e)},e.prototype.handleConsentCollectedEvent=function(e){u.resetConsentCookieCache();var t=e.detail;h.default.refreshVisitorTokens();for(var n=[],r=0;r