!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,i.id)break;t=i.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 i=n(),r="navigate";return s()>=0?r="back-forward-cache":i&&(document.prerendering||u()>0?r="prerender":document.wasDiscarded?r="restore":i.type&&(r=i.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:r}},l=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var i=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return i.observe(Object.assign({type:t,buffered:!0},n||{})),i}}catch(t){}},f=function(t,e,n,i){var r,o;return function(a){e.value>=0&&(a||i)&&((o=e.value-(r||0))||void 0===r)&&(r=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()}))}))},p=function(t){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&t()}))},m=function(t){var e=!1;return function(){e||(t(),e=!0)}},g=-1,v=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},S=function(t){"hidden"===document.visibilityState&&g>-1&&(g="visibilitychange"===t.type?t.timeStamp:0,T())},y=function(){addEventListener("visibilitychange",S,!0),addEventListener("prerenderingchange",S,!0)},T=function(){removeEventListener("visibilitychange",S,!0),removeEventListener("prerenderingchange",S,!0)},_=function(){return g<0&&(g=v(),y(),c((function(){setTimeout((function(){g=v(),y()}),0)}))),{get firstHiddenTime(){return g}}},E=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},w=[1800,3e3],I=function(t,e){e=e||{},E((function(){var n,i=_(),r=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 i={id:t.interactionId,latency:t.duration,entries:[t]};P.set(i.id,i),R.push(i)}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=m(t),"hidden"===document.visibilityState?t():(n=e(t),p(t)),n},F=[200,500],U=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},E((function(){var n;x();var i,r=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!==r.value&&(r.value=e.latency,r.entries=e.entries,i())}))},a=l("event",o,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});i=f(t,r,F,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),p((function(){o(a.takeRecords()),i(!0)})),c((function(){D=L(),R.length=0,P.clear(),r=d("INP"),i=f(t,r,F,e.reportAllChanges)})))})))},q=[],z=[],H=0,j=new WeakMap,J=new Map,K=-1,V=function(t){q=q.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=z.length-50;z=z.filter((function(n,i){return i>=e||t.includes(n)}));for(var n=new Set,i=0;iH&&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;H=Math.max(H,t.processingEnd);for(var i=z.length-1;i>=0;i--){var r=z[i];if(Math.abs(n-r.renderTime)<=8){(e=r).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]},z.push(e)),(t.interactionId||"first-input"===t.entryType)&&j.set(t,e),Y()}));var G=function(t,e){for(var n,i=[],r=0;n=q[r];r++)if(!(n.startTime+n.duratione)break;i.push(n)}return i},W=[2500,4e3],X={},Q=[800,1800],Z=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 i=d("TTFB"),r=f(t,i,Q,e.reportAllChanges);Z((function(){var o=n();o&&(i.value=Math.max(o.responseStart-u(),0),i.entries=[o],r(!0),c((function(){i=d("TTFB",0),(r=f(t,i,Q,e.reportAllChanges))(!0)})))}))};const et="2.1",nt="3",it={NO_VALUE:"",ACCEPTED:"1",DECLINED:"0"},rt={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())?it.DECLINED:e.includes(t.toUpperCase())?it.ACCEPTED:it.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:i||"",cus:s,purposes:{[rt.ANALYTICS]:d(rt.ANALYTICS),[rt.PREFERENCES]:d(rt.PREFERENCES),[rt.MARKETING]:d(rt.MARKETING),[rt.SALE_OF_DATA]:d(rt.SALE_OF_DATA)},sale_of_data_region:"t"==o,display_banner:"t"==r,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}(rt.ANALYTICS)}function ft(){return lt()}const ht=10;const pt=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"}),mt=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 St({monorailRegion:t,schema:e,rawData:n}){const i=Date.now(),r={schema_id:e,payload:e===vt.OnUnload?yt(n):Tt(n),metadata:{event_created_at_ms:i,event_sent_at_ms:i}};try{const e=pt[t||""];if(!e)return void console.debug("📡 Monorail: ",JSON.stringify(r,null,2));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_")}()){const t=new XMLHttpRequest;t.open("POST",e),t.setRequestHeader("Content-type","text/plain"),t.send(JSON.stringify(r))}else{const t=new window.Blob([JSON.stringify(r)],{type:"text/plain"});window.navigator.sendBeacon(e,t)}}catch(t){}}function yt(t){const e=_t(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 Tt(t){const e=_t(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 _t(t,e){return e.reduce(((e,n)=>{var i;return t[n]&&(e[(i=n,i.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 i=0;t=Et.replace(/[x]/g,(t=>{const e=n[i]%16;return i++,("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 It=At;!function(t,e){const n=At,i=t();for(;;)try{if(232216===-parseInt(n(396))/1+parseInt(n(403))/2*(parseInt(n(369))/3)+-parseInt(n(333))/4*(parseInt(n(413))/5)+-parseInt(n(342))/6+-parseInt(n(326))/7+parseInt(n(308))/8+-parseInt(n(323))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(xt);const Ct=function(){let t=!0;return function(e,n){const i=t?function(){if(n){const t=n.apply(e,arguments);return n=null,t}}:function(){};return t=!1,i}}(),kt=Ct(this,(function(){const t=At;return kt[t(391)]().search(t(358))[t(391)]()[t(426)](kt)[t(352)]("(((.+)+)+)+$")}));kt();class bt{browserAPI;[It(319)];constructor(t,e){const n=It;this[n(335)]=t,this[n(319)]={path:"/",sameSite:n(329),debug:!1,...e}}async[It(317)](){const t=It,e=this[t(319)][t(389)];if(this.browserAPI[t(353)])try{const n=await this[t(335)][t(353)][t(317)]({name:e});return n?n[t(384)]:null}catch(e){return this[t(370)]()}return this[t(370)]()}async[It(364)](t){const e=It;if(this.browserAPI.cookieStore)try{await this[e(335)].cookieStore.set({name:this[e(319)].cookieName,value:t,path:this.options[e(399)],maxAge:this[e(319)].cookieExpiry,sameSite:this[e(319)][e(377)]?.[e(338)]()})[e(417)]((e=>{this.setLegacy(t)}))}catch(n){this[e(388)](t)}else this[e(388)](t)}[It(370)](){const t=It,e=this.options[t(389)],n=new RegExp(t(401)+e+"=([^;]+)")[t(347)](this[t(335)][t(416)][t(412)]);return n?n[2]:null}setLegacy(t){const e=It;this[e(335)][e(416)][e(412)]=this.options[e(389)]+"="+t+e(375)+this[e(319)][e(399)]+e(332)+this[e(319)][e(321)]+e(345)+this[e(319)][e(377)]}log(t){const e=It;this[e(319)][e(343)]&&console[e(303)](e(365)+t)}}const Mt={document:document,navigator:navigator,window:window,screen:screen,cookieStore:typeof window!==It(395)&&"cookieStore"in window?window[It(353)]:void 0,performance:"undefined"!=typeof performance?performance:void 0};function At(t,e){const n=xt();return At=function(t,e){return n[t-=298]},At(t,e)}function Lt(t,e,n,i,r,o,a,s){const c=It,u=Math[c(336)](1e3,t),d=Math.min(1e3,n),l=Math[c(336)](1e3,r),f=Math[c(336)](1e3,o),h=e.length>=3&&function(t){const e=It;if(t[e(397)]<3)return!1;let n=!1,i=null;for(let r=1;r5e-4){n=!0;break}i=c}else i=c}return n}(e)?1:0;let p=0;if(i[c(397)]>1){p=new Set(i[c(398)]((t=>Math.floor(t.x/20)+","+Math.floor(t.y/20))))[c(371)]>1?1:0}const m=Math[c(400)]((s-a)/1e3);return{ma:u,ca:d,ka:l,sa:f,t:Math[c(336)](3600,m),nm:h,vc:p}}function xt(){const t=["1145334ZWDXbi","debug","scroll","; SameSite=","destroy","exec","sessionData","height","scrollActivity","updateIntervalId","search","cookieStore","clearTimeout","stringify","max","languages","(((.+)+)+)+$","touchmove","sqrt","preparePayloadData","pageCount","fillRect","set","[CookieJar] ","#fff","includes","state","411YSDfEn","getLegacy","size","plugins","lastUpdateTime","loadSessionData","; path=","now","sameSite","monitorBehavior","duration","ontouchstart","setTimeout","clientX","loading","value","click","createLinearGradient","width","setLegacy","cookieName","init","toString","cookieJar","Shopify Storefront","environmentChecked","undefined","37397MlTvgQ","length","map","path","floor","(^| )","removeEventListener","5668FkmoQj","clientY","devicePixelRatio","fillStyle","Mobile","blue","test","runCanvasTest","keydown","cookie","13795tjJwLP","toDataURL","[SHS] ","document","catch","red","font","mousePositions","checkEnvironment","requestIdleCallbackId","addColorStop","updateCookie","shift","constructor","startTime","readyState","timeStamp","createElement","userAgent","log","documentElement","touchstart","cancelIdleCallback","requestIdleCallback","1376528RQTulw","mousemove","push","addEventListener","then","checkBrowserConsistency","keyActivity","ses","clientHeight","get","eventHandlers","options","getContext","cookieExpiry","abs","193896YOrBBL","webdriver","window","296877FUijAJ","fillText","16px Arial","Strict","environment","updateInterval","; max-age=","52vuItos","clickActivity","browserAPI","min","mouseActivity","toLowerCase","clickPositions","navigator","config"];return(xt=function(){return t})()}function Rt(t,e){let n=0;return(...i)=>{const r=At,o=typeof performance!==r(395)?performance[r(376)]():Date.now();o-n>=e&&(n=o,t(...i))}}class Pt{[It(341)];[It(368)];browserAPI;[It(392)];constructor(t,e=Mt){const n=It;this[n(341)]={cookieName:"keep_alive",cookieExpiry:1800,updateInterval:5e3,debug:!1,...t},this[n(335)]=e,this[n(392)]=new bt(this[n(335)],{cookieName:this[n(341)].cookieName,cookieExpiry:this[n(341)][n(321)],debug:this.config[n(343)]}),this[n(368)]={startTime:Date[n(376)](),lastUpdateTime:null,environmentChecked:!1,sessionData:null,mouseActivity:0,clickActivity:0,keyActivity:0,scrollActivity:0,mousePositions:[],clickPositions:[]}}[It(390)](){(async()=>{const t=At;await this[t(374)](),await this[t(421)](),await this[t(424)](!0),this[t(335)][t(325)].setTimeout((()=>{this[t(378)]()}),100);const e=()=>{const n=t,i=Date[n(376)](),r=i-(this[n(368)].lastUpdateTime||i),o=Math[n(356)](0,this[n(341)][n(331)]-r),a=()=>{const t=n;this[t(335)][t(325)][t(307)]?this.state[t(422)]=this[t(335)].window[t(307)]((()=>{const n=t;this.updateCookie()[n(312)]((()=>{e()}))}),{timeout:2e3}):this[t(424)]()[t(312)]((()=>{e()}))};o>0?this[n(335)][n(325)][n(381)](a,o):a()};e()})()}[It(346)](){const t=It;this[t(368)][t(351)]&&this[t(335)].window[t(354)](this[t(368)][t(351)]),this[t(368)].requestIdleCallbackId&&this[t(335)][t(325)][t(306)]&&this[t(335)][t(325)].cancelIdleCallback(this.state.requestIdleCallbackId),this.state[t(318)]&&(this[t(335)][t(416)].removeEventListener(t(309),this[t(368)].eventHandlers[t(309)]),this[t(335)][t(416)][t(402)](t(385),this[t(368)][t(318)][t(385)]),this.browserAPI[t(416)][t(402)](t(411),this[t(368)][t(318)][t(411)]),this[t(335)][t(416)].removeEventListener(t(344),this[t(368)].eventHandlers[t(344)]),t(380)in window&&this[t(368)][t(318)].touchstart&&this[t(368)][t(318)][t(359)]&&(this.browserAPI[t(416)][t(402)]("touchstart",this[t(368)].eventHandlers[t(305)]),this.browserAPI[t(416)][t(402)](t(359),this[t(368)].eventHandlers[t(359)])))}async loadSessionData(){const t=It,e=function(t){if(!t)return null;try{const e=JSON.parse(atob(decodeURIComponent(t)));return e.v&&e.ts?e:null}catch(t){return null}}(await this.cookieJar[t(317)]());e&&(this[t(368)].lastUpdateTime=e.ts,e[t(315)]&&(this[t(368)][t(348)]={pageCount:e[t(315)].p||1,sessionStart:e[t(315)].s||Date[t(376)](),duration:e[t(315)].d||0}))}[It(421)](){const t=It,e={wd:this[t(335)].navigator[t(324)]?1:0,ua:/bot|crawler|spider|scraper/i[t(409)](this[t(335)][t(340)][t(302)])?0:1,cv:this[t(410)]()?1:0,br:this[t(313)]()?1:0};return this[t(368)][t(330)]=e,this[t(368)].environmentChecked=!0,e}[It(410)](){const t=It;try{const e=this[t(335)][t(416)][t(301)]("canvas");e[t(387)]=200,e[t(349)]=50;const n=e[t(320)]("2d");if(null===n)return!1;const i=n[t(386)](0,0,200,0);i[t(423)](0,t(418)),i[t(423)](1,t(408)),n[t(406)]=i,n[t(363)](0,0,200,50),n[t(406)]=t(366),n[t(419)]=t(328),n[t(327)](t(393),33,30);const r=e[t(414)]();return Boolean(r&&r[t(397)]>50)}catch(t){return!1}}[It(313)](){const t=It;let e=0;this[t(335)][t(340)][t(357)]&&this[t(335)][t(340)][t(357)][t(397)]>0&&e++,(this[t(335)][t(340)].plugins&&this[t(335)][t(340)][t(372)].length>0||this[t(335)][t(340)][t(302)][t(367)](t(407)))&&e++,this.checkViewportRatio()&&e++,typeof this[t(335)].window[t(405)]!==t(395)&&e++;try{const t=(new Date).getTimezoneOffset();t>-840&&t<840&&e++}catch(t){}return e>=3}checkViewportRatio(){const t=It,e=this[t(335)].window.innerWidth||this.browserAPI[t(416)][t(304)].clientWidth,n=this.browserAPI[t(325)].innerHeight||this[t(335)][t(416)].documentElement[t(316)];if(!e||!n)return!1;if(e<=2||n<=2)return!1;const i=e/n;return i>=.2&&i<=5}[It(378)](){const t=It,e=Rt((t=>{const e=At;this.state.mouseActivity++,this[e(368)][e(420)][e(397)]>=10&&this[e(368)][e(420)][e(425)](),this[e(368)][e(420)][e(310)]({x:t[e(382)],y:t[e(404)],t:t[e(300)]})}),100),n=t=>{const e=At;this[e(368)][e(334)]++,this[e(368)].clickPositions.length>=5&&this[e(368)][e(339)].shift(),this[e(368)][e(339)][e(310)]({x:t[e(382)],y:t[e(404)],t:t.timeStamp})},i=()=>{this[At(368)].keyActivity++},r=Rt((()=>{const t=At;this[t(368)][t(350)]=(this[t(368)][t(350)]||0)+1}),200),o=()=>{this[At(368)].clickActivity++},a=Rt((()=>{const t=At;this.state[t(337)]++}),200);this[t(335)][t(416)][t(311)](t(309),e,{passive:!0}),this[t(335)][t(416)][t(311)]("click",n,{passive:!0}),this.browserAPI[t(416)][t(311)](t(411),i,{passive:!0}),this[t(335)][t(416)][t(311)](t(344),r,{passive:!0}),t(380)in window&&(this[t(335)][t(416)][t(311)](t(305),o,{passive:!0}),this[t(335)].document[t(311)](t(359),a,{passive:!0})),this[t(368)][t(318)]={mousemove:e,click:n,keydown:i,scroll:r,touchstart:o,touchmove:a}}async[It(424)](t=!1){const e=It;this.updateSessionData(t);const n=this[e(361)]();n&&(await this.cookieJar[e(364)](n),this.state[e(373)]=Date[e(376)]())}updateSessionData(t=!1){const e=It,n=Date[e(376)]();let i=Math[e(400)]((n-this.state[e(298)])/1e3);null!==this[e(368)][e(373)]&&(i=Math[e(400)]((n-this[e(368)].lastUpdateTime)/1e3)),this[e(368)][e(348)]?(this[e(368)][e(348)][e(362)]+=t?1:0,this[e(368)][e(348)][e(379)]+=i):this.state[e(348)]={pageCount:1,sessionStart:this[e(368)][e(298)],duration:0}}[It(361)](){const t=It;if(!this[t(368)][t(394)]&&0===this[t(368)][t(337)]&&0===this[t(368)][t(334)])return null;const e=this.state[t(330)]??{wd:0,ua:1,cv:0,br:0},n=Lt(this.state[t(337)],this.state.mousePositions,this[t(368)][t(334)],this.state[t(339)],this[t(368)][t(314)],this[t(368)][t(350)],this.state[t(298)],Date[t(376)]()),i={p:this[t(368)][t(348)]?.[t(362)]??1,s:this[t(368)].sessionData?.sessionStart??this[t(368)].startTime,d:this[t(368)][t(348)]?.[t(379)]??0},r={v:1,ts:Date[t(376)](),env:e,bhv:n,ses:i};return encodeURIComponent(btoa(JSON[t(355)](r)))}[It(303)](t){const e=It;this[e(341)][e(343)]&&console[e(303)](e(415)+t)}}const Dt=(t,e=Mt)=>{const n=It,i=new Pt(t,e);return e.document[n(299)]===n(383)?e[n(416)][n(311)]("DOMContentLoaded",(()=>i.init())):i.init(),i};let Nt=!0,Ot=!1,Bt=null,Ft=!1;class Ut{info;config;performanceMetrics;constructor(t){const e=/_shopify_s=([^;]*)/.exec(document.cookie),n=e?e[1]:void 0,i=/_shopify_y=([^;]*)/.exec(document.cookie),r=i?i[1]:void 0;this.config=t,this.info={perfKitInit:Date.now(),perfKitVersion:"1.6.2",url:window.location.href,referrer:document.referrer||void 0,microSessionId:wt(),microSessionCount:0,sessionToken:n,uniqueToken:r},performance.setResourceTimingBufferSize(1e3),this.performanceMetrics=function(t){const e=performance.getEntriesByType("navigation");if(0===e.length)return{};const n=e[0];let i=!1;return(n.requestStart&&n.startTime&&n.requestStartt+864e5)&&(i=!0),{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: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 qt=new Set;function zt(){if(null!==Bt){if(Ht()&&qt.size>0){let t={};for(const e of qt)t={...t,...e};qt.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=>mt.test(t.name))),i=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}));St({monorailRegion:Bt.config.monorailRegion,schema:vt.OnUnload,rawData:{...Bt.info,...Bt.config.storefrontData,...Bt.performanceMetrics,...t,resourceTiming:e,cartAjaxResourceTimings:n,cartPerformanceMetrics:i,paintTimingHidden:Ft}})}}else console.debug("⛔️ Shopify/perf-kit is not initialized")}function Ht(){return ft()}!function(t,e){!function(t,e){e=e||{},I(m((function(){var n,i=d("CLS",0),r=0,o=[],a=function(t){t.forEach((function(t){if(!t.hadRecentInput){var e=o[0],n=o[o.length-1];r&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(r+=t.value,o.push(t)):(r=t.value,o=[t])}})),r>i.value&&(i.value=r,i.entries=o,n())},s=l("layout-shift",a);s&&(n=f(t,i,C,e.reportAllChanges),p((function(){a(s.takeRecords()),n(!0)})),c((function(){r=0,i=d("CLS",0),n=f(t,i,C,e.reportAllChanges),h((function(){return n()}))})),setTimeout(n,0))})))}((function(e){var n=function(t){var e,n={};if(t.entries.length){var r=t.entries.reduce((function(t,e){return t&&t.value>e.value?t:e}));if(r&&r.sources&&r.sources.length){var a=(e=r.sources).find((function(t){return t.node&&1===t.node.nodeType}))||e[0];a&&(n={largestShiftTarget:o(a.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:a,largestShiftEntry:r,loadState:i(r.startTime)})}}return Object.assign(t,{attribution:n})}(e);t(n)}),e)}((function(t){const{attribution:e,value:n}=t;qt.add({cumulativeLayoutShift:n,cumulativeLayoutShiftTarget:e.largestShiftTarget})})),function(t,e){!function(t,e){e=e||{},E((function(){var n,i=_(),r=d("LCP"),o=function(t){e.reportAllChanges||(t=t.slice(-1)),t.forEach((function(t){t.startTime{(!u||t.duration>u.duration)&&(u=t)})),St({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(i),processing_duration:Math.round(r),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],i=n.activationStart||0,r=Math.max((n.workerStart||n.fetchStart)-i,0),o=Math.max(n.domainLookupStart-i,0),a=Math.max(n.connectStart-i,0),s=Math.max(n.connectEnd-i,0);e={waitingDuration:r,cacheDuration:o-r,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;qt.add({timeToFirstByte:Math.round(e)})})),addEventListener("DOMContentLoaded",(()=>{Ft="hidden"===document.visibilityState})),addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&zt()})),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 Ut(e),e.spaMode&&(window.PerfKit={navigate:()=>{Nt?Nt=!1:Ot||(zt(),Bt=new Ut(e),Ot=!0)},setPageType:t=>{e.storefrontData.pageType=t}}),e.shs&&Dt({debug:!0})}catch(t){console.error("🚫 Error initializing PerfKit:",t.message)}var e}()}();