!function(){"use strict";var e={9414:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=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])},o(e,t)},function(e,t){function n(){this.constructor=e}o(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.TEST_PRODUCT_ADDED_TO_CART_SERVER_CHANGELOG=t.CHECKOUT_ONE_PAGE_VIEW=t.CHECKOUT_PAYMENT_STEP_STARTED=t.CHECKOUT_SHIPPING_INFO_SUBMITTED=t.CHECKOUT_SHIPPING_STEP_STARTED=t.CHECKOUT_ADDRESS_INFO_SUBMITTED=t.CHECKOUT_CONTACT_INFO_SUBMITTED=t.CHECKOUT_CONTACT_STEP_STARTED=t.ANALYTICS_ADDED_PAYMENT=t.ANALYTICS_PERFORMED_SEARCH=t.ANALYTICS_STARTED_ORDER_ONCE_PER_CHECKOUT=t.ANALYTICS_STARTED_ORDER=t.ANALYTICS_COMPLETED_ORDER=t.ANALYTICS_ADDED_PRODUCT_NEXT=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(6573),a=n(9974),s=n(357),c=n(8416),u=n(1482);t.analyticsEvents={viewedProduct:/^[ _]?viewed[ _]?product[ _]?$/i,viewedProductCategory:/^[ _]?viewed[ _]?product[ _]?category[ _]?$/i,viewedProductVariant:/^[ _]?viewed[ _]?product[ _]?variant[ _]?$/i,addedProduct:/^[ _]?added[ _]?product[ _]?$/i,addedProductNext:/^[ _]?added[ _]?product[ _]?next[ _]?$/i,addedProductPermalinkTest:/^[ _]?added[ _]?product[ _]?permalink[ _]?test[ _]?$/i,completedOrder:/^[ _]?completed[ _]?order[ _]?$/i,startedOrder:/^[ _]?started[ _]?order[ _]?$/i,startedOrderRemote:/^[ _]?started[ _]?order[ _]?remote[ _]?$/i,startedOrderOncePerCheckout:/^[ _]?started[ _]?order[ _]?once[ _]?per[ _]?checkout[ _]?$/i,startedOrderOncePerCheckoutRemote:/^[ _]?started[ _]?order[ _]?once[ _]?per[ _]?checkout[ _]?remote[ _]?$/i,performedSearch:/^[ _]?performed[ _]?search[ _]?$/i,addedPayment:/^[ _]?added[ _]?payment[ _]?$/i,addedPaymentRemote:/^[ _]?added[ _]?payment[ _]?remote[ _]?$/i,checkoutContactStepStarted:/^[ _]?checkout[ _]?[ _]?contact[ _]?step[ _]?started[ _]?$/i,checkoutContactInfoSubmitted:/^[ _]?checkout[ _]?[ _]?contact[ _]?info[ _]?submitted[ _]?$/i,checkoutContactInfoSubmittedRemote:/^[ _]?checkout[ _]?[ _]?contact[ _]?info[ _]?submitted[ _]?remote[ _]?$/i,checkoutAddressInfoSubmitted:/^[ _]?checkout[ _]?[ _]?address[ _]?info[ _]?submitted[ _]?$/i,checkoutAddressInfoSubmittedRemote:/^[ _]?checkout[ _]?[ _]?address[ _]?info[ _]?submitted[ _]?remote[ _]?$/i,checkoutShippingStepStarted:/^[ _]?checkout[ _]?[ _]?shipping[ _]?step[ _]?started[ _]?$/i,checkoutShippingInfoSubmitted:/^[ _]?checkout[ _]?[ _]?shipping[ _]?info[ _]?submitted[ _]?$/i,checkoutShippingInfoSubmittedRemote:/^[ _]?checkout[ _]?[ _]?shipping[ _]?info[ _]?submitted[ _]?remote[ _]?$/i,checkoutPaymentStepStarted:/^[ _]?checkout[ _]?[ _]?payment[ _]?step[ _]?started[ _]?$/i,checkoutOnePageView:/^[ _]?checkout[ _]?[ _]?one[ _]?page[ _]?view[ _]?$/i,testProductAddedToCartServerChangelog:/^test[ _]?product[ _]?added[ _]?to[ _]?cart[ _]?server[ _]?changelog$/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_ADDED_PRODUCT_NEXT="addedProductNext",t.ANALYTICS_COMPLETED_ORDER="completedOrder",t.ANALYTICS_STARTED_ORDER="startedOrder",t.ANALYTICS_STARTED_ORDER_ONCE_PER_CHECKOUT="startedOrderOncePerCheckout",t.ANALYTICS_PERFORMED_SEARCH="performedSearch",t.ANALYTICS_ADDED_PAYMENT="addedPayment",t.CHECKOUT_CONTACT_STEP_STARTED="checkoutContactStepStarted",t.CHECKOUT_CONTACT_INFO_SUBMITTED="checkoutContactInfoSubmitted",t.CHECKOUT_ADDRESS_INFO_SUBMITTED="checkoutAddressInfoSubmitted",t.CHECKOUT_SHIPPING_STEP_STARTED="checkoutShippingStepStarted",t.CHECKOUT_SHIPPING_INFO_SUBMITTED="checkoutShippingInfoSubmitted",t.CHECKOUT_PAYMENT_STEP_STARTED="checkoutPaymentStepStarted",t.CHECKOUT_ONE_PAGE_VIEW="checkoutOnePageView",t.TEST_PRODUCT_ADDED_TO_CART_SERVER_CHANGELOG="testProductAddedToCartServerChangelog",t.PSEUDO_PAGE_EVENTS=[t.CHECKOUT_CONTACT_STEP_STARTED,t.CHECKOUT_SHIPPING_STEP_STARTED,t.CHECKOUT_PAYMENT_STEP_STARTED,t.CHECKOUT_ONE_PAGE_VIEW];var d=function(e){function n(t,n,o){var r=e.call(this,t,n,o)||this;return r.wrapTrack(),r.setPixelStub(),r}return r(n,e),n.prototype.wrapTrack=function(){var e=this.track;this.track=function(n){var o=n.event,r=!1;for(var i in t.analyticsEvents){var a=t.analyticsEvents[i];if(this[i]&&a.test(o)){this[i].apply(this,[n]),r=!0;break}}r||e.apply(this,Array.prototype.slice.call(arguments))}},n.prototype.addMonorailBatchEvent=function(e){if(s.default.appName&&s.default.appName in u.appNameToEcommerceEventSchemaId){var t=this.getEcommercePixelIds();i.addBatchEvent({schemaId:e.schemaId?e.schemaId:u.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}(c.Integration);t.EcommerceIntegration=d},8416:function(e,t,n){var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0&&this.deferedEvents.forEach((function(e,n,r){var i=e[0],a=e[1];r.delete(n),t.callEvent(i,o(o({},a),{emittedAsync:!0}))})))},e.prototype.emitEventOrAwaitConsent=function(e,t){this.hasConsent()?this.callEvent(e,t):this.deferedEvents.add([e,t])},e.prototype.callEvent=function(e,t){switch(e){case"page":this.page(t);break;case"track":this.track(t)}},e.prototype.checkoutOnePageView=function(e){if(e.properties.hasOwnProperty("page")){var t=e.properties;this.page(t.page)}},e.flatten=function(e){var t=o({},e);return t.properties={},o(o({},t),e.properties)},e.isEqual=function(e,t){for(var n in e)if(e[n]!==t[n])return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0},e}();t.Integration=a},1482:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.extractSchemaIdFromEventName=t.buyWithPrimePresenceSchemaId=t.trekkieAssetContextSchemaId=t.customStorefrontAnalyticsSchemaId=t.storefrontAnalyticsSchemaIdValidation=t.storefrontAnalyticsSchemaIdV5=t.legacyStorefrontAnalyticsSchemaId=t.appNameToEcommerceEventSchemaId=t.appNameToPageViewSchemaId=void 0,t.appNameToPageViewSchemaId={admin:"trekkie_admin_page_view/1.0",appstore:"trekkie_appstore_page_view/1.2",blog:"trekkie_blog_page_view/1.2",brochure:"trekkie_brochure_page_view/1.3","collabs-merchants":"trekkie_collabs_merchants_page_view/1.0","compass-web":"trekkie_compass_web_page_view/1.2",creators:"trekkie_creators_page_view/2.0",delivery_app:"trekkie_delivery_app_page_view/1.0",docs:"trekkie_docs_page_view/1.2",development:"edge_test/1.0",exchange:"trekkie_exchange_page_view/1.2",experts:"trekkie_experts_page_view/1.0",handshake:"trekkie_handshake_page_view/1.0",fakestore:"trekkie_fakestore_page_view/1.0",identity:"trekkie_identity_page_view/1.2",linkpop:"trekkie_linkpop_page_view/2.0","marketing-misc":"trekkie_marketing_misc_page_view/1.2","oberlo-home":"trekkie_oberlo_home_page_view/1.3",opinions:"trekkie_opinions_page_view/1.2",partners:"trekkie_partners_page_view/1.2","shopify-ping-web":"trekkie_shopify_ping_web_page_view/1.0",portal:"trekkie_portal_page_view/1.0",testing:"edge_test/1.0",themestore:"trekkie_themestore_page_view/1.2","services-db":"trekkie_services_db_page_view/1.0"},t.appNameToEcommerceEventSchemaId={storefront:"trekkie_storefront_ecommerce_event_emit/4.0",checkout:"trekkie_checkout_ecommerce_event_emit/4.0",test:"edge_test_ecommerce_event_emit/1.0"},t.legacyStorefrontAnalyticsSchemaId="storefront_customer_tracking/4.30",t.storefrontAnalyticsSchemaIdV5="storefront_customer_tracking/5.11",t.storefrontAnalyticsSchemaIdValidation="storefront_customer_tracking_validation/1.0",t.customStorefrontAnalyticsSchemaId="custom_storefront_customer_tracking/1.8",t.trekkieAssetContextSchemaId="trekkie_asset_context/1.3",t.buyWithPrimePresenceSchemaId="storefront_buy_with_prime_presence/1.0",t.extractSchemaIdFromEventName=function(e){var t=e.toLowerCase();if(0===t.lastIndexOf("monorail://")&&t.length>11)return t.substr(11)}},9965:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ConsentValuesV2=t.IntegrationTypes=t.ConsentPurposes=void 0;var o=n(8777);Object.defineProperty(t,"ConsentPurposes",{enumerable:!0,get:function(){return o.ConsentKeys}});var r,i=n(4842);Object.defineProperty(t,"IntegrationTypes",{enumerable:!0,get:function(){return i.IntegrationTypes}}),(r=t.ConsentValuesV2||(t.ConsentValuesV2={})).NO_VALUE="",r.ACCEPTED="1",r.DECLINED="0"},4842:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.IntegrationTypes=void 0,(n=t.IntegrationTypes||(t.IntegrationTypes={})).ECOMMERCE="EcommerceIntegration",n.INTEGRATION="Integration"},3988:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=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])},o(e,t)},function(e,t){function n(){this.constructor=e}o(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,o=arguments.length;n2&&(c.line_number=l[1],c.column_number=l[2],parseInt(c.line_number,10)>1e5))return}this.sendObserveXhr(n,u,d,c,s,r,i,e.app_config,e.notes)}}},6573:function(e,t,n){var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n10?{stringValue:"[max depth exceeded]"}:null==e?{stringValue:String(e)}:"string"==typeof e?{stringValue:e}:"number"==typeof e?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:"boolean"==typeof e?{boolValue:e}:Array.isArray(e)?{arrayValue:{values:e.map((function(e){return i(e,t+1)}))}}:"object"==typeof e?{kvlistValue:{values:Object.entries(e).map((function(e){return{key:e[0],value:i(e[1],t+1)}}))}}:{stringValue:String(e)}}var a=function(){function e(e){this.pendingMetrics=[],this.pendingLogs=[],this.exporter=e,this.boundFlush=this.flush.bind(this),this.setupPageUnloadHandler()}return e.prototype.setupPageUnloadHandler=function(){window.addEventListener("pagehide",this.boundFlush)},e.prototype.scheduleFlush=function(){void 0===this.flushTimeoutId&&(this.flushTimeoutId=setTimeout(this.boundFlush,500))},e.prototype.counter=function(e){var t=e.name,n=e.value,o=e.unit,i=e.attributes;this.pendingMetrics.length>=1e3&&this.flush();var a=1e6*(new Date).getTime();this.pendingMetrics.push({name:t,unit:o||"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[{asDouble:n,startTimeUnixNano:a,timeUnixNano:a,attributes:r(null!=i?i:{})}]}}),this.scheduleFlush()},e.prototype.log=function(e){var t=e.message,n=e.severity,a=e.severityText,s=e.attributes;this.pendingLogs.length>=1e3&&this.flush();var c=1e6*(new Date).getTime();this.pendingLogs.push({timeUnixNano:c,observedTimeUnixNano:c,severityNumber:null!=n?n:o.SeverityNumber.INFO,severityText:a,body:i(t),attributes:r(null!=s?s:{})}),this.scheduleFlush()},e.prototype.flush=function(){void 0!==this.flushTimeoutId&&(clearTimeout(this.flushTimeoutId),this.flushTimeoutId=void 0);var e=!0,t=!0;if(this.pendingMetrics.length>0){var n=this.pendingMetrics;this.pendingMetrics=[],e=this.exporter.exportMetrics(n)}if(this.pendingLogs.length>0){var o=this.pendingLogs;this.pendingLogs=[],t=this.exporter.exportLogs(o)}return e&&t},e.prototype.destroy=function(){window.removeEventListener("pagehide",this.boundFlush),void 0!==this.flushTimeoutId&&(clearTimeout(this.flushTimeoutId),this.flushTimeoutId=void 0)},e}();t.OTelClient=a},8218:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.OTelExporter=void 0;var o=n(9974),r="trekkie-otel",i="1.0.0",a=function(){function e(e,t){this.baseUrl=e.replace(/\/v1\/(metrics|logs)\/?$/,""),this.serviceName=t}return e.prototype.exportMetrics=function(e){var t={resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:this.serviceName}}]},scopeMetrics:[{scope:{name:r,version:i,attributes:[]},metrics:e}]}]},n=new Blob([JSON.stringify(t)],{type:"application/json"});return!!o.isSendBeaconSupported()&&navigator.sendBeacon(this.baseUrl+"/v1/metrics",n)},e.prototype.exportLogs=function(e){var t={resourceLogs:[{resource:{attributes:[{key:"service.name",value:{stringValue:this.serviceName}}]},scopeLogs:[{scope:{name:r,version:i,attributes:[]},logRecords:e}]}]},n=new Blob([JSON.stringify(t)],{type:"application/json"});return!!o.isSendBeaconSupported()&&navigator.sendBeacon(this.baseUrl+"/v1/logs",n)},e}();t.OTelExporter=a},4689:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createOtelClient=void 0;var o=n(4052),r=n(8218);t.createOtelClient=function(){var e=new r.OTelExporter("https://otlp-http-production.shopifysvc.com","trekkie");return new o.OTelClient(e)}},7179:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SeverityNumber=t.OTelExporter=t.OTelClient=t.otelClient=void 0;var o=n(4689);t.otelClient=o.createOtelClient();var r=n(4052);Object.defineProperty(t,"OTelClient",{enumerable:!0,get:function(){return r.OTelClient}});var i=n(8218);Object.defineProperty(t,"OTelExporter",{enumerable:!0,get:function(){return i.OTelExporter}});var a=n(6366);Object.defineProperty(t,"SeverityNumber",{enumerable:!0,get:function(){return a.SeverityNumber}})},6366:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SeverityNumber=void 0,(n=t.SeverityNumber||(t.SeverityNumber={}))[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.TRACE=1]="TRACE",n[n.TRACE2=2]="TRACE2",n[n.TRACE3=3]="TRACE3",n[n.TRACE4=4]="TRACE4",n[n.DEBUG=5]="DEBUG",n[n.DEBUG2=6]="DEBUG2",n[n.DEBUG3=7]="DEBUG3",n[n.DEBUG4=8]="DEBUG4",n[n.INFO=9]="INFO",n[n.INFO2=10]="INFO2",n[n.INFO3=11]="INFO3",n[n.INFO4=12]="INFO4",n[n.WARN=13]="WARN",n[n.WARN2=14]="WARN2",n[n.WARN3=15]="WARN3",n[n.WARN4=16]="WARN4",n[n.ERROR=17]="ERROR",n[n.ERROR2=18]="ERROR2",n[n.ERROR3=19]="ERROR3",n[n.ERROR4=20]="ERROR4",n[n.FATAL=21]="FATAL",n[n.FATAL2=22]="FATAL2",n[n.FATAL3=23]="FATAL3",n[n.FATAL4=24]="FATAL4"},7956:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getRemoteEventName=t.isRemoteProduct=void 0;var o=n(5263);t.isRemoteProduct=function(e){var t;if(null==e||"object"!=typeof e)return!1;if("remote"in e&&"boolean"==typeof e.remote)return e.remote;if(null===(t=e)||void 0===t?void 0:t.variantId){var n=o.getProductFromMeta(e.variantId);if(n&&"remote"in n&&"boolean"==typeof n.remote)return n.remote}return!1},t.getRemoteEventName=function(e){return"remote_"+e}},6848:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getRequestId=void 0;var o=n(2729),r={page_rendered:"z",product_page_rendered:"x",collection_page_rendered:"c",search_submitted:"b"};function i(e,t){if(r[t])return"ri-"+function(e){for(var t=e.replace(/-/g,""),n=[],o=0;o>>0},e.prototype.createKey=function(e,t,n){return e+":"+t+":"+this.hashString(n)},e.prototype.add=function(e){if(!r.some((function(t){return e.stack.includes(t)}))){var t=this.createKey(e.operation,e.property,e.stack);this.flushedKeys.has(t)||(this.queue.set(t,e),this.config.maxQueueSize&&this.queue.size>=this.config.maxQueueSize&&this.flush())}},e.prototype.limitFlushedKeysSize=function(){if(this.flushedKeys.size>this.config.maxFlushedKeysSize)for(var e=this.flushedKeys.size-this.config.maxFlushedKeysSize,t=this.flushedKeys.values(),n=0;n=100||100*Math.random()>>0;try{t=performance.now()>>>0}catch(e){t=0}return Math.abs(e+t).toString(16).toLowerCase().padStart(8,"0")}t.UniqueIdManager=u,t.buildToken=d,t.hexTime=l},161:function(e,t,n){var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n_?{value:a,status:"expired",convention:o,expiration:_}:{value:a,status:f(a)?"valid":"invalid",convention:o,expiration:_}}function h(e){try{return i.read("y"===e?"_shopify_y":"_shopify_s",{raw:!0})}catch(e){return}}function y(e){return null==e?void 0:e.toLowerCase()}function m(e,t,n){if(!e)return"api_missing";var o=y(e),r=o===y(t),i=o===y(n);return r&&i?"meta_and_cookie":r?"meta":i?"cookie":"neither"}function E(e){return e<1e3?"lt_1s":e<1e4?"1_10s":e<6e4?"10_60s":e<3e5?"1_5m":e<9e5?"5_15m":e<18e5?"15_30m":e<36e5?"30_60m":"gte_60m"}function g(e,t,n,o,r,i,d,l){try{a.otelClient.counter({name:"trekkie_tracking_identifier_validation",value:1,attributes:{identifier:e,surface:t?"checkout":"storefront",authoritative_api_read_enabled:!0,tracking_allowed:n,metadata_status:o.status,cookie_status:_(r),api_status:(p=i,p?p===s?"disallowed":p===c?"placeholder":p===u?"disabled":f(p)?"valid":"invalid":"missing"),api_relationship:m(i,o.value,r),tracking_allowed_transition_observed:d,page_age:l,consent_api_version:"1.1.0"}})}catch(e){}var p}var T=function(){function e(){this.pageStartedAt=(new Date).getTime()}return e.prototype.observeTrackingAllowed=function(e){this.trackingAllowed=e},e.prototype.markTrackingAllowedTransition=function(e){void 0!==this.trackingAllowed&&this.trackingAllowed!==e&&(this.transitionAt=(new Date).getTime()),this.trackingAllowed=e},e.prototype.collect=function(e,t,n,r,i,a){if(!n)return function(e){try{var t=e?l("serialized-shopifyY"):d("shopify-y"),n=e?l("serialized-shopifyS"):d("shopify-s");return o(o({},t?{unique_token_from_consent_api:t}:{}),n?{deprecated_visit_token_from_consent_api:n}:{})}catch(e){return{}}}(e);var s=h("y"),c=h("s"),u=o(o({},i?{unique_token_from_consent_api:i}:{}),a?{deprecated_visit_token_from_consent_api:a}:{});if(!r)return u;var p=v("y",e),f=v("s",e),y=function(e){return e?l("serialized-trackingTokenRenderId"):d("tracking-token-render-id")}(e),m=(new Date).getTime(),T=E(m-this.pageStartedAt),S=void 0!==this.transitionAt;return g("y",e,t,p,s,i,S,T),g("s",e,t,f,c,a,S,T),o(o(o(o(o(o(o(o(o(o(o({},u),{ti_cv:"1.1.0"}),p.value?{ti_y_m:p.value}:{}),f.value?{ti_s_m:f.value}:{}),s?{ti_y_c:s}:{}),c?{ti_s_c:c}:{}),{ti_y_cs:_(s),ti_s_cs:_(c),ti_y_ms:p.status,ti_s_ms:f.status}),y?{ti_rid:y}:{}),{ti_t:S}),void 0!==this.transitionAt?{ti_t_age:E(m-this.transitionAt)}:{}),{ti_pa:T})},e}();t.TrackingIdentifierTelemetry=T},9974:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isSendBeaconSupported=t.isPseudoPageEvent=t.canonical=t.isUnstableBrowserVersion=t.UNSTABLE_BROWSER_VERSION_SET=t.objectAssignFilterUndefined=void 0;var o=n(2164),r=n(9414),i=n(8533),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(o.virtualWindow().userAgent())},t.canonical=function(){for(var e=i.virtualDocument().getElementsByTagName("link"),t=0;t0?null===(s=null==d?void 0:d.variants[0])||void 0===s?void 0:s.id:void 0,f=(null===(u=null===(c=window.ShopifyAnalytics)||void 0===c?void 0:c.meta)||void 0===u?void 0:u.selectedVariantId)||p,v={schemaId:l.buyWithPrimePresenceSchemaId,payload:o(o(o({shop_id:r},e.data&&{event_message:e.data}),d&&{product_id:d.id}),f&&{product_variant_id:Number(f)})};a.produce([v])}}catch(e){_.reportError("buyWithPrimeError",e)}}))},e.prototype.getNavigationType=function(){try{var e="PerformanceNavigationTiming",t=p.getNavigationTypeExperimental();return t||(t=p.getNavigationTypeLegacy(),e="performance.navigation"),t?{navigationType:t,navigationApi:e}:{navigationType:"unknown",navigationApi:"unknown"}}catch(e){s.reportError("navigation_api_error",e)}return{navigationType:"error",navigationApi:"error"}},e.prototype.initialize=function(e,t,n){this.loadIntegrations(e,t,n)},e.prototype.getS2SEventId=function(e,t,n){var o,r,i,a;void 0===e&&(e=void 0),void 0===t&&(t={});var s={navigationApi:this.navigationInfo.navigationApi,navigationType:this.navigationInfo.navigationType},c="Added Product Next"===e?"Added Product":e,u=h.WebPixelEventNameMap[c];try{if("product_added_to_cart"===u&&(null===(o=window.Shopify)||void 0===o?void 0:o.evids)){var l=function(e){if(e.productId&&e.variantId)return e.productId.toString()+"-"+e.variantId.toString()}(t),p=null!==(r=C[e])&&void 0!==r?r:C.default;a=window.Shopify.evids(u,{analyticsFramework:p,cacheKey:l})}else a="checkout_completed"===u&&n?n:(null===(i=window.Shopify)||void 0===i?void 0:i.evids)&&u?window.Shopify.evids(u,{analyticsFramework:"trekkie"}):d.buildToken()}catch(e){a=d.buildToken()}return{s2sMetadata:s,eventId:"string"==typeof a&&a.length>0?a:d.buildToken()}},e.prototype.loadIntegrations=function(e,t,n){var o=this,r=this.waitFor(e.length,(function(){try{n()}catch(e){s.reportError("readyCallback",e)}o.allIntegrationsHaveLoaded=!0,o.flushMonorailEventsIfLoaded()}));e.forEach((function(e){var n=e[0],i=e[1];try{if(t[n]&&"object"==typeof t[n]){var a=new i({},t[n],r);a.initializeOrAwaitConsent(),o.integrations.push(a),"Trekkie"===a.name()&&(o.trekkie=a,window.ShopifyAnalytics=window.ShopifyAnalytics||{},window.ShopifyAnalytics.lib=window.ShopifyAnalytics.lib||{},window.ShopifyAnalytics.lib.trekkie=o.trekkie)}else r()}catch(e){r(),s.reportError("loadIntegration",e)}})),this.addConsentCollectedListener()},e.prototype.lockIntegrationsObject=function(){try{Object.defineProperty(this,"integrations",o(o({},Object.getOwnPropertyDescriptor(this,"integrations")),{value:this.integrations,configurable:!1,writable:!1}))}catch(e){s.reportError("lockIntegrationsObject",e)}},e.prototype.handleConsentCollected=function(e){v.default.refreshVisitorTokens(),this.integrations.forEach((function(t){t.onConsentCollected(e)})),a.flushBatchEvents()},e.prototype.addConsentCollectedListener=function(){document.addEventListener(u.TrackingEvents.CONSENT_COLLECTED,this.handleConsentCollectedBinded)},e.prototype.removeConsentCollectedListener=function(){document.removeEventListener(u.TrackingEvents.CONSENT_COLLECTED,this.handleConsentCollectedBinded)},e.prototype.identify=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t={});var o=this.getS2SEventId();e instanceof Object&&(t=e,e="");for(var r=0,i=this.integrations;r0?e:e+i.search();var t=i.href(),n=t.indexOf("#");return-1===n?t:t.slice(0,n)},e.prototype.constructTrackArgs=function(e,t,n){if(void 0===t&&(t={}),f.isPseudoPageEvent(e)){var r=t,i=r.name,a=r.path;if(i&&a){var s=this.generatePageObject(i,{path:a},n.eventId,n.s2sMetadata);return o(o({},t),{page:s})}}return t},e.prototype.destroy=function(){this.removeConsentCollectedListener(),g.otelClient.destroy(),T.removeShopifyAnalyticsProxy()},e}();t.Tricorder=A,t.replayAnalyticsQueue=function(e,t){E.markShimQueueReady(!0);for(var n=0,o=t;n"undefined"==typeof window,r=()=>"undefined"!=typeof __CtaTestEnv__&&"true"===__CtaTestEnv__;class i{}i.warn=e=>{r()||console.warn(e)},i.error=e=>{r()||console.error(e)},i.info=e=>{r()||console.info(e)},i.debug=e=>{r()||console.debug(e)},i.trace=e=>{r()||console.trace(e)};const a=i;function s(e,t){if(null===e)return"null";if(Array.isArray(e))return`[${e.map((e=>s(e,!0))).join(",")}]`;if("object"==typeof e){let n=[];for(const t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&n.push(`${t}:${s(e[t],!0)}`);const o=n.join(",");return t?`{${o}}`:o}return"string"==typeof e?JSON.stringify(e):`${e}`}function c(e,...t){if(0===t.length)return e;const n=t[0];return e[n]||(e[n]={}),c(e[n],...t.slice(1))}function u(e){try{return decodeURIComponent(e)}catch(e){return""}}function d(e){if(!e)return;const t=Math.max(...Object.keys(e).map((e=>parseInt(e,10))))+1;let n="";for(let o=0;oo?void 0:n}const P="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";function R(e){return P.replace(/[xy]/g,(t=>{const n=e();return("x"===t?n:3&n|8).toString(16)}))}function D(){const e="undefined"!=typeof crypto?crypto:void 0;if("function"==typeof(null==e?void 0:e.randomUUID))return e.randomUUID();if("function"==typeof(null==e?void 0:e.getRandomValues)){const t=e.getRandomValues(new Uint8Array(P.length));let n=0;return R((()=>t[n++]%16))}return R((()=>16*Math.random()|0))}const M="_tracking_consent";function L(){try{return document.cookie}catch{return!1}}function x(){return function(e){const t=L()?document.cookie.split("; "):[];for(let n=0;n{}));console.log("Monorail event from consent API:",o,n)}catch(e){}}}function K(){var e,t;return o()?{}:(null===(e=window.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.config)||{}}j.instance=void 0;const B=/^https?:\/\/([^/]+)(\/api\/(?:unstable|2\d{3}-\d{2})\/graphql\.json(?=$|\?))?/;function G(e,t){if("fetch"!==e.initiatorType)return!1;const n=e.name.match(B);if(!n)return!1;const[,o,r]=n;return o===t||!!r&&!(null==o||!o.endsWith(`.${t}`))}const H="_cmp",q="consentHeader";function Y(e){if(!o()){try{e=decodeURIComponent(e)}catch{}try{sessionStorage.setItem(q,e)}catch{}}}function W(e=H){let t;if(t=X()&&$((()=>function(e=H){var t,n;if(o())return;const r=null===(t=performance)||void 0===t||null===(n=t.getEntriesByType)||void 0===n?void 0:n.call(t,"resource"),i=window.location.host;let a=z[e];for(let t=r.length-1;t>=0;t--){const n=r[t];if(!G(n,i))continue;const o=Q(n,e);if(o){a=o;break}}return z[e]=a,a}(e)))||$((()=>function(e=H){var t,n;if(!Z()&&!function(){try{const e=performance.getEntriesByType("navigation")[0].serverTiming;return!!e&&0!=e.length}catch{return!1}}()){const e=new j;let t="failed_to_fetch";try{t=navigator.userAgent}catch{}e.produce("navigationServerTiming",JSON.stringify({failed:!0,userAgent:t,apiSupported:h()})),Z()||(c(p(),"Shopify","customerPrivacy").serverTimingSupportVerified=!0)}const o=null===(t=performance)||void 0===t||null===(n=t.getEntriesByType)||void 0===n?void 0:n.call(t,"navigation");if(!o)return;const r=o.map((t=>Q(t,e))).find((e=>e));return r&&e===H&&Y(r),r}(e))),!t){if(e!==H)return;let t;try{t=sessionStorage.getItem(q)}catch{}return t||void 0}try{t=decodeURIComponent(t)}catch{}return t}function $(e){try{return e()}catch{return}}const z={};function Q(e,t=H){var n,o;if(e)return null===(n=e.serverTiming)||void 0===n||null===(o=n.find((e=>e.name==t)))||void 0===o?void 0:o.description}function J(){var e,t;const n=p();return!0===(null==n||null===(e=n.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.backendConsentEnabled)||!0===K().asyncVisitorState}function X(){return!o()&&(J()||!f()&&!_()&&!v())}function Z(){var e,t;const n=p();return null==n||null===(e=n.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.serverTimingSupportVerified}const ee="_cs";let te;function ne(){if(o())return te;{var e,t;const n=(null===(e=window.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.injectedConsent)||K().injectedConsent;return n?u(n):void 0}}function oe(){var e;o()?te=void 0:null!==(e=window.Shopify)&&void 0!==e&&e.customerPrivacy&&(window.Shopify.customerPrivacy.injectedConsent=void 0)}function re(){var e;if(!o())return null===(e=window.Shopify)||void 0===e?void 0:e.customerPrivacy}function ie(){var e;return null===(e=re())||void 0===e?void 0:e.consentStatus}function ae(e){const t=re();t&&(t.consentStatus=e)}function se(){ce(m.CONSENT_TRACKING_API_LOADED)}function ce(e,t){if(!o())try{document.dispatchEvent(new CustomEvent(e,{detail:t||{}}))}catch(t){console.error(`[Shopify Customer Privacy] Error in event listener for "${e}":`,t)}}function ue(e){ae("loaded");const t=e[A.MARKETING],n=e[A.SALE_OF_DATA],o=e[A.ANALYTICS],r=e[A.PREFERENCES];!0===t?ce(m.MARKETING_ACCEPTED):!1===t&&ce(m.MARKETING_DECLINED),!0===n?ce(m.SALE_OF_DATA_ACCEPTED):!1===n&&ce(m.SALE_OF_DATA_DECLINED),!0===o?ce(m.ANALYTICS_ACCEPTED):!1===o&&ce(m.ANALYTICS_DECLINED),!0===r?ce(m.PREFERENCES_ACCEPTED):!1===r&&ce(m.PREFERENCES_DECLINED);const i=function(e){return{marketingAllowed:e[A.MARKETING],saleOfDataAllowed:e[A.SALE_OF_DATA],analyticsAllowed:e[A.ANALYTICS],preferencesAllowed:e[A.PREFERENCES],firstPartyMarketingAllowed:e[A.MARKETING],thirdPartyMarketingAllowed:e[A.SALE_OF_DATA]}}(e);ce(m.CONSENT_COLLECTED,i);const a=[o,r,t,n];a.every((e=>!0===e))&&ce(m.TRACKING_ACCEPTED),a.every((e=>!1===e))&&ce(m.TRACKING_DECLINED)}function de(e){var t,n;!function(e){o()?te=e:c(window,"Shopify","customerPrivacy").injectedConsent=e}(e),o()||(null!==(t=window.Shopify)&&void 0!==t&&null!==(n=t.customerPrivacy)&&void 0!==n&&n.cachedConsent&&(window.Shopify.customerPrivacy.cachedConsent=void 0),ue({[A.PREFERENCES]:ge(),[A.ANALYTICS]:Te(),[A.MARKETING]:Se(),[A.SALE_OF_DATA]:Ae()}))}function le(){try{let e=function(){let e;if(e=o()?ne():function(){var e,t;const n=null===(e=window.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.cachedConsent;return n?u(n):void 0}()||ne()||new URLSearchParams(window.location.search).get(ee)||x()||W(),void 0!==e)return ve(e)}();if(!e)return;return e}catch{return}}function pe(){return{m:me(C.MARKETING),a:me(C.ANALYTICS),p:me(C.PREFERENCES),s:me(C.SALE_OF_DATA)}}function fe(){return pe()[C.SALE_OF_DATA]}function _e(e=null){return null===e&&(e=le()),void 0===e}function ve(e){if("%"==e.slice(0,1))try{e=decodeURIComponent(e)}catch{}const t=e.slice(0,1);return"{"==t?function(e){var t;let n;try{n=JSON.parse(e)}catch{return}if(n.v===E&&null!==(t=n.con)&&void 0!==t&&t.CMP)return n}(e):"3"==t?function(e){const t=e.slice(1).split("_"),[n,o,r,i,a]=t;let s,c;try{s=t[5]?JSON.parse(t.slice(5).join("_")):void 0}catch{}if(a){const e=a.replace(/\*/g,"/").replace(/-/g,"+"),t=atob(e);let n="";for(let e=0;ee.slice(0,t)+"-"+e.slice(t)),n)}function u(e){const t=n.split(".")[0];return t.includes(e.toLowerCase())?S.DECLINED:t.includes(e.toUpperCase())?S.ACCEPTED:S.NO_VALUE}function d(e){return n.includes(e.replace("t","s").toUpperCase())}return{v:g,con:{CMP:{[C.ANALYTICS]:u(C.ANALYTICS),[C.PREFERENCES]:u(C.PREFERENCES),[C.MARKETING]:u(C.MARKETING),[C.SALE_OF_DATA]:u(C.SALE_OF_DATA)}},region:o||"",cus:s,purposes:{[A.ANALYTICS]:d(A.ANALYTICS),[A.PREFERENCES]:d(A.PREFERENCES),[A.MARKETING]:d(A.MARKETING),[A.SALE_OF_DATA]:d(A.SALE_OF_DATA)},sale_of_data_region:"t"==i,display_banner:"t"==r,consent_id:c}}(e):void 0}function he(e){switch(e){case S.ACCEPTED:return T.ACCEPTED;case S.DECLINED:return T.DECLINED;default:return T.NO_VALUE}}function ye(e){switch(e){case C.ANALYTICS:return k.ANALYTICS;case C.MARKETING:return k.MARKETING;case C.PREFERENCES:return k.PREFERENCES;case C.SALE_OF_DATA:return k.SALE_OF_DATA}}function me(e){const t=le();if(!t)return S.NO_VALUE;const n=t.con.CMP;return n?n[e]:S.NO_VALUE}function Ee(e){const t=le();if(!t||!t.purposes)return!0;const n=t.purposes[e];return"boolean"!=typeof n||n}function ge(){return Ee(A.PREFERENCES)}function Te(){return Ee(A.ANALYTICS)}function Se(){return Ee(A.MARKETING)}function Ae(){return Ee(A.SALE_OF_DATA)}function Ce(){const e=le();return!!e&&"boolean"==typeof e.display_banner&&e.display_banner}function ke(){const e=le();return e&&e.sale_of_data_region||!1}const Ie="v1.1",we=31536e6,be=18e5;function Ne(e,t){if(!o())throw new Error("handleTrackingTokens is only supported in Node.js environments. ");if(!Te()&&!Se())return;const{shopifyY:n,shopifyS:r,shopifyYExpiry:i,shopifySExpiry:a}=e(),s=Date.now(),c=i<=s,u=a<=s;t({shopifyY:N(n)&&!c?n:D(),shopifyS:N(r)&&!u?r:D(),shopifyYExpiry:s+we,shopifySExpiry:s+be})}function Oe(e,t){const n=p();if(!n)return;const o=c(n,"Shopify","customerPrivacy","cachedToken");if(t){const n="_shopify_s"===e?be:we;o[e]=t,o[e+"_expires_at"]=Date.now()+n}else delete o[e],delete o[e+"_expires_at"]}function Pe(e){return`${e.origin}${t=e.pathname,t.replace(/\/$/,"")}`;var t}function Re(e){return e.startsWith("http://")||e.startsWith("https://")}const De="Shopify-Storefront-Consent-Management";function Me(e){return""===e?void 0:e}function Le(e){const t=e.granular_consent;return{query:`query { consentManagement { cookies(${s({visitorConsent:{marketing:Me(t.marketing),analytics:Me(t.analytics),preferences:Me(t.preferences),saleOfData:Me(t.sale_of_data),...t.metafields&&{metafields:t.metafields}},...t.email&&{visitorEmail:t.email},origReferrer:Me(e.referrer),landingPage:Me(e.landing_page)})}) { trackingConsentCookie cookieDomain landingPageCookie origReferrerCookie shopifyUnique shopifyVisit } customerAccountUrl } }`,variables:{}}}let xe;function Ue(e,t,n,i={}){const s=K().consentDomain||t.granular_consent.checkoutRootDomain||window.location.host,d=()=>function(e,t,n,o){const i=t.granular_consent;let s="",c={};if(i.customerAccountRequestInfo)s=i.customerAccountRequestInfo.url,c=i.customerAccountRequestInfo.headers;else{const t=K(),o=i.storefrontAccessToken||t.storefrontAccessToken||function(){if(!0!==K().isHeadless)try{const e=document.documentElement.querySelector("#shopify-features"),t="Could not find liquid access token";if(!e)return void a.warn(t);const n=e.textContent;if(!n)return void a.warn(t);let o;try{o=JSON.parse(n).accessToken}catch{return void a.warn(t)}return o||void a.warn(t)}catch{return void a.warn("Could not find liquid access token")}}();s=`${/^(localhost|127\.0\.0\.1)(:|$)/.test(e)?"http:":"https:"}//${e}/api/unstable/graphql.json`;const r=i.isExtensionToken?"Shopify-Storefront-Extension-Token":"x-shopify-storefront-access-token";c=o?{[r]:o}:{},n&&(c={...c,...n()})}const u={headers:{"content-type":"application/json",...!0===K().asyncConsent&&new URL(s).origin===window.location.origin&&{[De]:"1"},...c,...r()?{"x-test-payload":JSON.stringify(t)}:{}},body:JSON.stringify(Le(t)),method:"POST"};let d;try{d=fetch(s,u)}catch(e){d=Promise.reject(e)}return d.then((e=>{try{null==o||o(e)}catch{}if(e.ok)return e.json();{const t=new Error("Server error");throw t.cause={status:e.status},t}}))}(s,t,i.getVisitorTokenHeaders,i.onResponse).then((e=>{var r,a;const s=null==e||null===(r=e.data)||void 0===r?void 0:r.consentManagement;if(!s){var d;const t=(null!==(d=null==e?void 0:e.errors)&&void 0!==d?d:[]).map((e=>null==e?void 0:e.message)).filter(Boolean).join("; ");throw new Error(t?`GraphQL error: ${t}`:"GraphQL response missing consentManagement")}const l=s.cookies.cookieDomain,p=s.cookies.trackingConsentCookie,f=s.cookies.shopifyUnique,_=s.cookies.shopifyVisit,v=null!==(a=s.customerAccountUrl)&&void 0!==a?a:"";if(!0===K().asyncConsent&&p&&!function(e){try{return void 0!==ve(u(e))}catch{return!1}}(p))throw new Error("Consent response contains unreadable consent");var h,y,m,E;if(p&&(h=p,c(window,"Shopify","customerPrivacy").cachedConsent=h,!0!==K().asyncConsent&&Y(p)),Oe("_shopify_y",f),Oe("_shopify_s",_),!0===K().asyncConsent)null!==(y=e.errors)&&void 0!==y&&y.length||!p||_e()||function(){if(o()||!function(){const e=L();return!!e&&e.split(";").some((e=>V.includes(e.split("=")[0].trim())))}())return;const e=window.location.hostname.split("."),t=["",...e.map(((t,n)=>e.slice(n).join(".")))];for(const e of V)for(const n of t)try{F(e,n,-1,"")}catch{}}();else if(t.granular_consent.headlessStorefront&&!J()){const e=31536e6,n=t.granular_consent,o=l||n.checkoutRootDomain||window.location.hostname,r=n.storefrontRootDomain||l||window.location.hostname;F(M,o,e,p),r!==o&&F(M,r,e,p)}return!1!==i.emitEvents&&(m=t,E={[A.PREFERENCES]:ge(),[A.ANALYTICS]:Te(),[A.MARKETING]:Se(),[A.SALE_OF_DATA]:Ae()},void 0!==m.granular_consent&&ue(E)),function(e,t){if(!e)return;const n=function(e){const t=new URL(e,window.location.origin),n=Re(e)?Pe(t):Pe(t).replace(window.location.origin,""),o=document.querySelectorAll(`a[href^="${n}"]`),r=document.querySelectorAll(`a[href*="${window.location.hostname}/customer_authentication"]`),i=new Set,a=[];for(let e=0;e{var t;const o="Error while setting storefront API consent: "+e.message,r=null===(t=e.cause)||void 0===t?void 0:t.status,i={error:o};if(void 0!==r&&(i.statusCode=r),void 0===n)throw i;n(i)}));if(!0!==K().asyncConsent)return d();const l=xe=xe?xe.then(d,d):d(),p=()=>{xe===l&&(xe=void 0)};return l.then(p,p),l}const Fe=[k.MARKETING,k.ANALYTICS,k.PREFERENCES,k.SALE_OF_DATA],Ve=[...Fe,k.EMAIL,"rootDomain","checkoutRootDomain","storefrontRootDomain","storefrontAccessToken","headlessStorefront","isExtensionToken","metafields","customerAccountRequestInfo"],je=Fe.map((e=>`"${e}"`)).join(", "),Ke="https://shopify.dev/docs/api/customer-privacy";function Be(e,t){if(o())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 n=new j;if(Te()&&n.produce("setTrackingConsent",Ie),function(e){if("boolean"!=typeof e&&"object"!=typeof e)throw new y(`setTrackingConsent received an invalid argument of type "${typeof e}". Expected an object with consent keys. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${Ke} for documentation.`);if("object"==typeof e){const t=Object.keys(e);if(0===t.length)throw new y(`The submitted consent object is empty. Expected at least one consent key: ${je}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${Ke} for documentation.`);for(const e of t)if(!Ve.includes(e))throw new y(`The submitted consent object contains an invalid key: "${e}". Valid keys are: ${je}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${Ke} for documentation.`)}}(e),void 0!==t&&"function"!=typeof t)throw new y(`setTrackingConsent received an invalid callback of type "${typeof t}". The second argument must be a function if provided. Example: setTrackingConsent({ analytics: true }, (error, result) => { ... }). See ${Ke} for documentation.`);const r=function(e){if(!e)return null;try{return qe()?document.referrer:""}catch{return""}}(e.analytics),i=function(e){if(!e)return null;if(!qe())return"/";try{return window.location.pathname+window.location.search}catch{return"/"}}(e.analytics);return Ue(0,{granular_consent:e,...null!==r&&{referrer:r},...null!==i&&{landing_page:i}},t)}function Ge(){const e=new j;if(Te()&&e.produce("getTrackingConsent",Ie),_e())return T.NO_VALUE;const t=pe();return t[C.MARKETING]===S.ACCEPTED&&t[C.ANALYTICS]===S.ACCEPTED?T.ACCEPTED:t[C.MARKETING]===S.DECLINED||t[C.ANALYTICS]===S.DECLINED?T.DECLINED:T.NO_INTERACTION}function He(){return function(){const e=le();return _e(e)?"":e.region||""}()}function qe(){try{if(""===document.referrer)return!0;const e=document.createElement("a");return e.href=document.referrer,window.location.hostname!=e.hostname}catch{return!0}}function Ye(){return!!_e()||Se()&&Te()}function We(){return ke()?"string"==typeof navigator.globalPrivacyControl?"1"!==navigator.globalPrivacyControl:"boolean"==typeof navigator.globalPrivacyControl?!navigator.globalPrivacyControl:null:null}function $e(){return Ce()&&Ge()===T.NO_INTERACTION}function ze(){return!1===We()?T.DECLINED:(e=fe(),_e()?T.NO_VALUE:e===S.NO_VALUE?T.NO_INTERACTION:he(e));var e}function Qe(){return!0}function Je(e){return function(e){const t=le();if(_e(t)||!t.cus)return;const n=t.cus[encodeURIComponent(e)];return n?decodeURIComponent(n):n}(e)}function Xe(){return function(){const e=le();if(!_e(e)&&e.cus)return Object.entries(e.cus).map((([e,t])=>({key:decodeURIComponent(e),value:decodeURIComponent(t)})))}()}function Ze(){const e={},t=pe();for(const n of Object.keys(t))e[ye(n)]=he(t[n]);return e}function et(){return function(){const e=le();return e&&e.consent_id||""}()}const tt="shopify-y",nt="shopify-s",ot="serialized-shopifyY",rt="serialized-shopifyS";function it(e){if(!o())try{var t,n;return null===(t=document.querySelector(`meta[name="${e}"]`))||void 0===t||null===(n=t.getAttribute("content"))||void 0===n?void 0:n.trim()}catch{return}}function at(e){const t=it(e);if(t)try{const e=JSON.parse(t);return"string"==typeof e?e.trim():void 0}catch{return}}function st(e){return void 0!==e&&Date.now()>e}function ct(e,t){const n=O(at(t));if(n&&!st(function(e){const t=at(`${e}Expiration`);if(!t)return;const n=Number(t);return Number.isFinite(n)?n:void 0}(t)))return n;const r=O(it(e));return r&&!st(function(e){if(!o())try{var t,n;const o=null===(t=document.querySelector(`meta[name="${e}"]`))||void 0===t||null===(n=t.getAttribute("data-expiration"))||void 0===n?void 0:n.trim();if(!o)return;const r=Number(o);return Number.isFinite(r)?r:void 0}catch{return}}(e))?r:void 0}class ut{constructor(){if(this.endpoint="https://otlp-http-production.shopifysvc.com/v1/metrics",this.serviceName="consent-tracking-api",this.scopeName="consent-tracking-api-opentelemetry",ut.instance)return ut.instance;ut.instance=this}increment(e,t={}){if(!o()&&e)try{const n=this.buildMetricBody(e,t);if(window.location.host.endsWith("spin.dev"))return void console.log("OpenTelemetry metric from consent API:",n);if("function"!=typeof fetch)return;return fetch(this.endpoint,{headers:{accept:"*/*","content-type":"application/json; charset=utf-8"},body:JSON.stringify(n),method:"POST",mode:"cors",credentials:"omit"}).catch((()=>{}))}catch(e){}}buildMetricBody(e,t){const n=1e6*Date.now();return{resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:this.serviceName}}]},scopeMetrics:[{scope:{name:this.scopeName,version:"1.1.0",attributes:[]},metrics:[{name:e,unit:"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[{asDouble:1,startTimeUnixNano:n,timeUnixNano:n,attributes:dt(t)}]}}]}]}]}}}function dt(e){return Object.keys(e).reduce(((t,n)=>{const o=e[n];return null==o||t.push({key:n,value:lt(o)}),t}),[])}function lt(e){return"string"==typeof e?{stringValue:e}:"boolean"==typeof e?{boolValue:e}:isFinite(e)?Math.floor(e)===e?{intValue:e}:{doubleValue:e}:{stringValue:String(e)}}let pt;function ft(){var e;return null!==(e=pt)&&void 0!==e?e:pt=new ut}ut.instance=void 0;const _t=.01;function vt(e,t){try{if(Math.random()>=_t)return;ft().increment("consent_tracking_api_tracking_token_read",{token:e,source:t})}catch{}}const ht={};function yt(e){return function(e){if(!X())return;const t=function(e){try{var t,n;const i=null===(t=performance)||void 0===t||null===(n=t.getEntriesByType)||void 0===n?void 0:n.call(t,"resource");if(!i)return;const a=window.location.host;for(let t=i.length-1;t>=0;t--){var o,r;const n=i[t];if(!G(n,a))continue;const s=null===(o=n.serverTiming)||void 0===o||null===(r=o.find((t=>t.name===e)))||void 0===r?void 0:r.description;if(s)return s}return}catch{return}}(e);return t&&(ht[e]=t),t}(e)||function(e){if(X())return ht[e]}(e)||function(e){try{var t,n,o,r;return null===(t=performance)||void 0===t||null===(n=t.getEntriesByType("navigation")[0])||void 0===n||null===(o=n.serverTiming)||void 0===o||null===(r=o.find((t=>t.name==e)))||void 0===r?void 0:r.description}catch{return}}(e)}const mt="unstable",Et="X-Shopify-UniqueToken",gt="X-Shopify-VisitToken",Tt="query { consentManagement { cookies(visitorConsent:{}) { cookieDomain } } }",St=.01;async function At(e){try{var t,n;if(Math.random()>St)return;let o=null;if(e)try{const t=await e.json();o=Array.isArray(null==t?void 0:t.errors)&&t.errors.length>0}catch{}ft().increment("consent_tracking_api_persist",{ok:String(!(null==e||!e.ok)),status:String(null!==(t=null==e?void 0:e.status)&&void 0!==t?t:"none"),graphql_errors:String(o)}),(new j).produce("persistOutcome",JSON.stringify({ok:!(null==e||!e.ok),status:null!==(n=null==e?void 0:e.status)&&void 0!==n?n:null,graphqlErrors:o,sampleRate:St}))}catch{}}function Ct(e,t){if(!o())try{const n=O(e),o=O(t);if(!n&&!o)return;const r=function(){const e=document.querySelector('[data-serialized-id="app-base-path"]');if(_()||e){var t;const n=document.querySelector('[data-serialized-id="preview-mode-data"]');if("/"!==JSON.parse((null==e?void 0:e.textContent)||"null")||!1!==(null===(t=JSON.parse((null==n?void 0:n.textContent)||"null"))||void 0===t?void 0:t.inPreviewMode))return;return new URL("/customer/api/unstable/graphql",window.location.origin).href}const{protocol:n,host:o}=function(){const e=K().consentDomain||window.location.host;return{protocol:/^(localhost|127\.0\.0\.1)(:|$)/.test(e)?"http:":"https:",host:e}}();return`${n}//${o}/api/${mt}/graphql.json`}();if(!r)return;const i=new URLSearchParams,a={"content-type":"application/json"};n&&(i.set("_y",n),a[Et]=n),o&&(i.set("_s",o),a[gt]=o);const s=`${r}?${i.toString()}`;let c;try{c=fetch(s,{headers:a,body:JSON.stringify({query:Tt,variables:{}}),method:"POST",mode:"cors",credentials:"include"})}catch(e){c=Promise.reject(e)}c.then((e=>At(e)),(()=>At(void 0)))}catch{}}function kt(e,{generateFallback:t=!1}={}){if(t&&o())throw new Error("Token generateFallback is not supported in Node.js environments, just browsers.");if(!Te()&&!Se())return;const n=function(e){var t,n,o,r,i,a;const s=p();if(!s)return;const c=null===(t=s.Shopify)||void 0===t||null===(n=t.customerPrivacy)||void 0===n||null===(o=n.cachedToken)||void 0===o?void 0:o[e],u=null===(r=s.Shopify)||void 0===r||null===(i=r.customerPrivacy)||void 0===i||null===(a=i.cachedToken)||void 0===a?void 0:a[e+"_expires_at"];return!c||!u||u<(new Date).getTime()?void 0:O(c)}(e);if(n)return vt(e,"window_cache"),n;if(function(){const e=p();if(null==e||!e.ShopPay)return!1;try{const t=Object(e.ShopPay);return Reflect.has(t,"trackingUnique")||Reflect.has(t,"trackingVisit")}catch{return!1}}()){const t=function(e){const t=p();if(!t||!t.ShopPay)return;const n={_shopify_y:"trackingUnique",_shopify_s:"trackingVisit"}[e];return n?O(t.ShopPay[n]):void 0}(e);return vt(e,"shop_pay"),t}const r="_shopify_y"===(i=e)?ct(tt,ot):"_shopify_s"===i?ct(nt,rt):void 0;var i;if(r)return vt(e,"meta"),r;const a=function(e){const t=e.replace("_shopify",""),n=yt(t),o=Number(yt(`${t}e`));if(!o||Date.now()/1e3t.trim().startsWith(`${e}=`))))||void 0===o||null===(r=o.split("=")[1])||void 0===r?void 0:r.trim())}catch{return}}(e);if(s)return vt(e,"cookie"),s;if(vt(e,"missing"),t)try{return function(e,t,n){if(!0===K().asyncConsent&&"loaded"!==ie())return;!function(e){var t,n;ft().increment("consent_tracking_api_tracking_token_missing");const o=p();(new j).produce("trackingTokenMissing",JSON.stringify({token:e,hasTrekkie:!(null==o||!o.ShopifyAnalytics),hasTheme:!(null==o||null===(t=o.Shopify)||void 0===t||!t.theme),domain:null==o||null===(n=o.location)||void 0===n?void 0:n.hostname}))}(e);const o=t?void 0:D(),r=n?void 0:D();return o&&Oe("_shopify_y",o),r&&Oe("_shopify_s",r),Ct(o,r),"_shopify_y"===e?o:r}(e,It({generateFallback:!1}),wt({generateFallback:!1}))}catch{}}function It({generateFallback:e=!1}={}){return kt("_shopify_y",{generateFallback:e})}function wt({generateFallback:e=!1}={}){return kt("_shopify_s",{generateFallback:e})}function bt(e){return(...t)=>{try{return e(...t)}catch(e){throw e instanceof y||function(e,t,n){try{var o;!function(e){const t=new XMLHttpRequest;t.open("POST","https://error-analytics-production.shopifysvc.com",!0),t.setRequestHeader("Content-Type","application/json"),t.setRequestHeader("Bugsnag-Api-Key","95ba910bcec4542ef2a0b64cd7ca666c"),t.setRequestHeader("Bugsnag-Payload-Version","5");const n=function(e){var t;const n=function(e){return e?e.stackTrace||e.stack||e.description||e.name:void 0}(e.error);let o,r;if(null!==(t=e.error)&&void 0!==t&&t.name){var i,a;o=e.error.name,r=null!==(i=null===(a=e.error)||void 0===a?void 0:a.message)&&void 0!==i?i:""}else{const t=(n||"unknown error").split("\n")[0],i=t.indexOf(":");var s,c,u;i>0?(o=t.substring(0,i).trim(),r=t.substring(i+1).trim()):(o=t.trim()||"unknown error",r=(null===(s=e.error)||void 0===s?void 0:s.message)||(null===(c=e.error)||void 0===c?void 0:c.error)||(null===(u=e.error)||void 0===u?void 0:u.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:n}],type:"browserjs"}],context:e.context||"general",app:{id:"ConsentTrackingAPI",version:"latest"},metaData:{request:{shopId:e.shopId,shopUrl:window.location.href},device:{userAgent:window.navigator.userAgent},"Additional Notes":e.notes},unhandled:!1}]})}(e);t.send(n)}({error:e,context:null!=t?t:"",shopId:Nt()||(null===(o=window.Shopify)||void 0===o?void 0:o.shop),notes:null!=n?n:""})}catch(e){}}(e),e}}}function Nt(){try{var e;const t=null===(e=document.getElementById("shopify-features"))||void 0===e?void 0:e.textContent;return t?JSON.parse(t).shopId:null}catch(e){return null}}function Ot(){return Se()}function Pt(){return Te()}function Rt(){return ge()}function Dt(){return Ae()}const Mt=({useBugsnagReporting:e})=>{fe()!=S.DECLINED&&!1===We()&&Be({sale_of_data:!1},(()=>!1));const t={analyticsProcessingAllowed:Te,currentVisitorConsent:Ze,doesMerchantSupportGranularConsent:Qe,firstPartyMarketingAllowed:Ot,getCCPAConsent:ze,getRegion:He,getTrackingConsent:Ge,getTrackingConsentMetafield:Je,marketingAllowed:Ot,preferencesProcessingAllowed:ge,saleOfDataAllowed:Dt,saleOfDataRegion:ke,setTrackingConsent:Be,shouldShowBanner:Ce,shouldShowGDPRBanner:$e,thirdPartyMarketingAllowed:Dt,userCanBeTracked:Ye,consentId:et,unstable:{},__internal:{uniqueToken:It,visitToken:wt},__metadata__:{name:"@shopify/consent-tracking-api",version:Ie,description:"Shopify Consent Tracking API"},config:K()};if(!e)return t;const n=t;for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];"function"==typeof t&&(n[e]=bt(t))}return t};function Lt(e={useBugsnagReporting:!1}){return Mt(e)}let xt;function Ut(){const e=It(),t=wt();return{...e?{"X-Shopify-UniqueToken":e}:{},...t?{"X-Shopify-VisitToken":t}:{}}}function Ft(){if(o())return;if(xt)return xt;const e=ie();if("loading"===e)return;if("loaded"===e)return;const t=!0===K().asyncConsent;if(!(_e()||t&&x()))return void ae("loaded");if(!t)return;ae("loading");const n=Ue(0,{granular_consent:{}},void 0,{emitEvents:!1,getVisitorTokenHeaders:J()?Ut:void 0}).then((()=>{ae("loaded")}));return xt=n,n.then((()=>{xt===n&&(xt=void 0)}),(()=>{"loading"===ie()&&ae(void 0),xt===n&&(xt=void 0)})),n}function Vt(){var e,t;if(o()||f()||v()||_())return;const n=null===(e=K().debug)||void 0===e||null===(t=e.hydrogen)||void 0===t?void 0:t.generation;return 2===n||3===n?n:void 0}const jt="p";function Kt(e){try{return d(e.version)===jt}catch{return!1}}function Bt(e){var t;if(!e)return;if("p"!==String.fromCharCode(null==e||null===(t=e.version)||void 0===t?void 0:t[0]))return;let n="",o="";const r=e.analyticsAllowed?"A":"a",i=e.preferencesAllowed?"P":"p",a=e.marketingAllowed?"M":"m",s=e.saleOfDataAllowed?"S":"s";function c(e){return!0===e?"t":!1===e?"f":""}0===e.analyticsConsent?n+=r:o+=r,0===e.marketingConsent?n+=a:o+=a,0===e.preferencesConsent?n+=i:o+=i,0===e.saleOfDataConsent?n+=s:o+=s;let u=`3${o}.${n}_${d(e.region)}_${c(e.shouldShowBanner)}_${c(e.saleOfDataRegion)}_${l(e.consentId)||""}_${0===Object.keys(e.metafields).length?"":JSON.stringify(e.metafields)}`;return u=u.replace(/_*$/,""),u}!function(){try{var e,t,n,r,i;if(o()||f())return;if("function"!=typeof(null===(e=performance)||void 0===e?void 0:e.setResourceTimingBufferSize))return;if((null!==(t=null===(n=(r=performance).getEntriesByType)||void 0===n||null===(i=n.call(r,"resource"))||void 0===i?void 0:i.length)&&void 0!==t?t:0)>=1e3)return;performance.setResourceTimingBufferSize(1e3)}catch{}}()},9671:function(e,t,n){n.r(t),n.d(t,{setupEventIdService:function(){return f}});const o="sh",r="shu",i=["page_viewed","collection_viewed","product_viewed","search_submitted","product_added_to_cart","product_added_to_cart_next","checkout_started","checkout_completed","payment_info_submitted","checkout_contact_step_started","checkout_contact_info_submitted","checkout_address_info_submitted","checkout_shipping_step_started","checkout_shipping_info_submitted","checkout_payment_step_started","session_started"],a="wpm",s="trekkie",c="trekkie-next",u="trekkie-parity";let d,l;function p(e){return`${e||o}-${function(){const e="xxxx-4xxx-xxxx-xxxxxxxxxxxx";let t="";try{const n=window.crypto,o=new Uint16Array(31);n.getRandomValues(o);let r=0;t=e.replace(/[x]/g,(e=>{const t=o[r];if("number"!=typeof t)throw new Error(`Event ID service: Invalid random number at index "${r}".`);const n=t%16;return r++,("x"===e?n:3&n|8).toString(16)})).toUpperCase()}catch{t=e.replace(/[x]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})).toUpperCase()}return`${function(){let e=0,t=0;e=(new Date).getTime()>>>0;try{t=performance.now()>>>0}catch{t=0}return Math.abs(e+t).toString(16).toLowerCase().padStart(8,"0")}()}-${t}`}()}`}function f(){window.Shopify=window.Shopify||{},!window.Shopify.evids&&(d={},l={[a]:{},[s]:{},[c]:{},[u]:{}},window.Shopify.evids=(...e)=>function(e,t){if(!function(e){return i.includes(e)}(e)||(null==t?void 0:t.analyticsFramework)!==s&&(null==t?void 0:t.analyticsFramework)!==a&&(null==t?void 0:t.analyticsFramework)!==c&&(null==t?void 0:t.analyticsFramework)!==u)return p(r);const n=function(e){return"string"==typeof e&&e?e:"default"}(t.cacheKey),o=function(e,t,n){const o=l[t],r=o[e]??(o[e]={}),i=r[n];return r[n]="number"==typeof i?i+1:0}(e,t.analyticsFramework,n);return function(e,t,n){const o=d[e]??(d[e]={}),r=o[n]??[];let i=r[t];return i||(i=p(),r.push(i)),o[n]=r,i}(e,o,n)}(...e))}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e,t=n(1074),o=n(1037),r=n(357),i="trekkie",a=[],s=n(2319);a.push(["Trekkie",s.Trekkie]);var c=n(3988);a.push(["S2S",c.S2S]);try{var u=null===(e=window[i])||void 0===e?void 0:e.config;if(u){o.setGlobalSerializedAppConfig(JSON.stringify(u));var d=window[i],l=window.trekkie=new t.Tricorder(a,u,(function(){window[i]=l,window._visit={tag:function(){},multitrackToken:function(){r.default.uniqToken}},l.user=function(){return{traits:function(){return{uniqToken:r.default.uniqToken}}}},t.replayAnalyticsQueue(l,d)}))}}catch(e){o.reportError("index_storefront",e)}}()}();