(function(p,u,s,h,n,e,w,z){if(null===document.getElementById(w)){p[n]=z;p[h]=p[h]||[];p[h].push(["init",z]);var f=u.getElementsByTagName(s)[0],j=u.createElement(s);j.id=w;j.async=1;j.src=e;f.parentNode.insertBefore(j,f)}})(window,document,'script','IlabsPush','_ilabsPushConfig','https://cdn.pn.vg/push/ilabspush.min.js','pushnews-js',{"optin":{"mailinglistOsp":{"status":!1,"activation":{"type":"optinClickNo"},"title":"Prefere assinar nossa Newsletter?","subtitle":"Ao continuar voc\u00ea declara que leu e assinou nossos Termos e Condi\u00e7\u00f5es","buttonSignUp":"OK","thankYou":"Obrigado pelo registo :)"},"native":!0,"status":!1,"vapidPublicKey":"BAFeGF8u3h-OQPH8eNtQl1KdRXjUhLCWN7LV6S6IT2ZYkpDvwFCHBVIgnRU90NoAIkCPaNIrUwXhvh3nZ3IEkio","activation":{"type":"auto"},"%desktopImage%":"https:\/\/icons.pn.vg\/2023\/11\/29\/65673137ab936.jpg","%desktopTxtTitle%":"Fique ligado!","%desktopTxtBody%":"Receba conte\u00fados exclusivos para voc\u00ea!","%desktopTxtButtonNo%":"N\u00e3o, obrigado","%desktopTxtButtonYes%":"Eba, quero!","nativePrePrompt":!1,"welcomePush":{"status":!0,"message":"Aqui voc\u00ea vai receber diversas promo\u00e7\u00f5es especiais, fica ligado. ","title":"Obrigado por se Cadastrar \ud83e\udd1d","url":"https:\/\/www.lojasolar.com.br\/154?map=productClusterIds?src=&utm_source=PushNotification_boas-vindas&utm_medium=url-link-lista_jornal-mes&utm_content=&utm_campaign=&utm_term=","useBigImage":!1,"bigImageUrl":null,"useButton":!0,"buttonText":"Clique aqui e veja as Ofertas \ud83e\udd11","hash":""},"theme":"https"},"popup":{"emailCapture":!1,"emailActionMessage":"Quer tamb\u00e9m se inscrever na nossa newsletter?","emailSubtitleMessage":"Ao continuar voc\u00ea declara que leu e concordou com nossos Termos e Condi\u00e7\u00f5es","emailButtonSubmit":"Assinar","emailSuccessMessage":"Obrigado pelo registo :)","emailNoThanks":"N\u00e3o, obrigado.","name":"lojasolar com br","domain":"www.lojasolar.com.br","appId":"d0fb0b64-2b55-4023-a52c-8f7c8a00c53a","actionMessage":"quer te enviar notifica\u00e7\u00f5es:","notificationIcon":"https:\/\/icons.pn.vg\/2023\/11\/29\/65673137ab936.jpg","notificationTitle":"Exemplo","notificationMessage":"Esta \u00e9 uma notifica\u00e7\u00e3o exemplo","caption":"(pode cancelar quando quiser)"},"extra":{"constants":{"PUSH_NOTIFICATION_SUBSCRIPTION_SDK_URL":"https:\/\/cdn.pn.vg\/push\/PushnewsSubscriptionSDK.js"},"googleAnalytics":{"status":!1,"events":[]},"interests":{"status":!1,"INTERESTS":[]},"modules":{"cartAbandonment":{"status":!0,"vendor":"generic","notifications":[{"delayMinutes":120,"notification":{"title":"Compre agora e garanta descontos imperd\u00edveis! \ud83e\udd11","body":"Aproveite descontos de at\u00e9 70% OFF \u2714\ufe0f","url":"https:\/\/www.lojasolar.com.br\/checkout\/#\/cart","icon":"https:\/\/icons.pn.vg\/2023\/12\/06\/657057bca6d90.jpg","bigImage":"","buttonText":"Abrir \ud83d\udc49","trackConversion":!0,"active":!0}}]}},"api":{"url":"https:\/\/api.pushnews.eu","publicToken":"pub_72de0b15a7bb84edcd39be84fb34a92d913f7ec3a3b6"}}});var IlabsPush=IlabsPush||[];var Pushnews=Pushnews||{};Pushnews.Category={name:"",dataLayer:window.dataLayer||[],setCategory:function(category){IlabsPush.push(function(IlabsPush){IlabsPush.log("Pushnews.Category.setCategory: ",category)});Pushnews.Category.name=category;IlabsPush.push(["sendCustomFilters",{'pushnews-category':category}])},getFromDataLayer:function(event){return Pushnews.Category.dataLayer.find(function(data){return data.event===event})},handleProductPage:function(){IlabsPush.push(function(IlabsPush){IlabsPush.log("Pushnews.Category: *** Product Page")});var productData=Pushnews.Category.getFromDataLayer("productDetail");if(productData&&productData.ecommerce){var category=productData.ecommerce.detail.products[0].category;var categories=category.split("/");if(categories.length>1){Pushnews.Category.setCategory(categories[0]+'/'+categories[1])}else{Pushnews.Category.setCategory(categories[0])}}},handleDepartmentPage:function(){IlabsPush.push(function(IlabsPush){IlabsPush.log("Pushnews.Category: *** Department Page")});var departmentData=Pushnews.Category.getFromDataLayer("departmentView");if(departmentData){Pushnews.Category.setCategory(departmentData.departmentName)}},handleCategoryPage:function(){IlabsPush.push(function(IlabsPush){IlabsPush.log("Pushnews.Category: *** Category Page")});var categoryData=Pushnews.Category.getFromDataLayer("categoryView");if(categoryData){var category;if(categoryData.departmentName){category=categoryData.departmentName+'/'+categoryData.categoryName}else{category=categoryData.categoryName} Pushnews.Category.setCategory(category)}else{IlabsPush.push(function(IlabsPush){IlabsPush.log("Pushnews.Category.init: categoryData not found")})}},init:function(){setTimeout(function(){(function checkDataLayer(){if(typeof window.dataLayer!=='undefined'&&Array.isArray(window.dataLayer)){Pushnews.Category.dataLayer=window.dataLayer;var pageType=__RUNTIME__?.route?.pageContext?.type;var url=window.location.href;if(url.endsWith("/p")||pageType==="product"){Pushnews.Category.handleProductPage()}else if(pageType==="department"){Pushnews.Category.handleDepartmentPage()}else if(pageType==="category"||pageType==="subcategory"){Pushnews.Category.handleCategoryPage()} if(!Pushnews.Category.name){setTimeout(checkDataLayer,1000)}}else{setTimeout(checkDataLayer,250)}})()},1000)}};Pushnews.cartRecovery={lastRecoveryEventDate:0,maxSecondsPerRecoveryEvent:60,isObserveUrlChangesInitialized:!1,productDetails:{},sendRecoveryEvent:function(){if(null===Pushnews.cartRecovery.lastRecoveryEventDate||Date.now()-Pushnews.cartRecovery.lastRecoveryEventDate>Pushnews.cartRecovery.maxSecondsPerRecoveryEvent*1000){Pushnews.cartRecovery.lastRecoveryEventDate=Date.now();var context=Pushnews.cartRecovery.productDetails;IlabsPush.push(["ecommerce.itemAddedToCart",{context:context}])}else{IlabsPush.push(function(IlabsPush){IlabsPush.log("IlabsPush:ecommerce.itemAddedToCart was prevented: too soon to be sent again.")})}},io:{grabProductDetails:function(){Pushnews.cartRecovery.productDetails.url=window.location.href;var pnVtexJson=document.querySelector('script[type="application/ld+json"]');if(!pnVtexJson){return} try{pnVtexJson=JSON.parse(pnVtexJson.text);if(pnVtexJson.hasOwnProperty('@type')&&'Product'===pnVtexJson['@type']){if(pnVtexJson.hasOwnProperty('name')){Pushnews.cartRecovery.productDetails.name=pnVtexJson.name} if(pnVtexJson.hasOwnProperty('description')){Pushnews.cartRecovery.productDetails.description=pnVtexJson.description} if(pnVtexJson.hasOwnProperty('image')){Pushnews.cartRecovery.productDetails.image=pnVtexJson.image} IlabsPush.push(function(IlabsPush){IlabsPush.log("Pushnews.cartRecovery.productDetails",Pushnews.cartRecovery.productDetails)})}}catch(e){IlabsPush.push(function(IlabsPush){IlabsPush.log("Pushnews.cartRecovery.io.grabProductDetails: Error parsing JSON",e)})}},monitorCart:function(){document.querySelectorAll('.min-h-regular.b--action-primary, .vtex-buy-products-items-item__buy').forEach(function(element){element.addEventListener('click',function(){Pushnews.cartRecovery.sendRecoveryEvent()})})},monitorCheckout:function(){if(null!==window.location.href.match("checkout/orderPlaced")){IlabsPush.push(function(IlabsPush){IlabsPush.log("Pushnews.cartRecovery.io.monitorCheckout: checkout/orderPlaced detected")});IlabsPush.push(["ecommerce.checkoutCompleted"])}},observeUrlChanges:function(){var previousUrl=location.href;var observer=new MutationObserver(function(mutations){if(location.href!==previousUrl&&''!==previousUrl){IlabsPush.push(function(IlabsPush){IlabsPush.log("Pushnews.cartRecovery.io.observeUrlChanges: URL changed")});previousUrl=location.href;setTimeout(function(){IlabsPush.push(function(IlabsPush){IlabsPush.log("Pushnews.cartRecovery.io.observeUrlChanges: URL changed - calling init() again.")});Pushnews.cartRecovery.io.init()},1500)}});observer.observe(document,{subtree:!0,childList:!0})},init:function(){IlabsPush.push(function(IlabsPush){IlabsPush.log("Pushnews.cartRecovery.io: init")});Pushnews.cartRecovery.io.grabProductDetails();Pushnews.cartRecovery.io.monitorCart();Pushnews.cartRecovery.io.monitorCheckout();Pushnews.Category.init();if(!Pushnews.cartRecovery.isObserveUrlChangesInitialized){Pushnews.cartRecovery.io.observeUrlChanges();Pushnews.cartRecovery.isObserveUrlChangesInitialized=!0}}},init:function(){Pushnews.cartRecovery.io.init()}} IlabsPush.push(function(){Pushnews.cartRecovery.init()})