(window.webpackJsonpPop=window.webpackJsonpPop||[]).push([["chunk-5cd91f7e"],{"4c36":function(t,e,i){(t.exports=i("2350")(!1)).push([t.i,"#pcw-app.pcw-widgets .popup-height{height:100%;margin:auto;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}#pcw-app.pcw-widgets .powered-by{height:1.7rem}#pcw-app.pcw-widgets .widget_fullscreen.pcw-w .popupContent{height:100%}#pcw-app.pcw-widgets .popupContent{position:relative;min-height:360px;margin:0;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex}@media only screen and (max-width:480px){#pcw-app.pcw-widgets .popupContent{min-height:auto;overflow:auto;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}#pcw-app.pcw-widgets .widget_fullscreen.pcw-w{-webkit-box-pack:initial;-ms-flex-pack:initial;justify-content:normal;padding:initial;overflow:hidden}#pcw-app.pcw-widgets .close{-webkit-transform:translate(-12px,12px);transform:translate(-12px,12px)}#pcw-app.pcw-widgets .close_circle{top:-10px;right:-10px}}#pcw-app.pcw-widgets .formInner:not(.hasBackground){background-color:transparent!important}#pcw-app.pcw-widgets .pcw-mini-popup{height:80px;width:80px;position:absolute;top:auto;bottom:90px;left:8px;max-width:16vw;max-height:16vw;cursor:pointer}#pcw-app.pcw-widgets .pcw-mini-popup *{cursor:pointer}#pcw-app.pcw-widgets .waiting-spin{-webkit-animation-name:waiting-spin;-webkit-animation-duration:40s;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear;-moz-animation-name:waiting-spin;-moz-animation-duration:40s;-moz-animation-iteration-count:infinite;-moz-animation-timing-function:linear;animation-name:waiting-spin;animation-duration:40s;animation-iteration-count:infinite;animation-timing-function:linear}@-webkit-keyframes waiting-spin{0%{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(-1turn)}}@keyframes waiting-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(-1turn);transform:rotate(-1turn)}}#pcw-app.pcw-widgets .pcw-mini-popup:hover{-webkit-transform:scale(1.15);transform:scale(1.15);-webkit-transition-duration:.3s;transition-duration:.3s}#pcw-app.pcw-widgets .pcw-mini-popup{-webkit-transition-duration:.2s;transition-duration:.2s}#pcw-app.pcw-widgets .btn-loading span{display:none!important;font-size:0}#pcw-app.pcw-widgets #popup{height:100%;position:fixed;pointer-events:none;top:0;left:0;right:0;bottom:0}#pcw-app.pcw-widgets #popup #top-popup-text{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}#pcw-app.pcw-widgets form select{padding-top:10px}",""])},"80d6":function(t,e,i){"use strict";i.d(e,"a",(function(){return p})),i.d(e,"b",(function(){return s}));var o=i("a026"),a=i("6b58");const n={name:"name",email:"mail",gender:"gender",phone:"phone"};var r=function(t){const e=t;return{gtag(t,i){e&&e.active&&(i.category="Popconvert",i.popconvert_action=[i.campaignId,i.component,i.action].join(":"),"function"==typeof window.gtag?window.gtag("event",this.getEventName(t),i):console.log("🔴PCW: gtag function not found."))},getEventName:t=>e.popconvertEvents&&t in e.popconvertEvents?e.popconvertEvents[t].name:t}};function p(t,e){const i={};for(const o in t)o in e?i["base_"+o]=t[o]:i[o]=t[o];return Object.assign(i,e),i}function s(t,e){const i={};for(const o in t)i[o]=o in e?function(...i){t[o].call(this,...i),e[o].call(this,...i)}:t[o];for(const o in e)o in t||(i[o]=e[o]);return i}e.c={props:["previewedScalingFactor","previewedCampaignComponent","previewedComponentStep","isActuallyMobileDevice","isMobileDevice","animations","widgetData","userAccountData","campaignId","checkbox_optin_text","localStorageObj","formOptinIsInUse","formOptinIsActive","campaignIsInDemoMode","gameImages","visibleWidgets","skipPopupStep"],data(){const t={gdrpCheckbox1:!0,gdrpCheckbox2:!0},e="https://cdn.popconvert.com.br/widget/img/icons/default.webp";return{popupHasLoaded:!1,regexPhone:"",usrlang:navigator.language||navigator.userLanguage,gdprForm:t,prizeForWinner:null,gameResult:null,location:window.location.href,show:!1,gameStarted:!1,popupStep:1,leadData:{},winnerPrize:!1,key:"",lead:{name:"",mail:"",url:"",source:0,picture:"",birthday:"",gender:"",profile:"",phone:"",gdpr_checkboxes:[t.gdrpCheckbox1,t.gdrpCheckbox2]},form:{hintActive:!1,mailCheck:!0,nameCheck:!0,phoneCheck:!0,genderCheck:!0,showFormError:!1,infoMessage:"",nameInputisDisabled:!1,isLoading:!1,usaUnbounce:!1},appEndPoint:"https://app.popconvert.com",visitorPassesCaptcha:!0,visitorCaptchaToken:null,defaultGameImage:e,defaultBackgroundImage:"https://cdn.popconvert.com.br/widget/img/background-popup.webp",defaultImages:[e,"https://cdn.popconvert.com.br/widget/img/background-popup.webp"],pcwGa:this.userAccountData.integrations?r(this.userAccountData.integrations.google):null}},mounted(){this.$root.$emit("publicPopupStep",this.publicPopupStepName),"popup"===this.previewedCampaignComponent&&(this.show=!0),this.captchaIsUsed&&(this.visitorPassesCaptcha=this.doCaptchaTest());this.gameStarted=!1,this.lead.url=document.URL,this.$root.$on("popupLoaded",()=>{this.popupHasLoaded||"popup"!==this.previewedCampaignComponent?this.skipPopupStep&&this.skipToPopupStep(this.skipPopupStep):this.skipToPopupStep(this.previewedComponentStep,"preview"),this.popupHasLoaded=!0}),this.$root.$on("hintFillForm",()=>{this.form.hintActive=!0,o.a.nextTick().then(()=>{setTimeout(()=>{this.form.hintActive=!1},2e3)})}),this.$root.$on("startFromForm",t=>{const e=this;t&&(e.lead.mail=t),e.$root.$emit("closeAllWidgetsBut","popup"),o.a.nextTick().then(()=>{setTimeout(()=>{e.show=!0},500)})}),this.$root.$on("closeAllWidgetsBut",t=>{"popup"!==t&&this.$root.$emit("hide-popup")}),this.$root.$on("show-popup",async(t=!1)=>{(this.campaignIsInDemoMode||await this.popupCanBeShown(t))&&(this.$root.$emit("popup-shown"),this.$root.$emit("trackHandler","Popup","evento[Popup Exibido]"),this.$root.$emit("closeAllWidgetsBut","popup"),this.campaignIsInDemoMode||this.$root.$emit("toLocalStg","popupLaunched",1),await o.a.nextTick(),this.show=!0)}),this.$root.$on("winnerAnimation",(t=3900)=>{const e=this;e.gameResult=1,e.isMobileDevice||e.winnerAnimation(),e.winnerPrize=!0,setTimeout(()=>{this.popupStep=3},t)}),this.$root.$on("loseGame",()=>{this.gameStarted=!0,this.gameResult=0}),this.$root.$on("hide-popup",()=>{this.show=!1}),this.$root.$on("close-popup",()=>{Object(a.a)(this.widgetData)||(3===this.popupStep&&this.prizeForWinner?this.closePopupToShowCouponBar():this.closePopuptoTryLater())}),1===this.widgetData.config.game_id&&this.$root.$emit("popupLoaded"),this.$emit("componentMounted","popup")},methods:{getBaseComputedProperty(t){return this["base_"+t]},closePopuptoTryLater(){this.$root.$emit("trackHandler","Popup","clique[Fechou Popup]"),this.$root.$emit("hide-popup"),this.$root.$emit("checkTriggers","launchInviteBar")},closePopupToShowCouponBar(){this.$root.$emit("trackHandler","Popup","clique[Fechou Popup após ganhar prêmio]"),this.$root.$emit("hide-popup"),this.$root.$emit("checkTriggers","launchCouponBar")},async skipToPopupStep(t,e="default"){if(this.popupStep=1,await Object(a.o)(25),t>=2){2!==t&&"preview"!==e||(this.$root.$emit("prepareGameToStep",2),this.popupStep=2);const i="preview"===e?this.getPreviewDataForPopupStep(2):this.localStorageObj.lead;Object.assign(this.lead,i),"preview"===e&&this.startFromForm()}if(await Object(a.o)(25),t>=3){3!==t&&"preview"!==e||(this.$root.$emit("winnerAnimation",0),this.$root.$emit("prepareGameToStep",3),this.popupStep=3);const i="preview"===e?this.getPreviewDataForPopupStep(3):this.localStorageObj.prizeForWinner;this.setPrizeForWinner(i)}},getPreviewDataForPopupStep(t){let e=null;return 2===t?e={name:"John Doe",mail:"john_doe@gmail.com",gender:"male",phone:"555-2368",url:"https://example.com/",gdpr_checkboxes:[!0,!0]}:3===t&&(e={success:"OK",data:this.widgetData.config.rewards.find(t=>t.active)||{coupon:"41WV3GFK2SYR",text:"10% OFF!"},message:"OK"}),e},setPrizeForWinner(t){this.$root.$emit("winnerPrize",t),this.prizeForWinner=t},async doCaptchaTest(){const{VueReCaptcha:t}=await i.e("chunk-5b4243a6").then(i.t.bind(null,"760d",7));o.a.use(t,{siteKey:this.userAccountData.captcha_token}),await this.$recaptchaLoaded(),this.visitorCaptchaToken=await this.$recaptcha("popup");return(await axios.get(this.appEndPoint+"/api/campaign/captcha",{headers:{Accept:"application/json","Access-Control-Allow-Headers":"*","Access-Control-Allow-Origin":"*",Authorization:o.a.localStorage.get("sQdih4UMDGd9"),"cache-control":"no-cache","pop-referer":String(location)},params:{token:this.visitorCaptchaToken}})).data.result},changeName(){this.form.nameCheck=Boolean(this.lead.name.match(/[a-zA-Z]{1,44}/)),this.form.showFormError=!1},changeMail(){this.lead.mail=this.lead.mail.trim(),this.form.mailCheck=Boolean(this.lead.mail.match(/^\w+([-+.']\w+)*@\w+([-+.]\w+)*\.\w+([-+.]\w+)*$/)),this.form.showFormError=!1},changePhone(){this.lead.phone=this.lead.phone.replaceAll(/\D/g,""),this.form.phoneCheck=Boolean(this.lead.phone.match(/^\d+/)),this.form.showFormError=!1},changeGender(){this.form.genderCheck=Boolean(this.lead.gender),this.form.showFormError=!1},changeGdprCheckbox(){this.lead.gdpr_checkboxes=[this.gdprForm.gdrpCheckbox1,this.gdprForm.gdrpCheckbox2]},startFromForm(){this.changeMail();const t=[this.form.mailCheck];this.popupFormHasOptinNameTrigger&&(this.changeName(),t.push(this.form.nameCheck)),this.popupFormHasOptinPhoneTrigger&&(this.changePhone(),t.push(this.form.phoneCheck)),this.popupFormHasOptinGenderTrigger&&(this.changeGender(),t.push(this.form.genderCheck)),t.every(t=>t)&&(this.form.isLoading=!0,this.lead.source=6,this.$root.$emit("trackHandler","Popup","clique[Continuar com E-mail]"),this.createLead())},sendLeadToIntegrationPlatforms(){const t={integration:this.responsysIntegration,lead:this.lead,reward:this.prizeForWinner,campaignId:this.userAccountData.campaign,url:document.URL};this.responsysIntegration&&function({integration:t,lead:e,reward:i,campaignId:o,url:a}){const r=[];try{for(const p of t.customFields){if(!p.customName)continue;let t;if("coupon"===p.name)t=i;else if("url"===p.name)t=a;else if("campaignId"===p.name)t=o;else{if(!n[p.name])continue;t=e[n[p.name]]}r.push([p.customName,t])}for(const{name:e,value:i}of t.fixedFields)r.push([e,i]);const p=document.createElement("div");p.innerHTML=t.html;for(const t of p.querySelectorAll("input"))r.push([t.name,t.value]);fetch(t.url+"?"+r.map(t=>t.join("=")).join("&"),{headers:{"Content-Type":"text/plain;charset=UTF-8"}})}catch(t){console.error("Error in Responsys integration with Popconvert.")}}(t)},async createLead(){if(window._edrone&&(_edrone.action_type="subscribe",this.lead.name&&(_edrone.first_name=this.lead.name.match(/\S+/)[0]),_edrone.email=this.lead.mail,_edrone.customer_tags="Popconvert","function"==typeof _edrone.init&&_edrone.init(),setTimeout(()=>{1!==_edrone.send_status&&"function"==typeof _edrone.init&&_edrone.init()},2e3)),this.lead.name.length>0&&(this.form.nameInputisDisabled=!0),this.campaignIsInDemoMode)return this.setPrizeForWinner({success:"OK",data:{coupon:"41WV3GFK2SYR",text:"10% OFF!"},message:"OK"}),void(this.popupStep=1===this.widgetData.config.game_id?3:2);if(Object(a.i)()){const t={success:"OK",data:{coupon:"41WV3GFK2SYR",text:"10% de Desconto!",description:"Disponível somente para certos produtos."},message:"OK"};this.setPrizeForWinner(t),this.$root.$emit("trackHandler","popup","evento[Lead Convertido]"),this.$root.$emit("toLocalStg","lastSessionDate",Date.now()),this.$root.$emit("toLocalStg","prizeForWinner",this.prizeForWinner),this.$root.$emit("toLocalStg","lead",this.lead),this.popupStep=1===this.widgetData.config.game_id?3:2}const t=new FormData;t.append("lead_name",this.lead.name?this.lead.name:this.lead.mail),t.append("lead_email",this.lead.mail),t.append("lead_url",document.URL),t.append("lead_source",this.lead.source),t.append("lead_campaign",this.userAccountData.campaign),t.append("lead_picture",this.lead.picture),t.append("lead_birthday",this.lead.birthday?this.lead.birthday:""),t.append("lead_gender",this.lead.gender?this.lead.gender:""),t.append("lead_profile",this.lead.profile?this.lead.profile:""),t.append("lead_city",this.lead.city?this.lead.city:""),t.append("lead_state",this.lead.state?this.lead.state:""),t.append("lead_country",this.lead.country?this.lead.country:""),t.append("lead_phone",this.lead.phone?this.lead.phone:""),t.append("lead_gdpr_checkboxes",this.lead.gdpr_checkboxes),this.captchaIsUsed&&t.append("captcha_token",this.visitorCaptchaToken);try{const e=await fetch(this.appEndPoint+"/api/campaign/join",{method:"POST",headers:new Headers({"Access-Control-Allow-Headers":"*","Access-Control-Allow-Origin":"*",Accept:"application/json",Authorization:Object(a.i)()?Object({NODE_ENV:"production",VUE_APP_CDN_ENV:"",VUE_APP_HOSTNAME_QR_CAMPAIGNS_HOSTING:"qr-campaigns.popconvert.com",VUE_APP_END_POINT:"https://app.popconvert.com",VUE_APP_VERSION:"1.7.24",BASE_URL:"https://cdn.popconvert.com.br/widget/dist/"}).VUE_APP_KEY:o.a.localStorage.get("sQdih4UMDGd9"),"cache-control":"no-cache"}),body:t}),i=await e.json();switch(i.message){case"OK":this.pcwGa&&this.pcwGa.gtag("submit_lead_data",{component:"popup",campaignId:this.userAccountData.campaign,action:"submit-form-successfully"}),this.setPrizeForWinner(i),this.$root.$emit("toLocalStg","popupLaunched",1),this.$root.$emit("trackHandler","Popup","evento[Lead Convertido]"),this.$root.$emit("toLocalStg","lastSessionDate",Date.now()),this.$root.$emit("toLocalStg","prizeForWinner",this.prizeForWinner),this.popupStep=1===this.widgetData.config.game_id?3:2;const t=this.lead;i.data&&i.data.lead&&(t.id=i.data.lead.id),this.$root.$emit("toLocalStg","lead",t);break;case"not-found":this.$root.$emit("trackHandler","Popup","erro[createLead-NaoEncontrado]"),this.handleErrorsOnForm(this.widgetData.popup.general_error_500,this.widgetData.popup.general_error_500);break;case"quota-reached":this.$root.$emit("trackHandler","Popup","erro[createLead-LimiteAtingido]"),this.handleErrorsOnForm(this.widgetData.popup.limit_joins_reached_error,this.widgetData.popup.limit_joins_reached_error);break;case"invalid-email":this.form.mailCheck=!1;break;case"duplicated-lead":this.$root.$emit("trackHandler","Popup","erro[createLead-Duplicado]"),this.$root.$emit("toLocalStg","lastSessionDate",Date.now()),this.form.nameInputisDisabled=!1,this.handleErrorsOnForm(this.widgetData.popup.limit_already_joined_error,this.widgetData.popup.limit_already_joined_error);break;case"The given data was invalid.":this.$root.$emit("trackHandler","Popup","erro[createLead-Invalido]"),this.handleErrorsOnForm(this.widgetData.popup.general_field_error,this.widgetData.popup.general_field_error);break;default:this.$root.$emit("trackHandler","Popup","erro[createLead-Geral]"),this.handleErrorsOnForm(this.widgetData.popup.general_error,this.widgetData.popup.general_error)}this.form.isLoading=!1,this.sendLeadToIntegrationPlatforms()}catch(t){console.error(t),this.form.infoMessage=this.widgetData.popup.general_error,this.form.showFormError=!0,this.form.isLoading=!1}},handleErrorsOnForm(t,e){this.$root.$emit("trackHandler","Popup","erro[formulario-preenchimento]",t),this.form.infoMessage=t,this.form.showFormError=!0,this.form.isLoading=!1},winnerAnimation(){o.a.nextTick().then(()=>{let t=window.innerWidth,e=window.innerHeight;if(!1 in window)return;const i=document.getElementById("winner-canvas");if(null==i)return;const o=i.getContext("2d"),a=[],n=["DodgerBlue","OliveDrab","Gold","Pink","SlateBlue","LightBlue","Gold","Violet","PaleGreen","SteelBlue","SandyBrown","Chocolate","Crimson"];function r(){var i,a;this.x=Math.random()*t,this.y=Math.random()*e-e,this.r=(i=11,a=33,Math.floor(Math.random()*(a-i+1)+i)),this.d=150*Math.random()+11,this.color=n[Math.floor(Math.random()*n.length)],this.tilt=Math.floor(33*Math.random())-11,this.tiltAngleIncremental=.07*Math.random()+.05,this.tiltAngle=0,this.draw=()=>(o.beginPath(),o.lineWidth=this.r/2,o.strokeStyle=this.color,o.moveTo(this.x+this.tilt+this.r/3,this.y),o.lineTo(this.x+this.tilt,this.y+this.tilt+this.r/5),o.stroke())}window.addEventListener("resize",()=>{t=window.innerWidth,e=window.innerHeight,i.width=window.innerWidth,i.height=window.innerHeight},!1);for(let t=0;t<150;t++)a.push(new r);i.width=t,i.height=e,function i(){const n=[];requestAnimationFrame(i),o.clearRect(0,0,t,window.innerHeight);for(let t=0;t<150;t++)n.push(a[t].draw());let r={};for(let i=0;i<150;i++)r=a[i],r.tiltAngle+=r.tiltAngleIncremental,r.y+=(Math.cos(r.d)+3+r.r/2)/2,r.tilt=15*Math.sin(r.tiltAngle-i/3),r.y<=e&&0,(r.x>t+30||r.x<-30||r.y>e)&&(r.x=Math.random()*t,r.y=-30,r.tilt=Math.floor(10*Math.random())-20);return n}()})},async popupCanBeShown(t=!1){return this.captchaIsUsed&&!await this.visitorPassesCaptcha?(console.log("🔴PCW: Captcha test was not passed."),!1):!(this.visibleWidgets.length>0&&!this.visibleWidgets.includes("popup"))&&(!(!t&&(0!==this.localStorageObj.popupLaunched||this.show))||(console.log("🔴PCW: Popup already launched in this session"),!1))},fixElementHeight(t,e){if(!t)return;const i=t.getBoundingClientRect().height;i>0&&(e.height=i+"px")}},watch:{publicPopupStepName(){this.$root.$emit("publicPopupStep",this.publicPopupStepName),"reward"===this.publicPopupStepName&&this.$root.$emit("reward-won",{code:this.prizeForWinner.data.coupon,name:this.prizeForWinner.data.text,description:this.prizeForWinner.data.description})},show(t){t&&this.$root.$emit("campaignViewed");const e=document.body;this.isMobileDevice&&(e.style=!0===t?" overflow: hidden;position: absolute;width: 100%;height: 100%;":"position: initial;height: 100%;width: 100%;")}},computed:{publicPopupStepName(){let t;return t=this.isRewardStep?"reward":1===this.popupStep?"informative"===this.widgetData.config.type?"content":"optin-form":2===this.popupStep?"game":"",t},isRewardStep(){return Boolean(this.winnerPrize||3===this.popupStep)},useWinnerAnimation(){return this.popupStep>1&&!this.isMobileDevice},popupHasFormOptinTrigger(){return this.isMobileDevice?this.widgetData.triggers.popup_show_mobile_form_optin:this.widgetData.triggers.popup_show_desktop_form_optin},popupFormHasOptinNameTrigger(){return this.isMobileDevice?this.widgetData.triggers.popup_form_mobile_optin_name:this.widgetData.triggers.popup_form_desktop_optin_name},popupFormHasOptinPhoneTrigger(){return this.isMobileDevice?this.widgetData.triggers.popup_form_mobile_optin_phone:this.widgetData.triggers.popup_form_desktop_optin_phone},popupFormHasOptinGenderTrigger(){return this.isMobileDevice?this.widgetData.triggers.popup_form_mobile_optin_gender:this.widgetData.triggers.popup_form_desktop_optin_gender},gdprConditionIsSatisfied(){return!this.widgetData.popup.require_gdpr_consent||this.gdprForm.gdrpCheckbox1&&this.gdprForm.gdrpCheckbox2},responsysIntegration(){return this.userAccountData.integrations.responsys},captchaIsUsed(){return this.userAccountData.captcha},popupContentStyle:()=>({height:"100% !important",flexDirection:"column"}),popupTextContentStyle:()=>({height:"100% !important",flexDirection:"column",justifyContent:"center !important"}),popupTitleStyle(){return{color:this.widgetData.popup.text_color_1+"!important",minHeight:"1em",marginBottom:"5px"}},gameImageStyle:()=>({height:"4rem"}),gameImageWrapperStyle(){return{textAlign:"center",position:"absolute",top:"0%",zIndex:"1",backgroundColor:this.widgetData.popup.theme_color,border:"4px solid "+this.widgetData.popup.theme_color,borderRadius:"0 0 25px 25px"}},formContentStyle:()=>({zIndex:"1",padding:"12px 6px 2px 6px",flexGrow:"0",flexShrink:"0"}),stylePopup(){const t={display:"flex",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",width:"90%",height:"85vh",borderRadius:this.widgetData.popup.elements_border_radius+"px!important"};return this.isRewardStep?this.widgetData.couponRewardWidget.style.useBackgroundImage?t.backgroundImage="url("+this.backgroundImageUrl+")":t.backgroundColor=this.backgroundColor:Object.assign(t,{backgroundColor:this.backgroundColor,backgroundImage:"url("+this.backgroundImageUrl+")"}),this.isMobileDevice&&(Object.assign(t,{margin:"0 auto",height:"80vh"}),this.vtexDayCampaignHasLoaded&&this.fixElementHeight(document.querySelector("[pcwPopup]"),t)),t},backgroundColor(){return this.isRewardStep?this.widgetData.couponRewardWidget.style.backgroundColor:this.widgetData.popup.background_color},backgroundImageUrl(){const t=this.widgetData.popup.background_image,e=this.widgetData.popup.background_image_mobile;return this.isMobileDevice&&e&&e!==this.defaultBackgroundImage?e:t},popupWrapperClass:()=>["block","popup-height","p-lg","px-3","pt-3","sm:px-8","sm:pt-8"],popupWrapperStyle(){const t={defaultOne:{alignItems:"center",justifyContent:"center",flexDirection:"column"},mobileAccess:{alignItems:"end",justifyContent:"end",flexDirection:"column-reverse"}},e={display:"flex!important",height:"80vh",paddingTop:"16px"};if(this.isMobileDevice&&Object.assign(e,t[this.popupLayout]),this.isMobileDevice&&(Object.assign(e,{minHeight:"60vh !important"}),this.vtexDayCampaignHasLoaded&&this.fixElementHeight(document.querySelector("[popupWrapper]"),e)),Object.assign(e,{padding:"0 18px"}),3===this.popupStep){const t={padding:"0 !important",width:"75% !important",margin:"0 auto !important",height:"100% !important"},e={margin:"0px -1rem !important",transform:"scale(.9)",marginTop:"-2rem !important",height:"100% !important",paddingLeft:"0px !important",width:"90vw !important",marginLeft:"auto !important",marginRight:"auto !important"};return this.isMobileDevice?e:t}return e},submitButtonStyle(){return{height:"2.5rem","line-height":"2.5rem","border-radius":this.widgetData.popup.elements_border_radius+"px!important",background:this.widgetData.popup.theme_color+"!important",color:this.widgetData.popup.theme_contrast+"!important"}},stylePopupInnerForm(){const t={mobile:{overflow:"visible",zIndex:9999,alignItems:"center",display:"flex!important",justifyContent:"center!important",height:"100% !important"},desktop:{overflow:"visible",zIndex:9999,transform:(()=>{if(!this.isMobileDevice&&this.previewedScalingFactor)return"scale(.9)"})(),height:"100% !important"}};return this.isMobileDevice?t.mobile:t.desktop},styleSpinnerWrapper(){const t={defaultOne:{display:"relative!important",top:"auto",left:"-35vw",bottom:"0vh"},mobileAccess:{display:"relative!important",bottom:"-2vh",top:"auto",left:"-30vw",marginTop:"calc(-20vh)"}};return this.vtexDayCampaignHasLoaded&&Object.assign(t.mobileAccess,{top:"-62%",bottom:"0",marginTop:"0"}),this.isMobileDevice?t[this.popupLayout]:""},popupLayout(){if(this.isMobileDevice){if(1===this.widgetData.popup.layout)return"defaultOne";if(2===this.widgetData.popup.layout)return"mobileAccess"}return"defaultOne"},userChoseAGameImage(){return this.widgetData.popup.game_image_url&&this.widgetData.popup.game_image_url!==this.defaultGameImage},userChoseABackgroundImage(){return this.backgroundImageUrl&&!this.defaultImages.includes(this.backgroundImageUrl)},scalingFactor(){return this.previewedScalingFactor?this.previewedScalingFactor:!this.isMobileDevice&&window.innerHeight<=641?.8:1},vtexDayCampaignHasLoaded(){return this.popupHasLoaded&&this.isMobileDevice&&this.widgetData&&this.widgetData.config&&this.widgetData.config.game_config&&"spin"===this.widgetData.config.game_config.gameName&&this.userAccountData&&3376==this.userAccountData.campaign}}}},ac0d:function(t,e,i){(e=t.exports=i("2350")(!1)).i(i("4c36"),""),e.push([t.i,"",""])},bb80:function(t,e,i){"use strict";i("be5f")},be5f:function(t,e,i){var o=i("ac0d");o.__esModule&&(o=o.default),"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);(0,i("499e").default)("63c75070",o,!0,{sourceMap:!1,shadowMode:!1})},ff5d:function(t,e,i){"use strict";i.r(e);var o={components:{ScratchCardPopup:()=>Promise.all([i.e("chunk-febb16ba"),i.e("chunk-bc7e576e")]).then(i.bind(null,"49ca")),ImagePopup:()=>Promise.all([i.e("chunk-febb16ba"),i.e("chunk-ab4dbbae"),i.e("chunk-b159a324")]).then(i.bind(null,"2843")),SlotsPopup:()=>Promise.all([i.e("chunk-febb16ba"),i.e("chunk-ab4dbbae"),i.e("chunk-61b0527d")]).then(i.bind(null,"6318")),SpinPopup:()=>Promise.all([i.e("chunk-ab4dbbae"),i.e("chunk-f213be5c")]).then(i.bind(null,"8644")),PickAGiftPopup:()=>Promise.all([i.e("chunk-febb16ba"),i.e("chunk-ab4dbbae"),i.e("chunk-9fce5c2a")]).then(i.bind(null,"d59e")),XplodItPopup:()=>Promise.all([i.e("chunk-febb16ba"),i.e("chunk-ab4dbbae"),i.e("chunk-74af4d6c")]).then(i.bind(null,"3ff5")),CountdownPopup:()=>Promise.all([i.e("chunk-febb16ba"),i.e("chunk-ab4dbbae"),i.e("chunk-25a14a76")]).then(i.bind(null,"a14d")),InformativePopup:()=>i.e("chunk-d57a0d0c").then(i.bind(null,"c91a")),CornerPopup:()=>Promise.all([i.e("chunk-febb16ba"),i.e("chunk-ab4dbbae"),i.e("chunk-e21c7c76")]).then(i.bind(null,"0283")),ExamplePopup:()=>Promise.all([i.e("chunk-febb16ba"),i.e("chunk-0c44960b")]).then(i.bind(null,"f798"))},props:[...i("80d6").c.props],data(){return{popupName:this.getPopupName()}},methods:{componentMounted(t){this.$emit("componentMounted",t)},getPopupName(){let t;const{game_config:e,game_id:i}=this.widgetData.config;return t="informative"===this.widgetData.config.type?"InformativePopup":"corner-popup"===e.gameName?"CornerPopup":"countdown"===e.gameName?"CountdownPopup":"popup-no-game"===e.gameName?"ImagePopup":2===i?"SlotsPopup":3===i?"SpinPopup":4===i||7===i?"PickAGiftPopup":5===i?"XplodItPopup":8===i?"ScratchCardPopup":"ImagePopup",t}}},a=(i("bb80"),i("2877")),n=Object(a.a)(o,(function(){var t=this.$createElement;return(this._self._c||t)(this.popupName,this._b({tag:"component",on:{componentMounted:this.componentMounted}},"component",Object.assign({},this.$props,this.$attrs),!1))}),[],!1,null,"0b427816",null);e.default=n.exports}}]);