window.hoopcompany_leadform = new Object; window.hoopcompany_leadform.topic_id = ''; window.hoopcompany_leadform.page_url = window.location.href; window.hoopcompany_leadform.page_name = document.title; window.getCookie=function(cname) { var name = cname + '='; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ''; }; window.setCookie=function(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires=" + d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } window.addEventListener('message', function(event) { if(event.data=='setClient'){ window.setCookie('hoopCliente',1,90); } }); window.hoopcompany_campaign = new Object; window.hoopcompany_campaign = {"id":1304,"name":"Campanha E-commerce","company":267911,"pipe":0,"extradata":{"btnSize":"66","companies":[{"id":267911,"selectedPipe":60576}],"fontColor":"#f5f5f5","btnPostion":{"x":10,"y":10,"type":"placement","placement":"down-right"},"textHeader":null,"basicFields":{"name":{"able":true,"required":true},"email":{"able":true,"required":true},"place":{"able":true,"required":true},"whats":{"able":true,"required":true},"plugin":true,"termOfUse":{"able":false,"required":false},"disableForm":true},"buttonColor":"#95989A","show_configs_whats":{"list":[],"type":"all","triggers":[],"start_type":"insta"}},"created_at":"2025-03-06 14:49:49","updated_at":"2025-03-10 20:12:46","image":null,"deleted_at":null,"group":null,"title":"Contato do e-Commerce","objective":null,"disabled":0,"token":"953700e696241e72af2712c14aa44f3c","type_campaign":"default","topics":[{"id":1792,"name":"ecommerce","message":"","campaign_id":1304,"popup_id":null,"last_seller":0,"created_at":"2025-03-06 14:49:49","updated_at":"2025-03-06 14:49:49","new_cliente_redirect":1,"seller_for_client":1,"cliente_redirect":1,"seller_for_new_client":1,"extradata":null,"CTA":1,"redirect_url":null,"model_id":null,"open_form":1,"success_message":null,"clicks":0},{"id":1794,"name":"Whats","message":"Ol\u00e1, podem me ajudar?","campaign_id":1304,"popup_id":null,"last_seller":0,"created_at":"2025-03-10 20:05:27","updated_at":"2025-03-10 20:21:22","new_cliente_redirect":1,"seller_for_client":1,"cliente_redirect":1,"seller_for_new_client":1,"extradata":{"companies":[{"id":267911,"last_seller":0}]},"CTA":1,"redirect_url":null,"model_id":null,"open_form":1,"success_message":null,"clicks":0}],"urls":[],"popups":[{"id":10020,"name":"PRIMEIRA COMPRA","type":"","show_type":"simple_fix","company_id":267911,"topic_id":0,"campaign_id":1304,"pipe_id":0,"configs":{"cupom1":{"porcent":true,"cupomActive":false,"cupomCode":"DECO10","cupomDiscount":"10","rodape":null,"color":"#f9e8c3","color2":"#826053","fields":{"name":true,"email":true,"telephone":true,"termOfUse":false,"place":false},"position":{"x":20,"y":20},"error":null,"iconColor":"black","isCenter":true,"model":"with_img","forOldClients":false,"imageSize":"90","thankText":"Parab\u00e9ns, seu cupom de desconto \u00e9 DECO10 insira no campo de cupons ao final da compra!","btnText":"Quero Cupom!","buttomBorderColor":"#eecba5","buttomTextColor":"#e4da9a","text":null,"image_name":"imgpopup-10020-1.png"},"cupom2":{"porcent":true,"cupomActive":false,"cupomCode":null,"cupomDiscount":null,"rodape":"Valida somente para primeira compra","color":"#0f4c81","color2":"#ffffff","fields":{"name":true,"email":true,"telephone":true,"termOfUse":false,"place":false},"position":{"x":20,"y":20},"error":null,"iconColor":"black","isCenter":true,"model":"without_img","forOldClients":false,"imageSize":70},"show_configs":{"type":"all","list":[],"triggers":[],"start_type":"insta","isOneView":true}},"script":null,"able":1,"created_at":"2025-03-06 16:57:36","updated_at":"2025-03-10 20:35:56","deleted_at":null,"optins":[{"id":981,"campaign_id":null,"company_id":267911,"popup_id":null,"extradata":{"ables":[]},"label":"ERP","visible":1,"required":0,"created_at":"2025-02-27 17:47:17","updated_at":"2025-02-27 17:47:17"}]}],"fields":[]};window.hoopcompany_trackPlatform = 'tray'; var tid = setInterval( function () { if ( document.readyState !== 'complete' ) return; clearInterval( tid ); if(window.hoopcompany_trackPlatform != 'tray'){ (function(document, tag) { var scriptTag = document.createElement(tag); firstScriptTag = document.getElementsByTagName(tag)[0]; scriptTag.setAttribute('type', 'text/javascript'); scriptTag.setAttribute('charset', 'UTF-8'); scriptTag.src = '//d2wy8f7a9ursnm.cloudfront.net/v7/bugsnag.min.js'; scriptTag.id = 'bugsnag'; firstScriptTag.parentNode.insertBefore(scriptTag, firstScriptTag); }(document, 'script')); document.getElementById('bugsnag').addEventListener('load', function() { (function(document, tag) { var scriptTag = document.createElement(tag); firstScriptTag = document.getElementsByTagName(tag)[0]; scriptTag.setAttribute('type', 'text/javascript'); scriptTag.src = 'https://hoopdecor.com/hoopcompany_ecommerce/tray/73465458d8eb5b895db8a0d9a069797f/267911/1304/1792'; firstScriptTag.parentNode.insertBefore(scriptTag, firstScriptTag); }(document, 'script')); }); } if (window.hoopcompany_campaign.extradata.show_configs_whats) { if (window.hoopcompany_campaign.extradata.show_configs_whats.type == 'all') { window.show_whats = 1; window.hoopcompany_campaign.extradata.show_configs_whats.list.forEach(function(url) { if (window.location.href.includes(url)) { window.show_whats = 0; } }); } else { window.show_whats = 0; window.hoopcompany_campaign.extradata.show_configs_whats.list.forEach(function(url) { if (window.location.href.includes(url)) { window.show_whats = 1; } }); } } else { window.show_whats = 0; } var verifyTriggers=function(popup){ //verifica gatilhos if(window.hoop_popup && popup.configs.show_configs.triggers &&popup.configs.show_configs.triggers.length && window.getCookie('hoop_popup_id')!=popup.id){ for(var i=0;i