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,i,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return o=!(r=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return r=e.done,e},e:function(e){o=!0,n=e},f:function(){try{r||null==a.return||a.return()}finally{if(o)throw n}}};if(Array.isArray(e)||(a=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},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 _regenerator(){var p,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function r(e,t,n,r){var o,i,a,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,i=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 a=e,c=0,u=p,d.n=t,m}},function(e,t,n){if(1t||ie.length)&&(t=e.length);for(var n=0,r=Array(t);n{function P(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=r(q);return _slicedToArray(null!=(e=null==e?void 0:e.split(":"))?e:[],1)[0]})())?e:(()=>{var e=new RegExp(/[?&]workspace=([^&]+)(&|$)/).exec(window.location.search);return null==e?void 0:e[1]})())?e:(()=>{var e;return null==(e=null==window?void 0:window.__RUNTIME__)?void 0:e.workspace})(),ckInfo:window.document.cookie});var e}function $(){var e=null==(e=null==(e=window.document)?void 0:e.querySelector('meta[name="storefront"]'))?void 0:e.getAttribute("content"),t=null!=(t=null!=(t=null!=(t=null==(t=window.VTEX_METADATA)?void 0:t.account)?t:null==(t=window.__RUNTIME__)?void 0:t.account)?t:window.jsnomeLoja)?t:(()=>{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 J=e?e:J})();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 J="";function o(){return window.location.href}function z(){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}var e="https://af-origin.vtex.com/api/activity-flow",K="Event",Q=1e4,Z=0,ee={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=Q,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 G(),e(r)}}))}function ne(e){var t={SessionId:(t=Y()).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},n=t.IsNewUser,r=t.isFirstEvent,t=P(t,["IsNewUser","isFirstEvent"]),t=Object.assign(Object.assign(Object.assign({},e),{DataType:K}),t);return"pageView"===e.eventType?Object.assign(Object.assign({},t),{IsNewUser:n,isFirstEvent:r}):t}function i(e,t){var n,r=1{var n=e;(n=ie[n])&&clearTimeout(n);var r=setTimeout(function(){"IN_VIEW"===s(e)&&t()},re);ie[e]=r})(t,function(){u(t,"VIEWED"),r.disconnect(),n.dispatchEvent(new Event("view"))}));break;case"IN_VIEW":o.isIntersecting||u(t,"NOT_VIEWED");break;case"VIEWED":r.disconnect()}})},{threshold:.5,rootMargin:"0px"})).observe(i)}function u(e,t){oe[e]=t}function s(e){return null!=(e=oe[e])?e:"NOT_VIEWED"}function a(e){return"".concat(e.adId,"-").concat(e.adRequestId)}function ce(e){e=(e=>{for(var t={},n=Object.keys(c),r=0,o=n;ri&&(clearInterval(n),t(null))},a)}))}},e)}))}var ye=["lojasrede","drogariavenancio"];function he(){return n(this,void 0,void 0,_regenerator().m(function e(){var r,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(n=t=void 0,t=$().accountName,n=(n=window.location.pathname).includes("/search")||n.includes("/pesquisa"),null!=t&&ye.includes(t)&&n)return e.n=1,me(function(){var e;return null==(e=document.querySelector("impulse-search"))?void 0:e.shadowRoot});e.n=2;break;case 1:o=e.v,e.n=4;break;case 2:return e.n=3,me(function(){return document.body});case 3:o=e.v;case 4:return r=o,e.a(2,r)}var t,n},e)}))}var f="data-af",d="".concat(f,"-element"),ge="".concat(f,"-onimpression"),be="".concat(f,"-onclick"),v="".concat(f,"-onview");function p(e){for(var t={},n=[d,ge,be,v],r=0,o=Array.from(e.attributes);rn.value&&(n.value=r,n.entries=o,t())}var t,n=A("CLS",0),r=0,o=[],i=O("layout-shift",e);i&&(t=S(a,n,nt,c.reportAllChanges),x(function(){e(i.takeRecords()),t(!0)}),_(function(){n=A("CLS",r=0),t=S(a,n,nt,c.reportAllChanges),$e(function(){return t()})}),setTimeout(t,0))}))}function Ue(i,a){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(a=a||{},N(function(){var e;ct();function t(t){dt(function(){t.forEach(ft);var e=st();e&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,o())})}var n=A("INP"),r=O("event",t,{durationThreshold:null!=(e=a.durationThreshold)?e:40}),o=S(i,n,vt,a.reportAllChanges);r&&(r.observe({type:"first-input",buffered:!0}),x(function(){t(r.takeRecords()),o(!0)}),_(function(){ut=at(),D.length=0,M.clear(),n=A("INP"),o=S(i,n,vt,a.reportAllChanges)}))}))}function Be(a,c){c=c||{},N(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))}},$e=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},x=function(e){document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&e()})},Je=function(e){var t=!1;return function(){t||(e(),t=!0)}},j=-1,ze=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},L=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]},M.set(n.id,n),D.push(n)),D.sort(function(e,t){return t.latency-e.latency}),10