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 _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 _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 _regeneratorValues(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}}}throw new TypeError(_typeof(e)+" is not iterable")}function _regenerator(){var m,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 y?t:y,t=Object.create(t.prototype);return _regeneratorDefine2(t,"_invoke",(o=e,a=n,l=r||[],f=!1,d={p:s=0,n:0,v:m,a:v,f:v.bind(m,4),d:function(e,t){return i=e,c=0,u=m,d.n=t,p}},function(e,t,n){if(1t||ae.length)&&(t=e.length);for(var n=0,r=Array(t);n{function f(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{var e=null!=(e=null==(e=window.vtexafenv)?void 0:e.account)?e:null!=(e=null==(e=null==document?void 0:document.currentScript)?void 0:e.getAttribute("an"))?e:null==(e=null==document?void 0:document.currentScript)?void 0:e.getAttribute("data-an");return B=e?e:B})();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 B="";function G(){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 X(){return a(M)}function l(){return window.location.href}function K(){return window.document.referrer}function Y(){var e;return null!=(e=null!=(e=_slicedToArray(null!=(e=null==(e=a(P))?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 $(){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 u(o,e,t){var a=1a&&(clearInterval(n),t(null))},i)}))}},e)}))}var e="https://af-origin.vtex.com/api/activity-flow",z="Event",Q=!1,Z=1e4,ee={userSession:"".concat(e,"/user-session"),pageView:"".concat(e,"/page-views"),ads:"".concat(e,"/ads"),webVitals:"".concat(e,"/web-vitals"),click:"".concat(e,"/click"),impression:"".concat(e,"/impression"),dataLayer:"".concat(e,"/data-layer"),view:"".concat(e,"/view")};function te(e,t){var n,r;navigator.sendBeacon?navigator.sendBeacon(t,e):(n=t,r=e,new Promise(function(e){var t=new XMLHttpRequest;t.timeout=Z,t.open("POST",n,!0),t.setRequestHeader("Content-Type","application/json"),t.send(r),t.onload=function(){if(200===t.status||202===t.status)return H(),e(r)}}))}function ne(e){var t={SessionId:(t=J()).sessionID,MacId:t.macID,IsNewUser:t.isNewUser,Url:t.url,Ref:t.ref,accountName:t.accountName,accountEnvironment:t.accountEnvironment,clientdate:(new Date).getTime(),isFirstEvent:t.isNewSessionID,workspace:t.workspace,ckInfo:t.ckInfo,checkout:t.checkout},n=t.IsNewUser,r=t.isFirstEvent,t=f(t,["IsNewUser","isFirstEvent"]);return"userSession"===e.eventType?{DataType:z,clientdate:t.clientdate,eventType:e.eventType,MacId:t.MacId,IsNewUser:n,workspace:t.workspace,Url:t.Url,SessionId:t.SessionId,accountName:t.accountName,accountEnvironment:t.accountEnvironment}:(t=Object.assign(Object.assign(Object.assign({},e),{DataType:z}),t),"pageView"===e.eventType?Object.assign(Object.assign({},t),{IsNewUser:n,isFirstEvent:r}):t)}function re(e,t){var n,t=1{var n=e;(n=ie[n])&&clearTimeout(n);var r=setTimeout(function(){"IN_VIEW"===p(e)&&t()},oe);ie[e]=r})(t,function(){m(t,"VIEWED"),r.disconnect(),n.dispatchEvent(new Event("view"))}));break;case"IN_VIEW":o.isIntersecting||m(t,"NOT_VIEWED");break;case"VIEWED":r.disconnect()}})},{threshold:.5,rootMargin:"0px"})).observe(a)}function m(e,t){ae[e]=t}function p(e){return null!=(e=ae[e])?e:"NOT_VIEWED"}function y(e){return"".concat(e.adId,"-").concat(e.adRequestId)}function ue(e){e=(e=>{for(var t={},n=Object.keys(c),r=0,o=n;r{try{var e=sessionStorage.getItem(t);return e?JSON.parse(e):null}catch(e){return sessionStorage.removeItem(t),null}})(r)))return e.a(2,o);e.n=1;break;case 1:return o=new URLSearchParams({application:Oe,featureKey:s,flag:l}).toString(),c="".concat(xe,"?").concat(o),e.p=2,e.n=3,function(u,r,e){var s=2{if("undefined"!=typeof window)return window.crypto||window.msCrypto;try{return require("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(16*Math.random()|0).toString(16)})).join("")}var Re="activity_flow_web_script",Me="https://stable.vtexobservability.com",Ve=.01,Pe=null,Fe=null;function Ue(r){return d(this,void 0,void 0,_regenerator().m(function e(){var t,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:r?(n=Ve,e.n=3):e.n=1;break;case 1:return e.n=2,function(){return d(this,void 0,void 0,_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(null!==Pe)return e.a(2,Pe);e.n=1;break;case 1:return e.n=2,Ce("telemetry_log_rate",window.location.hostname);case 2:return t=e.v,Pe=t=(t="number"==typeof t?t:Ve)<0||1t.length&&T({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=b(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(",");Be.get(e)!==n&&(Be.set(e,n),v({eventType:"impression",element:e.tagName.toLowerCase(),impressionType:r,attributes:t,elementSource:e.getAttribute(w)}))})}function Ke(){if(document.body){var e=l();if(Ge!==e)return Ge=e,Je&&Je.disconnect(),Xe("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&&Xe("rerender",null!=(e=e.parentElement)?e:document.body)}):"attributes"===a.type&&null!=(t=a.attributeName)&&t.startsWith(h)&&Xe("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}),Je=e}else"complete"===document.readyState&&T({context:"event.impression",message:"document.body is null even though readyState is complete; deferring handler to next tick"}),Ie(Ke)}function Ye(){ke(Ke)}function $e(e){return null!=e&&"object"===_typeof(e)}var ze=1e4,Qe={childList:!0,subtree:!0,attributes:!0},Ze="",t=null,et=!0,tt=void 0;function nt(e){var t=!0;try{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=k("CLS",0),r=0,o=[],a=A("layout-shift",e);a&&(t=x(i,n,Ot,c.reportAllChanges),O(function(){e(a.takeRecords()),t(!0)}),S(function(){n=k("CLS",r=0),t=x(i,n,Ot,c.reportAllChanges),_t(function(){return t()})}),setTimeout(t,0))}))}function yt(a,i){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(i=i||{},j(function(){var e;Dt();function t(t){Ft(function(){t.forEach(Pt);var e=Mt();e&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,o())})}var n=k("INP"),r=A("event",t,{durationThreshold:null!=(e=i.durationThreshold)?e:40}),o=x(a,n,Ut,i.reportAllChanges);r&&(r.observe({type:"first-input",buffered:!0}),O(function(){t(r.takeRecords()),o(!0)}),S(function(){Rt=Ct(),C.length=0,D.clear(),n=k("INP"),o=x(a,n,Ut,i.reportAllChanges)}))}))}function gt(i,c){c=c||{},j(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))}},_t=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},O=function(e){document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&e()})},Tt=function(e){var t=!1;return function(){t||(e(),t=!0)}},n=-1,Et=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},N=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