function _createForOfIteratorHelper(e,t){var n,r,o,a,i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return o=!(r=!0),{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){o=!0,n=e},f:function(){try{r||null==i.return||i.return()}finally{if(o)throw n}}};if(Array.isArray(e)||(i=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?void 0:e)&&e[n++],done:!e}}}}throw new TypeError(_typeof(e)+" is not iterable")}function _regenerator(){var p,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function r(e,t,n,r){var o,a,i,c,u,s,l,f,d,t=t&&t.prototype instanceof g?t:g,t=Object.create(t.prototype);return _regeneratorDefine2(t,"_invoke",(o=e,a=n,l=r||[],f=!1,d={p:s=0,n:0,v:p,a:v,f:v.bind(p,4),d:function(e,t){return i=e,c=0,u=p,d.n=t,m}},function(e,t,n){if(1t||a{function d(e,t){var n={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r{try{var e=sessionStorage.getItem(t);return e?JSON.parse(e):null}catch(e){return sessionStorage.removeItem(t),g({context:"featureFlags",message:"Failed to parse cached feature flag — cache entry removed",error:e,useDefaultRate:!0}),null}})(r)))return e.a(2,o);e.n=1;break;case 1:return o=new URLSearchParams({application:P,featureKey:s,flag:l}).toString(),c="".concat(M,"?").concat(o),e.p=2,e.n=3,function(l,r,e){var f=2{var e,t=null==document?void 0:document.currentScript,t=null!=(e=null==(e=window.vtexafenv)?void 0:e.account)?e:null!=(e=null==t?void 0:t.getAttribute("an"))?e:null==(e=null==t?void 0:t.dataset)?void 0:e.an;return ne=t?t:ne})();return e?{accountName:t,accountEnvironment:e}:null!=(e=window.__RUNTIME__)&&e.account?{accountName:t,accountEnvironment:"store_framework"}:window.jsnomeLoja?{accountName:t,accountEnvironment:"portal"}:{accountName:t,accountEnvironment:window.__NEXT_DATA__||window.___gatsby?"fast_store":void 0}}var ne="";function re(){var e,t;return null!=(e=null==(e=window.vtex)?void 0:e.checkout)&&e.version?(t=(e=window.vtex.checkout.version).startsWith("v")?"checkout_".concat(e.slice(0,2)):"checkout",{version:e,type:t}):null!=(e=window.__FASTCHECKOUT__)&&e.version?{version:window.__FASTCHECKOUT__.version,type:"fastcheckout"}:void 0}function oe(){return n(G)}function f(){return window.location.href}function ae(){return window.document.referrer}function ie(){var e;return null!=(e=null!=(e=_slicedToArray(null!=(e=null==(e=n(X))?void 0:e.split(":"))?e:[],1)[0])?e:null==(e=new RegExp(/[?&]workspace=([^&]+)(&|$)/).exec(window.location.search))?void 0:e[1])?e:null==(e=null==window?void 0:window.__RUNTIME__)?void 0:e.workspace}function ce(e){var t=(()=>{if("undefined"!=typeof window)return window.crypto||window.msCrypto;try{return require("node:crypto").webcrypto}catch(e){}})();return(null!=t&&t.getRandomValues?_toConsumableArray(t.getRandomValues(new Uint8Array(e))).map(function(e){return e.toString(16).padStart(2,"0")}):Array.from({length:2*e},function(){return Math.floor(16*Math.random()).toString(16)})).join("")}var ue="activity_flow_web_script",se="https://stable.vtexobservability.com",p={WARN:.01,ERROR:.01,INFO:0,DEBUG:0},le={WARN:null,ERROR:null,INFO:null,DEBUG:null},fe=null,de=null;function ve(r){return v(this,void 0,void 0,_regenerator().m(function e(){var t,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(null!==(t=le[r]))return e.a(2,t);e.n=1;break;case 1:return e.n=2,B("telemetry_log_rate_by_severity",window.location.hostname);case 2:t=e.v,n=null;try{n=JSON.parse(t)[r]}catch(e){console.warn("[AF] Failed to parse telemetry log rate from feature flags")}return((n="number"==typeof n?n:p[r])<0||1a&&(clearInterval(n),t(null))},i)}))}},e)}))}var ke="__af_consent_patched__",Ie=new Set;function je(e,t){try{e(t)}catch(e){g({context:"consent.dataLayer",message:"A consent listener failed; the other listeners and the page push are unaffected.",error:e,useDefaultRate:!0})}}function Le(t){var n=!1;return y(function(){return Array.isArray(window.dataLayer)?window.dataLayer:null},1e4,250).then(function(e){var r,o;!e||n||(Array.from(e).forEach(function(e){return je(t,e)}),Ie.add(t),(r=e).push[ke])||(o=r.push,r.push=function(){for(var e=arguments.length,t=new Array(e),n=0;n{if(null!==r)try{return Ke()}catch(e){m({context:"consent.receipt",error:e})}})())&&void 0===e.consent&&(n.consent=t)),(t=tt.get(e.eventType))?(t="".concat(Qe,"/").concat(t),rt(JSON.stringify(n),t)):m({context:"handleSendEvent",message:"No Activity Flow route registered for eventType ".concat(JSON.stringify(e.eventType),". Event will not be sent.")}))}function w(t,e){var n=1{var n=e;(n=lt[n])&&clearTimeout(n);var r=setTimeout(function(){"IN_VIEW"===vt(e)&&t()},ut);lt[e]=r})(t,function(){dt(t,"VIEWED"),r.disconnect(),n.dispatchEvent(new Event("view"))}));break;case"IN_VIEW":o.isIntersecting||dt(t,"NOT_VIEWED");break;case"VIEWED":r.disconnect()}})},{threshold:.5,rootMargin:"0px"})).observe(a)}function dt(e,t){st[e]=t}function vt(e){return null!=(e=st[e])?e:"NOT_VIEWED"}function pt(e){return"".concat(e.adId,"-").concat(e.adRequestId)}function mt(e){e=(e=>{for(var t={},n=Object.keys(ct),r=0,o=n;r{if(null!==r)try{return Ye(r)}catch(e){m({context:"consent.receipt",error:e})}})();!t||"pending"===e&&"none"===t.cmp||w({eventType:"consent",reason:"pending"===e&&Ct.has(t.cmp)?"unread":e,consent:t})}var Mt={eventType:"consent",route:"consent",init:function(){var e;e=function(){return Rt("changed")},we.add(e),Dt()&&Rt("changed"),setTimeout(function(){Dt()||Rt("pending")},3e3)}},Pt=/add[\s_-]*to[\s_-]*cart/i,Ft=/remove[\s_-]*from[\s_-]*cart/i,Vt=2e3,Ut="__af_cart_dedup__";function zt(e){e=e;var t,n,r,e=Pt.test(e)?"add":Ft.test(e)?"remove":null;if(e)return(t=window)[Ut]||(t[Ut]=new Map),n=null!=(n=(t=t[Ut]).get(e))?n:0,r=Date.now(),t.set(e,r),r-nt.length&&g({context:"event.impression",message:"Found element with the data-af-impression attribute but without the data-af-element attribute"}),0!==t.length)&&t.forEach(function(e){var t=_(e),n=Object.entries(t).map(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1];return"".concat(t,"=").concat(e)}).join(",");Yt.get(e)!==n&&(Yt.set(e,n),w({eventType:"impression",element:e.tagName.toLowerCase(),impressionType:r,attributes:t,elementSource:e.getAttribute(b)}))})}function Zt(){if(document.body){var e=f();if($t!==e)return $t=e,Kt&&Kt.disconnect(),Qt("first_render"),(e=new MutationObserver(function(e){var t,n,r,o=_createForOfIteratorHelper(e);try{for(o.s();!(r=o.n()).done;){var a=r.value;"childList"===a.type?a.addedNodes.forEach(function(e){e instanceof HTMLElement&&Qt("rerender",null!=(e=e.parentElement)?e:document.body)}):"attributes"===a.type&&null!=(t=a.attributeName)&&t.startsWith(h)&&Qt("rerender",null!=(n=a.target.parentElement)?n:document.body)}}catch(e){o.e(e)}finally{o.f()}})).observe(document.body,{childList:!0,subtree:!0,attributes:!0}),Kt=e}else"complete"===document.readyState&&g({context:"event.impression",message:"document.body is null even though readyState is complete; deferring handler to next tick"}),Gt(Zt)}var en={eventType:"impression",route:"impression",init:function(){Jt(Zt)}};function tn(){var n={},e=document.querySelectorAll('head meta[property^="product:"]');if(0!==e.length)return e.forEach(function(e){var t=e.getAttribute("property"),e=e.getAttribute("content");t&&e&&(n[t]=e)}),n}function nn(e){return null!=e&&"object"===_typeof(e)}var rn,on=1e4,an={childList:!0,subtree:!0,attributes:!0},cn="",t=null,un=!0;function sn(e){var t=!function e(t,n){if(void 0===t&&void 0===n)return 1;if(!(void 0===t&&void 0!==n||void 0!==t&&void 0===n)){var r=Object.keys(t),o=Object.keys(n);if(r.length===o.length){for(var a=0,i=r;an.value&&(n.value=r,n.entries=o,t())}var t,n=S("CLS",0),r=0,o=[],a=x("layout-shift",e);a&&(t=k(i,n,Fn,c.reportAllChanges),I(function(){e(a.takeRecords()),t(!0)}),A(function(){n=S("CLS",r=0),t=k(i,n,Fn,c.reportAllChanges),jn(function(){return t()})}),setTimeout(t,0))}))}function An(a,i){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(i=i||{},L(function(){var e;Wn();function t(t){Xn(function(){t.forEach(Jn);var e=Bn();e&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,o())})}var n=S("INP"),r=x("event",t,{durationThreshold:null!=(e=i.durationThreshold)?e:40}),o=k(a,n,Kn,i.reportAllChanges);r&&(r.observe({type:"first-input",buffered:!0}),I(function(){t(r.takeRecords()),o(!0)}),A(function(){Hn=qn(),C.length=0,D.clear(),n=S("INP"),o=k(a,n,Kn,i.reportAllChanges)}))}))}function On(i,c){c=c||{},L(function(){function e(e){(e=c.reportAllChanges?e:e.slice(-1)).forEach(function(e){e.startTimer[1]?"poor":e>r[0]?"needs-improvement":"good",t(n))}},jn=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},I=function(e){document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&e()})},Ln=function(e){var t=!1;return function(){t||(e(),t=!0)}},j=-1,Nn=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},e=function(e){"hidden"===document.visibilityState&&-1n.latency)&&(e?t.duration>e.latency?(e.entries=[t],e.latency=t.duration):t.duration===e.latency&&t.startTime===e.entries[0].startTime&&e.entries.push(t):(n={id:t.interactionId,latency:t.duration,entries:[t]},D.set(n.id,n),C.push(n)),C.sort(function(e,t){return t.latency-e.latency}),10