!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},y=function(t){"hidden"===document.visibilityState&&g>-1&&(g="visibilitychange"===t.type?t.timeStamp:0,T())},S=function(){addEventListener("visibilitychange",y,!0),addEventListener("prerenderingchange",y,!0)},T=function(){removeEventListener("visibilitychange",y,!0),removeEventListener("prerenderingchange",y,!0)},_=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],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],q=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)})))})))},z=[],H=[],U=0,j=new WeakMap,J=new Map,K=-1,Y=function(t){z=z.concat(t),G()},G=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,i){return i>=e||t.includes(n)}));for(var n=new Set,i=0;iU&&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 i=H.length-1;i>=0;i--){var r=H[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]},H.push(e)),(t.interactionId||"first-input"===t.entryType)&&j.set(t,e),G()}));var V=function(t,e){for(var n,i=[],r=0;n=z[r];r++)if(!(n.startTime+n.duratione)break;i.push(n)}return i},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 i=d("TTFB"),r=f(t,i,Z,e.reportAllChanges);Q((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,Z,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 yt({monorailRegion:t,schema:e,rawData:n}){const i=Date.now(),r={schema_id:e,payload:e===vt.OnUnload?St(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 St(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,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.2"}(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=Rt;!function(t,e){const n=Rt,i=t();for(;;)try{if(176674===parseInt(n(369))/1*(-parseInt(n(414))/2)+-parseInt(n(364))/3+-parseInt(n(352))/4*(parseInt(n(460))/5)+-parseInt(n(428))/6+parseInt(n(431))/7*(parseInt(n(404))/8)+parseInt(n(351))/9+parseInt(n(409))/10*(parseInt(n(419))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Mt);const Ct=function(){let t=!0;return function(e,n){const i=t?function(){if(n){const t=n[Rt(387)](e,arguments);return n=null,t}}:function(){};return t=!1,i}}(),kt=Ct(this,(function(){const t=Rt;return kt[t(366)]()[t(444)]("(((.+)+)+)+$")[t(366)]().constructor(kt)[t(444)](t(382))}));kt();class bt{[It(433)];options;constructor(t,e){const n=It;this[n(433)]=t,this[n(427)]={path:"/",sameSite:"Strict",debug:!1,...e}}async[It(380)](){const t=It,e=this[t(427)].cookieName;if(this.browserAPI[t(392)])try{const n=await this[t(433)][t(392)][t(380)]({name:e});return n?n.value:null}catch(e){return this[t(438)]()}return this[t(438)]()}async[It(360)](t){const e=It;if(this[e(433)].cookieStore)try{await this.browserAPI[e(392)][e(360)]({name:this[e(427)][e(359)],value:t,path:this[e(427)][e(447)],maxAge:this.options[e(470)],sameSite:this.options.sameSite?.[e(401)]()})[e(400)]((e=>{this.setLegacy(t)}))}catch(e){this.setLegacy(t)}else this.setLegacy(t)}[It(438)](){const t=It,e=this[t(427)][t(359)],n=new RegExp("(^| )"+e+t(471))[t(363)](this[t(433)][t(475)].cookie);return n?n[2]:null}setLegacy(t){const e=It;this[e(433)].document[e(474)]=this.options.cookieName+"="+t+e(381)+this[e(427)].path+e(448)+this[e(427)][e(470)]+"; SameSite="+this.options[e(398)]}[It(462)](t){const e=It;this[e(427)][e(362)]&&console.log(e(452)+t)}}const At={document:document,navigator:navigator,window:window,screen:screen,cookieStore:typeof window!==It(384)&&"cookieStore"in window?window[It(392)]:void 0,performance:typeof performance!==It(384)?performance:void 0};function Mt(){const t=["config","toString","clearTimeout","push","24672qEoEEg","16px Arial","updateInterval","sqrt","red","checkViewportRatio","environmentChecked","blue","size","monitorBehavior","Shopify Storefront","get","; path=","(((.+)+)+)+$","duration","undefined","min","updateIntervalId","apply","getContext","clientX","toDataURL","eventHandlers","cookieStore","clickActivity","ses","updateCookie","stringify","state","sameSite","clientY","catch","toLowerCase","keep_alive","destroy","1048IWIgXZ","webdriver","innerWidth","includes","clickPositions","196310CGAXQj","navigator","touchstart","keydown","width","12Somxie","touchmove","runCanvasTest","setTimeout","userAgent","319MjRBkv","length","loadSessionData","max","sessionData","shift","keyActivity","requestIdleCallback","options","90510FiKxLF","mousemove","floor","2233wUlfeM","checkEnvironment","browserAPI","font","devicePixelRatio","height","documentElement","getLegacy","environment","startTime","parse","sessionStart","pageCount","search","cancelIdleCallback","updateSessionData","path","; max-age=","[SHS] ","DOMContentLoaded","fillText","[CookieJar] ","map","requestIdleCallbackId","preparePayloadData","window","innerHeight","addColorStop","addEventListener","335QewOYT","createLinearGradient","log","ontouchstart","abs","getTimezoneOffset","lastUpdateTime","mousePositions","clientHeight","timeStamp","cookieExpiry","=([^;]+)","then","cookieJar","cookie","document","now","scroll","Mobile","999963HbRGtB","5308kTOZkP","scrollActivity","click","checkBrowserConsistency","removeEventListener","languages","#fff","cookieName","set","mouseActivity","debug","exec","880485YcAeWx"];return(Mt=function(){return t})()}function Lt(t,e,n,i,r,o,a,s){const c=It,u=Math[c(385)](1e3,t),d=Math[c(385)](1e3,n),l=Math.min(1e3,r),f=Math.min(1e3,o),h=e[c(420)]>=3&&function(t){const e=It;if(t[e(420)]<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(420)]>1){p=new Set(i[c(453)]((t=>Math[c(430)](t.x/20)+","+Math[c(430)](t.y/20))))[c(377)]>1?1:0}const m=Math[c(430)]((s-a)/1e3);return{ma:u,ca:d,ka:l,sa:f,t:Math[c(385)](3600,m),nm:h,vc:p}}function xt(t,e){let n=0;return(...i)=>{const r=Rt,o="undefined"!=typeof performance?performance[r(348)]():Date[r(348)]();o-n>=e&&(n=o,t(...i))}}function Rt(t,e){const n=Mt();return Rt=function(t,e){return n[t-=348]},Rt(t,e)}class Pt{[It(365)];[It(397)];[It(433)];cookieJar;constructor(t,e=At){const n=It,i={cookieName:n(402),cookieExpiry:1800,updateInterval:5e3,debug:!1};this[n(365)]={...i,...t},this[n(433)]=e,this[n(473)]=new bt(this.browserAPI,{cookieName:this[n(365)][n(359)],cookieExpiry:this[n(365)][n(470)],debug:this[n(365)][n(362)]}),this[n(397)]={startTime:Date[n(348)](),lastUpdateTime:null,environmentChecked:!1,sessionData:null,mouseActivity:0,clickActivity:0,keyActivity:0,scrollActivity:0,mousePositions:[],clickPositions:[]}}init(){(async()=>{const t=Rt;await this[t(421)](),await this[t(432)](),await this[t(395)](!0),this[t(433)][t(456)][t(417)]((()=>{this.monitorBehavior()}),100);const e=()=>{const n=t,i=Date[n(348)](),r=i-(this[n(397)][n(466)]||i),o=Math[n(422)](0,this[n(365)][n(371)]-r),a=()=>{const t=n;this.browserAPI[t(456)][t(426)]?this.state[t(454)]=this[t(433)][t(456)][t(426)]((()=>{const n=t;this[n(395)]()[n(472)]((()=>{e()}))}),{timeout:2e3}):this[t(395)]()[t(472)]((()=>{e()}))};o>0?this.browserAPI[n(456)][n(417)](a,o):a()};e()})()}[It(403)](){const t=It;this[t(397)][t(386)]&&this[t(433)][t(456)][t(367)](this[t(397)].updateIntervalId),this[t(397)].requestIdleCallbackId&&this.browserAPI[t(456)][t(445)]&&this[t(433)].window[t(445)](this[t(397)][t(454)]),this[t(397)][t(391)]&&(this[t(433)][t(475)].removeEventListener(t(429),this.state[t(391)][t(429)]),this[t(433)][t(475)][t(356)](t(354),this[t(397)][t(391)][t(354)]),this[t(433)][t(475)].removeEventListener(t(412),this.state[t(391)].keydown),this[t(433)][t(475)].removeEventListener("scroll",this.state.eventHandlers[t(349)]),t(463)in window&&this[t(397)].eventHandlers[t(411)]&&this.state[t(391)][t(415)]&&(this[t(433)][t(475)][t(356)](t(411),this[t(397)][t(391)][t(411)]),this.browserAPI.document.removeEventListener("touchmove",this[t(397)].eventHandlers[t(415)])))}async[It(421)](){const t=It,e=function(t){const e=It;if(!t)return null;try{const n=JSON[e(441)](atob(decodeURIComponent(t)));return n.v&&n.ts?n:null}catch(t){return null}}(await this[t(473)][t(380)]());e&&(this[t(397)][t(466)]=e.ts,e[t(394)]&&(this[t(397)][t(423)]={pageCount:e[t(394)].p||1,sessionStart:e[t(394)].s||Date[t(348)](),duration:e[t(394)].d||0}))}[It(432)](){const t=It,e={wd:this[t(433)].navigator[t(405)]?1:0,ua:/bot|crawler|spider|scraper/i.test(this[t(433)][t(410)][t(418)])?0:1,cv:this[t(416)]()?1:0,br:this.checkBrowserConsistency()?1:0};return this.state[t(439)]=e,this[t(397)][t(375)]=!0,e}runCanvasTest(){const t=It;try{const e=this[t(433)][t(475)].createElement("canvas");e[t(413)]=200,e[t(436)]=50;const n=e[t(388)]("2d");if(null===n)return!1;const i=n[t(461)](0,0,200,0);i.addColorStop(0,t(373)),i[t(458)](1,t(376)),n.fillStyle=i,n.fillRect(0,0,200,50),n.fillStyle=t(358),n[t(434)]=t(370),n[t(451)](t(379),33,30);const r=e[t(390)]();return Boolean(r&&r.length>50)}catch(t){return!1}}[It(355)](){const t=It;let e=0;this[t(433)][t(410)][t(357)]&&this[t(433)].navigator[t(357)].length>0&&e++,(this.browserAPI[t(410)].plugins&&this[t(433)][t(410)].plugins[t(420)]>0||this[t(433)][t(410)][t(418)][t(407)](t(350)))&&e++,this.checkViewportRatio()&&e++,typeof this.browserAPI[t(456)][t(435)]!==t(384)&&e++;try{const n=(new Date)[t(465)]();n>-840&&n<840&&e++}catch(t){}return e>=3}[It(374)](){const t=It,e=this[t(433)][t(456)][t(406)]||this.browserAPI[t(475)][t(437)].clientWidth,n=this[t(433)][t(456)][t(457)]||this[t(433)][t(475)][t(437)][t(468)];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=xt((t=>{const e=Rt;this.state[e(361)]++,this[e(397)][e(467)][e(420)]>=10&&this[e(397)][e(467)][e(424)](),this.state[e(467)][e(368)]({x:t[e(389)],y:t[e(399)],t:t[e(469)]})}),100),n=t=>{const e=Rt;this[e(397)].clickActivity++,this[e(397)][e(408)].length>=5&&this[e(397)].clickPositions[e(424)](),this[e(397)][e(408)].push({x:t.clientX,y:t[e(399)],t:t.timeStamp})},i=()=>{this[Rt(397)].keyActivity++},r=xt((()=>{const t=Rt;this[t(397)].scrollActivity=(this.state[t(353)]||0)+1}),200),o=()=>{const t=Rt;this[t(397)][t(393)]++},a=xt((()=>{this[Rt(397)].mouseActivity++}),200);this[t(433)].document[t(459)](t(429),e,{passive:!0}),this[t(433)].document[t(459)](t(354),n,{passive:!0}),this[t(433)][t(475)][t(459)]("keydown",i,{passive:!0}),this[t(433)].document[t(459)](t(349),r,{passive:!0}),"ontouchstart"in window&&(this[t(433)].document[t(459)](t(411),o,{passive:!0}),this[t(433)][t(475)][t(459)](t(415),a,{passive:!0})),this[t(397)][t(391)]={mousemove:e,click:n,keydown:i,scroll:r,touchstart:o,touchmove:a}}async[It(395)](t=!1){const e=It;this[e(446)](t);const n=this[e(455)]();n&&(await this.cookieJar[e(360)](n),this[e(397)].lastUpdateTime=Date.now())}[It(446)](t=!1){const e=It,n=Date.now();let i=Math[e(430)]((n-this.state[e(440)])/1e3);null!==this[e(397)][e(466)]&&(i=Math[e(430)]((n-this.state[e(466)])/1e3)),this[e(397)][e(423)]?(this.state.sessionData[e(443)]+=t?1:0,this[e(397)][e(423)][e(383)]+=i):this[e(397)][e(423)]={pageCount:1,sessionStart:this[e(397)][e(440)],duration:0}}[It(455)](){const t=It;if(!this[t(397)][t(375)]&&0===this[t(397)][t(361)]&&0===this[t(397)][t(393)])return null;const e=this[t(397)][t(439)]??{wd:0,ua:1,cv:0,br:0},n=Lt(this[t(397)][t(361)],this[t(397)].mousePositions,this[t(397)].clickActivity,this[t(397)][t(408)],this.state[t(425)],this[t(397)].scrollActivity,this[t(397)][t(440)],Date[t(348)]()),i={p:this[t(397)][t(423)]?.[t(443)]??1,s:this[t(397)][t(423)]?.[t(442)]??this[t(397)][t(440)],d:this[t(397)][t(423)]?.[t(383)]??0},r={v:1,ts:Date[t(348)](),env:e,bhv:n,ses:i};return encodeURIComponent(btoa(JSON[t(396)](r)))}[It(462)](t){const e=It;this.config.debug&&console[e(462)](e(449)+t)}}const Dt=(t,e=At)=>{const n=It,i=new Pt(t,e);return"loading"===e[n(475)].readyState?e.document[n(459)](n(450),(()=>i.init())):i.init(),i};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,i=/_shopify_y=([^;]*)/.exec(document.cookie),r=i?i[1]:void 0;this.config=t,this.info={perfKitInit:Date.now(),perfKitVersion:"1.6.1",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 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=>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}));yt({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 Ut(){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;zt.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)})),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(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;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},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&&Dt({debug:!0})}catch(t){console.error("🚫 Error initializing PerfKit:",t.message)}var e}()}();