!function(){"use strict";class t{t;o=0;i=[];u(t){if(t.hadRecentInput)return;const e=this.i[0],n=this.i.at(-1);this.o&&e&&n&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(this.o+=t.value,this.i.push(t)):(this.o=t.value,this.i=[t]),this.t?.(t)}}const e=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart{if("loading"===document.readyState)return"loading";{const n=e();if(n){if(t{const e=t.nodeName;return 1===t.nodeType?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},i=t=>{let e="";try{for(;9!==t?.nodeType;){const n=t,i=n.id?"#"+n.id:[r(n),...Array.from(n.classList).sort()].join(".");if(e.length+i.length>99)return e||i;if(e=e?i+">"+e:i,n.id)break;t=n.parentNode}}catch{}return e},o=new WeakMap;function a(t,e){return o.get(t)||o.set(t,new e),o.get(t)}let s=-1;const c=()=>s,u=t=>{addEventListener("pageshow",e=>{e.persisted&&(s=e.timeStamp,t(e))},!0)},l=(t,e,n,r)=>{let i,o;return a=>{e.value>=0&&(a||r)&&(o=e.value-(i??0),(o||void 0===i)&&(i=e.value,e.delta=o,e.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(e.value,n),t(e)))}},d=t=>{requestAnimationFrame(()=>requestAnimationFrame(()=>t()))},h=()=>{const t=e();return t?.activationStart??0},f=(t,n=-1)=>{const r=e();let i="navigate";return c()>=0?i="back-forward-cache":r&&(document.prerendering||h()>0?i="prerender":document.wasDiscarded?i="restore":r.type&&(i=r.type.replace(/_/g,"-"))),{name:t,value:n,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},m=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(t=>{Promise.resolve().then(()=>{e(t.getEntries())})});return r.observe({type:t,buffered:!0,...n}),r}}catch{}},p=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let g=-1;const v=new Set,y=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,w=t=>{if("hidden"===document.visibilityState){if("visibilitychange"===t.type)for(const t of v)t();isFinite(g)||(g="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("prerenderingchange",w,!0))}},S=()=>{if(g<0){const t=h(),e=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(e=>"hidden"===e.name&&e.startTime>t)[0]?.startTime;g=e??y(),addEventListener("visibilitychange",w,!0),addEventListener("prerenderingchange",w,!0),u(()=>{setTimeout(()=>{g=y()})})}return{get firstHiddenTime(){return g},onHidden(t){v.add(t)}}},C=t=>{document.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},b=[1800,3e3],T=(t,e={})=>{C(()=>{const n=S();let r,i=f("FCP");const o=m("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime{i=f("FCP"),r=l(t,i,b,e.reportAllChanges),d(()=>{i.value=performance.now()-n.timeStamp,r(!0)})}))})},_=[.1,.25],L=t=>t.find(t=>1===t.node?.nodeType)||t[0];let D=0,B=1/0,x=0;const M=t=>{for(const e of t)e.interactionId&&(B=Math.min(B,e.interactionId),x=Math.max(x,e.interactionId),D=x?(x-B)/7+1:0)};let z;const A=()=>z?D:performance.interactionCount??0;let E=0;class P{l=[];h=new Map;m;p;v(){E=A(),this.l.length=0,this.h.clear()}M(){const t=Math.min(this.l.length-1,Math.floor((A()-E)/50));return this.l[t]}u(t){if(this.m?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const e=this.l.at(-1);let n=this.h.get(t.interactionId);if(n||this.l.length<10||t.duration>e.T){if(n?t.duration>n.T?(n.entries=[t],n.T=t.duration):t.duration===n.T&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],T:t.duration},this.h.set(n.id,n),this.l.push(n)),this.l.sort((t,e)=>e.T-t.T),this.l.length>10){const t=this.l.splice(10);for(const e of t)this.h.delete(e.id)}this.p?.(n)}}}const I=t=>{const e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=p(t),addEventListener("visibilitychange",t,{once:!0,capture:!0}),e(()=>{t(),removeEventListener("visibilitychange",t,{capture:!0})}))},N=[200,500];class q{m;u(t){this.m?.(t)}}const j=[2500,4e3],k=[800,1800],H=t=>{document.prerendering?C(()=>H(t)):"complete"!==document.readyState?addEventListener("load",()=>H(t),!0):setTimeout(t)},U="",O="1",W="0",F="p",K="a",R="m",Z="t",J="m",X="a",V="p",Y="s",G=()=>"undefined"==typeof window;function $(t){try{return decodeURIComponent(t)}catch(t){return""}}function Q(t,e=!1){const n=function(){try{return document.cookie}catch{return!1}}()?document.cookie.split("; "):[];for(let e=0;e{});console.log("Monorail event from consent API:",r,n)}catch(t){}}}function et(){var t,e;return G()?{}:(null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.config)||{}}tt.instance=void 0;function nt(t){try{return t()}catch{return}}function rt(){var t,e;if(!ut()&&!function(){try{const t=performance.getEntriesByType("navigation")[0].serverTiming;return!!t&&0!=t.length}catch{return!1}}()){const t=new tt;let e="failed_to_fetch";try{e=navigator.userAgent}catch{}t.produce("navigationServerTiming",JSON.stringify({failed:!0,userAgent:e})),function(){if(ut())return;const t=st();t.Shopify||(t.Shopify={});t.Shopify.customerPrivacy||(t.Shopify.customerPrivacy={});t.Shopify.customerPrivacy.serverTimingSupportVerified=!0}()}const n=null===(t=performance)||void 0===t||null===(e=t.getEntriesByType)||void 0===e?void 0:e.call(t,"navigation");if(!n)return;const r=n.map(at).find(t=>t);if(r)try{sessionStorage.setItem("consentHeader",r)}catch{}return r}let it;function ot(){var t,e;const n=null===(t=performance)||void 0===t||null===(e=t.getEntriesByType)||void 0===e?void 0:e.call(t,"resource");let r=it;for(let t=n.length-1;t>=0;t--){let e=at(n[t]);if(e){r=e;break}}return it=r,r}function at(t){var e,n;if(t)return null===(e=t.serverTiming)||void 0===e||null===(n=e.find(t=>"_cmp"==t.name))||void 0===n?void 0:n.description}function st(){return window}function ct(){var t,e;const n=st();return!0===(null==n||null===(t=n.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.backendConsentEnabled)||!0===et().isHeadless}function ut(){var t,e;const n=st();return null==n||null===(t=n.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.serverTimingSupportVerified}function lt(){if(!G()){var t,e;const n=(null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.injectedConsent)||et().injectedConsent;return n?$(n):void 0}}function dt(){let t;if(t=G()?lt():function(){var t,e;const n=null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.cachedConsent;return n?$(n):void 0}()||lt()||new URLSearchParams(window.location.search).get("_cs")||void 0||Q("_tracking_consent")||function(){let t;if(t=ct()&&nt(ot)||nt(rt),!t){let t;try{t=sessionStorage.getItem("consentHeader")}catch{}return t||void 0}try{t=decodeURIComponent(t)}catch{}return t}(),void 0!==t)return function(t){if("%"==t.slice(0,1))try{t=decodeURIComponent(t)}catch{}const e=t.slice(0,1);if("{"==e)return function(t){var e;let n;try{n=JSON.parse(t)}catch{return}if("2.1"!==n.v)return;if(null===(e=n.con)||void 0===e||!e.CMP)return;return n}(t);if("3"==e)return function(t){const e=t.slice(1).split("_"),[n,r,i,o,a]=e;let s,c;try{s=e[5]?JSON.parse(e.slice(5).join("_")):void 0}catch{}if(a){const t=a.replace(/\*/g,"/").replace(/-/g,"+"),e=atob(t);let n="";for(let t=0;tt.slice(0,e)+"-"+t.slice(e),n)}function u(t){const e=n.split(".")[0];return e.includes(t.toLowerCase())?W:e.includes(t.toUpperCase())?O:U}function l(t){return n.includes(t.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[X]:u(X),[V]:u(V),[J]:u(J),[Y]:u(Y)}},region:r||"",cus:s,purposes:{[K]:l(K),[F]:l(F),[R]:l(R),[Z]:l(Z)},sale_of_data_region:"t"==o,display_banner:"t"==i,consent_id:c}}(t);return}(t)}function ht(t){const e=function(){try{let t=dt();if(!t)return;return t}catch{return}}();if(!e||!e.purposes)return!0;const n=e.purposes[t];return"boolean"!=typeof n||n}function ft(){return ht(K)}const mt={},pt=/^https?:\/\/([^/]+)(\/api\/(?:unstable|2\d{3}-\d{2})\/graphql\.json(?=$|\?))?/;function gt(t,e){if(ct()){const t=function(t){try{var e,n;const o=null===(e=performance)||void 0===e||null===(n=e.getEntriesByType)||void 0===n?void 0:n.call(e,"resource");if(o){const e=window.location.host;for(let n=o.length-1;n>=0;n--){var r,i;const a=o[n];if("fetch"!==a.initiatorType)continue;const s=a.name.match(pt);if(!s)continue;const[,c,u]=s;if(!(c===e||u&&(null==c?void 0:c.endsWith(`.${e}`))))continue;const l=null===(r=a.serverTiming)||void 0===r||null===(i=r.find(e=>e.name===t))||void 0===i?void 0:i.description;if(l)return mt[t]=l,l}}return mt[t]}catch{return mt[t]}}(e);if(t)return t}const n=function(t){try{var e,n,r,i;return null===(e=performance)||void 0===e||null===(n=e.getEntriesByType("navigation")[0])||void 0===n||null===(r=n.serverTiming)||void 0===r||null===(i=r.find(e=>e.name==t))||void 0===i?void 0:i.description}catch{return}}(e);return n||function(t){try{var e,n,r,i;return null===(e=document.cookie)||void 0===e||null===(n=e.split(";"))||void 0===n||null===(r=n.find(e=>e.includes(t)))||void 0===r||null===(i=r.split("=")[1])||void 0===i?void 0:i.trim()}catch{return}}(t)}function vt(t,e){if(!{}.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var yt=0;function wt(t){return"__private_"+yt+++"_"+t}function St(t){return Object.entries(t).map(([t,e])=>({key:t,value:{stringValue:String(e)}}))}function Ct(t){if(Array.isArray(t))return{arrayValue:{values:t.map(t=>Ct(t))}};switch(typeof t){case"boolean":return{boolValue:Boolean(t)};case"number":return{doubleValue:Number(t)};default:return{stringValue:String(t)}}}const bt=function(t,e,n){const r=[0];for(let i=0;i{t.attributes={...vt(this,_t)[_t],...t.attributes}});const t=vt(this,Lt)[Lt];vt(this,Lt)[Lt]=[],await this.exportByKeepalive(t,(t,e)=>vt(this,Tt)[Tt].exportMetrics(this.aggregateMetrics(t),e))}async exportLogs(){const t=vt(this,Dt)[Dt];vt(this,Dt)[Dt]=[],await this.exportByKeepalive(t,(t,e)=>vt(this,Tt)[Tt].exportLogs(this.formatLogs(t),e))}aggregateMetrics(t){const e={};return t.forEach(t=>{switch(t.type){case"histogram":!function(t,e){var n;const{name:r,value:i,unit:o,timeUnixNano:a,attributes:s}=e,c=null!==(n=e.bounds)&&void 0!==n?n:bt,u=new Array(c.length+1).fill(0);t[r]||={name:r,unit:o||"1",histogram:{aggregationTemporality:1,dataPoints:[]}};for(let t=0;t0?d:0,bucketCounts:r>0?[1]:[]};t[n].exponentialHistogram.dataPoints.push({attributes:St(null!=a?a:{}),startTimeUnixNano:o,timeUnixNano:o,count:1,sum:c,scale:u,zeroCount:h,positive:m,negative:f,min:c,max:c,zeroThreshold:0})}(e,t);break;case"counter":!function(t,e){const{name:n,value:r,unit:i,timeUnixNano:o,attributes:a}=e;t[n]||={name:n,unit:i||"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}},t[n].sum.dataPoints.push({startTimeUnixNano:o,timeUnixNano:o,asDouble:r,attributes:St(null!=a?a:{})})}(e,t);break;case"gauge":!function(t,e){const{name:n,value:r,unit:i,timeUnixNano:o,attributes:a}=e;t[n]||={name:n,unit:i||"1",gauge:{dataPoints:[]}},t[n].gauge.dataPoints.push({startTimeUnixNano:o,timeUnixNano:o,asDouble:r,attributes:St(null!=a?a:{})})}(e,t)}}),Object.values(e)}async exportByKeepalive(t,e){if(0===t.length)return;const n=[],r=[];t.forEach(t=>{var e;null===(e=t.requiresKeepalive)||void 0===e||e?n.push(t):r.push(t)});const i=[n.length>0?e(n,{keepalive:!0}):void 0,r.length>0?e(r,{keepalive:!1}):void 0].filter(t=>void 0!==t);await Promise.all(i)}formatLogs(t){return t.map(t=>{const e={timeUnixNano:t.timeUnixNano,observedTimeUnixNano:t.timeUnixNano,attributes:(n={...vt(this,_t)[_t],...t.attributes},Object.entries(n).map(([t,e])=>({key:t,value:Ct(e)})))};var n;return t.body&&(e.body={stringValue:t.body}),e})}}var xt=wt("url"),Mt=wt("serviceName"),zt=wt("logger"),At=wt("fetchFn"),Et=wt("maxPayloadSizeBytes");class Pt{constructor(t,e,n){var r;Object.defineProperty(this,xt,{writable:!0,value:void 0}),Object.defineProperty(this,Mt,{writable:!0,value:void 0}),Object.defineProperty(this,zt,{writable:!0,value:void 0}),Object.defineProperty(this,At,{writable:!0,value:void 0}),Object.defineProperty(this,Et,{writable:!0,value:void 0}),vt(this,xt)[xt]=t.replace(/\/v1\/(logs|metrics|traces)\/?$/,""),vt(this,Mt)[Mt]=e,vt(this,zt)[zt]=null==n?void 0:n.logger,vt(this,At)[At]=null==n?void 0:n.fetchFn,vt(this,Et)[Et]=null!==(r=null==n?void 0:n.maxPayloadSizeBytes)&&void 0!==r?r:51200}async exportMetrics(t,e){var n;const r=null===(n=null==e?void 0:e.keepalive)||void 0===n||n;await this.exportBatches("/v1/metrics",[...t],t=>({resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:vt(this,Mt)[Mt]}}]},scopeMetrics:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},metrics:t}]}]}),r)}async exportLogs(t,e){var n;const r=null===(n=null==e?void 0:e.keepalive)||void 0===n||n;await this.exportBatches("/v1/logs",[...t],t=>({resourceLogs:[{resource:{attributes:[{key:"service.name",value:{stringValue:vt(this,Mt)[Mt]}}]},scopeLogs:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},logRecords:t}]}]}),r)}async exportTo(t,e,n){var r;const i=JSON.stringify(t),o=(new TextEncoder).encode(i).length;if(o>vt(this,Et)[Et])throw new Nt(`Payload size ${o} exceeds ${vt(this,Et)[Et]} bytes`);const a=await this.exporterFetch()(`${vt(this,xt)[xt]}${e}`,{method:"POST",keepalive:n,headers:{"Content-Type":"application/json"},body:i});if(null===(r=vt(this,zt)[zt])||void 0===r||r.log({status:a.status}),!a.ok){if(400===a.status){const t=await a.text();throw new It(`Invalid OpenTelemetry Data: ${t}`)}if(429===a.status||503===a.status){const e=await a.text(),n=a.headers.get("Retry-After"),r=n?{seconds:Number(n)}:void 0;throw new It("Server did not accept data",{errorData:e,retryAfter:r,body:t})}if(401===a.status||403===a.status){const e=await a.text();throw new qt(`Authentication failed: ${a.status} ${401===a.status?"Unauthorized":"Forbidden"}`,{errorData:e,body:t})}throw new It(`Server responded with ${a.status}`)}}exporterFetch(){return vt(this,At)[At]||fetch}async exportBatches(t,e,n,r){let i=e.length;for(;e.length>0;)try{const o=e.slice(0,i);await this.exportTo(n(o),t,r),e.splice(0,i)}catch(t){if(!(t instanceof Nt&&i>1))throw t;i=Math.ceil(i/2)}}}class It extends Error{constructor(t,e){super(t),this.metadata=void 0,this.name="OpenTelemetryClientError",this.metadata=e}}class Nt extends Error{constructor(...t){super(...t),this.name="PayloadTooLargeError"}}class qt extends Error{constructor(t,e){super(t),this.name="AuthenticationFailedError",this.metadata=void 0,this.name="AuthenticationFailedError",this.metadata=e}}function jt(t,e){let n,r;try{var i,o,a,s;n=null===(i=performance)||void 0===i||null===(o=i.getEntriesByType("navigation")[0])||void 0===o||null===(a=o.serverTiming)||void 0===a||null===(s=a.find(t=>t.name==e))||void 0===s?void 0:s.description}catch{n=void 0}try{var c,u,l,d;r=null===(c=document.cookie)||void 0===c||null===(u=c.split(";"))||void 0===u||null===(l=u.find(e=>e.includes(t)))||void 0===l||null===(d=l.split("=")[1])||void 0===d?void 0:d.trim()}catch{r=void 0}return n||r}function kt(){return jt("_shopify_s","_s")}function Ht(){var t=["mxbNCgDwAq","mti0oti3ogPRzKz6CW","nde1nJaWmKnMtxvXvG","mtq2otm5mLjqBwXSza","nLLHrvHnzW","mtaWodr2AePisxq","odmZohLKrMvXsG","mJuWuxPQBMzo","mJKXodaWoe9OANbsBW","mJC4nuXRENjeEG","nJqYnZeWnMzkBgXrAG"];return(Ht=function(){return t})()}function Ut(t,e){var n=Ht();return Ut=function(e,r){var i=n[e-=194];if(void 0===Ut.EWTqos){Ut.tFDnFw=function(t){for(var e,n,r="",i="",o=0,a=0;n=t.charAt(a++);~n&&(e=o%4?64*e+n:n,o++%4)?r+=String.fromCharCode(255&e>>(-2*o&6)):0)n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(n);for(var s=0,c=r.length;s>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;t=this[Ot(228)]))try{await this[Ot(224)][Ot(206)]()}catch(t){this[Ot(208)]&&console[Ot(201)](Ot(213)+t)}}[Ot(227)](){this[Ot(207)]&&clearTimeout(this[Ot(207)]),this[Ot(207)]=window[Ot(203)](()=>{this[Ot(212)]()[Ot(222)](()=>{})},this[Ot(218)])}}function Kt(t,e){const n=Rt();return Kt=function(e,r){let i=n[e-=404];if(void 0===Kt.dEBhLP){Kt.fLkFNo=function(t){let e="",n="";for(let n,r,i=0,o=0;r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?e+=String.fromCharCode(255&n>>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;tt+e.s,0)/t[ae(373)],n=t[ae(423)]((t,n)=>t+(n.s-e)**2,0)/(t[ae(373)]-1),r=Math[ae(442)](n);return{speed:e,jitter:r}}function Qt(t,e,n,r,i,o,a,s,c,u,l,d,h){const f=Math[ae(505)](1e3,t),m=Math[ae(505)](1e3,n),p=Math[ae(505)](1e3,o),g=Math[ae(505)](1e3,s),v=Math[ae(505)](1e3,a),y=Math[ae(505)](1e3,c),w=[];if(e[ae(373)]>=3)for(let t=1;t5e-4){e=!0;break}n=r.s}else n=r.s;return e}(w),C=function(t){if(t[ae(373)]<3)return 0;let e=0,n=0;for(let r=1;r2*Math.PI-Math.PI/12)&&e++,n++}return n>0?e/n:0}(e),{speed:b,jitter:T}=$t(w);let _=0,L=0;if(r[ae(373)]>1){const t=new Set(r[ae(461)](t=>Math[ae(322)](t.x/20)+","+Math[ae(322)](t.y/20)))[ae(315)];_=t>1?1:0,L=r[ae(423)]((t,e)=>t+e[ae(356)],0)/r[ae(373)]}const D=i[ae(423)]((t,e)=>(null===e[ae(366)]||t[ae(357)](e[ae(366)]),t),[]),{rhythmConsistency:B,jitter:x}=function(t){if(t[ae(373)]<2)return{rhythmConsistency:0,jitter:0};const e=t[ae(423)]((t,e)=>t+e,0)/t[ae(373)],n=t[ae(423)]((t,n)=>(t??0)+((n??0)-e)**2,0)/t[ae(373)],r=Math[ae(442)](n);return{rhythmConsistency:0===r?1:Math[ae(339)](0,1-r/e),jitter:r/e}}(D),M=D[ae(373)]>0?D[ae(423)]((t,e)=>t+e,0)/D[ae(373)]:0,z=[];if(u[ae(373)]>=3)for(let t=1;tu[t-1].p?ae(512):"up";z[ae(357)]({s:r,dir:i,t:u[t].t})}const{speed:A,jitter:E}=$t(z),P=function(t){if(t[ae(373)]<2)return 0;let e=0;for(let n=1;n=500&&t[r].t-n>=500&&(e++,n=t[r].t);return e}(z)),{speed:N,jitter:q}=$t(l),j=function(t){if(t[ae(373)]<2)return 0;let e=0;for(let n=1;n=500&&e++;return e}(l)),H=Math[ae(322)]((h-d)/1e3);return{ma:f,ca:m,ka:p,sa:g,ta:y,kba:v,t:Math[ae(505)](3600,H),nm:S?1:0,ms:ee(C),mj:ee(T),msp:ee(b),vc:_,cp:ee(L),rc:ee(B),kj:ee(x),ki:ee(M),ss:ee(A),sj:ee(E),ssm:ee(P),sp:I,ts:ee(N),tj:ee(q),tp:k,tsm:ee(j)}}function te(t,e){let n=0;return(...r)=>{const i=typeof performance!==ae(511)?performance[ae(388)]():Date[ae(388)]();i-n>=e&&(n=i,t(...r))}}function ee(t){return Math[ae(427)](100*t)/100}function ne(t){return{wd:t[ae(372)],ua:t[ae(498)],cf:t[ae(509)],be:t[ae(444)],nm:t[ae(369)],nc:t[ae(441)],ka:t[ae(443)],sa:t[ae(359)],ta:t[ae(343)],pt:t[ae(491)],mp:t[ae(495)],sd:t[ae(301)]}}class re{[ae(368)];[ae(326)];[ae(393)];[ae(483)];constructor(t,e,n=Yt()){const r={shopId:0,updateInterval:5e3,debug:!1,beaconEndpoint:Xt,beaconRetryLimit:3,maxSilenceMs:18e5,exportWithFetch:!1,logsSampleRate:1};this[ae(368)]={...r,...e},this[ae(393)]=n,this[ae(483)]=t,this[ae(326)]={startTime:Date[ae(388)](),lastUpdateTime:null,environmentChecked:!1,sessionData:null,mouseActivity:0,clickActivity:0,keyActivity:0,keyboardBurstActivity:0,scrollActivity:0,touchActivity:0,mousePositions:[],clickPositions:[],keyEvents:[],scrollEvents:[],keyboardBursts:[],touchEvents:[],lastTouchEvent:null};const i=this[ae(502)]();this[ae(326)][ae(310)]={lastSignals:i,lastProcessTime:0,lastSuccessfulSendTime:0,retryCount:0}}[ae(451)](){(async()=>{await this[ae(425)](),await this[ae(465)](!0),this[ae(393)][ae(391)][ae(489)](()=>{this[ae(434)]()},100);const t=()=>{const e=Date[ae(388)](),n=e-(this[ae(326)][ae(480)]||e),r=Math[ae(339)](0,this[ae(368)][ae(360)]-n),i=()=>{this[ae(393)][ae(391)][ae(305)]?this[ae(326)][ae(433)]=this[ae(393)][ae(391)][ae(305)](()=>{this[ae(465)]()[ae(439)](()=>this[ae(483)][ae(447)]())[ae(439)](()=>{t()})},{timeout:2e3}):this[ae(465)]()[ae(439)](()=>this[ae(483)][ae(447)]())[ae(439)](()=>{t()})};r>0?this[ae(393)][ae(391)][ae(489)](i,r):i()};t()})()[ae(463)](t=>{this[ae(483)][ae(464)](t,ae(451))})}[ae(337)](){this[ae(326)][ae(470)]&&this[ae(393)][ae(391)][ae(375)](this[ae(326)][ae(470)]),this[ae(326)][ae(433)]&&this[ae(393)][ae(391)][ae(385)]&&this[ae(393)][ae(391)][ae(385)](this[ae(326)][ae(433)]),this[ae(326)][ae(416)]&&(this[ae(393)][ae(398)][ae(318)](ae(363),this[ae(326)][ae(416)][ae(363)]),this[ae(393)][ae(398)][ae(318)](ae(506),this[ae(326)][ae(416)][ae(506)]),this[ae(393)][ae(398)][ae(318)](ae(448),this[ae(326)][ae(416)][ae(448)]),this[ae(393)][ae(398)][ae(318)](ae(361),this[ae(326)][ae(416)][ae(361)]),ae(446)in window&&this[ae(326)][ae(416)][ae(358)]&&this[ae(326)][ae(416)][ae(396)]&&this[ae(326)][ae(416)][ae(412)]&&(this[ae(393)][ae(398)][ae(318)](ae(358),this[ae(326)][ae(416)][ae(358)]),this[ae(393)][ae(398)][ae(318)](ae(396),this[ae(326)][ae(416)][ae(396)]),this[ae(393)][ae(398)][ae(318)](ae(412),this[ae(326)][ae(416)][ae(412)]))),this[ae(326)][ae(310)]?.[ae(469)]&&this[ae(393)][ae(391)][ae(375)](this[ae(326)][ae(310)][ae(469)]),this[ae(326)][ae(310)]=void 0}[ae(421)](){return this[ae(326)][ae(310)]?.[ae(445)]?ne(this[ae(326)][ae(310)][ae(445)]):null}[ae(425)](){const t={wd:this[ae(393)][ae(510)][ae(327)]?1:0,ua:/bot|crawler|spider|scraper/i[ae(472)](this[ae(393)][ae(510)][ae(345)])?0:1,cv:this[ae(462)]()?1:0,br:this[ae(429)]()?1:0};return this[ae(326)][ae(401)]=t,this[ae(326)][ae(477)]=!0,t}[ae(462)](){try{const t=this[ae(393)][ae(398)][ae(387)](ae(383));t[ae(403)]=200,t[ae(450)]=50;const e=t[ae(467)]("2d");if(null===e)return!1;const n=e[ae(430)](0,0,200,0);n[ae(308)](0,ae(471)),n[ae(308)](1,ae(331)),e[ae(320)]=n,e[ae(486)](0,0,200,50),e[ae(320)]=ae(481),e[ae(508)]=ae(420),e[ae(349)](ae(438),33,30);const r=t[ae(384)]();return Boolean(r&&r[ae(373)]>50)}catch(t){return!1}}[ae(429)](){let t=0;this[ae(393)][ae(510)][ae(501)]&&this[ae(393)][ae(510)][ae(501)][ae(373)]>0&&t++,(this[ae(393)][ae(510)][ae(376)]&&this[ae(393)][ae(510)][ae(376)][ae(373)]>0||this[ae(393)][ae(510)][ae(345)][ae(457)](ae(414)))&&t++,this[ae(478)]()&&t++,typeof this[ae(393)][ae(391)][ae(468)]!==ae(511)&&t++;try{const e=(new Date)[ae(418)]();e>-840&&e<840&&t++}catch(t){}return t>=3}[ae(478)](){const t=this[ae(393)][ae(391)][ae(316)]||this[ae(393)][ae(398)][ae(330)][ae(437)],e=this[ae(393)][ae(391)][ae(473)]||this[ae(393)][ae(398)][ae(330)][ae(395)];if(!t||!e)return!1;if(t<=2||e<=2)return!1;const n=t/e;return n>=.2&&n<=5}[ae(338)](t,e){return n=>{try{t(n)}catch(t){this[ae(483)][ae(464)](t,ae(306)+e)}}}[ae(434)](){const t=te(this[ae(338)](t=>{this[ae(326)][ae(406)]++,this[ae(326)][ae(302)][ae(373)]>=10&&this[ae(326)][ae(302)][ae(496)](),this[ae(326)][ae(302)][ae(357)]({x:t[ae(436)],y:t[ae(454)],t:t[ae(314)]})},ae(363)),100),e=this[ae(338)](t=>{this[ae(326)][ae(344)]++,requestAnimationFrame(()=>setTimeout(()=>{this[ae(326)][ae(386)][ae(373)]>=5&&this[ae(326)][ae(386)][ae(496)](),this[ae(326)][ae(386)][ae(357)]({x:t[ae(436)],y:t[ae(454)],t:t[ae(314)],pre:this[ae(334)](t)})},0))},ae(506)),n=this[ae(338)](t=>{this[ae(326)][ae(342)]++;const e=t[ae(351)];if([ae(422),ae(507),ae(348),ae(411)][ae(457)](e))return;const n=this[ae(326)][ae(379)][this[ae(326)][ae(379)][ae(373)]-1],r=t[ae(314)],i=n?r-n.t:null;this[ae(326)][ae(379)][ae(373)]>=10&&this[ae(326)][ae(379)][ae(496)](),this[ae(326)][ae(379)][ae(357)]({_0x269a55:e,t:r,int:i}),null!==i&&i<100?(this[ae(326)][ae(321)][ae(357)](i),this[ae(326)][ae(321)][ae(373)]>=5&&(this[ae(326)][ae(325)]++,this[ae(326)][ae(321)]=[])):this[ae(326)][ae(321)]=[]},ae(448)),r=te(this[ae(338)](t=>{this[ae(326)][ae(328)]++;const e=t[ae(314)],n=window[ae(370)];this[ae(326)][ae(426)][ae(373)]>=10&&this[ae(326)][ae(426)][ae(496)](),this[ae(326)][ae(426)][ae(357)]({p:n,t:e})},ae(361)),200),i=this[ae(338)](t=>{t[ae(346)]&&0!==t[ae(346)][ae(373)]&&(this[ae(326)][ae(408)]++,this[ae(326)][ae(417)][ae(373)]>=10&&this[ae(326)][ae(417)][ae(496)](),this[ae(326)][ae(377)]={x:t[ae(346)][0][ae(436)],y:t[ae(346)][0][ae(454)],t:t[ae(314)],typ:ae(341),s:0,d:0})},ae(358)),o=te(this[ae(338)](t=>{if(!t[ae(346)]||0===t[ae(346)][ae(373)])return;const e={x:t[ae(346)][0][ae(436)],y:t[ae(346)][0][ae(454)]};if(this[ae(326)][ae(377)]){const n=this[ae(492)](this[ae(326)][ae(377)],e);this[ae(326)][ae(417)][ae(373)]>=10&&this[ae(326)][ae(417)][ae(496)]();const r={x:t[ae(346)][0][ae(436)],y:t[ae(346)][0][ae(454)],t:t[ae(314)],typ:ae(466),d:n,s:n/(t[ae(314)]-this[ae(326)][ae(377)].t)};this[ae(326)][ae(417)][ae(357)](r),this[ae(326)][ae(377)]=r}else{const e={x:t[ae(346)][0][ae(436)],y:t[ae(346)][0][ae(454)],t:t[ae(314)],typ:ae(466),s:0,d:0};this[ae(326)][ae(377)]=e}},ae(396)),200),a=this[ae(338)](t=>{this[ae(326)][ae(377)]=null},ae(412));this[ae(393)][ae(398)][ae(428)](ae(363),t,{passive:!0}),this[ae(393)][ae(398)][ae(428)](ae(506),e,{passive:!0}),this[ae(393)][ae(398)][ae(428)](ae(448),n,{passive:!0}),this[ae(393)][ae(398)][ae(428)](ae(361),r,{passive:!0}),ae(446)in window&&(this[ae(393)][ae(398)][ae(428)](ae(358),i,{passive:!0}),this[ae(393)][ae(398)][ae(428)](ae(396),o,{passive:!0}),this[ae(393)][ae(398)][ae(428)](ae(412),a,{passive:!0})),this[ae(326)][ae(416)]={mousemove:t,click:e,keydown:n,scroll:r,touchstart:i,touchmove:o,touchend:a}}async[ae(465)](t=!1){this[ae(394)](t),await this[ae(453)](),this[ae(326)][ae(480)]=Date[ae(388)]()}[ae(394)](t=!1){const e=Date[ae(388)]();let n=Math[ae(322)]((e-this[ae(326)][ae(399)])/1e3);null!==this[ae(326)][ae(480)]&&(n=Math[ae(322)]((e-this[ae(326)][ae(480)])/1e3)),this[ae(326)][ae(402)]?(this[ae(326)][ae(402)][ae(415)]+=t?1:0,this[ae(326)][ae(402)][ae(474)]+=n):this[ae(326)][ae(402)]={pageCount:1,sessionStart:this[ae(326)][ae(399)],duration:0}}[ae(431)](t,e=!1){this[ae(483)][ae(350)](ae(456)+t,e)}[ae(502)](){try{if(this[ae(393)][ae(391)][ae(317)]){const e=this[ae(393)][ae(391)][ae(317)][ae(479)](Vt);if(e){const n=JSON[ae(504)](e);let r;return ae(372)in n?r=n:r={webdriver_detected:(t=n).wd,bot_user_agent:t.ua,canvas_fingerprint_normal:t.cf,browser_environment_normal:t.be,natural_mouse_activity:t.nm,natural_click_patterns:t.nc,keyboard_activity:t.ka,scroll_activity:t.sa,touch_activity:t.ta,significant_page_time:t.pt,multiple_pages_visited:t.mp,session_duration_reasonable:t.sd},r}}}catch(t){}var t;return null}[ae(324)](t){try{this[ae(393)][ae(391)][ae(317)]&&this[ae(393)][ae(391)][ae(317)][ae(389)](Vt,JSON[ae(405)](ne(t)))}catch(t){}}[ae(334)](t){const e=t[ae(381)];if(!(e&&e instanceof Element&&e[ae(497)]))return 0;const n=e[ae(497)]();if(!n[ae(403)]||!n[ae(450)])return 0;const r=n[ae(493)]+n[ae(403)]/2,i=n[ae(352)]+n[ae(450)]/2,o=this[ae(492)]({x:t[ae(436)],y:t[ae(454)]},{x:r,y:i}),a=Math[ae(442)](n[ae(403)]**2+n[ae(450)]**2)/2;return a>0?Math[ae(339)](0,1-o/a):0}[ae(492)](t,e){return Math[ae(442)]((e.x-t.x)**2+(e.y-t.y)**2)}[ae(404)](t){if(t[ae(355)](ae(371))||t[ae(355)](ae(407)))return t;return""+(this[ae(393)][ae(391)][ae(362)][ae(460)]||this[ae(393)][ae(391)][ae(362)][ae(482)]+"//"+this[ae(393)][ae(391)][ae(362)][ae(353)])+t}async[ae(347)](t,e){if(!this[ae(326)][ae(310)])return;if(null===this[ae(368)][ae(487)])return void(this[ae(326)][ae(310)][ae(354)]=Date[ae(388)]());const n=function(t,e,n){return{v:t,s:{wd:e.wd,ua:e.ua,cf:e.cf,be:e.be,nm:e.nm,nc:e.nc,ka:e.ka,sa:e.sa,ta:e.ta,pt:e.pt,mp:e.mp,sd:e.sd},r:n}}(1,ne(t),e),r=JSON[ae(405)](n),i=this[ae(404)](this[ae(368)][ae(487)]);if(this[ae(393)][ae(510)][ae(347)]&&!this[ae(368)][ae(380)])try{const t=new Blob([r],{type:ae(455)});if(this[ae(393)][ae(510)][ae(347)](i,t))return this[ae(326)][ae(310)][ae(311)]=0,void(this[ae(326)][ae(310)][ae(354)]=Date[ae(388)]())}catch(t){}try{const t=await fetch(i,{method:ae(424),headers:{"Content-Type":ae(455)},body:r,credentials:ae(485),keepalive:!0});if(!t.ok)throw new Error(ae(432)+t[ae(309)]);this[ae(326)][ae(310)][ae(311)]=0,this[ae(326)][ae(310)][ae(354)]=Date[ae(388)]()}catch(n){this[ae(488)](t,e)}}[ae(488)](t,e){if(!this[ae(326)][ae(310)]||this[ae(326)][ae(310)][ae(311)]>=this[ae(368)][ae(410)])return;const n=Math[ae(505)](1e3*2**this[ae(326)][ae(310)][ae(311)],3e4);this[ae(326)][ae(310)][ae(311)]++,this[ae(326)][ae(310)][ae(469)]=this[ae(393)][ae(391)][ae(489)](()=>{this[ae(326)][ae(310)]&&this[ae(347)](t,e)},n)}async[ae(453)](){if(!this[ae(326)][ae(310)])return;const t=Qt(this[ae(326)][ae(406)],this[ae(326)][ae(302)],this[ae(326)][ae(344)],this[ae(326)][ae(386)],this[ae(326)][ae(379)],this[ae(326)][ae(342)],this[ae(326)][ae(325)],this[ae(326)][ae(328)],this[ae(326)][ae(408)],this[ae(326)][ae(426)],this[ae(326)][ae(417)],this[ae(326)][ae(399)],Date[ae(388)]()),e=function(t,e,n,r){const i={webdriver_detected:1===t?.wd||!1,bot_user_agent:0===t?.ua||!1,browser_environment_normal:1===t?.br||!1,canvas_fingerprint_normal:1===t?.cv||!1,natural_mouse_activity:!1,natural_click_patterns:!1,keyboard_activity:!1,scroll_activity:!1,touch_activity:!1,significant_page_time:!1,multiple_pages_visited:!1,session_duration_reasonable:!1};if(e.ma>0&&1===e.nm&&(i[ae(369)]=!0),e.ca>0&&1===e.vc&&(i[ae(441)]=!0),e.ka>0&&(i[ae(443)]=!0),e.sa>0&&(i[ae(359)]=!0),e.ta>0&&(i[ae(343)]=!0),e.t>30&&(i[ae(491)]=!0),n&&(n[ae(415)]>1&&(i[ae(495)]=!0),n[ae(474)]>60&&(i[ae(301)]=!0)),r){const t=Object[ae(378)](i);for(const e of t)i[e]=i[e]||r[e]}return i}(this[ae(326)][ae(401)],t,this[ae(326)][ae(402)],this[ae(326)][ae(310)][ae(445)]),n=function(t,e){if(!e)return!0;const n=Object[ae(378)](t);for(const r of n)if(t[r]!==e[r])return!0;return!1}(e,this[ae(326)][ae(310)][ae(445)]),r=Date[ae(388)]()-this[ae(326)][ae(310)][ae(354)],i=r>=this[ae(368)][ae(332)];if(n||i){if(Date[ae(388)]()-this[ae(326)][ae(310)][ae(390)]<100)return void this[ae(431)](ae(458),!0);if(i&&!n&&this[ae(431)](ae(382)+Math[ae(427)](r/1e3)+ae(392),!0),n&&this[ae(368)][ae(440)]){if(this[ae(326)][ae(310)][ae(445)]){Object[ae(378)](e)[ae(307)](t=>{this[ae(326)][ae(310)][ae(445)][t],e[t]})}else this[ae(431)](ae(500));this[ae(326)][ae(402)]}if(this[ae(326)][ae(310)][ae(445)]=(o=e,{...o}),this[ae(326)][ae(310)][ae(390)]=Date[ae(388)](),this[ae(324)](e),this[ae(368)][ae(476)]&&n)try{this[ae(368)][ae(476)](ne(e))}catch(t){this[ae(483)][ae(464)](t,ae(329))}const t=ae(n?333:303);await this[ae(347)](e,t)}else this[ae(368)][ae(440)];var o}}const ie=(t,e)=>({libVersion:"2.3.0",shopId:e||"",hostname:t[ae(391)]?.[ae(362)]?.[ae(435)]||"",url:t[ae(391)]?.[ae(362)]?.[ae(400)]||"",referrer:t[ae(398)]?.[ae(494)]||"",baseURI:t[ae(398)]?.[ae(475)]||"",sessionToken:kt()||"",uniqueToken:jt("_shopify_y","_y")||""}),oe=(t,e=Yt(),n=new Pt(Zt,Jt))=>{const r=new Bt({exporter:n,attributes:ie(e,t?.[ae(459)])}),i=kt(),o=i?function(t){let e=0;for(let n=0,r=t[Kt(410)];ns[ae(451)]()):s[ae(451)](),s};function ae(t,e){const n=Gt();return ae=function(e,r){let i=n[e-=301];if(void 0===ae.TKqbkc){ae.CXAwAR=function(t){let e="",n="";for(let n,r,i=0,o=0;r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?e+=String.fromCharCode(255&n>>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;tt.startTime-e.startTime)}getLongAnimationFrames(){if(!le()){const t=function(){const{getLongAnimationFrames:t}=window.ShopifyAnalytics?.performance||{};if(!t)return[];return t(!0)}();this.longAnimationFrames=[];for(const e of t)this.handleAnimationFrame(e.startTime,e.endTime)}return[...this.longAnimationFrames].sort((t,e)=>t.startTime-e.startTime)}destroy(){this.cleanup(),this.quietWindowStartCandidates=[],this.longAnimationFrames=[]}initializeLongAnimationFrameObserver(){if(le())try{this.longAnimationFrameObserver=new PerformanceObserver(t=>{const e=t.getEntries();for(const t of e)this.handleAnimationFrame(t.startTime,t.startTime+t.duration)}),this.longAnimationFrameObserver.observe({type:"long-animation-frame",buffered:!0})}catch(t){}}handleAnimationFrame(t,e){if(this.longAnimationFrames.push({startTime:t,endTime:e}),this.quietWindowStartCandidates.length>0){t-this.quietWindowStartCandidates[this.quietWindowStartCandidates.length-1].startTime<250&&this.quietWindowStartCandidates.pop()}this.quietWindowStartCandidates.push({startTime:e})}cleanup(){this.longAnimationFrameObserver&&(this.longAnimationFrameObserver.disconnect(),this.longAnimationFrameObserver=null)}}let ce=null;function ue(t,e=0){if(null===t||!le()&&!Boolean(window.ShopifyAnalytics?.performance?.getLongAnimationFrames))return de(),null;const n=(ce?ce.getLongAnimationFrames():[]).map(t=>({startTime:t.startTime-e,endTime:t.endTime-e}));let r=null;for(const e of n){if(e.startTime<=t&&e.endTime>t){r=e;break}if(e.startTime>=t){r=e;break}}if(!r||r.startTime-t>=250)return de(),t;const i=(ce?ce.getQuietWindowStartCandidates():[]).map(t=>({startTime:t.startTime-e}));let o=t;if(i.length>0)for(const e of i)if(e.startTime>=t){o=e.startTime;break}return de(),o}function le(){return PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")}function de(){ce&&(ce.destroy(),ce=null)}function he(){return PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")}function fe(){return performance.getEntriesByType("long-animation-frame")}function me(t){if(!t)return;const e=[];for(const n of t.split(",")){const t=Number(n);isNaN(t)||e.push(t)}return e.length>0?e:void 0}const pe=Object.freeze({shop_domain:`${window.location.origin}/.well-known/shopify/monorail/v1/produce`,global:"https://monorail-edge.shopifysvc.com/v1/produce",canada:"https://monorail-edge-ca.shopifycloud.com/v1/produce",staging:"https://monorail-edge-staging.shopifycloud.com/v1/produce"}),ge=new RegExp(`^${window.location.origin}/((?:(?:[a-z]{2,3}|zh-hans|zh-hant)(?:-[a-zA-Z0-9]+)/)?cart/(add|change|update|clear))`),ve=new RegExp("cart-performance:|add:|change:|clear:|note_update:");var ye;function we({monorailRegion:t,schema:e,rawData:n}){const r=Date.now(),i={schema_id:e,payload:e===ye.OnUnload?Se(n):Ce(n),metadata:{event_created_at_ms:r,event_sent_at_ms:r}},o=pe[t||""],a=JSON.stringify(i);if(!o)return void console.debug("📡 Monorail: ",JSON.stringify(i,null,2));try{const t=new window.Blob([a],{type:"text/plain"});if("function"==typeof window.navigator.sendBeacon&&"function"==typeof window.Blob&&!function(){const{userAgent:t}=window.navigator;return-1!==t.lastIndexOf("iPhone; CPU iPhone OS 12_")||-1!==t.lastIndexOf("iPad; CPU OS 12_")}()&&window.navigator.sendBeacon(o,t))return}catch(t){}const s=new XMLHttpRequest;s.open("POST",o),s.setRequestHeader("Content-type","text/plain"),s.send(a)}function Se(t){const e=be(t,["domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","activationStart","firstPaint","visuallyReady","initiatorType","redirectCount","cartAjaxResourceTimings","cartPerformanceMetrics","totalStylingDuration","totalStyleDuration","totalForcedStyleDuration","totalLayoutDuration","totalForcedLayoutDuration"]);return{perf_kit_init:t.perfKitInit,perf_kit_version:t.perfKitVersion,url:t.url,page_type:t.pageType,shop_id:t.shopId,application:t.application,storefront_id:t.storefrontId,theme_instance_id:t.themeInstanceId,theme_name:t.themeName,theme_version:t.themeVersion,session_token:t.sessionToken,unique_token:t.uniqueToken,micro_session_id:t.microSessionId,micro_session_count:t.microSessionCount,cumulative_layout_shift:t.cumulativeLayoutShift,cumulative_layout_shift_target:t.cumulativeLayoutShiftTarget,first_contentful_paint:t.firstContentfulPaint,largest_contentful_paint:t.largestContentfulPaint,largest_contentful_paint_target:t.largestContentfulPaintTarget,time_to_first_byte:t.timeToFirstByte,quiet_window_start:t.quietWindowStart,seo_bot:t.seoBot,humanness_score:t.humannessScore,ja3_fingerprint:t.ja3Fingerprint,navigation_start:t.navigationStart,navigation_type:t.navigationType,navigation_bad:t.navigationBad,encoded_body_size:t.encodedBodySize,decoded_body_size:t.decodedBodySize,transfer_size:t.transferSize,first_interim_response_start:t.firstInterimResponseStart,final_response_headers_start:t.finalResponseHeadersStart,response_start:t.responseStart,response_end:t.responseEnd,worker_start:t.workerStart,connect_start:t.connectStart,connect_end:t.connectEnd,domain_lookup_start:t.domainLookupStart,domain_lookup_end:t.domainLookupEnd,fetch_start:t.fetchStart,redirect_start:t.redirectStart,redirect_end:t.redirectEnd,request_start:t.requestStart,secure_connection_start:t.secureConnectionStart,next_hop_protocol:t.nextHopProtocol,server_timing:t.serverTiming,paint_timing_hidden:t.paintTimingHidden,referrer:t.referrer,render_region:t.renderRegion,resource_timing:t.resourceTiming,treatment_ids:t.treatmentIds,other_metrics:JSON.stringify(e)}}function Ce(t){const e=be(t,["longAnimationFrame"]);return{url:t.url,page_type:t.pageType,shop_id:t.shopId,application:t.application,storefront_id:t.storefrontId,theme_instance_id:t.themeInstanceId,session_token:t.sessionToken,unique_token:t.uniqueToken,micro_session_id:t.microSessionId,micro_session_count:t.microSessionCount,interaction_to_next_paint:t.interactionToNextPaint,interaction_to_next_paint_target:t.interactionToNextPaintTarget,seo_bot:t.seoBot,humanness_score:t.humannessScore,ja3_fingerprint:t.ja3Fingerprint,referrer:t.referrer,worker_start:t.workerStart,next_hop_protocol:t.nextHopProtocol,navigation_bad:t.navigationBad,treatment_ids:t.treatmentIds,other_interaction_metrics:JSON.stringify(e)}}function be(t,e){return e.reduce((e,n)=>{var r;return null!=t[n]&&(e[(r=n,r.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`))]=t[n]),e},{})}function Te(t,e){return t?Math.max(0,Math.round(t-e)):0}!function(t){t.OnInteraction="perf_kit_on_interaction/3.2",t.OnUnload="perf_kit_on_unload/3.5"}(ye||(ye={}));const _e="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function Le(){let t="";try{const e=window.crypto,n=new Uint16Array(31);e.getRandomValues(n);let r=0;t=_e.replace(/[x]/g,t=>{const e=n[r]%16;return r++,("x"===t?e:3&e|8).toString(16)}).toUpperCase()}catch(e){t=_e.replace(/[x]/g,t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}).toUpperCase()}return`${function(){let t=0,e=0;t=(new Date).getTime()>>>0;try{e=performance.now()>>>0}catch(t){e=0}return Math.abs(t+e).toString(16).toLowerCase().padStart(8,"0")}()}-${t}`}let De=!0,Be=!1,xe=null,Me=null,ze=!1;class Ae{info;config;constructor(t){this.config=t,this.info={perfKitInit:Date.now(),perfKitVersion:"3.5.2",url:window.location.href,referrer:document.referrer||void 0,microSessionId:Le(),microSessionCount:0,get sessionToken(){return gt("_shopify_s","_s")},get uniqueToken(){return gt("_shopify_y","_y")}},performance.setResourceTimingBufferSize(1e3)}get performanceMetrics(){return function(t){const e=performance.getEntriesByType("navigation");if(0===e.length)return{};const n=e[0],r=n.activationStart||0,i=function(t,e){return!e&&(t.requestStart>0&&t.startTime>0&&t.requestStart0&&t.startTime>0&&t.responseStart0&&t.fetchStart>0&&t.responseStart0&&t.fetchStart0&&t.responseEnd>e+864e5}(n,t);return{encodedBodySize:n.encodedBodySize,decodedBodySize:n.decodedBodySize,navigationStart:Math.round(n.startTime),navigationType:n.type,navigationBad:i,firstInterimResponseStart:Math.round(n.firstInterimResponseStart),finalResponseHeadersStart:Math.round(n.finalResponseHeadersStart),responseStart:Math.round(n.responseStart),responseEnd:Math.round(n.responseEnd),workerStart:Math.round(n.workerStart),connectStart:Math.round(n.connectStart),connectEnd:Math.round(n.connectEnd),domainLookupStart:Math.round(n.domainLookupStart),domainLookupEnd:Math.round(n.domainLookupEnd),fetchStart:Math.round(n.fetchStart),redirectStart:Math.round(n.redirectStart),redirectEnd:Math.round(n.redirectEnd),requestStart:Math.round(n.requestStart),secureConnectionStart:Math.round(n.secureConnectionStart),nextHopProtocol:n.nextHopProtocol,serverTiming:JSON.stringify(n.serverTiming),domInteractive:Te(n.domInteractive,r),domComplete:Te(n.domComplete,r),domContentLoadedEventStart:Te(n.domContentLoadedEventStart,r),domContentLoadedEventEnd:Te(n.domContentLoadedEventEnd,r),activationStart:Math.round(r),redirectCount:n.redirectCount,initiatorType:n.initiatorType,transferSize:n.transferSize}}(this.info.perfKitInit)}}function Ee(t){xe=new Ae(t),Me=null,ce||(ce=new se),t.spaMode&&(window.PerfKit={navigate:()=>{De?De=!1:Be||(Ie(),xe=new Ae(t),Be=!0)},setPageType:e=>{t.storefrontData.pageType=e},setConsent:t=>{Me=t}}),t.shs&&!t.spaMode&&oe({debug:!1,shopId:t.storefrontData.shopId,exportWithFetch:t.shsExportWithFetch||!0,logsSampleRate:t.shsLogsSampleRate,...t.shsBeaconEndpoint&&{beaconEndpoint:t.shsBeaconEndpoint}})}const Pe=new Set;function Ie(){if(null!==xe){if(!je()&&Ne()&&Pe.size>0){let t={};for(const e of Pe)t={...t,...e};const e=t.firstContentfulPaint??null,n=ue(e,performance.getEntriesByType("navigation")[0]?.activationStart||0);null!==e&&null!==n&&(t.quietWindowStart=Math.round(n));const r=function(){if(!he())return null;const t=fe();let e=0;for(const n of t){e+=n.styleAndLayoutStart?n.startTime+n.duration-n.styleAndLayoutStart:0;for(const t of n.scripts)e+=t.forcedStyleAndLayoutDuration}return e}();null!==r&&(t.totalStylingDuration=Math.round(r));const i=function(){if(!he())return null;const t=fe();if(0===t.length)return null;if("number"!=typeof t[0].styleDuration)return null;let e=0,n=0,r=0,i=0;for(const o of t){const t=o;e+=t.styleDuration??0,r+=t.layoutDuration??0;for(const t of o.scripts){const e=t;n+=e.forcedStyleDuration??0,i+=e.forcedLayoutDuration??0}}return{totalStyleDuration:e,totalForcedStyleDuration:n,totalLayoutDuration:r,totalForcedLayoutDuration:i}}();null!==i&&(t.totalStyleDuration=Math.round(i.totalStyleDuration),t.totalForcedStyleDuration=Math.round(i.totalForcedStyleDuration),t.totalLayoutDuration=Math.round(i.totalLayoutDuration),t.totalForcedLayoutDuration=Math.round(i.totalForcedLayoutDuration)),Pe.clear(),xe.info.microSessionCount+=1;const o=function(t){if(!(100*Math.random()>(t||10)))return performance.getEntriesByType("resource").map(t=>{const e=Object.entries(t.toJSON()).map(([t,e])=>"number"==typeof e?[t,Math.round(e)]:[t,e]);return JSON.stringify(Object.fromEntries(e))})}(xe.config.resourceTimingSamplingRate),a=performance.getEntriesByType("resource").filter(t=>ge.test(t.name)),s=performance.getEntriesByType("measure").filter(t=>ve.test(t.name)).map(t=>{const e=t.toJSON();return e.name.startsWith("cart-performance:")||(e.name=`cart-performance:${e.name}`),e});we({monorailRegion:xe.config.monorailRegion,schema:ye.OnUnload,rawData:{...xe.info,...xe.config.storefrontData,...xe.performanceMetrics,...t,resourceTiming:o,cartAjaxResourceTimings:a,cartPerformanceMetrics:s,paintTimingHidden:ze}})}}else console.debug("⛔️ Shopify/perf-kit is not initialized")}function Ne(){return null!==Me?Me:ft()}((e,r={})=>{const o=a(r=Object.assign({},r),t),s=new WeakMap;o.t=t=>{if(t?.sources?.length){const e=L(t.sources),n=e?.node;if(n){const t=r.generateTarget?.(n)??i(n);s.set(e,t)}}},((e,n={})=>{const r=S();T(p(()=>{let i,o=f("CLS",0);const s=a(n,t),c=t=>{for(const e of t)s.u(e);s.o>o.value&&(o.value=s.o,o.entries=s.i,i())},h=m("layout-shift",c);h&&(i=l(e,o,_,n.reportAllChanges),r.onHidden(()=>{c(h.takeRecords()),i(!0)}),u(()=>{s.o=0,o=f("CLS",0),i=l(e,o,_,n.reportAllChanges),d(()=>i())}),setTimeout(i))}))})(t=>{const r=(t=>{let e={};if(t.entries.length){const r=t.entries.reduce((t,e)=>t.value>e.value?t:e);if(r?.sources?.length){const t=L(r.sources);t&&(e={largestShiftTarget:s.get(t),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:t,largestShiftEntry:r,loadState:n(r.startTime)})}}return Object.assign(t,{attribution:e})})(t);e(r)},r)})(function(t){const{attribution:e,value:n}=t;Pe.add({cumulativeLayoutShift:n,cumulativeLayoutShiftTarget:e.largestShiftTarget})}),((t,n={})=>{const r=a(n=Object.assign({},n),q),o=new WeakMap;r.m=t=>{const e=t.element;if(e){const r=n.generateTarget?.(e)??i(e);o.set(t,r)}},((t,e={})=>{C(()=>{const n=S();let r,i=f("LCP");const o=a(e,q),s=t=>{e.reportAllChanges||(t=t.slice(-1));for(const e of t)o.u(e),e.startTime{s(c.takeRecords()),c.disconnect(),r(!0)}),o=t=>{t.isTrusted&&(I(n),removeEventListener(t.type,o,{capture:!0}))};for(const t of["keydown","click","visibilitychange"])addEventListener(t,o,{capture:!0});u(n=>{i=f("LCP"),r=l(t,i,j,e.reportAllChanges),d(()=>{i.value=performance.now()-n.timeStamp,r(!0)})})}})})(n=>{const r=(t=>{let n={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:t.value};if(t.entries.length){const r=e();if(r){const e=r.activationStart||0,i=t.entries.at(-1),a=i.url&&performance.getEntriesByType("resource").filter(t=>t.name===i.url)[0],s=Math.max(0,r.responseStart-e),c=Math.max(s,a?(a.requestStart||a.startTime)-e:0),u=Math.min(t.value,Math.max(c,a?a.responseEnd-e:0));n={target:o.get(i),timeToFirstByte:s,resourceLoadDelay:c-s,resourceLoadDuration:u-c,elementRenderDelay:t.value-u,navigationEntry:r,lcpEntry:i},i.url&&(n.url=i.url),a&&(n.lcpResourceEntry=a)}}return Object.assign(t,{attribution:n})})(n);t(r)},n)})(function(t){const{attribution:e,value:n}=t;Pe.add({largestContentfulPaint:Math.round(n),largestContentfulPaintTarget:e.target})}),((t,r={})=>{T(r=>{const i=(t=>{let r={timeToFirstByte:0,firstByteToFCP:t.value,loadState:n(c())};if(t.entries.length){const i=e(),o=t.entries.at(-1);if(i){const e=i.activationStart||0,a=Math.max(0,i.responseStart-e);r={timeToFirstByte:a,firstByteToFCP:t.value-a,loadState:n(t.entries[0].startTime),navigationEntry:i,fcpEntry:o}}}return Object.assign(t,{attribution:r})})(r);t(i)},r)})(function(t){const{value:e}=t;Pe.add({firstContentfulPaint:Math.round(e)})}),((t,e={})=>{const r=a(e=Object.assign({},e),P);let o=[],s=[],c=0;const d=new WeakMap,h=new WeakMap;let p=!1;const g=()=>{p||(I(v),p=!0)},v=()=>{const t=r.l.map(t=>d.get(t.entries[0])),e=s.length-50;s=s.filter((n,r)=>r>=e||t.includes(n));const n=new Set;for(const t of s){const e=y(t.startTime,t.processingEnd);for(const t of e)n.add(t)}const i=o.length-1-50;o=o.filter((t,e)=>t.startTime>c&&e>i||n.has(t)),p=!1};r.m=t=>{const e=t.startTime+t.duration;let n;c=Math.max(c,t.processingEnd);for(let r=s.length-1;r>=0;r--){const i=s[r];if(Math.abs(e-i.renderTime)<=8){n=i,n.startTime=Math.min(t.startTime,n.startTime),n.processingStart=Math.min(t.processingStart,n.processingStart),n.processingEnd=Math.max(t.processingEnd,n.processingEnd),n.entries.push(t);break}}n||(n={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:e,entries:[t]},s.push(n)),(t.interactionId||"first-input"===t.entryType)&&d.set(t,n),g()},r.p=t=>{if(!h.get(t)){const n=t.entries[0].target;if(n){const r=e.generateTarget?.(n)??i(n);h.set(t,r)}}};const y=(t,e)=>{const n=[];for(const r of o)if(!(r.startTime+r.duratione)break;n.push(r)}return n},w=t=>{const e=t.entries[0],i=d.get(e),o=e.processingStart,a=Math.max(e.startTime+e.duration,o),s=Math.min(i.processingEnd,a),c=i.entries.sort((t,e)=>t.processingStart-e.processingStart),u=y(e.startTime,s),l=r.h.get(e.interactionId),f={interactionTarget:h.get(l),interactionType:e.name.startsWith("key")?"keyboard":"pointer",interactionTime:e.startTime,nextPaintTime:a,processedEventEntries:c,longAnimationFrameEntries:u,inputDelay:o-e.startTime,processingDuration:s-o,presentationDelay:a-s,loadState:n(e.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(t=>{if(!t.longAnimationFrameEntries?.length)return;const e=t.interactionTime,n=t.inputDelay,r=t.processingDuration;let i,o,a=0,s=0,c=0,u=0;for(const c of t.longAnimationFrameEntries){s=s+c.startTime+c.duration-c.styleAndLayoutStart;for(const t of c.scripts){const c=t.startTime+t.duration;if(cu&&(o=t.startTime=e+n+r?"presentation-delay":"processing-duration",i=t,u=l)}}const l=t.longAnimationFrameEntries.at(-1),d=l?l.startTime+l.duration:0;d>=e+n+r&&(c=t.nextPaintTime-d),i&&o&&(t.longestScript={entry:i,subpart:o,intersectingDuration:u}),t.totalScriptDuration=a,t.totalStyleAndLayoutDuration=s,t.totalPaintDuration=c,t.totalUnattributedDuration=t.nextPaintTime-e-a-s-c})(f),Object.assign(t,{attribution:f})};m("long-animation-frame",t=>{o=o.concat(t),g()}),((t,e={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=S();C(()=>{"interactionCount"in performance||z||(z=m("event",M,{type:"event",buffered:!0,durationThreshold:0}));let r,i=f("INP");const o=a(e,P),s=t=>{I(()=>{for(const e of t)o.u(e);const e=o.M();e&&e.T!==i.value&&(i.value=e.T,i.entries=e.entries,r())})},c=m("event",s,{durationThreshold:e.durationThreshold??40});r=l(t,i,N,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(c.takeRecords()),r(!0)}),u(()=>{o.v(),i=f("INP"),r=l(t,i,N,e.reportAllChanges)}))})})(e=>{const n=w(e);t(n)},e)})(function(t){const{attribution:e,value:n}=t;if(null===xe)return void console.debug("⛔️ Shopify/perf-kit is not initialized");if(navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"))return;if(je())return;if(!Ne())return;xe.info.microSessionCount+=1;const{inputDelay:r,processingDuration:i,presentationDelay:o,longestScript:a,interactionTarget:s}=e,c=a?.entry?{slowest_script:a.entry.sourceURL,slowest_script_duration:Math.round(a.entry.duration)}:{};we({monorailRegion:xe.config.monorailRegion,schema:ye.OnInteraction,rawData:{...xe.info,...xe.config.storefrontData,...xe.performanceMetrics,interactionToNextPaint:Math.round(n),interactionToNextPaintTarget:s,longAnimationFrame:{input_delay:Math.round(r),processing_duration:Math.round(i),presentation_delay:Math.round(o),...c}}})},{reportAllChanges:!0}),((t,n={})=>{((t,n={})=>{let r=f("TTFB"),i=l(t,r,k,n.reportAllChanges);H(()=>{const o=e();o&&(r.value=Math.max(o.responseStart-h(),0),r.entries=[o],i(!0),u(()=>{r=f("TTFB",0),i=l(t,r,k,n.reportAllChanges),i(!0)}))})})(e=>{const n=(t=>{let e={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(t.entries.length){const n=t.entries[0],r=n.activationStart||0,i=Math.max((n.workerStart||n.fetchStart)-r,0),o=Math.max(n.domainLookupStart-r,0),a=Math.max(n.connectStart-r,0),s=Math.max(n.connectEnd-r,0);e={waitingDuration:i,cacheDuration:o-i,dnsDuration:a-o,connectionDuration:s-a,requestDuration:t.value-s,navigationEntry:n}}return Object.assign(t,{attribution:e})})(e);t(n)},n)})(function(t){const{value:e}=t;Pe.add({timeToFirstByte:Math.round(e)})}),addEventListener("DOMContentLoaded",()=>{ze="hidden"===document.visibilityState}),addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&Ie()});const qe=/bot|crawl|headless|curl|wget|python|spider|libwww-pearl|newrelic|datadog|sitebulb|site24x7/i;function je(){return!!qe.test(navigator.userAgent)||!!(navigator.webdriver||document.__webdriver_evaluate||document.__selenium_evaluate||document.__webdriver_script_fn||document.__webdriver_script_func||document.__webdriver_script_function||document.$cdc_asdjflasutopfhvcZLmcfl_||document.$wdc_||window._Selenium_IDE_Recorder||window._phantom||window.__nightmare||window.callPhantom||window._phantom||window.__playwright__binding__||window.__pwInitScripts)}!function(){const{dataset:t}=document.currentScript;try{Ee(function(t){if(!t.application)throw new Error("Application is missing");if(!["storefront-renderer","hydrogen","shop-web"].includes(t.application.toLowerCase()))throw new Error("Invalid application type");if("shop-web"!==t.application.toLowerCase()){if(!t.shopId)throw new Error("shopId is missing");if(!t.themeInstanceId&&!t.storefrontId)throw new Error("Either `themeInstanceId` or `storefrontId` must be defined");for(const e of["shopId","themeInstanceId","storefrontId"])if(t[e]&&isNaN(Number(t[e])))throw new Error(`Invalid ${e}`)}if(t.humannessScore&&isNaN(Number(t.humannessScore)))throw new Error("Invalid humannessScore");if(t.monorailRegion&&!["shop_domain","global","staging","canada"].includes(t.monorailRegion.toLowerCase()))throw new Error("Invalid monorail region");if(t.resourceTimingSamplingRate&&(isNaN(Number(t.resourceTimingSamplingRate))||Number(t.resourceTimingSamplingRate)<10||Number(t.resourceTimingSamplingRate)>100))throw new Error("Invalid resource timing sampling rate");return{storefrontData:{application:t.application.toLowerCase(),shopId:Number(t.shopId)||0,renderRegion:t.renderRegion,pageType:t.pageType,seoBot:"true"===t.seoBot,humannessScore:Number(t.humannessScore)||void 0,ja3Fingerprint:t.ja3Fingerprint,themeInstanceId:Number(t.themeInstanceId)||void 0,storefrontId:Number(t.storefrontId)||void 0,themeName:t.themeName||void 0,themeVersion:t.themeVersion||void 0,treatmentIds:me(t.treatmentIds)},monorailRegion:t.monorailRegion,resourceTimingSamplingRate:Number(t.resourceTimingSamplingRate)||void 0,spaMode:"true"===t.spaMode,shs:"true"===t.shs,shsBeaconEndpoint:t.shsBeaconEndpoint||void 0,shsExportWithFetch:"true"===t.shsExportWithFetch,shsLogsSampleRate:Number(t.shsLogsSampleRate)||1}}(t))}catch(t){console.error("🚫 Error initializing PerfKit:",t.message)}}()}();













