!function(){"use strict";var t,e,n=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart(e||100)-1)return n||o;if(n=n?o+">"+n:o,r.id)break;t=r.parentNode}}catch(t){}return n},a=-1,s=function(){return a},c=function(t){addEventListener("pageshow",(function(e){e.persisted&&(a=e.timeStamp,t(e))}),!0)},u=function(){var t=n();return t&&t.activationStart||0},d=function(t,e){var r=n(),i="navigate";return s()>=0?i="back-forward-cache":r&&(document.prerendering||u()>0?i="prerender":document.wasDiscarded?i="restore":r.type&&(i=r.type.replace(/_/g,"-"))),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},l=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},f=function(t,e,n,r){var i,o;return function(a){e.value>=0&&(a||r)&&((o=e.value-(i||0))||void 0===i)&&(i=e.value,e.delta=o,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e))}},h=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},m=function(t){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&t()}))},p=function(t){var e=!1;return function(){e||(t(),e=!0)}},g=-1,v=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},y=function(t){"hidden"===document.visibilityState&&g>-1&&(g="visibilitychange"===t.type?t.timeStamp:0,_())},S=function(){addEventListener("visibilitychange",y,!0),addEventListener("prerenderingchange",y,!0)},_=function(){removeEventListener("visibilitychange",y,!0),removeEventListener("prerenderingchange",y,!0)},T=function(){return g<0&&(g=v(),S(),c((function(){setTimeout((function(){g=v(),S()}),0)}))),{get firstHiddenTime(){return g}}},E=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},w=[1800,3e3],C=function(t,e){e=e||{},E((function(){var n,r=T(),i=d("FCP"),o=l("paint",(function(t){t.forEach((function(t){"first-contentful-paint"===t.name&&(o.disconnect(),t.startTimee.latency){if(n)t.duration>n.latency?(n.entries=[t],n.latency=t.duration):t.duration===n.latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};P.set(r.id,r),R.push(r)}R.sort((function(t,e){return e.latency-t.latency})),R.length>10&&R.splice(10).forEach((function(t){return P.delete(t.id)}))}}},B=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=p(t),"hidden"===document.visibilityState?t():(n=e(t),m(t)),n},F=[200,500],q=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},E((function(){var n;x();var r,i=d("INP"),o=function(t){B((function(){t.forEach(O);var e=function(){var t=Math.min(R.length-1,Math.floor((L()-D)/50));return R[t]}();e&&e.latency!==i.value&&(i.value=e.latency,i.entries=e.entries,r())}))},a=l("event",o,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=f(t,i,F,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),m((function(){o(a.takeRecords()),r(!0)})),c((function(){D=L(),R.length=0,P.clear(),i=d("INP"),r=f(t,i,F,e.reportAllChanges)})))})))},z=[],H=[],U=0,j=new WeakMap,J=new Map,K=-1,V=function(t){z=z.concat(t),Y()},Y=function(){K<0&&(K=B($))},$=function(){J.size>10&&J.forEach((function(t,e){P.has(e)||J.delete(e)}));var t=R.map((function(t){return j.get(t.entries[0])})),e=H.length-50;H=H.filter((function(n,r){return r>=e||t.includes(n)}));for(var n=new Set,r=0;rU&&e>o||n.has(t)})),K=-1};N.push((function(t){t.interactionId&&t.target&&!J.has(t.interactionId)&&J.set(t.interactionId,t.target)}),(function(t){var e,n=t.startTime+t.duration;U=Math.max(U,t.processingEnd);for(var r=H.length-1;r>=0;r--){var i=H[r];if(Math.abs(n-i.renderTime)<=8){(e=i).startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd),e.entries.push(t);break}}e||(e={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:n,entries:[t]},H.push(e)),(t.interactionId||"first-input"===t.entryType)&&j.set(t,e),Y()}));var G=function(t,e){for(var n,r=[],i=0;n=z[i];i++)if(!(n.startTime+n.duratione)break;r.push(n)}return r},W=[2500,4e3],X={},Z=[800,1800],Q=function t(e){document.prerendering?E((function(){return t(e)})):"complete"!==document.readyState?addEventListener("load",(function(){return t(e)}),!0):setTimeout(e,0)},tt=function(t,e){e=e||{};var r=d("TTFB"),i=f(t,r,Z,e.reportAllChanges);Q((function(){var o=n();o&&(r.value=Math.max(o.responseStart-u(),0),r.entries=[o],i(!0),c((function(){r=d("TTFB",0),(i=f(t,r,Z,e.reportAllChanges))(!0)})))}))};const et="2.1",nt="3",rt={NO_VALUE:"",ACCEPTED:"1",DECLINED:"0"},it={PREFERENCES:"p",ANALYTICS:"a",MARKETING:"m",SALE_OF_DATA:"t"},ot={MARKETING:"m",ANALYTICS:"a",PREFERENCES:"p",SALE_OF_DATA:"s"},at=()=>"undefined"!=typeof __CtaTestEnv__&&"true"===__CtaTestEnv__,st="_tracking_consent";function ct(t,e=!1){const n=document.cookie?document.cookie.split("; "):[];for(let e=0;et.charCodeAt(0).toString(16).padStart(2,"0"))).join("");c=[8,13,18,23].reduce(((t,e)=>t.slice(0,e)+"-"+t.slice(e)),e)}function u(t){const e=n.split(".")[0];return e.includes(t.toLowerCase())?rt.DECLINED:e.includes(t.toUpperCase())?rt.ACCEPTED:rt.NO_VALUE}function d(t){return n.includes(t.replace("t","s").toUpperCase())}return{v:nt,con:{CMP:{[ot.ANALYTICS]:u(ot.ANALYTICS),[ot.PREFERENCES]:u(ot.PREFERENCES),[ot.MARKETING]:u(ot.MARKETING),[ot.SALE_OF_DATA]:u(ot.SALE_OF_DATA)}},region:r||"",cus:s,purposes:{[it.ANALYTICS]:d(it.ANALYTICS),[it.PREFERENCES]:d(it.PREFERENCES),[it.MARKETING]:d(it.MARKETING),[it.SALE_OF_DATA]:d(it.SALE_OF_DATA)},sale_of_data_region:"t"==o,display_banner:"t"==i,consent_id:c}}(t);return}(t)}function lt(){return function(t){const e=dt();if(!e||!e.purposes)return!0;const n=e.purposes[t];return"boolean"!=typeof n||n}(it.ANALYTICS)}function ft(){return lt()}const ht=10;const mt=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"}),pt=new RegExp(`^${window.location.origin}/((?:(?:[a-z]{2,3}|zh-hans|zh-hant)(?:-[a-zA-Z0-9]+)/)?cart/(add|change|update|clear))`),gt=new RegExp("cart-performance:|add:|change:|clear:|note_update:");var vt;function yt({monorailRegion:t,schema:e,rawData:n}){const r=Date.now(),i={schema_id:e,payload:e===vt.OnUnload?St(n):_t(n),metadata:{event_created_at_ms:r,event_sent_at_ms:r}},o=mt[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 St(t){const e=Tt(t,["domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","firstPaint","visuallyReady","initiatorType","redirectCount","cartAjaxResourceTimings","cartPerformanceMetrics"]);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,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,other_metrics:JSON.stringify(e)}}function _t(t){const e=Tt(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,other_interaction_metrics:JSON.stringify(e)}}function Tt(t,e){return e.reduce(((e,n)=>{var r;return t[n]&&(e[(r=n,r.replace(/[A-Z]/g,(t=>`_${t.toLowerCase()}`)))]=t[n]||null),e}),{})}!function(t){t.OnInteraction="perf_kit_on_interaction/3.1",t.OnUnload="perf_kit_on_unload/3.3"}(vt||(vt={}));const Et="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function wt(){let t="";try{const e=window.crypto,n=new Uint16Array(31);e.getRandomValues(n);let r=0;t=Et.replace(/[x]/g,(t=>{const e=n[r]%16;return r++,("x"===t?e:3&e|8).toString(16)})).toUpperCase()}catch(e){t=Et.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}`}const Ct=Lt;!function(t,e){const n=Lt,r=t();for(;;)try{if(580205===-parseInt(n(193))/1+parseInt(n(118))/2+parseInt(n(131))/3+-parseInt(n(226))/4+parseInt(n(224))/5+parseInt(n(211))/6+-parseInt(n(171))/7)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Dt);const It=function(){let t=!0;return function(e,n){const r=t?function(){if(n){const t=n.apply(e,arguments);return n=null,t}}:function(){};return t=!1,r}}(),bt=It(this,(function(){const t=Lt;return bt.toString().search("(((.+)+)+)+$")[t(225)]()[t(186)](bt)[t(121)]("(((.+)+)+)+$")}));bt();class kt{[Ct(172)];[Ct(166)];constructor(t,e){const n=Ct;this[n(172)]=t,this.options={path:"/",sameSite:n(189),debug:!1,...e}}async[Ct(202)](){const t=Ct,e=this[t(166)][t(223)];if(this[t(172)].cookieStore)try{const n=await this[t(172)][t(119)][t(202)]({name:e});return n?n[t(128)]:null}catch(e){return this[t(206)]()}return this[t(206)]()}async[Ct(231)](t){const e=Ct;if(this[e(172)][e(119)])try{await this[e(172)].cookieStore[e(231)]({name:this[e(166)].cookieName,value:t,path:this[e(166)].path,maxAge:this.options[e(107)],sameSite:this[e(166)][e(108)]?.[e(213)]()})[e(154)]((n=>{this[e(139)](t)}))}catch(e){this.setLegacy(t)}else this[e(139)](t)}[Ct(206)](){const t=Ct,e=this[t(166)][t(223)],n=new RegExp(t(200)+e+t(201)).exec(this.browserAPI[t(155)][t(135)]);return n?n[2]:null}[Ct(139)](t){const e=Ct;this[e(172)][e(155)][e(135)]=this.options.cookieName+"="+t+e(188)+this[e(166)][e(115)]+e(208)+this.options[e(107)]+e(120)+this[e(166)][e(108)]}[Ct(179)](t){const e=Ct;this[e(166)][e(150)]&&console[e(179)](e(165)+t)}}const Mt={document:document,navigator:navigator,window:window,screen:screen,cookieStore:typeof window!==Ct(198)&&Ct(119)in window?window[Ct(119)]:void 0,performance:typeof performance!==Ct(198)?performance:void 0};function At(t,e,n,r,i,o,a,s){const c=Ct,u=Math[c(183)](1e3,t),d=Math.min(1e3,n),l=Math.min(1e3,i),f=Math[c(183)](1e3,o),h=e[c(149)]>=3&&function(t){const e=Ct;if(t[e(149)]<3)return!1;let n=!1,r=null;for(let i=1;i5e-4){n=!0;break}r=c}else r=c}return n}(e)?1:0;let m=0;if(r[c(149)]>1){m=new Set(r.map((t=>Math[c(228)](t.x/20)+","+Math.floor(t.y/20)))).size>1?1:0}const p=Math[c(228)]((s-a)/1e3);return{ma:u,ca:d,ka:l,sa:f,t:Math[c(183)](3600,p),nm:h,vc:m}}function Lt(t,e){const n=Dt();return Lt=function(t,e){return n[t-=105]},Lt(t,e)}function xt(t,e){let n=0;return(...r)=>{const i=Lt,o=typeof performance!==i(198)?performance.now():Date[i(112)]();o-n>=e&&(n=o,t(...r))}}class Rt{[Ct(145)];[Ct(197)];[Ct(172)];cookieJar;constructor(t,e=Mt){const n=Ct,r={cookieName:n(194),cookieExpiry:1800,updateInterval:5e3,debug:!1};this[n(145)]={...r,...t},this[n(172)]=e,this[n(217)]=new kt(this[n(172)],{cookieName:this[n(145)][n(223)],cookieExpiry:this[n(145)][n(107)],debug:this[n(145)].debug}),this[n(197)]={startTime:Date[n(112)](),lastUpdateTime:null,environmentChecked:!1,sessionData:null,mouseActivity:0,clickActivity:0,keyActivity:0,scrollActivity:0,mousePositions:[],clickPositions:[]}}[Ct(151)](){(async()=>{const t=Lt;await this[t(191)](),await this[t(123)](),await this[t(124)](!0),this[t(172)].window[t(110)]((()=>{this.monitorBehavior()}),100);const e=()=>{const n=t,r=Date[n(112)](),i=r-(this.state[n(227)]||r),o=Math[n(212)](0,this[n(145)][n(141)]-i),a=()=>{const t=n;this.browserAPI[t(137)][t(157)]?this[t(197)].requestIdleCallbackId=this[t(172)][t(137)][t(157)]((()=>{const n=t;this.updateCookie()[n(142)]((()=>{e()}))}),{timeout:2e3}):this[t(124)]()[t(142)]((()=>{e()}))};o>0?this[n(172)][n(137)][n(110)](a,o):a()};e()})()}destroy(){const t=Ct;this[t(197)][t(216)]&&this[t(172)].window[t(215)](this[t(197)][t(216)]),this[t(197)].requestIdleCallbackId&&this[t(172)][t(137)][t(204)]&&this.browserAPI[t(137)].cancelIdleCallback(this[t(197)][t(122)]),this[t(197)].eventHandlers&&(this[t(172)][t(155)][t(111)](t(133),this[t(197)].eventHandlers[t(133)]),this.browserAPI[t(155)].removeEventListener("click",this[t(197)][t(175)][t(134)]),this[t(172)][t(155)][t(111)](t(125),this[t(197)].eventHandlers[t(125)]),this[t(172)].document.removeEventListener("scroll",this[t(197)][t(175)].scroll),"ontouchstart"in window&&this.state.eventHandlers.touchstart&&this.state[t(175)].touchmove&&(this[t(172)][t(155)][t(111)](t(161),this[t(197)][t(175)].touchstart),this[t(172)][t(155)].removeEventListener(t(185),this[t(197)][t(175)].touchmove)))}async[Ct(191)](){const t=Ct,e=function(t){const e=Ct;if(!t)return null;try{const n=JSON[e(143)](atob(decodeURIComponent(t)));return n.v&&n.ts?n:null}catch(t){return null}}(await this[t(217)].get());e&&(this[t(197)][t(227)]=e.ts,e.ses&&(this[t(197)][t(173)]={pageCount:e.ses.p||1,sessionStart:e[t(140)].s||Date[t(112)](),duration:e[t(140)].d||0}))}[Ct(123)](){const t=Ct,e={wd:this[t(172)][t(219)][t(207)]?1:0,ua:/bot|crawler|spider|scraper/i[t(156)](this[t(172)][t(219)][t(116)])?0:1,cv:this[t(132)]()?1:0,br:this[t(127)]()?1:0};return this.state.environment=e,this[t(197)].environmentChecked=!0,e}[Ct(132)](){const t=Ct;try{const e=this[t(172)][t(155)][t(168)](t(174));e[t(163)]=200,e[t(144)]=50;const n=e.getContext("2d");if(null===n)return!1;const r=n[t(138)](0,0,200,0);r[t(130)](0,t(199)),r[t(130)](1,t(230)),n[t(210)]=r,n[t(148)](0,0,200,50),n[t(210)]=t(187),n[t(169)]="16px Arial",n[t(184)](t(147),33,30);const i=e[t(214)]();return Boolean(i&&i.length>50)}catch(t){return!1}}[Ct(127)](){const t=Ct;let e=0;this[t(172)].navigator[t(109)]&&this.browserAPI[t(219)][t(109)][t(149)]>0&&e++,(this[t(172)][t(219)][t(170)]&&this[t(172)][t(219)].plugins[t(149)]>0||this[t(172)].navigator[t(116)][t(182)](t(152)))&&e++,this[t(126)]()&&e++,typeof this[t(172)][t(137)].devicePixelRatio!==t(198)&&e++;try{const n=(new Date)[t(209)]();n>-840&&n<840&&e++}catch(t){}return e>=3}[Ct(126)](){const t=Ct,e=this.browserAPI.window[t(162)]||this[t(172)][t(155)][t(180)][t(195)],n=this[t(172)][t(137)][t(159)]||this.browserAPI[t(155)].documentElement[t(158)];if(!e||!n)return!1;if(e<=2||n<=2)return!1;const r=e/n;return r>=.2&&r<=5}[Ct(167)](){const t=Ct,e=xt((t=>{const e=Lt;this[e(197)][e(221)]++,this[e(197)][e(203)][e(149)]>=10&&this[e(197)][e(203)][e(220)](),this.state[e(203)][e(178)]({x:t.clientX,y:t[e(160)],t:t[e(181)]})}),100),n=t=>{const e=Lt;this[e(197)][e(229)]++,this[e(197)][e(105)][e(149)]>=5&&this.state[e(105)].shift(),this[e(197)][e(105)][e(178)]({x:t[e(129)],y:t.clientY,t:t.timeStamp})},r=()=>{const t=Lt;this[t(197)][t(114)]++},i=xt((()=>{const t=Lt;this.state[t(136)]=(this[t(197)][t(136)]||0)+1}),200),o=()=>{this[Lt(197)].clickActivity++},a=xt((()=>{this.state.mouseActivity++}),200);this.browserAPI.document.addEventListener(t(133),e,{passive:!0}),this[t(172)][t(155)][t(222)](t(134),n,{passive:!0}),this.browserAPI[t(155)][t(222)](t(125),r,{passive:!0}),this[t(172)][t(155)].addEventListener("scroll",i,{passive:!0}),"ontouchstart"in window&&(this[t(172)][t(155)][t(222)](t(161),o,{passive:!0}),this[t(172)][t(155)].addEventListener(t(185),a,{passive:!0})),this[t(197)][t(175)]={mousemove:e,click:n,keydown:r,scroll:i,touchstart:o,touchmove:a}}async[Ct(124)](t=!1){const e=Ct;this[e(192)](t);const n=this[e(113)]();n&&(await this.cookieJar[e(231)](n),this[e(197)][e(227)]=Date[e(112)]())}[Ct(192)](t=!1){const e=Ct,n=Date[e(112)]();let r=Math.floor((n-this.state[e(218)])/1e3);null!==this[e(197)][e(227)]&&(r=Math[e(228)]((n-this[e(197)][e(227)])/1e3)),this[e(197)][e(173)]?(this[e(197)].sessionData[e(164)]+=t?1:0,this[e(197)][e(173)][e(196)]+=r):this[e(197)][e(173)]={pageCount:1,sessionStart:this.state[e(218)],duration:0}}[Ct(113)](){const t=Ct;if(!this[t(197)][t(106)]&&0===this[t(197)].mouseActivity&&0===this[t(197)][t(229)])return null;const e=this[t(197)][t(177)]??{wd:0,ua:1,cv:0,br:0},n=At(this.state[t(221)],this[t(197)][t(203)],this.state[t(229)],this[t(197)][t(105)],this[t(197)][t(114)],this.state[t(136)],this[t(197)][t(218)],Date[t(112)]()),r={p:this.state[t(173)]?.[t(164)]??1,s:this[t(197)][t(173)]?.[t(117)]??this.state.startTime,d:this.state[t(173)]?.[t(196)]??0},i={v:1,ts:Date[t(112)](),env:e,bhv:n,ses:r};return encodeURIComponent(btoa(JSON[t(153)](i)))}[Ct(179)](t){const e=Ct;this[e(145)][e(150)]&&console[e(179)]("[SHS] "+t)}}const Pt=(t,e=Mt)=>{const n=Ct,r=new Rt(t,e);return e[n(155)][n(205)]===n(176)?e[n(155)][n(222)](n(190),(()=>r[n(151)]())):r.init(),r};function Dt(){const t=["updateInterval","then","parse","height","config","sqrt","Shopify Storefront","fillRect","length","debug","init","Mobile","stringify","catch","document","test","requestIdleCallback","clientHeight","innerHeight","clientY","touchstart","innerWidth","width","pageCount","[CookieJar] ","options","monitorBehavior","createElement","font","plugins","3137715qMkByh","browserAPI","sessionData","canvas","eventHandlers","loading","environment","push","log","documentElement","timeStamp","includes","min","fillText","touchmove","constructor","#fff","; path=","Strict","DOMContentLoaded","loadSessionData","updateSessionData","61972pKsDef","keep_alive","clientWidth","duration","state","undefined","red","(^| )","=([^;]+)","get","mousePositions","cancelIdleCallback","readyState","getLegacy","webdriver","; max-age=","getTimezoneOffset","fillStyle","2541468uLdusx","max","toLowerCase","toDataURL","clearTimeout","updateIntervalId","cookieJar","startTime","navigator","shift","mouseActivity","addEventListener","cookieName","5270450BWmBqn","toString","4027324SibXOZ","lastUpdateTime","floor","clickActivity","blue","set","clickPositions","environmentChecked","cookieExpiry","sameSite","languages","setTimeout","removeEventListener","now","preparePayloadData","keyActivity","path","userAgent","sessionStart","817926OyXRmx","cookieStore","; SameSite=","search","requestIdleCallbackId","checkEnvironment","updateCookie","keydown","checkViewportRatio","checkBrowserConsistency","value","clientX","addColorStop","631866AqpOJP","runCanvasTest","mousemove","click","cookie","scrollActivity","window","createLinearGradient","setLegacy","ses"];return(Dt=function(){return t})()}let Nt=!0,Ot=!1,Bt=null,Ft=!1;class qt{info;config;performanceMetrics;constructor(t){const e=/_shopify_s=([^;]*)/.exec(document.cookie),n=e?e[1]:void 0,r=/_shopify_y=([^;]*)/.exec(document.cookie),i=r?r[1]:void 0;this.config=t,this.info={perfKitInit:Date.now(),perfKitVersion:"1.6.3",url:window.location.href,referrer:document.referrer||void 0,microSessionId:wt(),microSessionCount:0,sessionToken:n,uniqueToken:i},performance.setResourceTimingBufferSize(1e3),this.performanceMetrics=function(t){const e=performance.getEntriesByType("navigation");if(0===e.length)return{};const n=e[0];let r=!1;return(n.requestStart&&n.startTime&&n.requestStartt+864e5)&&(r=!0),{encodedBodySize:n.encodedBodySize,decodedBodySize:n.decodedBodySize,navigationStart:Math.round(n.startTime),navigationType:n.type,navigationBad:r,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:Math.round(n.domInteractive),domComplete:Math.round(n.domComplete),domContentLoadedEventStart:Math.round(n.domContentLoadedEventStart),domContentLoadedEventEnd:Math.round(n.domContentLoadedEventEnd),redirectCount:n.redirectCount,initiatorType:n.initiatorType,transferSize:n.transferSize}}(this.info.perfKitInit)}}const zt=new Set;function Ht(){if(null!==Bt){if(Ut()&&zt.size>0){let t={};for(const e of zt)t={...t,...e};zt.clear(),Bt.info.microSessionCount+=1;const e=function(t){if(!(100*Math.random()>(t||ht)))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))}))}(Bt.config.resourceTimingSamplingRate),n=performance.getEntriesByType("resource").filter((t=>pt.test(t.name))),r=performance.getEntriesByType("measure").filter((t=>gt.test(t.name))).map((t=>{const e=t.toJSON();return e.name.startsWith("cart-performance:")||(e.name=`cart-performance:${e.name}`),e}));yt({monorailRegion:Bt.config.monorailRegion,schema:vt.OnUnload,rawData:{...Bt.info,...Bt.config.storefrontData,...Bt.performanceMetrics,...t,resourceTiming:e,cartAjaxResourceTimings:n,cartPerformanceMetrics:r,paintTimingHidden:Ft}})}}else console.debug("⛔️ Shopify/perf-kit is not initialized")}function Ut(){return ft()}!function(t,e){!function(t,e){e=e||{},C(p((function(){var n,r=d("CLS",0),i=0,o=[],a=function(t){t.forEach((function(t){if(!t.hadRecentInput){var e=o[0],n=o[o.length-1];i&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(i+=t.value,o.push(t)):(i=t.value,o=[t])}})),i>r.value&&(r.value=i,r.entries=o,n())},s=l("layout-shift",a);s&&(n=f(t,r,I,e.reportAllChanges),m((function(){a(s.takeRecords()),n(!0)})),c((function(){i=0,r=d("CLS",0),n=f(t,r,I,e.reportAllChanges),h((function(){return n()}))})),setTimeout(n,0))})))}((function(e){var n=function(t){var e,n={};if(t.entries.length){var i=t.entries.reduce((function(t,e){return t&&t.value>e.value?t:e}));if(i&&i.sources&&i.sources.length){var a=(e=i.sources).find((function(t){return t.node&&1===t.node.nodeType}))||e[0];a&&(n={largestShiftTarget:o(a.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:a,largestShiftEntry:i,loadState:r(i.startTime)})}}return Object.assign(t,{attribution:n})}(e);t(n)}),e)}((function(t){const{attribution:e,value:n}=t;zt.add({cumulativeLayoutShift:n,cumulativeLayoutShiftTarget:e.largestShiftTarget})})),function(t,e){!function(t,e){e=e||{},E((function(){var n,r=T(),i=d("LCP"),o=function(t){e.reportAllChanges||(t=t.slice(-1)),t.forEach((function(t){t.startTime{(!u||t.duration>u.duration)&&(u=t)})),yt({monorailRegion:Bt.config.monorailRegion,schema:vt.OnInteraction,rawData:{...Bt.info,...Bt.config.storefrontData,...Bt.performanceMetrics,interactionToNextPaint:Math.round(n),interactionToNextPaintTarget:s,longAnimationFrame:{input_delay:Math.round(r),processing_duration:Math.round(i),presentation_delay:Math.round(o),...u?{slowest_script:u.sourceURL,slowest_script_duration:Math.round(u.duration)}:{}}}})}),{reportAllChanges:!0}),function(t,e){tt((function(e){var n=function(t){var e={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(t.entries.length){var 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)}),e)}((function(t){const{value:e}=t;zt.add({timeToFirstByte:Math.round(e)})})),addEventListener("DOMContentLoaded",(()=>{Ft="hidden"===document.visibilityState})),addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&Ht()})),function(){const{dataset:t}=document.currentScript;try{e=function(t){if(!t.application)throw new Error("Application is missing");if(!["storefront-renderer","hydrogen"].includes(t.application.toLowerCase()))throw new Error("Invalid application type");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","humannessScore","themeInstanceId","storefrontId"])if(t[e]&&isNaN(Number(t[e])))throw new Error(`Invalid ${e}`);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)100))throw new Error("Invalid resource timing sampling rate");return{storefrontData:{application:t.application.toLowerCase(),shopId:Number(t.shopId),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},monorailRegion:t.monorailRegion,resourceTimingSamplingRate:Number(t.resourceTimingSamplingRate)||void 0,spaMode:"true"===t.spaMode,shs:"true"===t.shs}}(t),Bt=new qt(e),e.spaMode&&(window.PerfKit={navigate:()=>{Nt?Nt=!1:Ot||(Ht(),Bt=new qt(e),Ot=!0)},setPageType:t=>{e.storefrontData.pageType=t}}),e.shs&&Pt({debug:!0})}catch(t){console.error("🚫 Error initializing PerfKit:",t.message)}var e}()}();