!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}},h=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){}},l=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))}},f=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)},E=function(){return g<0&&(g=v(),S(),c((function(){setTimeout((function(){g=v(),S()}),0)}))),{get firstHiddenTime(){return g}}},_=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},w=[1800,3e3],C=function(t,e){e=e||{},_((function(){var n,i=E(),r=d("FCP"),o=h("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)}))}}},O=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],j=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},_((function(){var n;L();var i,r=d("INP"),o=function(t){O((function(){t.forEach(B);var e=function(){var t=Math.min(R.length-1,Math.floor((x()-D)/50));return R[t]}();e&&e.latency!==r.value&&(r.value=e.latency,r.entries=e.entries,i())}))},a=h("event",o,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});i=l(t,r,F,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),p((function(){o(a.takeRecords()),i(!0)})),c((function(){D=x(),R.length=0,P.clear(),r=d("INP"),i=l(t,r,F,e.reportAllChanges)})))})))},q=[],z=[],U=0,H=new WeakMap,J=new Map,K=-1,Y=function(t){q=q.concat(t),V()},V=function(){K<0&&(K=O(G))},G=function(){J.size>10&&J.forEach((function(t,e){P.has(e)||J.delete(e)}));var t=R.map((function(t){return H.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;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=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)&&H.set(t,e),V()}));var X=function(t,e){for(var n,i=[],r=0;n=q[r];r++)if(!(n.startTime+n.duratione)break;i.push(n)}return i},$=[2500,4e3],W={},Z=[800,1800],Q=function t(e){document.prerendering?_((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=l(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=l(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 ht(){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 lt(){return ht()}const ft=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}},o=pt[t||""],a=JSON.stringify(r);if(!o)return void console.debug("📡 Monorail: ",JSON.stringify(r,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=Et(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=Et(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 Et(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 _t="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function wt(){let t="";try{const e=window.crypto,n=new Uint16Array(31);e.getRandomValues(n);let i=0;t=_t.replace(/[x]/g,(t=>{const e=n[i]%16;return i++,("x"===t?e:3&e|8).toString(16)})).toUpperCase()}catch(e){t=_t.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=Bt;function It(){const t=["requestIdleCallbackId","ses","sessionData","eventHandlers","set","touchmove","height","Mobile","setTimeout","372NXUKLU","atan2","checkEnvironment","init","round","getTimezoneOffset","click","getContext","navigator","toString","Control","toDataURL","clientY","=([^;]+)","path","parse","mouseActivity","scroll","Shopify Storefront","left","touchstart","touchend","Alt","value","keyEvents","10611601MkAUVn","updateSessionData","abs","dir","target","undefined","innerWidth","fillText","cookieName","fillStyle","devicePixelRatio","pre","log","keyActivity","mousemove","updateCookie","red","35KyqDsZ","languages","172736nsDlGe","max","font","10LhztOB","cookieJar","shift","document","calculateClickPrecision","cookieStore","destroy","(((.+)+)+)+$","checkViewportRatio","move","16376rUCYIq","mousePositions","reduce","scrollActivity","config","Shift","options","search","checkBrowserConsistency","loadSessionData","push","startTime","canvas","keyboardBursts","timeStamp","down","floor","toLowerCase","3333sCYmaV","start","browserAPI","documentElement","key","44664804qOtOuT","min","removeEventListener","includes","(^| )","now","width","Strict","sessionStart","touchEvents","touches","sameSite","requestIdleCallback","keep_alive","int","updateInterval","environment","clickActivity","addEventListener","getBoundingClientRect","lastUpdateTime","get","; path=","clickPositions","; SameSite=","duration","getDistance","window","lastTouchEvent","size","readyState","blue","scrollEvents","clearTimeout","Meta","then","getLegacy","DOMContentLoaded","cookie","length","webdriver","touchActivity","5121CrlYTx","584592maHxuJ","cancelIdleCallback","state","debug","top","cookieExpiry","test","sqrt","setLegacy","keydown","plugins","preparePayloadData","clientX","userAgent","#fff","1124sEEzuL","exec","ontouchstart","pageCount","updateIntervalId","7126QDnTzo","[SHS] ","apply","runCanvasTest","addColorStop"];return(It=function(){return t})()}!function(t,e){const n=Bt,i=t();for(;;)try{if(622831===-parseInt(n(479))/1+parseInt(n(494))/2*(-parseInt(n(431))/3)+parseInt(n(400))/4*(parseInt(n(398))/5)+-parseInt(n(356))/6*(parseInt(n(499))/7)+parseInt(n(413))/8*(-parseInt(n(478))/9)+parseInt(n(403))/10*(-parseInt(n(381))/11)+parseInt(n(436))/12)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(It);const Mt=function(){let t=!0;return function(e,n){const i=t?function(){if(n){const t=n[Bt(501)](e,arguments);return n=null,t}}:function(){};return t=!1,i}}(),kt=Mt(this,(function(){const t=Bt;return kt[t(365)]()[t(420)](t(410))[t(365)]().constructor(kt).search(t(410))}));kt();class bt{[Ct(433)];[Ct(419)];constructor(t,e){const n=Ct;this[n(433)]=t,this[n(419)]={path:"/",sameSite:n(443),debug:!1,...e}}async[Ct(457)](){const t=Ct,e=this[t(419)][t(389)];if(this[t(433)].cookieStore)try{const n=await this[t(433)][t(408)][t(457)]({name:e});return n?n[t(379)]:null}catch(e){return this[t(472)]()}return this.getLegacy()}async[Ct(351)](t){const e=Ct;if(this[e(433)][e(408)])try{await this[e(433)][e(408)][e(351)]({name:this.options[e(389)],value:t,path:this[e(419)][e(370)],maxAge:this[e(419)][e(484)],sameSite:this[e(419)][e(447)]?.[e(430)]()}).catch((n=>{this[e(487)](t)}))}catch(e){this.setLegacy(t)}else this[e(487)](t)}[Ct(472)](){const t=Ct,e=this[t(419)][t(389)],n=new RegExp(t(440)+e+t(369))[t(495)](this[t(433)][t(406)][t(474)]);return n?n[2]:null}[Ct(487)](t){const e=Ct;this[e(433)][e(406)][e(474)]=this[e(419)][e(389)]+"="+t+e(458)+this[e(419)][e(370)]+"; max-age="+this[e(419)][e(484)]+e(460)+this[e(419)][e(447)]}[Ct(393)](t){const e=Ct;this[e(419)][e(482)]&&console[e(393)]("[CookieJar] "+t)}}const At={document:document,navigator:navigator,window:window,screen:screen,cookieStore:typeof window!==Ct(386)&&Ct(408)in window?window.cookieStore:void 0,performance:typeof performance!==Ct(386)?performance:void 0};function xt(t){const e=Ct;if(t.length<2)return{speed:0,jitter:0};const n=t.reduce(((t,e)=>t+e.s),0)/t.length,i=t[e(415)](((t,e)=>t+(e.s-n)**2),0)/(t[e(475)]-1),r=Math[e(486)](i);return{speed:n,jitter:r}}function Lt(t,e,n,i,r,o,a,s,c,u,d,h,l){const f=Ct,p=Math[f(437)](1e3,t),m=Math.min(1e3,n),g=Math[f(437)](1e3,o),v=Math[f(437)](1e3,s),y=Math[f(437)](1e3,a),S=Math.min(1e3,c),T=[];if(e.length>=3)for(let t=1;t5e-4){n=!0;break}i=r.s}else i=r.s;return n}(T),_=function(t){const e=Ct;if(t[e(475)]<3)return 0;let n=0,i=0;for(let r=1;r2*Math.PI-Math.PI/12)&&n++,i++}return i>0?n/i:0}(e),{speed:w,jitter:C}=xt(T);let I=0,M=0;if(i.length>1){I=new Set(i.map((t=>Math[f(429)](t.x/20)+","+Math[f(429)](t.y/20))))[f(465)]>1?1:0,M=i[f(415)](((t,e)=>t+e[f(392)]),0)/i.length}const k=r[f(415)](((t,e)=>{const n=f;return null===e[n(450)]||t[n(423)](e.int),t}),[]),{rhythmConsistency:b,jitter:A}=function(t){const e=Ct;if(t.length<2)return{rhythmConsistency:0,jitter:0};const n=t[e(415)](((t,e)=>t+e),0)/t[e(475)],i=t[e(415)](((t,e)=>(t??0)+((e??0)-n)**2),0)/t[e(475)],r=Math[e(486)](i);return{rhythmConsistency:0===r?1:Math[e(401)](0,1-r/n),jitter:r/n}}(k),x=k[f(475)]>0?k[f(415)](((t,e)=>t+e),0)/k.length:0,L=[];if(u.length>=3)for(let t=1;tu[t-1].p?f(428):"up";L[f(423)]({s:i,dir:r,t:u[t].t})}const{speed:R,jitter:P}=xt(L),D=function(t){const e=Ct;if(t[e(475)]<2)return 0;let n=0;for(let i=1;i=500&&t[r].t-i>=500&&(n++,i=t[r].t);return n}(L)),{speed:B,jitter:O}=xt(d),F=function(t){const e=Ct;if(t[e(475)]<2)return 0;let n=0;for(let i=1;i=500&&n++;return n}(d)),q=Math[f(429)]((l-h)/1e3);return{ma:p,ca:m,ka:g,sa:v,ta:S,kba:y,t:Math.min(3600,q),nm:E?1:0,ms:Pt(_),mj:Pt(C),msp:Pt(w),vc:I,cp:Pt(M),rc:Pt(b),kj:Pt(A),ki:Pt(x),ss:Pt(R),sj:Pt(P),ssm:Pt(D),sp:N,ts:Pt(B),tj:Pt(O),tp:j,tsm:Pt(F)}}function Rt(t,e){let n=0;return(...i)=>{const r=Bt,o=typeof performance!==r(386)?performance[r(441)]():Date[r(441)]();o-n>=e&&(n=o,t(...i))}}function Pt(t){return Math[Ct(360)](100*t)/100}class Dt{[Ct(417)];[Ct(481)];[Ct(433)];[Ct(404)];constructor(t,e=At){const n=Ct,i={cookieName:n(449),cookieExpiry:1800,updateInterval:5e3,debug:!1};this.config={...i,...t},this[n(433)]=e,this[n(404)]=new bt(this.browserAPI,{cookieName:this[n(417)][n(389)],cookieExpiry:this.config[n(484)],debug:this[n(417)][n(482)]}),this.state={startTime:Date[n(441)](),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}}[Ct(359)](){(async()=>{const t=Bt;await this.loadSessionData(),await this[t(358)](),await this[t(396)](!0),this[t(433)][t(463)][t(355)]((()=>{this.monitorBehavior()}),100);const e=()=>{const n=t,i=Date[n(441)](),r=i-(this[n(481)][n(456)]||i),o=Math.max(0,this.config[n(451)]-r),a=()=>{const t=n;this[t(433)][t(463)][t(448)]?this[t(481)].requestIdleCallbackId=this.browserAPI[t(463)].requestIdleCallback((()=>{const n=t;this[n(396)]()[n(471)]((()=>{e()}))}),{timeout:2e3}):this[t(396)]().then((()=>{e()}))};o>0?this.browserAPI.window.setTimeout(a,o):a()};e()})()}[Ct(409)](){const t=Ct;this[t(481)][t(498)]&&this[t(433)][t(463)][t(469)](this[t(481)][t(498)]),this[t(481)][t(347)]&&this[t(433)].window.cancelIdleCallback&&this[t(433)][t(463)][t(480)](this[t(481)][t(347)]),this[t(481)][t(350)]&&(this[t(433)][t(406)][t(438)]("mousemove",this[t(481)].eventHandlers[t(395)]),this.browserAPI[t(406)][t(438)](t(362),this.state[t(350)][t(362)]),this[t(433)][t(406)].removeEventListener(t(488),this.state[t(350)][t(488)]),this[t(433)][t(406)][t(438)]("scroll",this[t(481)][t(350)][t(373)]),t(496)in window&&this[t(481)][t(350)].touchstart&&this[t(481)][t(350)][t(352)]&&this[t(481)].eventHandlers[t(377)]&&(this[t(433)].document[t(438)]("touchstart",this[t(481)].eventHandlers.touchstart),this.browserAPI.document[t(438)]("touchmove",this.state[t(350)][t(352)]),this[t(433)].document.removeEventListener(t(377),this[t(481)][t(350)][t(377)])))}async[Ct(422)](){const t=Ct,e=function(t){const e=Ct;if(!t)return null;try{const n=JSON[e(371)](atob(decodeURIComponent(t)));return n.v&&n.ts?n:null}catch(t){return null}}(await this[t(404)][t(457)]());e&&(this[t(481)][t(456)]=e.ts,e[t(348)]&&(this[t(481)][t(349)]={pageCount:e[t(348)].p||1,sessionStart:e.ses.s||Date[t(441)](),duration:e[t(348)].d||0}))}[Ct(358)](){const t=Ct,e={wd:this[t(433)][t(364)][t(476)]?1:0,ua:/bot|crawler|spider|scraper/i[t(485)](this.browserAPI[t(364)].userAgent)?0:1,cv:this[t(345)]()?1:0,br:this[t(421)]()?1:0};return this[t(481)][t(452)]=e,this.state.environmentChecked=!0,e}[Ct(345)](){const t=Ct;try{const e=this[t(433)][t(406)].createElement(t(425));e[t(442)]=200,e[t(353)]=50;const n=e[t(363)]("2d");if(null===n)return!1;const i=n.createLinearGradient(0,0,200,0);i.addColorStop(0,t(397)),i[t(346)](1,t(467)),n.fillStyle=i,n.fillRect(0,0,200,50),n[t(390)]=t(493),n[t(402)]="16px Arial",n[t(388)](t(374),33,30);const r=e[t(367)]();return Boolean(r&&r[t(475)]>50)}catch(t){return!1}}[Ct(421)](){const t=Ct;let e=0;this[t(433)].navigator[t(399)]&&this.browserAPI[t(364)][t(399)][t(475)]>0&&e++,(this[t(433)].navigator[t(489)]&&this.browserAPI.navigator[t(489)][t(475)]>0||this[t(433)][t(364)][t(492)][t(439)](t(354)))&&e++,this[t(411)]()&&e++,typeof this[t(433)].window[t(391)]!==t(386)&&e++;try{const n=(new Date)[t(361)]();n>-840&&n<840&&e++}catch(t){}return e>=3}[Ct(411)](){const t=Ct,e=this[t(433)][t(463)][t(387)]||this[t(433)][t(406)][t(434)].clientWidth,n=this[t(433)][t(463)].innerHeight||this.browserAPI[t(406)][t(434)].clientHeight;if(!e||!n)return!1;if(e<=2||n<=2)return!1;const i=e/n;return i>=.2&&i<=5}monitorBehavior(){const t=Ct,e=Rt((t=>{const e=Bt;this[e(481)][e(372)]++,this.state[e(414)].length>=10&&this[e(481)][e(414)][e(405)](),this.state[e(414)].push({x:t.clientX,y:t[e(368)],t:t[e(427)]})}),100),n=t=>{const e=Bt;this.state[e(453)]++,this[e(481)][e(459)][e(475)]>=5&&this.state[e(459)][e(405)](),this[e(481)][e(459)].push({x:t[e(491)],y:t[e(368)],t:t[e(427)],pre:this[e(407)](t)})},i=t=>{const e=Bt;this[e(481)][e(394)]++;const n=t[e(435)];if([e(418),e(366),e(378),e(470)][e(439)](n))return;const i=this[e(481)].keyEvents[this[e(481)][e(380)].length-1],r=t[e(427)],o=i?r-i.t:null;this[e(481)][e(380)][e(475)]>=10&&this[e(481)].keyEvents[e(405)](),this[e(481)].keyEvents[e(423)]({k:n,t:r,int:o}),null!==o&&o<100?(this[e(481)].keyboardBursts[e(423)](o),this[e(481)][e(426)][e(475)]>=5&&(this[e(481)].keyboardBurstActivity++,this[e(481)][e(426)]=[])):this.state[e(426)]=[]},r=Rt((t=>{const e=Bt;this.state.scrollActivity++;const n=t[e(427)],i=window.scrollY;this[e(481)][e(468)][e(475)]>=10&&this.state[e(468)][e(405)](),this[e(481)][e(468)].push({p:i,t:n})}),200),o=t=>{const e=Bt;this[e(481)][e(477)]++,this.state[e(445)][e(475)]>=10&&this.state[e(445)][e(405)](),this[e(481)].lastTouchEvent={x:t.touches[0].clientX,y:t.touches[0].clientY,t:t[e(427)],typ:e(432),s:0,d:0}},a=Rt((t=>{const e=Bt,n={x:t[e(446)][0][e(491)],y:t[e(446)][0][e(368)]};if(this[e(481)][e(464)]){const i=this[e(462)](this[e(481)].lastTouchEvent,n);this[e(481)][e(445)][e(475)]>=10&&this[e(481)].touchEvents[e(405)]();const r={x:t[e(446)][0].clientX,y:t[e(446)][0][e(368)],t:t.timeStamp,typ:e(412),d:i,s:i/(t[e(427)]-this[e(481)][e(464)].t)};this[e(481)][e(445)][e(423)](r),this[e(481)][e(464)]=r}else{const n={x:t[e(446)][0][e(491)],y:t[e(446)][0].clientY,t:t.timeStamp,typ:e(412),s:0,d:0};this.state[e(464)]=n}}),200),s=t=>{const e=Bt;this.state[e(464)]=null};this[t(433)][t(406)][t(454)]("mousemove",e,{passive:!0}),this[t(433)][t(406)][t(454)](t(362),n,{passive:!0}),this[t(433)][t(406)][t(454)](t(488),i,{passive:!0}),this[t(433)][t(406)][t(454)](t(373),r,{passive:!0}),t(496)in window&&(this.browserAPI.document[t(454)](t(376),o,{passive:!0}),this[t(433)][t(406)].addEventListener(t(352),a,{passive:!0}),this[t(433)].document[t(454)]("touchend",s,{passive:!0})),this[t(481)][t(350)]={mousemove:e,click:n,keydown:i,scroll:r,touchstart:o,touchmove:a,touchend:s}}async[Ct(396)](t=!1){const e=Ct;this[e(382)](t);const n=this[e(490)]();n&&(await this.cookieJar[e(351)](n),this[e(481)][e(456)]=Date[e(441)]())}updateSessionData(t=!1){const e=Ct,n=Date[e(441)]();let i=Math.floor((n-this[e(481)].startTime)/1e3);null!==this[e(481)].lastUpdateTime&&(i=Math[e(429)]((n-this[e(481)][e(456)])/1e3)),this[e(481)][e(349)]?(this[e(481)][e(349)][e(497)]+=t?1:0,this[e(481)][e(349)][e(461)]+=i):this.state[e(349)]={pageCount:1,sessionStart:this[e(481)][e(424)],duration:0}}[Ct(490)](){const t=Ct;if(!this.state.environmentChecked&&0===this[t(481)][t(372)]&&0===this[t(481)].clickActivity)return null;const e=this[t(481)][t(452)]??{wd:0,ua:1,cv:0,br:0},n=Lt(this[t(481)][t(372)],this[t(481)][t(414)],this[t(481)][t(453)],this[t(481)][t(459)],this[t(481)][t(380)],this[t(481)][t(394)],this[t(481)].keyboardBurstActivity,this[t(481)][t(416)],this[t(481)][t(477)],this[t(481)][t(468)],this.state[t(445)],this.state.startTime,Date[t(441)]()),i={p:this[t(481)][t(349)]?.[t(497)]??1,s:this.state[t(349)]?.[t(444)]??this[t(481)][t(424)],d:this[t(481)][t(349)]?.[t(461)]??0},r={v:2,ts:Date[t(441)](),env:e,bhv:n,ses:i};return encodeURIComponent(btoa(JSON.stringify(r)))}log(t){const e=Ct;this[e(417)][e(482)]&&console[e(393)](e(500)+t)}[Ct(407)](t){const e=Ct,n=t[e(385)];if(!(n&&n instanceof Element&&n.getBoundingClientRect))return 0;const i=n[e(455)]();if(!i[e(442)]||!i.height)return 0;const r=i[e(375)]+i[e(442)]/2,o=i[e(483)]+i[e(353)]/2,a=this[e(462)]({x:t.clientX,y:t[e(368)]},{x:r,y:o}),s=Math[e(486)](i.width**2+i[e(353)]**2)/2;return s>0?Math.max(0,1-a/s):0}[Ct(462)](t,e){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}}const Nt=(t,e=At)=>{const n=Ct,i=new Dt(t,e);return"loading"===e[n(406)][n(466)]?e[n(406)].addEventListener(n(473),(()=>i.init())):i[n(359)](),i};function Bt(t,e){const n=It();return Bt=function(t,e){return n[t-=345]},Bt(t,e)}let Ot=!0,Ft=!1,jt=null,qt=!1;class zt{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.5",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 Ut=new Set;function Ht(){if(null!==jt){if(Jt()&&Ut.size>0){let t={};for(const e of Ut)t={...t,...e};Ut.clear(),jt.info.microSessionCount+=1;const e=function(t){if(!(100*Math.random()>(t||ft)))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))}))}(jt.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:jt.config.monorailRegion,schema:vt.OnUnload,rawData:{...jt.info,...jt.config.storefrontData,...jt.performanceMetrics,...t,resourceTiming:e,cartAjaxResourceTimings:n,cartPerformanceMetrics:i,paintTimingHidden:qt}})}}else console.debug("⛔️ Shopify/perf-kit is not initialized")}function Jt(){return lt()}!function(t,e){!function(t,e){e=e||{},C(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=h("layout-shift",a);s&&(n=l(t,i,I,e.reportAllChanges),p((function(){a(s.takeRecords()),n(!0)})),c((function(){r=0,i=d("CLS",0),n=l(t,i,I,e.reportAllChanges),f((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;Ut.add({cumulativeLayoutShift:n,cumulativeLayoutShiftTarget:e.largestShiftTarget})})),function(t,e){!function(t,e){e=e||{},_((function(){var n,i=E(),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:jt.config.monorailRegion,schema:vt.OnInteraction,rawData:{...jt.info,...jt.config.storefrontData,...jt.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;Ut.add({timeToFirstByte:Math.round(e)})})),addEventListener("DOMContentLoaded",(()=>{qt="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),jt=new zt(e),e.spaMode&&(window.PerfKit={navigate:()=>{Ot?Ot=!1:Ft||(Ht(),jt=new zt(e),Ft=!0)},setPageType:t=>{e.storefrontData.pageType=t}}),e.shs&&Nt({debug:!0})}catch(t){console.error("🚫 Error initializing PerfKit:",t.message)}var e}()}();